generated new packages
diff --git a/generated/googleapis_beta/CHANGELOG.md b/generated/googleapis_beta/CHANGELOG.md index 1329c35..6cfbb21 100644 --- a/generated/googleapis_beta/CHANGELOG.md +++ b/generated/googleapis_beta/CHANGELOG.md
@@ -1,3 +1,19 @@ +## 0.48.0 + + * [api-new] accesscontextmanager:v1beta + * [api-new] alertcenter:v1beta1 + * [api-new] cloudasset:v1beta1 + * [api-new] cloudscheduler:v1beta1 + * [api-new] containeranalysis:v1beta1 + * [api-new] file:v1beta1 + * [api-new] firebasehosting:v1beta1 + * [api-new] replicapool:v1beta1 + * [api-new] servicenetworking:v1beta + * [api-removed] replicapool:v1beta2 + * [api-removed] replicapoolupdater:v1beta1 + * [api-removed] speech:v1beta1 + * [api-removed] sqladmin:v1beta3 + ## 0.47.0+1 * Regenerate package with widened constraint for `package:http`
diff --git a/generated/googleapis_beta/README.md b/generated/googleapis_beta/README.md index 412941d..8eb07b6 100644 --- a/generated/googleapis_beta/README.md +++ b/generated/googleapis_beta/README.md
@@ -68,27 +68,39 @@ The following is a list of APIs that are currently available inside this package. +####  Access Context Manager API - accesscontextmanager v1beta + +An API for setting attribute based access control to requests to GCP services. + +Official API documentation: https://cloud.google.com/access-context-manager/docs/reference/rest/ + ####  Ad Exchange Buyer API II - adexchangebuyer2 v2beta1 -Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals. +Accesses the latest features for managing Authorized Buyers accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals. -Official API documentation: https://developers.google.com/ad-exchange/buyer-rest/reference/rest/ +Official API documentation: https://developers.google.com/authorized-buyers/apis/reference/rest/ + +####  G Suite Alert Center API - alertcenter v1beta1 + +Manages alerts on issues affecting your domain. + +Official API documentation: https://developers.google.com/admin-sdk/alertcenter/ ####  App Engine Admin API - appengine v1beta -The App Engine Admin API enables developers to provision and manage their App Engine applications. +Provisions and manages developers' App Engine applications. Official API documentation: https://cloud.google.com/appengine/docs/admin-api/ ####  App Engine Admin API - appengine v1beta4 -The App Engine Admin API enables developers to provision and manage their App Engine applications. +Provisions and manages developers' App Engine applications. Official API documentation: https://cloud.google.com/appengine/docs/admin-api/ ####  App Engine Admin API - appengine v1beta5 -The App Engine Admin API enables developers to provision and manage their App Engine applications. +Provisions and manages developers' App Engine applications. Official API documentation: https://cloud.google.com/appengine/docs/admin-api/ @@ -99,6 +111,12 @@ Official API documentation: https://cloud.google.com/binary-authorization/ +####  Cloud Asset API - cloudasset v1beta1 + +The cloud asset API manages the history and inventory of cloud resources. + +Official API documentation: https://console.cloud.google.com/apis/api/cloudasset.googleapis.com/overview + ####  Stackdriver Error Reporting API - clouderrorreporting v1beta1 Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors. @@ -108,16 +126,28 @@ ####  Cloud Resource Manager API - cloudresourcemanager v1beta1 -The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata. +Creates, reads, and updates metadata for Google Cloud Platform resource containers. Official API documentation: https://cloud.google.com/resource-manager -####  Cloud Tasks API - cloudtasks v2beta2 +####  Cloud Scheduler API - cloudscheduler v1beta1 + +Creates and manages jobs run on a regular recurring schedule. + +Official API documentation: https://cloud.google.com/scheduler/ + +####  Cloud Tasks API - cloudtasks v2beta3 Manages the execution of large numbers of distributed requests. Official API documentation: https://cloud.google.com/tasks/ +####  Container Analysis API - containeranalysis v1beta1 + +An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts. + +Official API documentation: https://cloud.google.com/container-analysis/api/reference/rest/ + ####  Dataflow API - dataflow v1b3 Manages Google Cloud Dataflow projects on Google Cloud Platform. @@ -126,7 +156,7 @@ ####  Dialogflow API - dialogflow v2beta1 -An end-to-end development suite for conversational interfaces (e.g., chatbots, voice-powered apps and devices). +Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices). Official API documentation: https://cloud.google.com/dialogflow-enterprise/ @@ -136,21 +166,27 @@ Official API documentation: https://developers.google.com/cloud-dns -####  Cloud Identity-Aware Proxy API - iap v1beta1 +####  Cloud Filestore API - file v1beta1 -Controls access to cloud applications running on Google Cloud Platform. +The Cloud Filestore API is used for creating and managing cloud file servers. -Official API documentation: https://cloud.google.com/iap +Official API documentation: https://cloud.google.com/filestore/ + +####  Firebase Hosting API - firebasehosting v1beta1 + +The Firebase Hosting REST API enables programmatic and customizable deployments to your Firebase-hosted sites. Use this REST API to deploy new or updated hosting configurations and content files. + +Official API documentation: https://firebase.google.com/docs/hosting/ ####  Cloud Natural Language API - language v1beta1 -Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations. +Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers. Official API documentation: https://cloud.google.com/natural-language/ ####  Cloud Natural Language API - language v1beta2 -Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations. +Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers. Official API documentation: https://cloud.google.com/natural-language/ @@ -164,13 +200,13 @@ Manages OS login configuration for Google account users. -Official API documentation: https://cloud.google.com/compute/docs/oslogin/rest/ +Official API documentation: https://cloud.google.com/compute/docs/oslogin/ ####  Cloud OS Login API - oslogin v1beta Manages OS login configuration for Google account users. -Official API documentation: https://cloud.google.com/compute/docs/oslogin/rest/ +Official API documentation: https://cloud.google.com/compute/docs/oslogin/ ####  Proximity Beacon API - proximitybeacon v1beta1 @@ -185,17 +221,11 @@ Official API documentation: https://cloud.google.com/pubsub/docs -####  Google Cloud Memorystore for Redis API - redis v1beta1 +####  Replica Pool API - replicapool v1beta1 -The Google Cloud Memorystore for Redis API is used for creating and managing Redis instances on the Google Cloud Platform. +The Replica Pool API allows users to declaratively provision and manage groups of Google Compute Engine instances based on a common template. -Official API documentation: https://cloud.google.com/memorystore/docs/redis/ - -####  Google Compute Engine Instance Group Updater API - replicapoolupdater v1beta1 - -[Deprecated. Please use compute.instanceGroupManagers.update method. replicapoolupdater API will be disabled after December 30th, 2016] Updates groups of Compute Engine instances. - -Official API documentation: https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service +Official API documentation: https://developers.google.com/compute/docs/replica-pool/ ####  Cloud Runtime Configuration API - runtimeconfig v1beta1 @@ -203,21 +233,15 @@ Official API documentation: https://cloud.google.com/deployment-manager/runtime-configurator/ -####  Cloud Speech API - speech v1beta1 +####  Service Networking API - servicenetworking v1beta -Converts audio to text by applying powerful neural network models. +Provides automatic management of network configurations necessary for certain services. -Official API documentation: https://cloud.google.com/speech-to-text/docs/quickstart-protocol - -####  Cloud SQL Admin API - sqladmin v1beta3 - -Cloud SQL provides the Cloud SQL Admin API, a REST API for administering your instances programmatically. - -Official API documentation: https://cloud.google.com/sql/docs/reference/latest +Official API documentation: https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started ####  Cloud SQL Admin API - sqladmin v1beta4 -Cloud SQL provides the Cloud SQL Admin API, a REST API for administering your instances programmatically. +Creates and manages Cloud SQL instances, which provide fully managed MySQL or PostgreSQL databases. Official API documentation: https://cloud.google.com/sql/docs/reference/latest @@ -235,7 +259,7 @@ ####  Web Security Scanner API - websecurityscanner v1alpha -Web Security Scanner API (under development). +Scans your Compute and App Engine apps for common web vulnerabilities. Official API documentation: https://cloud.google.com/security-scanner/
diff --git a/generated/googleapis_beta/lib/accesscontextmanager/v1beta.dart b/generated/googleapis_beta/lib/accesscontextmanager/v1beta.dart new file mode 100644 index 0000000..d09f9f5 --- /dev/null +++ b/generated/googleapis_beta/lib/accesscontextmanager/v1beta.dart
@@ -0,0 +1,1844 @@ +// This is a generated file (see the discoveryapis_generator project). + +// ignore_for_file: unnecessary_cast + +library googleapis_beta.accesscontextmanager.v1beta; + +import 'dart:core' as core; +import 'dart:async' as async; +import 'dart:convert' as convert; + +import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; +import 'package:http/http.dart' as http; + +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' + show ApiRequestError, DetailedApiRequestError; + +const core.String USER_AGENT = 'dart-api-client accesscontextmanager/v1beta'; + +/// An API for setting attribute based access control to requests to GCP +/// services. +class AccesscontextmanagerApi { + /// View and manage your data across Google Cloud Platform services + static const CloudPlatformScope = + "https://www.googleapis.com/auth/cloud-platform"; + + final commons.ApiRequester _requester; + + AccessPoliciesResourceApi get accessPolicies => + new AccessPoliciesResourceApi(_requester); + OperationsResourceApi get operations => new OperationsResourceApi(_requester); + + AccesscontextmanagerApi(http.Client client, + {core.String rootUrl: "https://accesscontextmanager.googleapis.com/", + core.String servicePath: ""}) + : _requester = + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); +} + +class AccessPoliciesResourceApi { + final commons.ApiRequester _requester; + + AccessPoliciesAccessLevelsResourceApi get accessLevels => + new AccessPoliciesAccessLevelsResourceApi(_requester); + AccessPoliciesServicePerimetersResourceApi get servicePerimeters => + new AccessPoliciesServicePerimetersResourceApi(_requester); + + AccessPoliciesResourceApi(commons.ApiRequester client) : _requester = client; + + /// Create an `AccessPolicy`. Fails if this organization already has a + /// `AccessPolicy`. The longrunning Operation will have a successful status + /// once the `AccessPolicy` has propagated to long-lasting storage. + /// Syntactic and basic semantic errors will be returned in `metadata` as a + /// BadRequest proto. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [$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(AccessPolicy request, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/accessPolicies'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// Delete an AccessPolicy by resource + /// name. The longrunning Operation will have a successful status once the + /// AccessPolicy + /// has been removed from long-lasting storage. + /// + /// Request parameters: + /// + /// [name] - Required. Resource name for the access policy to delete. + /// + /// Format `accessPolicies/{policy_id}` + /// Value must have pattern "^accessPolicies/[^/]+$". + /// + /// [$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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// Get an AccessPolicy by name. + /// + /// Request parameters: + /// + /// [name] - Required. Resource name for the access policy to get. + /// + /// Format `accessPolicies/{policy_id}` + /// Value must have pattern "^accessPolicies/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [AccessPolicy]. + /// + /// 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<AccessPolicy> get(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new AccessPolicy.fromJson(data)); + } + + /// List all AccessPolicies under a + /// container. + /// + /// Request parameters: + /// + /// [parent] - Required. Resource name for the container to list AccessPolicy + /// instances + /// from. + /// + /// Format: + /// `organizations/{org_id}` + /// + /// [pageToken] - Next page token for the next batch of AccessPolicy + /// instances. Defaults to + /// the first page of results. + /// + /// [pageSize] - Number of AccessPolicy instances to include in the list. + /// Default 100. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListAccessPoliciesResponse]. + /// + /// 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<ListAccessPoliciesResponse> list( + {core.String parent, + core.String pageToken, + core.int pageSize, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent != null) { + _queryParams["parent"] = [parent]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/accessPolicies'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new ListAccessPoliciesResponse.fromJson(data)); + } + + /// Update an AccessPolicy. The + /// longrunning Operation from this RPC will have a successful status once the + /// changes to the AccessPolicy have propagated + /// to long-lasting storage. Syntactic and basic semantic errors will be + /// returned in `metadata` as a BadRequest proto. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - Output only. Resource name of the `AccessPolicy`. Format: + /// `accessPolicies/{policy_id}` + /// Value must have pattern "^accessPolicies/[^/]+$". + /// + /// [updateMask] - Required. Mask to control which fields get updated. Must be + /// non-empty. + /// + /// [$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(AccessPolicy request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +class AccessPoliciesAccessLevelsResourceApi { + final commons.ApiRequester _requester; + + AccessPoliciesAccessLevelsResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Create an Access Level. The longrunning + /// operation from this RPC will have a successful status once the Access + /// Level has + /// propagated to long-lasting storage. Access Levels containing + /// errors will result in an error response for the first error encountered. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. Resource name for the access policy which owns this + /// Access + /// Level. + /// + /// Format: `accessPolicies/{policy_id}` + /// Value must have pattern "^accessPolicies/[^/]+$". + /// + /// [$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(AccessLevel request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/accessLevels'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// Delete an Access Level by resource + /// name. The longrunning operation from this RPC will have a successful + /// status + /// once the Access Level has been removed + /// from long-lasting storage. + /// + /// Request parameters: + /// + /// [name] - Required. Resource name for the Access Level. + /// + /// Format: + /// `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + /// Value must have pattern "^accessPolicies/[^/]+/accessLevels/[^/]+$". + /// + /// [$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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// Get an Access Level by resource + /// name. + /// + /// Request parameters: + /// + /// [name] - Required. Resource name for the Access Level. + /// + /// Format: + /// `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + /// Value must have pattern "^accessPolicies/[^/]+/accessLevels/[^/]+$". + /// + /// [accessLevelFormat] - Whether to return `BasicLevels` in the Cloud Common + /// Expression + /// Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where + /// Access Levels + /// are returned as `BasicLevels` or `CustomLevels` based on how they were + /// created. If set to CEL, all Access Levels are returned as + /// `CustomLevels`. In the CEL case, `BasicLevels` are translated to + /// equivalent + /// `CustomLevels`. + /// Possible string values are: + /// - "LEVEL_FORMAT_UNSPECIFIED" : A LEVEL_FORMAT_UNSPECIFIED. + /// - "AS_DEFINED" : A AS_DEFINED. + /// - "CEL" : A CEL. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [AccessLevel]. + /// + /// 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<AccessLevel> get(core.String name, + {core.String accessLevelFormat, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (accessLevelFormat != null) { + _queryParams["accessLevelFormat"] = [accessLevelFormat]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new AccessLevel.fromJson(data)); + } + + /// List all Access Levels for an access + /// policy. + /// + /// Request parameters: + /// + /// [parent] - Required. Resource name for the access policy to list Access + /// Levels from. + /// + /// Format: + /// `accessPolicies/{policy_id}` + /// Value must have pattern "^accessPolicies/[^/]+$". + /// + /// [pageToken] - Next page token for the next batch of Access Level + /// instances. + /// Defaults to the first page of results. + /// + /// [pageSize] - Number of Access Levels to include in + /// the list. Default 100. + /// + /// [accessLevelFormat] - Whether to return `BasicLevels` in the Cloud Common + /// Expression language, as + /// `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + /// `AccessLevels` in the format they were defined. + /// Possible string values are: + /// - "LEVEL_FORMAT_UNSPECIFIED" : A LEVEL_FORMAT_UNSPECIFIED. + /// - "AS_DEFINED" : A AS_DEFINED. + /// - "CEL" : A CEL. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListAccessLevelsResponse]. + /// + /// 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<ListAccessLevelsResponse> list(core.String parent, + {core.String pageToken, + core.int pageSize, + core.String accessLevelFormat, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if (accessLevelFormat != null) { + _queryParams["accessLevelFormat"] = [accessLevelFormat]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/accessLevels'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new ListAccessLevelsResponse.fromJson(data)); + } + + /// Update an Access Level. The longrunning + /// operation from this RPC will have a successful status once the changes to + /// the Access Level have propagated + /// to long-lasting storage. Access Levels containing + /// errors will result in an error response for the first error encountered. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - Required. Resource name for the Access Level. The `short_name` + /// component + /// must begin with a letter and only include alphanumeric and '_'. Format: + /// `accessPolicies/{policy_id}/accessLevels/{short_name}` + /// Value must have pattern "^accessPolicies/[^/]+/accessLevels/[^/]+$". + /// + /// [updateMask] - Required. Mask to control which fields get updated. Must + /// be non-empty. + /// + /// [$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(AccessLevel request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +class AccessPoliciesServicePerimetersResourceApi { + final commons.ApiRequester _requester; + + AccessPoliciesServicePerimetersResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Create an Service Perimeter. The + /// longrunning operation from this RPC will have a successful status once the + /// Service Perimeter has + /// propagated to long-lasting storage. Service Perimeters containing + /// errors will result in an error response for the first error encountered. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. Resource name for the access policy which owns this + /// Service + /// Perimeter. + /// + /// Format: `accessPolicies/{policy_id}` + /// Value must have pattern "^accessPolicies/[^/]+$". + /// + /// [$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(ServicePerimeter request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/servicePerimeters'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// Delete an Service Perimeter by resource + /// name. The longrunning operation from this RPC will have a successful + /// status + /// once the Service Perimeter has been + /// removed from long-lasting storage. + /// + /// Request parameters: + /// + /// [name] - Required. Resource name for the Service Perimeter. + /// + /// Format: + /// `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` + /// Value must have pattern "^accessPolicies/[^/]+/servicePerimeters/[^/]+$". + /// + /// [$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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// Get an Service Perimeter by resource + /// name. + /// + /// Request parameters: + /// + /// [name] - Required. Resource name for the Service Perimeter. + /// + /// Format: + /// `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + /// Value must have pattern "^accessPolicies/[^/]+/servicePerimeters/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ServicePerimeter]. + /// + /// 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<ServicePerimeter> get(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ServicePerimeter.fromJson(data)); + } + + /// List all Service Perimeters for an + /// access policy. + /// + /// Request parameters: + /// + /// [parent] - Required. Resource name for the access policy to list Service + /// Perimeters from. + /// + /// Format: + /// `accessPolicies/{policy_id}` + /// Value must have pattern "^accessPolicies/[^/]+$". + /// + /// [pageToken] - Next page token for the next batch of Service Perimeter + /// instances. + /// Defaults to the first page of results. + /// + /// [pageSize] - Number of Service Perimeters to include + /// in the list. Default 100. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListServicePerimetersResponse]. + /// + /// 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<ListServicePerimetersResponse> list(core.String parent, + {core.String pageToken, core.int pageSize, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/servicePerimeters'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new ListServicePerimetersResponse.fromJson(data)); + } + + /// Update an Service Perimeter. The + /// longrunning operation from this RPC will have a successful status once the + /// changes to the Service Perimeter have + /// propagated to long-lasting storage. Service Perimeter containing + /// errors will result in an error response for the first error encountered. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - Required. Resource name for the ServicePerimeter. The + /// `short_name` + /// component must begin with a letter and only include alphanumeric and '_'. + /// Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}` + /// Value must have pattern "^accessPolicies/[^/]+/servicePerimeters/[^/]+$". + /// + /// [updateMask] - Required. Mask to control which fields get updated. Must be + /// non-empty. + /// + /// [$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(ServicePerimeter request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +class OperationsResourceApi { + final commons.ApiRequester _requester; + + OperationsResourceApi(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 "^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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +/// An `AccessLevel` is a label that can be applied to requests to GCP services, +/// along with a list of requirements necessary for the label to be applied. +class AccessLevel { + /// A `BasicLevel` composed of `Conditions`. + BasicLevel basic; + + /// Output only. Time the `AccessLevel` was created in UTC. + core.String createTime; + + /// Description of the `AccessLevel` and its use. Does not affect behavior. + core.String description; + + /// Required. Resource name for the Access Level. The `short_name` component + /// must begin with a letter and only include alphanumeric and '_'. Format: + /// `accessPolicies/{policy_id}/accessLevels/{short_name}` + core.String name; + + /// Human readable title. Must be unique within the Policy. + core.String title; + + /// Output only. Time the `AccessLevel` was updated in UTC. + core.String updateTime; + + AccessLevel(); + + AccessLevel.fromJson(core.Map _json) { + if (_json.containsKey("basic")) { + basic = new BasicLevel.fromJson(_json["basic"]); + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("title")) { + title = _json["title"]; + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (basic != null) { + _json["basic"] = (basic).toJson(); + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (description != null) { + _json["description"] = description; + } + if (name != null) { + _json["name"] = name; + } + if (title != null) { + _json["title"] = title; + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + return _json; + } +} + +/// `AccessPolicy` is a container for `AccessLevels` (which define the necessary +/// attributes to use GCP services) and `ServicePerimeters` (which define +/// regions +/// of services able to freely pass data within a perimeter). An access policy +/// is +/// globally visible within an organization, and the restrictions it specifies +/// apply to all projects within an organization. +class AccessPolicy { + /// Output only. Time the `AccessPolicy` was created in UTC. + core.String createTime; + + /// Output only. Resource name of the `AccessPolicy`. Format: + /// `accessPolicies/{policy_id}` + core.String name; + + /// Required. The parent of this `AccessPolicy` in the Cloud Resource + /// Hierarchy. Currently immutable once created. Format: + /// `organizations/{organization_id}` + core.String parent; + + /// Required. Human readable title. Does not affect behavior. + core.String title; + + /// Output only. Time the `AccessPolicy` was updated in UTC. + core.String updateTime; + + AccessPolicy(); + + AccessPolicy.fromJson(core.Map _json) { + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("parent")) { + parent = _json["parent"]; + } + if (_json.containsKey("title")) { + title = _json["title"]; + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (createTime != null) { + _json["createTime"] = createTime; + } + if (name != null) { + _json["name"] = name; + } + if (parent != null) { + _json["parent"] = parent; + } + if (title != null) { + _json["title"] = title; + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + return _json; + } +} + +/// `BasicLevel` is an `AccessLevel` using a set of recommended features. +class BasicLevel { + /// How the `conditions` list should be combined to determine if a request is + /// granted this `AccessLevel`. If AND is used, each `Condition` in + /// `conditions` must be satisfied for the `AccessLevel` to be applied. If OR + /// is used, at least one `Condition` in `conditions` must be satisfied for + /// the + /// `AccessLevel` to be applied. Default behavior is AND. + /// Possible string values are: + /// - "AND" : All `Conditions` must be true for the `BasicLevel` to be true. + /// - "OR" : If at least one `Condition` is true, then the `BasicLevel` is + /// true. + core.String combiningFunction; + + /// Required. A list of requirements for the `AccessLevel` to be granted. + core.List<Condition> conditions; + + BasicLevel(); + + BasicLevel.fromJson(core.Map _json) { + if (_json.containsKey("combiningFunction")) { + combiningFunction = _json["combiningFunction"]; + } + if (_json.containsKey("conditions")) { + conditions = (_json["conditions"] as core.List) + .map<Condition>((value) => new Condition.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (combiningFunction != null) { + _json["combiningFunction"] = combiningFunction; + } + if (conditions != null) { + _json["conditions"] = + conditions.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A condition necessary for an `AccessLevel` to be granted. The Condition is +/// an +/// AND over its fields. So a Condition is true if: 1) the request IP is from +/// one +/// of the listed subnetworks AND 2) the originating device complies with the +/// listed device policy AND 3) all listed access levels are granted AND 4) the +/// request was sent at a time allowed by the DateTimeRestriction. +class Condition { + /// Device specific restrictions, all restrictions must hold for the + /// Condition to be true. If not specified, all devices are allowed. + DevicePolicy devicePolicy; + + /// CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for + /// a CIDR IP address block, the specified IP address portion must be properly + /// truncated (i.e. all the host bits must be zero) or the input is considered + /// malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is + /// not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas + /// "2001:db8::1/32" is not. The originating IP of a request must be in one of + /// the listed subnets in order for this Condition to be true. If empty, all + /// IP + /// addresses are allowed. + core.List<core.String> ipSubnetworks; + + /// The signed-in user originating the request must be a part of one of the + /// provided members. + /// Syntax: + /// `user:{emailid}` + /// `group:{emailid}` + /// `serviceAccount:{emailid}` + /// If not specified, a request may come from any user (logged in/not logged + /// in, not present in any groups, etc.). + core.List<core.String> members; + + /// Whether to negate the Condition. If true, the Condition becomes a NAND + /// over + /// its non-empty fields, each field must be false for the Condition overall + /// to + /// be satisfied. Defaults to false. + core.bool negate; + + /// A list of other access levels defined in the same `Policy`, referenced by + /// resource name. Referencing an `AccessLevel` which does not exist is an + /// error. All access levels listed must be granted for the Condition + /// to be true. Example: + /// "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` + core.List<core.String> requiredAccessLevels; + + Condition(); + + Condition.fromJson(core.Map _json) { + if (_json.containsKey("devicePolicy")) { + devicePolicy = new DevicePolicy.fromJson(_json["devicePolicy"]); + } + if (_json.containsKey("ipSubnetworks")) { + ipSubnetworks = (_json["ipSubnetworks"] as core.List).cast<core.String>(); + } + if (_json.containsKey("members")) { + members = (_json["members"] as core.List).cast<core.String>(); + } + if (_json.containsKey("negate")) { + negate = _json["negate"]; + } + if (_json.containsKey("requiredAccessLevels")) { + requiredAccessLevels = + (_json["requiredAccessLevels"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (devicePolicy != null) { + _json["devicePolicy"] = (devicePolicy).toJson(); + } + if (ipSubnetworks != null) { + _json["ipSubnetworks"] = ipSubnetworks; + } + if (members != null) { + _json["members"] = members; + } + if (negate != null) { + _json["negate"] = negate; + } + if (requiredAccessLevels != null) { + _json["requiredAccessLevels"] = requiredAccessLevels; + } + return _json; + } +} + +/// `DevicePolicy` specifies device specific restrictions necessary to acquire a +/// given access level. A `DevicePolicy` specifies requirements for requests +/// from +/// devices to be granted access levels, it does not do any enforcement on the +/// device. `DevicePolicy` acts as an AND over all specified fields, and each +/// repeated field is an OR over its elements. Any unset fields are ignored. For +/// example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : +/// DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be +/// true for requests originating from encrypted Linux desktops and encrypted +/// Windows desktops. +class DevicePolicy { + /// Allowed device management levels, an empty list allows all management + /// levels. + core.List<core.String> allowedDeviceManagementLevels; + + /// Allowed encryptions statuses, an empty list allows all statuses. + core.List<core.String> allowedEncryptionStatuses; + + /// Allowed OS versions, an empty list allows all types and all versions. + core.List<OsConstraint> osConstraints; + + /// Whether or not screenlock is required for the DevicePolicy to be true. + /// Defaults to `false`. + core.bool requireScreenlock; + + DevicePolicy(); + + DevicePolicy.fromJson(core.Map _json) { + if (_json.containsKey("allowedDeviceManagementLevels")) { + allowedDeviceManagementLevels = + (_json["allowedDeviceManagementLevels"] as core.List) + .cast<core.String>(); + } + if (_json.containsKey("allowedEncryptionStatuses")) { + allowedEncryptionStatuses = + (_json["allowedEncryptionStatuses"] as core.List).cast<core.String>(); + } + if (_json.containsKey("osConstraints")) { + osConstraints = (_json["osConstraints"] as core.List) + .map<OsConstraint>((value) => new OsConstraint.fromJson(value)) + .toList(); + } + if (_json.containsKey("requireScreenlock")) { + requireScreenlock = _json["requireScreenlock"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (allowedDeviceManagementLevels != null) { + _json["allowedDeviceManagementLevels"] = allowedDeviceManagementLevels; + } + if (allowedEncryptionStatuses != null) { + _json["allowedEncryptionStatuses"] = allowedEncryptionStatuses; + } + if (osConstraints != null) { + _json["osConstraints"] = + osConstraints.map((value) => (value).toJson()).toList(); + } + if (requireScreenlock != null) { + _json["requireScreenlock"] = requireScreenlock; + } + return _json; + } +} + +/// A response to `ListAccessLevelsRequest`. +class ListAccessLevelsResponse { + /// List of the Access Level instances. + core.List<AccessLevel> accessLevels; + + /// The pagination token to retrieve the next page of results. If the value is + /// empty, no further results remain. + core.String nextPageToken; + + ListAccessLevelsResponse(); + + ListAccessLevelsResponse.fromJson(core.Map _json) { + if (_json.containsKey("accessLevels")) { + accessLevels = (_json["accessLevels"] as core.List) + .map<AccessLevel>((value) => new AccessLevel.fromJson(value)) + .toList(); + } + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (accessLevels != null) { + _json["accessLevels"] = + accessLevels.map((value) => (value).toJson()).toList(); + } + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + return _json; + } +} + +/// A response to `ListAccessPoliciesRequest`. +class ListAccessPoliciesResponse { + /// List of the AccessPolicy instances. + core.List<AccessPolicy> accessPolicies; + + /// The pagination token to retrieve the next page of results. If the value is + /// empty, no further results remain. + core.String nextPageToken; + + ListAccessPoliciesResponse(); + + ListAccessPoliciesResponse.fromJson(core.Map _json) { + if (_json.containsKey("accessPolicies")) { + accessPolicies = (_json["accessPolicies"] as core.List) + .map<AccessPolicy>((value) => new AccessPolicy.fromJson(value)) + .toList(); + } + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (accessPolicies != null) { + _json["accessPolicies"] = + accessPolicies.map((value) => (value).toJson()).toList(); + } + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + return _json; + } +} + +/// A response to `ListServicePerimetersRequest`. +class ListServicePerimetersResponse { + /// The pagination token to retrieve the next page of results. If the value is + /// empty, no further results remain. + core.String nextPageToken; + + /// List of the Service Perimeter instances. + core.List<ServicePerimeter> servicePerimeters; + + ListServicePerimetersResponse(); + + ListServicePerimetersResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("servicePerimeters")) { + servicePerimeters = (_json["servicePerimeters"] as core.List) + .map<ServicePerimeter>( + (value) => new ServicePerimeter.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (servicePerimeters != null) { + _json["servicePerimeters"] = + servicePerimeters.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// 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 have the format of `operations/some/unique/name`. + 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(); + + Operation.fromJson(core.Map _json) { + if (_json.containsKey("done")) { + done = _json["done"]; + } + if (_json.containsKey("error")) { + error = new Status.fromJson(_json["error"]); + } + if (_json.containsKey("metadata")) { + metadata = + (_json["metadata"] as core.Map).cast<core.String, core.Object>(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("response")) { + response = + (_json["response"] as core.Map).cast<core.String, core.Object>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (done != null) { + _json["done"] = done; + } + if (error != null) { + _json["error"] = (error).toJson(); + } + if (metadata != null) { + _json["metadata"] = metadata; + } + if (name != null) { + _json["name"] = name; + } + if (response != null) { + _json["response"] = response; + } + return _json; + } +} + +/// A restriction on the OS type and version of devices making requests. +class OsConstraint { + /// The minimum allowed OS version. If not set, any version of this OS + /// satisfies the constraint. Format: `"major.minor.patch"`. + /// Examples: `"10.5.301"`, `"9.2.1"`. + core.String minimumVersion; + + /// Required. The allowed OS type. + /// Possible string values are: + /// - "OS_UNSPECIFIED" : The operating system of the device is not specified + /// or not known. + /// - "DESKTOP_MAC" : A desktop Mac operating system. + /// - "DESKTOP_WINDOWS" : A desktop Windows operating system. + /// - "DESKTOP_LINUX" : A desktop Linux operating system. + /// - "DESKTOP_CHROME_OS" : A desktop ChromeOS operating system. + /// - "ANDROID" : An Android operating system. + /// - "IOS" : An iOS operating system. + core.String osType; + + OsConstraint(); + + OsConstraint.fromJson(core.Map _json) { + if (_json.containsKey("minimumVersion")) { + minimumVersion = _json["minimumVersion"]; + } + if (_json.containsKey("osType")) { + osType = _json["osType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (minimumVersion != null) { + _json["minimumVersion"] = minimumVersion; + } + if (osType != null) { + _json["osType"] = osType; + } + return _json; + } +} + +/// `ServicePerimeter` describes a set of GCP resources which can freely import +/// and export data amongst themselves, but not export outside of the +/// `ServicePerimeter`. If a request with a source within this +/// `ServicePerimeter` +/// has a target outside of the `ServicePerimeter`, the request will be blocked. +/// Otherwise the request is allowed. There are two types of Service Perimeter - +/// Regular and Bridge. Regular Service Perimeters cannot overlap, a single GCP +/// project can only belong to a single regular Service Perimeter. Service +/// Perimeter Bridges can contain only GCP projects as members, a single GCP +/// project may belong to multiple Service Perimeter Bridges. +class ServicePerimeter { + /// Output only. Time the `ServicePerimeter` was created in UTC. + core.String createTime; + + /// Description of the `ServicePerimeter` and its use. Does not affect + /// behavior. + core.String description; + + /// Required. Resource name for the ServicePerimeter. The `short_name` + /// component must begin with a letter and only include alphanumeric and '_'. + /// Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}` + core.String name; + + /// Perimeter type indicator. A single project is + /// allowed to be a member of single regular perimeter, but multiple service + /// perimeter bridges. A project cannot be a included in a perimeter bridge + /// without being included in regular perimeter. For perimeter bridges, + /// restricted/unrestricted service lists as well as access lists must be + /// empty. + /// Possible string values are: + /// - "PERIMETER_TYPE_REGULAR" : Regular Perimeter. + /// - "PERIMETER_TYPE_BRIDGE" : Perimeter Bridge. + core.String perimeterType; + + /// Current ServicePerimeter configuration. Specifies sets of resources, + /// restricted/unrestricted services and access levels that determine + /// perimeter + /// content and boundaries. + ServicePerimeterConfig status; + + /// Human readable title. Must be unique within the Policy. + core.String title; + + /// Output only. Time the `ServicePerimeter` was updated in UTC. + core.String updateTime; + + ServicePerimeter(); + + ServicePerimeter.fromJson(core.Map _json) { + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("perimeterType")) { + perimeterType = _json["perimeterType"]; + } + if (_json.containsKey("status")) { + status = new ServicePerimeterConfig.fromJson(_json["status"]); + } + if (_json.containsKey("title")) { + title = _json["title"]; + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (createTime != null) { + _json["createTime"] = createTime; + } + if (description != null) { + _json["description"] = description; + } + if (name != null) { + _json["name"] = name; + } + if (perimeterType != null) { + _json["perimeterType"] = perimeterType; + } + if (status != null) { + _json["status"] = (status).toJson(); + } + if (title != null) { + _json["title"] = title; + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + return _json; + } +} + +/// `ServicePerimeterConfig` specifies a set of GCP resources that describe +/// specific Service Perimeter configuration. +class ServicePerimeterConfig { + /// A list of `AccessLevel` resource names that allow resources within the + /// `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed + /// must be in the same policy as this `ServicePerimeter`. Referencing a + /// nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are + /// listed, resources within the perimeter can only be accessed via GCP calls + /// with + /// request origins within the perimeter. Example: + /// `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. + /// For Service Perimeter Bridge, must be empty. + core.List<core.String> accessLevels; + + /// A list of GCP resources that are inside of the service perimeter. + /// Currently only projects are allowed. Format: `projects/{project_number}` + core.List<core.String> resources; + + /// GCP services that are subject to the Service Perimeter restrictions. May + /// contain a list of services or a single wildcard "*". For example, if + /// `storage.googleapis.com` is specified, access to the storage buckets + /// inside the perimeter must meet the perimeter's access restrictions. + /// + /// Wildcard means that unless explicitly specified by "unrestricted_services" + /// list, any service is treated as restricted. One of the fields + /// "restricted_services", "unrestricted_services" must contain a wildcard + /// "*", + /// otherwise the Service Perimeter specification is invalid. It also means + /// that both field being empty is invalid as well. "restricted_services" can + /// be empty if and only if "unrestricted_services" list contains a "*" + /// wildcard. + core.List<core.String> restrictedServices; + + /// GCP services that are not subject to the Service Perimeter restrictions. + /// May contain a list of services or a single wildcard "*". For example, if + /// `logging.googleapis.com` is unrestricted, users can access logs inside the + /// perimeter as if the perimeter doesn't exist, and it also means VMs inside + /// the perimeter + /// can access logs outside the perimeter. + /// + /// The wildcard means that unless explicitly specified by + /// "restricted_services" list, any service is treated as unrestricted. One of + /// the fields "restricted_services", "unrestricted_services" must contain a + /// wildcard "*", otherwise the Service Perimeter specification is invalid. It + /// also means that both field being empty is invalid as well. + /// "unrestricted_services" can be empty if and only if "restricted_services" + /// list contains a "*" wildcard. + core.List<core.String> unrestrictedServices; + + ServicePerimeterConfig(); + + ServicePerimeterConfig.fromJson(core.Map _json) { + if (_json.containsKey("accessLevels")) { + accessLevels = (_json["accessLevels"] as core.List).cast<core.String>(); + } + if (_json.containsKey("resources")) { + resources = (_json["resources"] as core.List).cast<core.String>(); + } + if (_json.containsKey("restrictedServices")) { + restrictedServices = + (_json["restrictedServices"] as core.List).cast<core.String>(); + } + if (_json.containsKey("unrestrictedServices")) { + unrestrictedServices = + (_json["unrestrictedServices"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (accessLevels != null) { + _json["accessLevels"] = accessLevels; + } + if (resources != null) { + _json["resources"] = resources; + } + if (restrictedServices != null) { + _json["restrictedServices"] = restrictedServices; + } + if (unrestrictedServices != null) { + _json["unrestrictedServices"] = unrestrictedServices; + } + return _json; + } +} + +/// 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). The error model is designed to be: +/// +/// - Simple to use and understand for most users +/// - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error +/// message, +/// and error details. The error code should be an enum value of +/// google.rpc.Code, but it may accept additional error codes if needed. The +/// error message should be a developer-facing English message that helps +/// developers *understand* and *resolve* the error. If a localized user-facing +/// error message is needed, put the localized message in the error details or +/// localize it in the client. The optional error details may contain arbitrary +/// information about the error. There is a predefined set of error detail types +/// in the package `google.rpc` that can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but +/// it +/// is not necessarily the actual wire format. When the `Status` message is +/// exposed in different client libraries and different wire protocols, it can +/// be +/// mapped differently. For example, it will likely be mapped to some exceptions +/// in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of +/// environments, either with or without APIs, to provide a +/// consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, +/// it may embed the `Status` in the normal response to indicate the partial +/// errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may +/// have a `Status` message for error reporting. +/// +/// - Batch operations. If a client uses batch request and batch response, the +/// `Status` message should be used directly inside batch response, one for +/// each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation +/// results in its response, the status of those operations should be +/// represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could +/// be used directly after any stripping needed for security/privacy reasons. +class Status { + /// The status code, which should be an enum value of google.rpc.Code. + core.int code; + + /// A list of messages that carry the error details. There is a common set of + /// message types for APIs to use. + /// + /// 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.List<core.Map<core.String, core.Object>> details; + + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// google.rpc.Status.details field, or localized by the client. + core.String message; + + Status(); + + Status.fromJson(core.Map _json) { + if (_json.containsKey("code")) { + code = _json["code"]; + } + if (_json.containsKey("details")) { + details = (_json["details"] as core.List) + .map<core.Map<core.String, core.Object>>( + (value) => (value as core.Map).cast<core.String, core.Object>()) + .toList(); + } + if (_json.containsKey("message")) { + message = _json["message"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (code != null) { + _json["code"] = code; + } + if (details != null) { + _json["details"] = details; + } + if (message != null) { + _json["message"] = message; + } + return _json; + } +}
diff --git a/generated/googleapis_beta/lib/adexchangebuyer2/v2beta1.dart b/generated/googleapis_beta/lib/adexchangebuyer2/v2beta1.dart index 302142d..1bbd405 100644 --- a/generated/googleapis_beta/lib/adexchangebuyer2/v2beta1.dart +++ b/generated/googleapis_beta/lib/adexchangebuyer2/v2beta1.dart
@@ -16,9 +16,9 @@ const core.String USER_AGENT = 'dart-api-client adexchangebuyer2/v2beta1'; -/// Accesses the latest features for managing Ad Exchange accounts, Real-Time -/// Bidding configurations and auction metrics, and Marketplace programmatic -/// deals. +/// Accesses the latest features for managing Authorized Buyers accounts, +/// Real-Time Bidding configurations and auction metrics, and Marketplace +/// programmatic deals. class Adexchangebuyer2Api { /// Manage your Ad Exchange buyer account configuration static const AdexchangeBuyerScope = @@ -43,6 +43,14 @@ new AccountsClientsResourceApi(_requester); AccountsCreativesResourceApi get creatives => new AccountsCreativesResourceApi(_requester); + AccountsFinalizedProposalsResourceApi get finalizedProposals => + new AccountsFinalizedProposalsResourceApi(_requester); + AccountsProductsResourceApi get products => + new AccountsProductsResourceApi(_requester); + AccountsProposalsResourceApi get proposals => + new AccountsProposalsResourceApi(_requester); + AccountsPublisherProfilesResourceApi get publisherProfiles => + new AccountsPublisherProfilesResourceApi(_requester); AccountsResourceApi(commons.ApiRequester client) : _requester = client; } @@ -174,7 +182,8 @@ /// Typically, this is the value of /// ListClientsResponse.nextPageToken /// returned from the previous call to the - /// accounts.clients.list method. + /// accounts.clients.list + /// method. /// /// [partnerClientId] - Optional unique identifier (from the standpoint of an /// Ad Exchange sponsor @@ -1336,6 +1345,984 @@ } } +class AccountsFinalizedProposalsResourceApi { + final commons.ApiRequester _requester; + + AccountsFinalizedProposalsResourceApi(commons.ApiRequester client) + : _requester = client; + + /// List finalized proposals, regardless if a proposal is being renegotiated. + /// A filter expression (PQL query) may be specified to filter the results. + /// The notes will not be returned. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [filterSyntax] - Syntax the filter is written in. Current implementation + /// defaults to PQL + /// but in the future it will be LIST_FILTER. + /// Possible string values are: + /// - "FILTER_SYNTAX_UNSPECIFIED" : A FILTER_SYNTAX_UNSPECIFIED. + /// - "PQL" : A PQL. + /// - "LIST_FILTER" : A LIST_FILTER. + /// + /// [filter] - An optional PQL filter query used to query for proposals. + /// + /// Nested repeated fields, such as proposal.deals.targetingCriterion, + /// cannot be filtered. + /// + /// [pageToken] - The page token as returned from ListProposalsResponse. + /// + /// [pageSize] - Requested page size. The server may return fewer results than + /// requested. + /// If unspecified, the server will pick an appropriate default. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListProposalsResponse]. + /// + /// 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<ListProposalsResponse> list(core.String accountId, + {core.String filterSyntax, + core.String filter, + core.String pageToken, + core.int pageSize, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (filterSyntax != null) { + _queryParams["filterSyntax"] = [filterSyntax]; + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/finalizedProposals'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListProposalsResponse.fromJson(data)); + } +} + +class AccountsProductsResourceApi { + final commons.ApiRequester _requester; + + AccountsProductsResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Gets the requested product by ID. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [productId] - The ID for the product to get the head revision for. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Product]. + /// + /// 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<Product> get(core.String accountId, core.String productId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (productId == null) { + throw new core.ArgumentError("Parameter productId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/products/' + + commons.Escaper.ecapeVariable('$productId'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Product.fromJson(data)); + } + + /// List all products visible to the buyer (optionally filtered by the + /// specified PQL query). + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [filter] - An optional PQL query used to query for products. See + /// https://developers.google.com/ad-manager/docs/pqlreference + /// for documentation about PQL and examples. + /// + /// Nested repeated fields, such as product.targetingCriterion.inclusions, + /// cannot be filtered. + /// + /// [pageToken] - The page token as returned from ListProductsResponse. + /// + /// [pageSize] - Requested page size. The server may return fewer results than + /// requested. + /// If unspecified, the server will pick an appropriate default. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListProductsResponse]. + /// + /// 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<ListProductsResponse> list(core.String accountId, + {core.String filter, + core.String pageToken, + core.int pageSize, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/products'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListProductsResponse.fromJson(data)); + } +} + +class AccountsProposalsResourceApi { + final commons.ApiRequester _requester; + + AccountsProposalsResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Mark the proposal as accepted at the given revision number. If the number + /// does not match the server's revision number an `ABORTED` error message + /// will + /// be returned. This call updates the proposal_state from `PROPOSED` to + /// `BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [proposalId] - The ID of the proposal to accept. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Proposal]. + /// + /// 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<Proposal> accept(AcceptProposalRequest request, + core.String accountId, core.String proposalId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (proposalId == null) { + throw new core.ArgumentError("Parameter proposalId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals/' + + commons.Escaper.ecapeVariable('$proposalId') + + ':accept'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Proposal.fromJson(data)); + } + + /// Create a new note and attach it to the proposal. The note is assigned + /// a unique ID by the server. + /// The proposal revision number will not increase when associated with a + /// new note. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [proposalId] - The ID of the proposal to attach the note to. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Note]. + /// + /// 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<Note> addNote( + AddNoteRequest request, core.String accountId, core.String proposalId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (proposalId == null) { + throw new core.ArgumentError("Parameter proposalId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals/' + + commons.Escaper.ecapeVariable('$proposalId') + + ':addNote'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Note.fromJson(data)); + } + + /// Cancel an ongoing negotiation on a proposal. This does not cancel or end + /// serving for the deals if the proposal has been finalized, but only cancels + /// a negotiation unilaterally. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [proposalId] - The ID of the proposal to cancel negotiation for. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Proposal]. + /// + /// 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<Proposal> cancelNegotiation(CancelNegotiationRequest request, + core.String accountId, core.String proposalId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (proposalId == null) { + throw new core.ArgumentError("Parameter proposalId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals/' + + commons.Escaper.ecapeVariable('$proposalId') + + ':cancelNegotiation'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Proposal.fromJson(data)); + } + + /// Update the given proposal to indicate that setup has been completed. + /// This method is called by the buyer when the line items have been created + /// on their end for a finalized proposal and all the required creatives + /// have been uploaded using the creatives API. This call updates the + /// `is_setup_completed` bit on the proposal and also notifies the seller. + /// The server will advance the revision number of the most recent proposal. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [proposalId] - The ID of the proposal to mark as setup completed. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Proposal]. + /// + /// 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<Proposal> completeSetup(CompleteSetupRequest request, + core.String accountId, core.String proposalId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (proposalId == null) { + throw new core.ArgumentError("Parameter proposalId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals/' + + commons.Escaper.ecapeVariable('$proposalId') + + ':completeSetup'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Proposal.fromJson(data)); + } + + /// Create the given proposal. Each created proposal and any deals it contains + /// are assigned a unique ID by the server. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Proposal]. + /// + /// 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<Proposal> create(Proposal request, core.String accountId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Proposal.fromJson(data)); + } + + /// Gets a proposal given its ID. The proposal is returned at its head + /// revision. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [proposalId] - The unique ID of the proposal + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Proposal]. + /// + /// 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<Proposal> get(core.String accountId, core.String proposalId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (proposalId == null) { + throw new core.ArgumentError("Parameter proposalId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals/' + + commons.Escaper.ecapeVariable('$proposalId'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Proposal.fromJson(data)); + } + + /// List proposals. A filter expression (PQL query) may be specified to + /// filter the results. To retrieve all finalized proposals, regardless if a + /// proposal is being renegotiated, see the FinalizedProposals resource. + /// Note that Bidder/ChildSeat relationships differ from the usual behavior. + /// A Bidder account can only see its child seats' proposals by specifying + /// the ChildSeat's accountId in the request path. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [pageToken] - The page token as returned from ListProposalsResponse. + /// + /// [pageSize] - Requested page size. The server may return fewer results than + /// requested. + /// If unspecified, the server will pick an appropriate default. + /// + /// [filterSyntax] - Syntax the filter is written in. Current implementation + /// defaults to PQL + /// but in the future it will be LIST_FILTER. + /// Possible string values are: + /// - "FILTER_SYNTAX_UNSPECIFIED" : A FILTER_SYNTAX_UNSPECIFIED. + /// - "PQL" : A PQL. + /// - "LIST_FILTER" : A LIST_FILTER. + /// + /// [filter] - An optional PQL filter query used to query for proposals. + /// + /// Nested repeated fields, such as proposal.deals.targetingCriterion, + /// cannot be filtered. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListProposalsResponse]. + /// + /// 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<ListProposalsResponse> list(core.String accountId, + {core.String pageToken, + core.int pageSize, + core.String filterSyntax, + core.String filter, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if (filterSyntax != null) { + _queryParams["filterSyntax"] = [filterSyntax]; + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListProposalsResponse.fromJson(data)); + } + + /// Update the given proposal to pause serving. + /// This method will set the + /// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all + /// deals in the proposal. + /// + /// It is a no-op to pause an already-paused proposal. + /// It is an error to call PauseProposal for a proposal that is not + /// finalized or renegotiating. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [proposalId] - The ID of the proposal to pause. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Proposal]. + /// + /// 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<Proposal> pause(PauseProposalRequest request, + core.String accountId, core.String proposalId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (proposalId == null) { + throw new core.ArgumentError("Parameter proposalId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals/' + + commons.Escaper.ecapeVariable('$proposalId') + + ':pause'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Proposal.fromJson(data)); + } + + /// Update the given proposal to resume serving. + /// This method will set the + /// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for + /// all + /// deals in the proposal. + /// + /// Note that if the `has_seller_paused` bit is also set, serving will not + /// resume until the seller also resumes. + /// + /// It is a no-op to resume an already-running proposal. + /// It is an error to call ResumeProposal for a proposal that is not + /// finalized or renegotiating. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [proposalId] - The ID of the proposal to resume. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Proposal]. + /// + /// 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<Proposal> resume(ResumeProposalRequest request, + core.String accountId, core.String proposalId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (proposalId == null) { + throw new core.ArgumentError("Parameter proposalId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals/' + + commons.Escaper.ecapeVariable('$proposalId') + + ':resume'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Proposal.fromJson(data)); + } + + /// Update the given proposal at the client known revision number. If the + /// server revision has advanced since the passed-in + /// `proposal.proposal_revision`, an `ABORTED` error message will be returned. + /// Only the buyer-modifiable fields of the proposal will be updated. + /// + /// Note that the deals in the proposal will be updated to match the passed-in + /// copy. + /// If a passed-in deal does not have a `deal_id`, the server will assign a + /// new + /// unique ID and create the deal. + /// If passed-in deal has a `deal_id`, it will be updated to match the + /// passed-in copy. + /// Any existing deals not present in the passed-in proposal will be deleted. + /// It is an error to pass in a deal with a `deal_id` not present at head. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [proposalId] - The unique ID of the proposal. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Proposal]. + /// + /// 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<Proposal> update( + Proposal request, core.String accountId, core.String proposalId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (proposalId == null) { + throw new core.ArgumentError("Parameter proposalId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/proposals/' + + commons.Escaper.ecapeVariable('$proposalId'); + + var _response = _requester.request(_url, "PUT", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Proposal.fromJson(data)); + } +} + +class AccountsPublisherProfilesResourceApi { + final commons.ApiRequester _requester; + + AccountsPublisherProfilesResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Gets the requested publisher profile by id. + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [publisherProfileId] - The id for the publisher profile to get. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [PublisherProfile]. + /// + /// 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<PublisherProfile> get( + core.String accountId, core.String publisherProfileId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (publisherProfileId == null) { + throw new core.ArgumentError("Parameter publisherProfileId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/publisherProfiles/' + + commons.Escaper.ecapeVariable('$publisherProfileId'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new PublisherProfile.fromJson(data)); + } + + /// List all publisher profiles visible to the buyer + /// + /// Request parameters: + /// + /// [accountId] - Account ID of the buyer. + /// + /// [pageToken] - The page token as return from ListPublisherProfilesResponse. + /// + /// [pageSize] - Specify the number of results to include per page. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListPublisherProfilesResponse]. + /// + /// 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<ListPublisherProfilesResponse> list(core.String accountId, + {core.String pageToken, core.int pageSize, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (accountId == null) { + throw new core.ArgumentError("Parameter accountId is required."); + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/accounts/' + + commons.Escaper.ecapeVariable('$accountId') + + '/publisherProfiles'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new ListPublisherProfilesResponse.fromJson(data)); + } +} + class BiddersResourceApi { final commons.ApiRequester _requester; @@ -1350,12 +2337,85 @@ class BiddersAccountsResourceApi { final commons.ApiRequester _requester; + BiddersAccountsCreativesResourceApi get creatives => + new BiddersAccountsCreativesResourceApi(_requester); BiddersAccountsFilterSetsResourceApi get filterSets => new BiddersAccountsFilterSetsResourceApi(_requester); BiddersAccountsResourceApi(commons.ApiRequester client) : _requester = client; } +class BiddersAccountsCreativesResourceApi { + final commons.ApiRequester _requester; + + BiddersAccountsCreativesResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Deletes a single creative. + /// + /// A creative is deactivated upon deletion and does not count against active + /// snippet quota. A deleted creative should not be used in bidding (all bids + /// with that creative will be rejected). + /// + /// Request parameters: + /// + /// [ownerName] - Name of the owner (bidder or account) of the creative to be + /// deleted. + /// For example: + /// + /// - For an account-level creative for the buyer account representing bidder + /// 123: `bidders/123/accounts/123` + /// + /// - For an account-level creative for the child seat buyer account 456 + /// whose bidder is 123: `bidders/123/accounts/456` + /// Value must have pattern "^bidders/[^/]+/accounts/[^/]+$". + /// + /// [creativeId] - The ID of the creative to delete. + /// + /// [$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 ownerName, core.String creativeId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (ownerName == null) { + throw new core.ArgumentError("Parameter ownerName is required."); + } + if (creativeId == null) { + throw new core.ArgumentError("Parameter creativeId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/' + + commons.Escaper.ecapeVariableReserved('$ownerName') + + '/creatives/' + + commons.Escaper.ecapeVariable('$creativeId'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Empty.fromJson(data)); + } +} + class BiddersAccountsFilterSetsResourceApi { final commons.ApiRequester _requester; @@ -2103,7 +3163,7 @@ /// breakdown by /// creative. /// See - /// [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + /// [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). /// /// [pageToken] - A token identifying a page of results the server should /// return. @@ -2199,7 +3259,7 @@ /// [creativeStatusId] - The ID of the creative status for which to retrieve a /// breakdown by detail. /// See - /// [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + /// [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). /// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and /// 87. /// @@ -3174,6 +4234,10 @@ /// whose bidder is 123: `bidders/123/accounts/456/filterSets/abc` /// Value must have pattern "^bidders/[^/]+/filterSets/[^/]+$". /// + /// [pageSize] - Requested page size. The server may return fewer results than + /// requested. + /// If unspecified, the server will pick an appropriate default. + /// /// [pageToken] - A token identifying a page of results the server should /// return. /// Typically, this is the value of @@ -3181,10 +4245,6 @@ /// returned from the previous call to the filteredBids.list /// method. /// - /// [pageSize] - Requested page size. The server may return fewer results than - /// requested. - /// If unspecified, the server will pick an appropriate default. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -3196,7 +4256,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListFilteredBidsResponse> list(core.String filterSetName, - {core.String pageToken, core.int pageSize, core.String $fields}) { + {core.int pageSize, core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -3207,12 +4267,12 @@ if (filterSetName == null) { throw new core.ArgumentError("Parameter filterSetName is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -3262,7 +4322,7 @@ /// breakdown by /// creative. /// See - /// [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + /// [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). /// /// [pageToken] - A token identifying a page of results the server should /// return. @@ -3357,7 +4417,7 @@ /// [creativeStatusId] - The ID of the creative status for which to retrieve a /// breakdown by detail. /// See - /// [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + /// [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). /// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and /// 87. /// @@ -3722,6 +4782,80 @@ } } +/// Request to accept a proposal. +class AcceptProposalRequest { + /// The last known client revision number of the proposal. + core.String proposalRevision; + + AcceptProposalRequest(); + + AcceptProposalRequest.fromJson(core.Map _json) { + if (_json.containsKey("proposalRevision")) { + proposalRevision = _json["proposalRevision"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (proposalRevision != null) { + _json["proposalRevision"] = proposalRevision; + } + return _json; + } +} + +/// Represents size of a single ad slot, or a creative. +class AdSize { + /// The height of the ad slot in pixels. + /// This field will be present only when size type is `PIXEL`. + core.String height; + + /// The size type of the ad slot. + /// Possible string values are: + /// - "SIZE_TYPE_UNSPECIFIED" : A placeholder for an undefined size type. + /// - "PIXEL" : Ad slot with size specified by height and width in pixels. + /// - "INTERSTITIAL" : Special size to describe an interstitial ad slot. + /// - "NATIVE" : Native (mobile) ads rendered by the publisher. + /// - "FLUID" : Fluid size (i.e., responsive size) can be resized + /// automatically with the + /// change of outside environment. + core.String sizeType; + + /// The width of the ad slot in pixels. + /// This field will be present only when size type is `PIXEL`. + core.String width; + + AdSize(); + + AdSize.fromJson(core.Map _json) { + if (_json.containsKey("height")) { + height = _json["height"]; + } + if (_json.containsKey("sizeType")) { + sizeType = _json["sizeType"]; + } + if (_json.containsKey("width")) { + width = _json["width"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (height != null) { + _json["height"] = height; + } + if (sizeType != null) { + _json["sizeType"] = sizeType; + } + if (width != null) { + _json["width"] = width; + } + return _json; + } +} + /// A request for associating a deal and a creative. class AddDealAssociationRequest { /// The association between a creative and a deal that should be added. @@ -3745,6 +4879,29 @@ } } +/// Request message for adding a note to a given proposal. +class AddNoteRequest { + /// Details of the note to add. + Note note; + + AddNoteRequest(); + + AddNoteRequest.fromJson(core.Map _json) { + if (_json.containsKey("note")) { + note = new Note.fromJson(_json["note"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (note != null) { + _json["note"] = (note).toJson(); + } + return _json; + } +} + /// @OutputOnly The app type the restriction applies to for mobile device. class AppContext { /// The app types this restriction applies to. @@ -3929,6 +5086,30 @@ } } +/// Represents a buyer of inventory. Each buyer is identified by a unique +/// Authorized Buyers account ID. +class Buyer { + /// Authorized Buyers account ID of the buyer. + core.String accountId; + + Buyer(); + + Buyer.fromJson(core.Map _json) { + if (_json.containsKey("accountId")) { + accountId = _json["accountId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (accountId != null) { + _json["accountId"] = accountId; + } + return _json; + } +} + /// The number of impressions with the specified dimension values where the /// corresponding bid request or bid response was not successful, as described /// by @@ -3936,7 +5117,7 @@ class CalloutStatusRow { /// The ID of the callout status. /// See - /// [callout-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/callout-status-codes). + /// [callout-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/callout-status-codes). core.int calloutStatusId; /// The number of impressions for which there was a bid request or bid @@ -3977,13 +5158,25 @@ } } -/// A client resource represents a client buyer—an agency, -/// a brand, or an advertiser customer of the sponsor buyer. -/// Users associated with the client buyer have restricted access to -/// the Ad Exchange Marketplace and certain other sections -/// of the Ad Exchange Buyer UI based on the role -/// granted to the client buyer. -/// All fields are required unless otherwise specified. +/// Request to cancel an ongoing negotiation. +class CancelNegotiationRequest { + CancelNegotiationRequest(); + + CancelNegotiationRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// A client resource represents a client buyer—an agency, a brand, or an +/// advertiser customer of the sponsor buyer. Users associated with the client +/// buyer have restricted access to the Marketplace and certain other sections +/// of +/// the Authorized Buyers UI based on the role granted to the client buyer. All +/// fields are required unless otherwise specified. class Client { /// The globally-unique numerical ID of the client. /// The value of this field is ignored in create and update operations. @@ -4139,9 +5332,8 @@ } /// A client user is created under a client buyer and has restricted access to -/// the Ad Exchange Marketplace and certain other sections -/// of the Ad Exchange Buyer UI based on the role -/// granted to the associated client buyer. +/// the Marketplace and certain other sections of the Authorized Buyers UI based +/// on the role granted to the associated client buyer. /// /// The only way a new client user can be created is via accepting an /// email invitation @@ -4211,9 +5403,8 @@ } } -/// An invitation for a new client user to get access to the Ad Exchange -/// Buyer UI. -/// All fields are required unless otherwise specified. +/// An invitation for a new client user to get access to the Authorized Buyers +/// UI. All fields are required unless otherwise specified. class ClientUserInvitation { /// Numerical account ID of the client buyer /// that the invited user is associated with. @@ -4259,6 +5450,51 @@ } } +/// Request message for indicating that the proposal's setup step is complete. +class CompleteSetupRequest { + CompleteSetupRequest(); + + CompleteSetupRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// Contains information on how a buyer or seller can be reached. +class ContactInformation { + /// Email address for the contact. + core.String email; + + /// The name of the contact. + core.String name; + + ContactInformation(); + + ContactInformation.fromJson(core.Map _json) { + if (_json.containsKey("email")) { + email = _json["email"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (email != null) { + _json["email"] = email; + } + if (name != null) { + _json["name"] = name; + } + return _json; + } +} + /// @OutputOnly Shows any corrections that were applied to this creative. class Correction { /// The contexts for the correction. @@ -4337,7 +5573,7 @@ /// A creative and its classification data. /// -/// Next ID: 38 +/// Next ID: 39 class Creative { /// The account that this creative belongs to. /// Can be used to filter the response of the @@ -4698,6 +5934,212 @@ } } +/// Represents creative restrictions associated to Programmatic Guaranteed/ +/// Preferred Deal in Ad Manager. +/// This doesn't apply to Private Auction and AdX Preferred Deals. +class CreativeRestrictions { + /// The format of the environment that the creatives will be displayed in. + /// Possible string values are: + /// - "CREATIVE_FORMAT_UNSPECIFIED" : A placeholder for an undefined creative + /// format. + /// - "DISPLAY" : A creative that will be displayed in environments such as a + /// browser. + /// - "VIDEO" : A video creative that will be displayed in environments such + /// as a video + /// player. + core.String creativeFormat; + core.List<CreativeSpecification> creativeSpecifications; + + /// Skippable video ads allow viewers to skip ads after 5 seconds. + /// Possible string values are: + /// - "SKIPPABLE_AD_TYPE_UNSPECIFIED" : A placeholder for an undefined + /// skippable ad type. + /// - "SKIPPABLE" : This video ad can be skipped after 5 seconds. + /// - "INSTREAM_SELECT" : This video ad can be skipped after 5 seconds, and is + /// counted as + /// engaged view after 30 seconds. The creative is hosted on + /// YouTube only, and viewcount of the YouTube video increments + /// after the engaged view. + /// - "NOT_SKIPPABLE" : This video ad is not skippable. + core.String skippableAdType; + + CreativeRestrictions(); + + CreativeRestrictions.fromJson(core.Map _json) { + if (_json.containsKey("creativeFormat")) { + creativeFormat = _json["creativeFormat"]; + } + if (_json.containsKey("creativeSpecifications")) { + creativeSpecifications = (_json["creativeSpecifications"] as core.List) + .map<CreativeSpecification>( + (value) => new CreativeSpecification.fromJson(value)) + .toList(); + } + if (_json.containsKey("skippableAdType")) { + skippableAdType = _json["skippableAdType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (creativeFormat != null) { + _json["creativeFormat"] = creativeFormat; + } + if (creativeSpecifications != null) { + _json["creativeSpecifications"] = + creativeSpecifications.map((value) => (value).toJson()).toList(); + } + if (skippableAdType != null) { + _json["skippableAdType"] = skippableAdType; + } + return _json; + } +} + +/// Specifies the size of the creative. +class CreativeSize { + /// What formats are allowed by the publisher. + /// If this repeated field is empty then all formats are allowed. + /// For example, if this field contains AllowedFormatType.AUDIO then the + /// publisher only allows an audio ad (without any video). + core.List<core.String> allowedFormats; + + /// For video creatives specifies the sizes of companion ads (if present). + /// Companion sizes may be filled in only when creative_size_type = VIDEO + core.List<Size> companionSizes; + + /// The creative size type. + /// Possible string values are: + /// - "CREATIVE_SIZE_TYPE_UNSPECIFIED" : A placeholder for an undefined + /// creative size type. + /// - "REGULAR" : The creative is a regular desktop creative. + /// - "INTERSTITIAL" : The creative is an interstitial creative. + /// - "VIDEO" : The creative is a video creative. + /// - "NATIVE" : The creative is a native (mobile) creative. + core.String creativeSizeType; + + /// The native template for this creative. It will have a value only if + /// creative_size_type = CreativeSizeType.NATIVE. + /// @OutputOnly + /// Possible string values are: + /// - "UNKNOWN_NATIVE_TEMPLATE" : A placeholder for an undefined native + /// template. + /// - "NATIVE_CONTENT_AD" : The creative is linked to native content ad. + /// - "NATIVE_APP_INSTALL_AD" : The creative is linked to native app install + /// ad. + /// - "NATIVE_VIDEO_CONTENT_AD" : The creative is linked to native video + /// content ad. + /// - "NATIVE_VIDEO_APP_INSTALL_AD" : The creative is linked to native video + /// app install ad. + core.String nativeTemplate; + + /// For regular or video creative size type, specifies the size + /// of the creative + Size size; + + /// The type of skippable ad for this creative. It will have a value only if + /// creative_size_type = CreativeSizeType.VIDEO. + /// Possible string values are: + /// - "SKIPPABLE_AD_TYPE_UNSPECIFIED" : A placeholder for an undefined + /// skippable ad type. + /// - "GENERIC" : This video ad can be skipped after 5 seconds. + /// - "INSTREAM_SELECT" : This video ad can be skipped after 5 seconds, and + /// count as + /// engaged view after 30 seconds. The creative is hosted on + /// YouTube only, and viewcount of the YouTube video increments + /// after the engaged view. + /// - "NOT_SKIPPABLE" : This video ad is not skippable. + core.String skippableAdType; + + CreativeSize(); + + CreativeSize.fromJson(core.Map _json) { + if (_json.containsKey("allowedFormats")) { + allowedFormats = + (_json["allowedFormats"] as core.List).cast<core.String>(); + } + if (_json.containsKey("companionSizes")) { + companionSizes = (_json["companionSizes"] as core.List) + .map<Size>((value) => new Size.fromJson(value)) + .toList(); + } + if (_json.containsKey("creativeSizeType")) { + creativeSizeType = _json["creativeSizeType"]; + } + if (_json.containsKey("nativeTemplate")) { + nativeTemplate = _json["nativeTemplate"]; + } + if (_json.containsKey("size")) { + size = new Size.fromJson(_json["size"]); + } + if (_json.containsKey("skippableAdType")) { + skippableAdType = _json["skippableAdType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (allowedFormats != null) { + _json["allowedFormats"] = allowedFormats; + } + if (companionSizes != null) { + _json["companionSizes"] = + companionSizes.map((value) => (value).toJson()).toList(); + } + if (creativeSizeType != null) { + _json["creativeSizeType"] = creativeSizeType; + } + if (nativeTemplate != null) { + _json["nativeTemplate"] = nativeTemplate; + } + if (size != null) { + _json["size"] = (size).toJson(); + } + if (skippableAdType != null) { + _json["skippableAdType"] = skippableAdType; + } + return _json; + } +} + +/// Represents information for a creative that is associated with a Programmatic +/// Guaranteed/Preferred Deal in Ad Manager. +class CreativeSpecification { + /// Companion sizes may be filled in only when this is a video creative. + core.List<AdSize> creativeCompanionSizes; + + /// The size of the creative. + AdSize creativeSize; + + CreativeSpecification(); + + CreativeSpecification.fromJson(core.Map _json) { + if (_json.containsKey("creativeCompanionSizes")) { + creativeCompanionSizes = (_json["creativeCompanionSizes"] as core.List) + .map<AdSize>((value) => new AdSize.fromJson(value)) + .toList(); + } + if (_json.containsKey("creativeSize")) { + creativeSize = new AdSize.fromJson(_json["creativeSize"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (creativeCompanionSizes != null) { + _json["creativeCompanionSizes"] = + creativeCompanionSizes.map((value) => (value).toJson()).toList(); + } + if (creativeSize != null) { + _json["creativeSize"] = (creativeSize).toJson(); + } + return _json; + } +} + /// The number of bids with the specified dimension values that did not win the /// auction (either were filtered pre-auction or lost the auction), as described /// by the specified creative status. @@ -4707,7 +6149,7 @@ /// The ID of the creative status. /// See - /// [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + /// [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). core.int creativeStatusId; /// The values of all dimensions associated with metric values in this row. @@ -4743,21 +6185,62 @@ } } -/// Represents a whole calendar date, e.g. date of birth. The time of day and -/// time zone are either specified elsewhere or are not significant. The date -/// is relative to the Proleptic Gregorian Calendar. The day may be 0 to -/// represent a year and month where the day is not significant, e.g. credit -/// card -/// expiration date. The year may be 0 to represent a month and day independent -/// of year, e.g. anniversary date. Related types are google.type.TimeOfDay -/// and `google.protobuf.Timestamp`. +/// Generic targeting used for targeting dimensions that contains a list of +/// included and excluded numeric IDs. +class CriteriaTargeting { + /// A list of numeric IDs to be excluded. + core.List<core.String> excludedCriteriaIds; + + /// A list of numeric IDs to be included. + core.List<core.String> targetedCriteriaIds; + + CriteriaTargeting(); + + CriteriaTargeting.fromJson(core.Map _json) { + if (_json.containsKey("excludedCriteriaIds")) { + excludedCriteriaIds = + (_json["excludedCriteriaIds"] as core.List).cast<core.String>(); + } + if (_json.containsKey("targetedCriteriaIds")) { + targetedCriteriaIds = + (_json["targetedCriteriaIds"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (excludedCriteriaIds != null) { + _json["excludedCriteriaIds"] = excludedCriteriaIds; + } + if (targetedCriteriaIds != null) { + _json["targetedCriteriaIds"] = targetedCriteriaIds; + } + return _json; + } +} + +/// Represents a whole or partial calendar date, e.g. a birthday. The time of +/// day +/// and time zone are either specified elsewhere or are not significant. The +/// date +/// is relative to the Proleptic Gregorian Calendar. This can represent: +/// +/// * A full date, with non-zero year, month and day values +/// * A month and day value, with a zero year, e.g. an anniversary +/// * A year on its own, with zero month and day values +/// * A year and month value, with a zero day, e.g. a credit card expiration +/// date +/// +/// Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. class Date { /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - /// if specifying a year/month where the day is not significant. + /// if specifying a year by itself or a year and month where the day is not + /// significant. core.int day; - /// Month of year. Must be from 1 to 12, or 0 if specifying a date without a - /// month. + /// Month of year. Must be from 1 to 12, or 0 if specifying a year without a + /// month and day. core.int month; /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without @@ -4794,6 +6277,672 @@ } } +/// Daypart targeting message that specifies if the ad can be shown +/// only during certain parts of a day/week. +class DayPart { + /// The day of the week to target. If unspecified, applicable to all days. + /// Possible string values are: + /// - "DAY_OF_WEEK_UNSPECIFIED" : A placeholder for when the day of the week + /// is not specified. + /// - "MONDAY" : Monday + /// - "TUESDAY" : Tuesday + /// - "WEDNESDAY" : Wednesday + /// - "THURSDAY" : Thursday + /// - "FRIDAY" : Friday + /// - "SATURDAY" : Saturday + /// - "SUNDAY" : Sunday + core.String dayOfWeek; + + /// The ending time of the day for the ad to show (minute level granularity). + /// The end time is exclusive. + /// This field is not available for filtering in PQL queries. + TimeOfDay endTime; + + /// The starting time of day for the ad to show (minute level granularity). + /// The start time is inclusive. + /// This field is not available for filtering in PQL queries. + TimeOfDay startTime; + + DayPart(); + + DayPart.fromJson(core.Map _json) { + if (_json.containsKey("dayOfWeek")) { + dayOfWeek = _json["dayOfWeek"]; + } + if (_json.containsKey("endTime")) { + endTime = new TimeOfDay.fromJson(_json["endTime"]); + } + if (_json.containsKey("startTime")) { + startTime = new TimeOfDay.fromJson(_json["startTime"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (dayOfWeek != null) { + _json["dayOfWeek"] = dayOfWeek; + } + if (endTime != null) { + _json["endTime"] = (endTime).toJson(); + } + if (startTime != null) { + _json["startTime"] = (startTime).toJson(); + } + return _json; + } +} + +/// Specifies the day part targeting criteria. +class DayPartTargeting { + /// A list of day part targeting criterion. + core.List<DayPart> dayParts; + + /// The timezone to use for interpreting the day part targeting. + /// Possible string values are: + /// - "TIME_ZONE_SOURCE_UNSPECIFIED" : A placeholder for an undefined time + /// zone source. + /// - "PUBLISHER" : Use publisher's time zone setting. + /// - "USER" : Use the user's time zone setting. + core.String timeZoneType; + + DayPartTargeting(); + + DayPartTargeting.fromJson(core.Map _json) { + if (_json.containsKey("dayParts")) { + dayParts = (_json["dayParts"] as core.List) + .map<DayPart>((value) => new DayPart.fromJson(value)) + .toList(); + } + if (_json.containsKey("timeZoneType")) { + timeZoneType = _json["timeZoneType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (dayParts != null) { + _json["dayParts"] = dayParts.map((value) => (value).toJson()).toList(); + } + if (timeZoneType != null) { + _json["timeZoneType"] = timeZoneType; + } + return _json; + } +} + +/// A deal represents a segment of inventory for displaying ads on. +/// A proposal can contain multiple deals. A deal contains the terms and +/// targeting information that +/// is used for serving. +class Deal { + /// Proposed flight end time of the deal. + /// This will generally be stored in a granularity of a second. + /// A value is not required for Private Auction deals or Preferred Deals. + core.String availableEndTime; + + /// Optional proposed flight start time of the deal. + /// This will generally be stored in the granularity of one second since deal + /// serving + /// starts at seconds boundary. Any time specified with more granularity + /// (e.g., in milliseconds) will be truncated towards the start of time in + /// seconds. + core.String availableStartTime; + + /// Buyer private data (hidden from seller). + PrivateData buyerPrivateData; + + /// The product ID from which this deal was created. + /// + /// Note: This field may be set only when creating the resource. Modifying + /// this field while updating the resource will result in an error. + core.String createProductId; + + /// Optional revision number of the product that the deal was created from. + /// If present on create, and the server `product_revision` has advanced + /// sinced + /// the passed-in `create_product_revision`, an `ABORTED` error will be + /// returned. + /// + /// Note: This field may be set only when creating the resource. Modifying + /// this field while updating the resource will result in an error. + core.String createProductRevision; + + /// The time of the deal creation. + /// @OutputOnly + core.String createTime; + + /// Specifies the creative pre-approval policy. + /// @OutputOnly + /// Possible string values are: + /// - "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED" : A placeholder for an + /// undefined creative pre-approval policy. + /// - "SELLER_PRE_APPROVAL_REQUIRED" : The seller needs to approve each + /// creative before it can serve. + /// - "SELLER_PRE_APPROVAL_NOT_REQUIRED" : The seller does not need to approve + /// each creative before it can serve. + core.String creativePreApprovalPolicy; + + /// Restricitions about the creatives associated with the deal (i.e., size) + /// This is available for Programmatic Guaranteed/Preferred Deals in Ad + /// Manager. + /// @OutputOnly + CreativeRestrictions creativeRestrictions; + + /// Specifies whether the creative is safeFrame compatible. + /// @OutputOnly + /// Possible string values are: + /// - "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED" : A placeholder for an + /// undefined creative safe-frame compatibility. + /// - "COMPATIBLE" : The creatives need to be compatible with the safe frame + /// option. + /// - "INCOMPATIBLE" : The creatives can be incompatible with the safe frame + /// option. + core.String creativeSafeFrameCompatibility; + + /// A unique deal ID for the deal (server-assigned). + /// @OutputOnly + core.String dealId; + + /// Metadata about the serving status of this deal. + /// @OutputOnly + DealServingMetadata dealServingMetadata; + + /// The negotiable terms of the deal. + DealTerms dealTerms; + + /// The set of fields around delivery control that are interesting for a buyer + /// to see but are non-negotiable. These are set by the publisher. + DeliveryControl deliveryControl; + + /// Description for the deal terms. + core.String description; + + /// The name of the deal. + core.String displayName; + + /// The external deal ID assigned to this deal once the deal is finalized. + /// This is the deal ID that shows up in serving/reporting etc. + /// @OutputOnly + core.String externalDealId; + + /// True, if the buyside inventory setup is complete for this deal. + /// @OutputOnly + core.bool isSetupComplete; + + /// Specifies the creative source for programmatic deals. PUBLISHER means + /// creative is provided by seller and ADVERTISER means creative is + /// provided by buyer. + /// @OutputOnly + /// Possible string values are: + /// - "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED" : A placeholder for an + /// undefined programmatic creative source. + /// - "ADVERTISER" : The advertiser provides the creatives. + /// - "PUBLISHER" : The publisher provides the creatives to be served. + core.String programmaticCreativeSource; + + /// ID of the proposal that this deal is part of. + /// @OutputOnly + core.String proposalId; + + /// Seller contact information for the deal. + /// @OutputOnly + core.List<ContactInformation> sellerContacts; + + /// The syndication product associated with the deal. + /// + /// Note: This field may be set only when creating the resource. Modifying + /// this field while updating the resource will result in an error. + /// Possible string values are: + /// - "SYNDICATION_PRODUCT_UNSPECIFIED" : A placeholder for an undefined + /// syndication product. + /// - "CONTENT" : This typically represents a web page. + /// - "MOBILE" : This represents a mobile property. + /// - "VIDEO" : This represents video ad formats. + /// - "GAMES" : This represents ads shown within games. + core.String syndicationProduct; + + /// Specifies the subset of inventory targeted by the deal. + /// @OutputOnly + MarketplaceTargeting targeting; + + /// The shared targeting visible to buyers and sellers. Each shared + /// targeting entity is AND'd together. + core.List<TargetingCriteria> targetingCriterion; + + /// The time when the deal was last updated. + /// @OutputOnly + core.String updateTime; + + /// The web property code for the seller copied over from the product. + core.String webPropertyCode; + + Deal(); + + Deal.fromJson(core.Map _json) { + if (_json.containsKey("availableEndTime")) { + availableEndTime = _json["availableEndTime"]; + } + if (_json.containsKey("availableStartTime")) { + availableStartTime = _json["availableStartTime"]; + } + if (_json.containsKey("buyerPrivateData")) { + buyerPrivateData = new PrivateData.fromJson(_json["buyerPrivateData"]); + } + if (_json.containsKey("createProductId")) { + createProductId = _json["createProductId"]; + } + if (_json.containsKey("createProductRevision")) { + createProductRevision = _json["createProductRevision"]; + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("creativePreApprovalPolicy")) { + creativePreApprovalPolicy = _json["creativePreApprovalPolicy"]; + } + if (_json.containsKey("creativeRestrictions")) { + creativeRestrictions = + new CreativeRestrictions.fromJson(_json["creativeRestrictions"]); + } + if (_json.containsKey("creativeSafeFrameCompatibility")) { + creativeSafeFrameCompatibility = _json["creativeSafeFrameCompatibility"]; + } + if (_json.containsKey("dealId")) { + dealId = _json["dealId"]; + } + if (_json.containsKey("dealServingMetadata")) { + dealServingMetadata = + new DealServingMetadata.fromJson(_json["dealServingMetadata"]); + } + if (_json.containsKey("dealTerms")) { + dealTerms = new DealTerms.fromJson(_json["dealTerms"]); + } + if (_json.containsKey("deliveryControl")) { + deliveryControl = new DeliveryControl.fromJson(_json["deliveryControl"]); + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("externalDealId")) { + externalDealId = _json["externalDealId"]; + } + if (_json.containsKey("isSetupComplete")) { + isSetupComplete = _json["isSetupComplete"]; + } + if (_json.containsKey("programmaticCreativeSource")) { + programmaticCreativeSource = _json["programmaticCreativeSource"]; + } + if (_json.containsKey("proposalId")) { + proposalId = _json["proposalId"]; + } + if (_json.containsKey("sellerContacts")) { + sellerContacts = (_json["sellerContacts"] as core.List) + .map<ContactInformation>( + (value) => new ContactInformation.fromJson(value)) + .toList(); + } + if (_json.containsKey("syndicationProduct")) { + syndicationProduct = _json["syndicationProduct"]; + } + if (_json.containsKey("targeting")) { + targeting = new MarketplaceTargeting.fromJson(_json["targeting"]); + } + if (_json.containsKey("targetingCriterion")) { + targetingCriterion = (_json["targetingCriterion"] as core.List) + .map<TargetingCriteria>( + (value) => new TargetingCriteria.fromJson(value)) + .toList(); + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + if (_json.containsKey("webPropertyCode")) { + webPropertyCode = _json["webPropertyCode"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (availableEndTime != null) { + _json["availableEndTime"] = availableEndTime; + } + if (availableStartTime != null) { + _json["availableStartTime"] = availableStartTime; + } + if (buyerPrivateData != null) { + _json["buyerPrivateData"] = (buyerPrivateData).toJson(); + } + if (createProductId != null) { + _json["createProductId"] = createProductId; + } + if (createProductRevision != null) { + _json["createProductRevision"] = createProductRevision; + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (creativePreApprovalPolicy != null) { + _json["creativePreApprovalPolicy"] = creativePreApprovalPolicy; + } + if (creativeRestrictions != null) { + _json["creativeRestrictions"] = (creativeRestrictions).toJson(); + } + if (creativeSafeFrameCompatibility != null) { + _json["creativeSafeFrameCompatibility"] = creativeSafeFrameCompatibility; + } + if (dealId != null) { + _json["dealId"] = dealId; + } + if (dealServingMetadata != null) { + _json["dealServingMetadata"] = (dealServingMetadata).toJson(); + } + if (dealTerms != null) { + _json["dealTerms"] = (dealTerms).toJson(); + } + if (deliveryControl != null) { + _json["deliveryControl"] = (deliveryControl).toJson(); + } + if (description != null) { + _json["description"] = description; + } + if (displayName != null) { + _json["displayName"] = displayName; + } + if (externalDealId != null) { + _json["externalDealId"] = externalDealId; + } + if (isSetupComplete != null) { + _json["isSetupComplete"] = isSetupComplete; + } + if (programmaticCreativeSource != null) { + _json["programmaticCreativeSource"] = programmaticCreativeSource; + } + if (proposalId != null) { + _json["proposalId"] = proposalId; + } + if (sellerContacts != null) { + _json["sellerContacts"] = + sellerContacts.map((value) => (value).toJson()).toList(); + } + if (syndicationProduct != null) { + _json["syndicationProduct"] = syndicationProduct; + } + if (targeting != null) { + _json["targeting"] = (targeting).toJson(); + } + if (targetingCriterion != null) { + _json["targetingCriterion"] = + targetingCriterion.map((value) => (value).toJson()).toList(); + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + if (webPropertyCode != null) { + _json["webPropertyCode"] = webPropertyCode; + } + return _json; + } +} + +/// Tracks which parties (if any) have paused a deal. +/// The deal is considered paused if either hasBuyerPaused or +/// hasSellPaused is true. +class DealPauseStatus { + /// The buyer's reason for pausing, if the buyer paused the deal. + core.String buyerPauseReason; + + /// The role of the person who first paused this deal. + /// Possible string values are: + /// - "BUYER_SELLER_ROLE_UNSPECIFIED" : A placeholder for an undefined + /// buyer/seller role. + /// - "BUYER" : Specifies the role as buyer. + /// - "SELLER" : Specifies the role as seller. + core.String firstPausedBy; + + /// True, if the buyer has paused the deal unilaterally. + core.bool hasBuyerPaused; + + /// True, if the seller has paused the deal unilaterally. + core.bool hasSellerPaused; + + /// The seller's reason for pausing, if the seller paused the deal. + core.String sellerPauseReason; + + DealPauseStatus(); + + DealPauseStatus.fromJson(core.Map _json) { + if (_json.containsKey("buyerPauseReason")) { + buyerPauseReason = _json["buyerPauseReason"]; + } + if (_json.containsKey("firstPausedBy")) { + firstPausedBy = _json["firstPausedBy"]; + } + if (_json.containsKey("hasBuyerPaused")) { + hasBuyerPaused = _json["hasBuyerPaused"]; + } + if (_json.containsKey("hasSellerPaused")) { + hasSellerPaused = _json["hasSellerPaused"]; + } + if (_json.containsKey("sellerPauseReason")) { + sellerPauseReason = _json["sellerPauseReason"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (buyerPauseReason != null) { + _json["buyerPauseReason"] = buyerPauseReason; + } + if (firstPausedBy != null) { + _json["firstPausedBy"] = firstPausedBy; + } + if (hasBuyerPaused != null) { + _json["hasBuyerPaused"] = hasBuyerPaused; + } + if (hasSellerPaused != null) { + _json["hasSellerPaused"] = hasSellerPaused; + } + if (sellerPauseReason != null) { + _json["sellerPauseReason"] = sellerPauseReason; + } + return _json; + } +} + +/// Message captures metadata about the serving status of a deal. +class DealServingMetadata { + /// Tracks which parties (if any) have paused a deal. + /// @OutputOnly + DealPauseStatus dealPauseStatus; + + DealServingMetadata(); + + DealServingMetadata.fromJson(core.Map _json) { + if (_json.containsKey("dealPauseStatus")) { + dealPauseStatus = new DealPauseStatus.fromJson(_json["dealPauseStatus"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (dealPauseStatus != null) { + _json["dealPauseStatus"] = (dealPauseStatus).toJson(); + } + return _json; + } +} + +/// The deal terms specify the details of a Product/deal. They specify things +/// like price per buyer, the type of pricing model (e.g., fixed price, auction) +/// and expected impressions from the publisher. +class DealTerms { + /// Visibility of the URL in bid requests. (default: BRANDED) + /// Possible string values are: + /// - "BRANDING_TYPE_UNSPECIFIED" : A placeholder for an undefined branding + /// type. + /// - "BRANDED" : Full URL is included in bid requests. + /// - "SEMI_TRANSPARENT" : A TopLevelDomain or masked URL is sent in bid + /// requests + /// rather than the full one. + core.String brandingType; + + /// Publisher provided description for the terms. + core.String description; + + /// Non-binding estimate of the estimated gross spend for this deal. + /// Can be set by buyer or seller. + Price estimatedGrossSpend; + + /// Non-binding estimate of the impressions served per day. + /// Can be set by buyer or seller. + core.String estimatedImpressionsPerDay; + + /// The terms for guaranteed fixed price deals. + GuaranteedFixedPriceTerms guaranteedFixedPriceTerms; + + /// The terms for non-guaranteed auction deals. + NonGuaranteedAuctionTerms nonGuaranteedAuctionTerms; + + /// The terms for non-guaranteed fixed price deals. + NonGuaranteedFixedPriceTerms nonGuaranteedFixedPriceTerms; + + /// The time zone name. For deals with Cost Per Day billing, defines the + /// time zone used to mark the boundaries of a day. It should be an + /// IANA TZ name, such as "America/Los_Angeles". For more information, + /// see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. + core.String sellerTimeZone; + + DealTerms(); + + DealTerms.fromJson(core.Map _json) { + if (_json.containsKey("brandingType")) { + brandingType = _json["brandingType"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("estimatedGrossSpend")) { + estimatedGrossSpend = new Price.fromJson(_json["estimatedGrossSpend"]); + } + if (_json.containsKey("estimatedImpressionsPerDay")) { + estimatedImpressionsPerDay = _json["estimatedImpressionsPerDay"]; + } + if (_json.containsKey("guaranteedFixedPriceTerms")) { + guaranteedFixedPriceTerms = new GuaranteedFixedPriceTerms.fromJson( + _json["guaranteedFixedPriceTerms"]); + } + if (_json.containsKey("nonGuaranteedAuctionTerms")) { + nonGuaranteedAuctionTerms = new NonGuaranteedAuctionTerms.fromJson( + _json["nonGuaranteedAuctionTerms"]); + } + if (_json.containsKey("nonGuaranteedFixedPriceTerms")) { + nonGuaranteedFixedPriceTerms = new NonGuaranteedFixedPriceTerms.fromJson( + _json["nonGuaranteedFixedPriceTerms"]); + } + if (_json.containsKey("sellerTimeZone")) { + sellerTimeZone = _json["sellerTimeZone"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (brandingType != null) { + _json["brandingType"] = brandingType; + } + if (description != null) { + _json["description"] = description; + } + if (estimatedGrossSpend != null) { + _json["estimatedGrossSpend"] = (estimatedGrossSpend).toJson(); + } + if (estimatedImpressionsPerDay != null) { + _json["estimatedImpressionsPerDay"] = estimatedImpressionsPerDay; + } + if (guaranteedFixedPriceTerms != null) { + _json["guaranteedFixedPriceTerms"] = (guaranteedFixedPriceTerms).toJson(); + } + if (nonGuaranteedAuctionTerms != null) { + _json["nonGuaranteedAuctionTerms"] = (nonGuaranteedAuctionTerms).toJson(); + } + if (nonGuaranteedFixedPriceTerms != null) { + _json["nonGuaranteedFixedPriceTerms"] = + (nonGuaranteedFixedPriceTerms).toJson(); + } + if (sellerTimeZone != null) { + _json["sellerTimeZone"] = sellerTimeZone; + } + return _json; + } +} + +/// Message contains details about how the deals will be paced. +class DeliveryControl { + /// Specified the creative blocking levels to be applied. + /// @OutputOnly + /// Possible string values are: + /// - "CREATIVE_BLOCKING_LEVEL_UNSPECIFIED" : A placeholder for an undefined + /// creative blocking level. + /// - "PUBLISHER_BLOCKING_RULES" : Publisher blocking rules will be applied. + /// - "ADX_POLICY_BLOCKING_ONLY" : The Ad Exchange policy blocking rules will + /// be applied. + core.String creativeBlockingLevel; + + /// Specifies how the impression delivery will be paced. + /// @OutputOnly + /// Possible string values are: + /// - "DELIVERY_RATE_TYPE_UNSPECIFIED" : A placeholder for an undefined + /// delivery rate type. + /// - "EVENLY" : Impressions are served uniformly over the life of the deal. + /// - "FRONT_LOADED" : Impressions are served front-loaded. + /// - "AS_FAST_AS_POSSIBLE" : Impressions are served as fast as possible. + core.String deliveryRateType; + + /// Specifies any frequency caps. + /// @OutputOnly + core.List<FrequencyCap> frequencyCaps; + + DeliveryControl(); + + DeliveryControl.fromJson(core.Map _json) { + if (_json.containsKey("creativeBlockingLevel")) { + creativeBlockingLevel = _json["creativeBlockingLevel"]; + } + if (_json.containsKey("deliveryRateType")) { + deliveryRateType = _json["deliveryRateType"]; + } + if (_json.containsKey("frequencyCaps")) { + frequencyCaps = (_json["frequencyCaps"] as core.List) + .map<FrequencyCap>((value) => new FrequencyCap.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (creativeBlockingLevel != null) { + _json["creativeBlockingLevel"] = creativeBlockingLevel; + } + if (deliveryRateType != null) { + _json["deliveryRateType"] = deliveryRateType; + } + if (frequencyCaps != null) { + _json["frequencyCaps"] = + frequencyCaps.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + /// @OutputOnly The reason and details for a disapproval. class Disapproval { /// Additional details about the reason for disapproval. @@ -4955,6 +7104,8 @@ /// - "DESTINATION_EXPERIENCE" : Unacceptable landing page. /// - "UNSUPPORTED_LANGUAGE" : Unsupported language. /// - "NON_SSL_COMPLIANT" : Non-SSL compliant. + /// - "TEMPORARY_PAUSE" : Temporary pausing of creative. + /// - "BAIL_BONDS" : Promotes services related to bail bonds. core.String reason; Disapproval(); @@ -5005,25 +7156,31 @@ /// A set of filters that is applied to a request for data. /// Within a filter set, an AND operation is performed across the filters /// represented by each field. An OR operation is performed across the filters -/// represented by the multiple values of a repeated field. E.g. +/// represented by the multiple values of a repeated field, e.g., /// "format=VIDEO AND deal_id=12 AND (seller_network_id=34 OR -/// seller_network_id=56)" +/// seller_network_id=56)". class FilterSet { /// An absolute date range, defined by a start date and an end date. /// Interpreted relative to Pacific time zone. AbsoluteDateRange absoluteDateRange; + /// The set of dimensions along which to break down the response; may be + /// empty. + /// If multiple dimensions are requested, the breakdown is along the Cartesian + /// product of the requested dimensions. + core.List<core.String> breakdownDimensions; + /// The ID of the creative on which to filter; optional. This field may be set /// only for a filter set that accesses account-level troubleshooting data, - /// i.e. one whose name matches the `bidders / * /accounts / * /filterSets / * - /// ` + /// i.e., one whose name matches the `bidders / * /accounts / * /filterSets / + /// * ` /// pattern. core.String creativeId; /// The ID of the deal on which to filter; optional. This field may be set /// only for a filter set that accesses account-level troubleshooting data, - /// i.e. one whose name matches the `bidders / * /accounts / * /filterSets / * - /// ` + /// i.e., one whose name matches the `bidders / * /accounts / * /filterSets / + /// * ` /// pattern. core.String dealId; @@ -5037,7 +7194,7 @@ core.String environment; /// The list of formats on which to filter; may be empty. The filters - /// represented by multiple formats are ORed together (i.e. if non-empty, + /// represented by multiple formats are ORed together (i.e., if non-empty, /// results must match any one of the formats). core.List<core.String> formats; @@ -5055,11 +7212,11 @@ core.String name; /// The list of platforms on which to filter; may be empty. The filters - /// represented by multiple platforms are ORed together (i.e. if non-empty, + /// represented by multiple platforms are ORed together (i.e., if non-empty, /// results must match any one of the platforms). core.List<core.String> platforms; - /// For Exchange Bidding buyers only. + /// For Open Bidding partners only. /// The list of publisher identifiers on which to filter; may be empty. /// The filters represented by multiple publisher identifiers are ORed /// together. @@ -5073,13 +7230,12 @@ /// Interpreted relative to Pacific time zone. RelativeDateRange relativeDateRange; - /// For Ad Exchange buyers only. + /// For Authorized Buyers only. /// The list of IDs of the seller (publisher) networks on which to filter; /// may be empty. The filters represented by multiple seller network IDs are - /// ORed together (i.e. if non-empty, results must match any one of the - /// publisher networks). - /// See - /// [seller-network-ids](https://developers.google.com/ad-exchange/rtb/downloads/seller-network-ids) + /// ORed together (i.e., if non-empty, results must match any one of the + /// publisher networks). See + /// [seller-network-ids](https://developers.google.com/authorized-buyers/rtb/downloads/seller-network-ids) /// file for the set of existing seller network IDs. core.List<core.int> sellerNetworkIds; @@ -5101,6 +7257,10 @@ absoluteDateRange = new AbsoluteDateRange.fromJson(_json["absoluteDateRange"]); } + if (_json.containsKey("breakdownDimensions")) { + breakdownDimensions = + (_json["breakdownDimensions"] as core.List).cast<core.String>(); + } if (_json.containsKey("creativeId")) { creativeId = _json["creativeId"]; } @@ -5146,6 +7306,9 @@ if (absoluteDateRange != null) { _json["absoluteDateRange"] = (absoluteDateRange).toJson(); } + if (breakdownDimensions != null) { + _json["breakdownDimensions"] = breakdownDimensions; + } if (creativeId != null) { _json["creativeId"] = creativeId; } @@ -5308,6 +7471,154 @@ } } +/// Represents a list of targeted and excluded mobile application IDs that +/// publishers own. +/// Mobile application IDs are from App Store and Google Play Store. +/// Android App ID, for example, com.google.android.apps.maps, can be found in +/// Google Play Store URL. +/// iOS App ID (which is a number) can be found at the end of iTunes store URL. +/// First party mobile applications is either included or excluded. +class FirstPartyMobileApplicationTargeting { + /// A list of application IDs to be excluded. + core.List<core.String> excludedAppIds; + + /// A list of application IDs to be included. + core.List<core.String> targetedAppIds; + + FirstPartyMobileApplicationTargeting(); + + FirstPartyMobileApplicationTargeting.fromJson(core.Map _json) { + if (_json.containsKey("excludedAppIds")) { + excludedAppIds = + (_json["excludedAppIds"] as core.List).cast<core.String>(); + } + if (_json.containsKey("targetedAppIds")) { + targetedAppIds = + (_json["targetedAppIds"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (excludedAppIds != null) { + _json["excludedAppIds"] = excludedAppIds; + } + if (targetedAppIds != null) { + _json["targetedAppIds"] = targetedAppIds; + } + return _json; + } +} + +/// Frequency cap. +class FrequencyCap { + /// The maximum number of impressions that can be served to a user within the + /// specified time period. + core.int maxImpressions; + + /// The amount of time, in the units specified by time_unit_type. Defines the + /// amount of time over which impressions per user are counted and capped. + core.int numTimeUnits; + + /// The time unit. Along with num_time_units defines the amount of time over + /// which impressions per user are counted and capped. + /// Possible string values are: + /// - "TIME_UNIT_TYPE_UNSPECIFIED" : A placeholder for an undefined time unit + /// type. This just indicates the + /// variable with this value hasn't been initialized. + /// - "MINUTE" : Minute + /// - "HOUR" : Hour + /// - "DAY" : Day + /// - "WEEK" : Week + /// - "MONTH" : Month + /// - "LIFETIME" : Lifetime + core.String timeUnitType; + + FrequencyCap(); + + FrequencyCap.fromJson(core.Map _json) { + if (_json.containsKey("maxImpressions")) { + maxImpressions = _json["maxImpressions"]; + } + if (_json.containsKey("numTimeUnits")) { + numTimeUnits = _json["numTimeUnits"]; + } + if (_json.containsKey("timeUnitType")) { + timeUnitType = _json["timeUnitType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (maxImpressions != null) { + _json["maxImpressions"] = maxImpressions; + } + if (numTimeUnits != null) { + _json["numTimeUnits"] = numTimeUnits; + } + if (timeUnitType != null) { + _json["timeUnitType"] = timeUnitType; + } + return _json; + } +} + +/// Terms for Programmatic Guaranteed Deals. +class GuaranteedFixedPriceTerms { + /// Fixed price for the specified buyer. + core.List<PricePerBuyer> fixedPrices; + + /// Guaranteed impressions as a percentage. This is the percentage + /// of guaranteed looks that the buyer is guaranteeing to buy. + core.String guaranteedImpressions; + + /// Count of guaranteed looks. Required for deal, optional for product. + core.String guaranteedLooks; + + /// Daily minimum looks for CPD deal types. + core.String minimumDailyLooks; + + GuaranteedFixedPriceTerms(); + + GuaranteedFixedPriceTerms.fromJson(core.Map _json) { + if (_json.containsKey("fixedPrices")) { + fixedPrices = (_json["fixedPrices"] as core.List) + .map<PricePerBuyer>((value) => new PricePerBuyer.fromJson(value)) + .toList(); + } + if (_json.containsKey("guaranteedImpressions")) { + guaranteedImpressions = _json["guaranteedImpressions"]; + } + if (_json.containsKey("guaranteedLooks")) { + guaranteedLooks = _json["guaranteedLooks"]; + } + if (_json.containsKey("minimumDailyLooks")) { + minimumDailyLooks = _json["minimumDailyLooks"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fixedPrices != null) { + _json["fixedPrices"] = + fixedPrices.map((value) => (value).toJson()).toList(); + } + if (guaranteedImpressions != null) { + _json["guaranteedImpressions"] = guaranteedImpressions; + } + if (guaranteedLooks != null) { + _json["guaranteedLooks"] = guaranteedLooks; + } + if (minimumDailyLooks != null) { + _json["minimumDailyLooks"] = minimumDailyLooks; + } + return _json; + } +} + /// HTML content for a creative. class HtmlContent { /// The height of the HTML snippet in pixels. @@ -5467,6 +7778,47 @@ } } +/// Represents the size of an ad unit that can be targeted on an ad +/// request. It only applies to Private Auction, AdX Preferred Deals and +/// Auction Packages. This targeting does not apply to Programmatic Guaranteed +/// and Preferred Deals in Ad Manager. +class InventorySizeTargeting { + /// A list of inventory sizes to be excluded. + core.List<AdSize> excludedInventorySizes; + + /// A list of inventory sizes to be included. + core.List<AdSize> targetedInventorySizes; + + InventorySizeTargeting(); + + InventorySizeTargeting.fromJson(core.Map _json) { + if (_json.containsKey("excludedInventorySizes")) { + excludedInventorySizes = (_json["excludedInventorySizes"] as core.List) + .map<AdSize>((value) => new AdSize.fromJson(value)) + .toList(); + } + if (_json.containsKey("targetedInventorySizes")) { + targetedInventorySizes = (_json["targetedInventorySizes"] as core.List) + .map<AdSize>((value) => new AdSize.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (excludedInventorySizes != null) { + _json["excludedInventorySizes"] = + excludedInventorySizes.map((value) => (value).toJson()).toList(); + } + if (targetedInventorySizes != null) { + _json["targetedInventorySizes"] = + targetedInventorySizes.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + /// Response message for listing the metrics that are measured in number of /// bids. class ListBidMetricsResponse { @@ -5681,8 +8033,8 @@ /// Pass this value in the /// ListClientsRequest.pageToken /// field in the subsequent call to the - /// accounts.clients.list method - /// to retrieve the next page of results. + /// accounts.clients.list + /// method to retrieve the next page of results. core.String nextPageToken; ListClientsResponse(); @@ -5763,19 +8115,19 @@ /// This value will never be returned in responses. /// - "CREATIVE_ATTRIBUTE" : Indicates that the detail ID refers to a creative /// attribute; see - /// [publisher-excludable-creative-attributes](https://developers.google.com/ad-exchange/rtb/downloads/publisher-excludable-creative-attributes). + /// [publisher-excludable-creative-attributes](https://developers.google.com/authorized-buyers/rtb/downloads/publisher-excludable-creative-attributes). /// - "VENDOR" : Indicates that the detail ID refers to a vendor; see - /// [vendors](https://developers.google.com/ad-exchange/rtb/downloads/vendors). + /// [vendors](https://developers.google.com/authorized-buyers/rtb/downloads/vendors). /// - "SENSITIVE_CATEGORY" : Indicates that the detail ID refers to a /// sensitive category; see - /// [ad-sensitive-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-sensitive-categories). + /// [ad-sensitive-categories](https://developers.google.com/authorized-buyers/rtb/downloads/ad-sensitive-categories). /// - "PRODUCT_CATEGORY" : Indicates that the detail ID refers to a product /// category; see - /// [ad-product-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-product-categories). + /// [ad-product-categories](https://developers.google.com/authorized-buyers/rtb/downloads/ad-product-categories). /// - "DISAPPROVAL_REASON" : Indicates that the detail ID refers to a /// disapproval reason; see /// DisapprovalReason enum in - /// [snippet-status-report-proto](https://developers.google.com/ad-exchange/rtb/downloads/snippet-status-report-proto). + /// [snippet-status-report-proto](https://developers.google.com/authorized-buyers/rtb/downloads/snippet-status-report-proto). core.String detailType; /// List of rows, with counts of bids with a given creative status aggregated @@ -6152,6 +8504,110 @@ } } +/// Response message for listing products visible to the buyer. +class ListProductsResponse { + /// List pagination support. + core.String nextPageToken; + + /// The list of matching products at their head revision number. + core.List<Product> products; + + ListProductsResponse(); + + ListProductsResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("products")) { + products = (_json["products"] as core.List) + .map<Product>((value) => new Product.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (products != null) { + _json["products"] = products.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Response message for listing proposals. +class ListProposalsResponse { + /// Continuation token for fetching the next page of results. + core.String nextPageToken; + + /// The list of proposals. + core.List<Proposal> proposals; + + ListProposalsResponse(); + + ListProposalsResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("proposals")) { + proposals = (_json["proposals"] as core.List) + .map<Proposal>((value) => new Proposal.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (proposals != null) { + _json["proposals"] = proposals.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Response message for profiles visible to the buyer. +class ListPublisherProfilesResponse { + /// List pagination support + core.String nextPageToken; + + /// The list of matching publisher profiles. + core.List<PublisherProfile> publisherProfiles; + + ListPublisherProfilesResponse(); + + ListPublisherProfilesResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("publisherProfiles")) { + publisherProfiles = (_json["publisherProfiles"] as core.List) + .map<PublisherProfile>( + (value) => new PublisherProfile.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (publisherProfiles != null) { + _json["publisherProfiles"] = + publisherProfiles.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + /// @OutputOnly The Geo criteria the restriction applies to. class LocationContext { /// IDs representing the geo location for this context. @@ -6178,6 +8634,73 @@ } } +/// Targeting represents different criteria that can be used by advertisers to +/// target ad inventory. For example, they can choose to target ad requests only +/// if the user is in the US. +/// Multiple types of targeting are always applied as a logical AND, unless +/// noted +/// otherwise. +class MarketplaceTargeting { + /// Geo criteria IDs to be included/excluded. + CriteriaTargeting geoTargeting; + + /// Inventory sizes to be included/excluded. + InventorySizeTargeting inventorySizeTargeting; + + /// Placement targeting information, e.g., URL, mobile applications. + PlacementTargeting placementTargeting; + + /// Technology targeting information, e.g., operating system, device category. + TechnologyTargeting technologyTargeting; + + /// Video targeting information. + VideoTargeting videoTargeting; + + MarketplaceTargeting(); + + MarketplaceTargeting.fromJson(core.Map _json) { + if (_json.containsKey("geoTargeting")) { + geoTargeting = new CriteriaTargeting.fromJson(_json["geoTargeting"]); + } + if (_json.containsKey("inventorySizeTargeting")) { + inventorySizeTargeting = + new InventorySizeTargeting.fromJson(_json["inventorySizeTargeting"]); + } + if (_json.containsKey("placementTargeting")) { + placementTargeting = + new PlacementTargeting.fromJson(_json["placementTargeting"]); + } + if (_json.containsKey("technologyTargeting")) { + technologyTargeting = + new TechnologyTargeting.fromJson(_json["technologyTargeting"]); + } + if (_json.containsKey("videoTargeting")) { + videoTargeting = new VideoTargeting.fromJson(_json["videoTargeting"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (geoTargeting != null) { + _json["geoTargeting"] = (geoTargeting).toJson(); + } + if (inventorySizeTargeting != null) { + _json["inventorySizeTargeting"] = (inventorySizeTargeting).toJson(); + } + if (placementTargeting != null) { + _json["placementTargeting"] = (placementTargeting).toJson(); + } + if (technologyTargeting != null) { + _json["technologyTargeting"] = (technologyTargeting).toJson(); + } + if (videoTargeting != null) { + _json["videoTargeting"] = (videoTargeting).toJson(); + } + return _json; + } +} + /// A metric value, with an expected value and a variance; represents a count /// that may be either exact or estimated (i.e. when sampled). class MetricValue { @@ -6219,6 +8742,78 @@ } } +/// Mobile application targeting settings. +class MobileApplicationTargeting { + /// Publisher owned apps to be targeted or excluded by the publisher to + /// display the ads in. + FirstPartyMobileApplicationTargeting firstPartyTargeting; + + MobileApplicationTargeting(); + + MobileApplicationTargeting.fromJson(core.Map _json) { + if (_json.containsKey("firstPartyTargeting")) { + firstPartyTargeting = new FirstPartyMobileApplicationTargeting.fromJson( + _json["firstPartyTargeting"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (firstPartyTargeting != null) { + _json["firstPartyTargeting"] = (firstPartyTargeting).toJson(); + } + return _json; + } +} + +/// Represents an amount of money with its currency type. +class Money { + /// The 3-letter currency code defined in ISO 4217. + core.String currencyCode; + + /// Number of nano (10^-9) units of the amount. + /// The value must be between -999,999,999 and +999,999,999 inclusive. + /// If `units` is positive, `nanos` must be positive or zero. + /// If `units` is zero, `nanos` can be positive, zero, or negative. + /// If `units` is negative, `nanos` must be negative or zero. + /// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + core.int nanos; + + /// The whole units of the amount. + /// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + core.String units; + + Money(); + + Money.fromJson(core.Map _json) { + if (_json.containsKey("currencyCode")) { + currencyCode = _json["currencyCode"]; + } + if (_json.containsKey("nanos")) { + nanos = _json["nanos"]; + } + if (_json.containsKey("units")) { + units = _json["units"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (currencyCode != null) { + _json["currencyCode"] = currencyCode; + } + if (nanos != null) { + _json["nanos"] = nanos; + } + if (units != null) { + _json["units"] = units; + } + return _json; + } +} + /// Native content for a creative. class NativeContent { /// The name of the advertiser or sponsor, to be displayed in the ad creative. @@ -6401,6 +8996,239 @@ } } +/// Terms for Private Auctions. Note that Private Auctions can be created only +/// by the seller, but they can be returned in a get or list request. +class NonGuaranteedAuctionTerms { + /// True if open auction buyers are allowed to compete with invited buyers + /// in this private auction. + core.bool autoOptimizePrivateAuction; + + /// Reserve price for the specified buyer. + core.List<PricePerBuyer> reservePricesPerBuyer; + + NonGuaranteedAuctionTerms(); + + NonGuaranteedAuctionTerms.fromJson(core.Map _json) { + if (_json.containsKey("autoOptimizePrivateAuction")) { + autoOptimizePrivateAuction = _json["autoOptimizePrivateAuction"]; + } + if (_json.containsKey("reservePricesPerBuyer")) { + reservePricesPerBuyer = (_json["reservePricesPerBuyer"] as core.List) + .map<PricePerBuyer>((value) => new PricePerBuyer.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (autoOptimizePrivateAuction != null) { + _json["autoOptimizePrivateAuction"] = autoOptimizePrivateAuction; + } + if (reservePricesPerBuyer != null) { + _json["reservePricesPerBuyer"] = + reservePricesPerBuyer.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Terms for Preferred Deals. Note that Preferred Deals cannot be created via +/// the API at this time, but can be returned in a get or list request. +class NonGuaranteedFixedPriceTerms { + /// Fixed price for the specified buyer. + core.List<PricePerBuyer> fixedPrices; + + NonGuaranteedFixedPriceTerms(); + + NonGuaranteedFixedPriceTerms.fromJson(core.Map _json) { + if (_json.containsKey("fixedPrices")) { + fixedPrices = (_json["fixedPrices"] as core.List) + .map<PricePerBuyer>((value) => new PricePerBuyer.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fixedPrices != null) { + _json["fixedPrices"] = + fixedPrices.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A proposal may be associated to several notes. +class Note { + /// The timestamp for when this note was created. + /// @OutputOnly + core.String createTime; + + /// The role of the person (buyer/seller) creating the note. + /// @OutputOnly + /// Possible string values are: + /// - "BUYER_SELLER_ROLE_UNSPECIFIED" : A placeholder for an undefined + /// buyer/seller role. + /// - "BUYER" : Specifies the role as buyer. + /// - "SELLER" : Specifies the role as seller. + core.String creatorRole; + + /// The actual note to attach. + /// (max-length: 1024 unicode code units) + /// + /// Note: This field may be set only when creating the resource. Modifying + /// this field while updating the resource will result in an error. + core.String note; + + /// The unique ID for the note. + /// @OutputOnly + core.String noteId; + + /// The revision number of the proposal when the note is created. + /// @OutputOnly + core.String proposalRevision; + + Note(); + + Note.fromJson(core.Map _json) { + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("creatorRole")) { + creatorRole = _json["creatorRole"]; + } + if (_json.containsKey("note")) { + note = _json["note"]; + } + if (_json.containsKey("noteId")) { + noteId = _json["noteId"]; + } + if (_json.containsKey("proposalRevision")) { + proposalRevision = _json["proposalRevision"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (createTime != null) { + _json["createTime"] = createTime; + } + if (creatorRole != null) { + _json["creatorRole"] = creatorRole; + } + if (note != null) { + _json["note"] = note; + } + if (noteId != null) { + _json["noteId"] = noteId; + } + if (proposalRevision != null) { + _json["proposalRevision"] = proposalRevision; + } + return _json; + } +} + +/// Represents targeting information for operating systems. +class OperatingSystemTargeting { + /// IDs of operating systems to be included/excluded. + CriteriaTargeting operatingSystemCriteria; + + /// IDs of operating system versions to be included/excluded. + CriteriaTargeting operatingSystemVersionCriteria; + + OperatingSystemTargeting(); + + OperatingSystemTargeting.fromJson(core.Map _json) { + if (_json.containsKey("operatingSystemCriteria")) { + operatingSystemCriteria = + new CriteriaTargeting.fromJson(_json["operatingSystemCriteria"]); + } + if (_json.containsKey("operatingSystemVersionCriteria")) { + operatingSystemVersionCriteria = new CriteriaTargeting.fromJson( + _json["operatingSystemVersionCriteria"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (operatingSystemCriteria != null) { + _json["operatingSystemCriteria"] = (operatingSystemCriteria).toJson(); + } + if (operatingSystemVersionCriteria != null) { + _json["operatingSystemVersionCriteria"] = + (operatingSystemVersionCriteria).toJson(); + } + return _json; + } +} + +/// Request message to pause serving for an already-finalized proposal. +class PauseProposalRequest { + /// The reason why the proposal is being paused. + /// This human readable message will be displayed in the seller's UI. + /// (Max length: 100 unicode code units.) + core.String reason; + + PauseProposalRequest(); + + PauseProposalRequest.fromJson(core.Map _json) { + if (_json.containsKey("reason")) { + reason = _json["reason"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (reason != null) { + _json["reason"] = reason; + } + return _json; + } +} + +/// Represents targeting about where the ads can appear, e.g., certain sites or +/// mobile applications. +/// Different placement targeting types will be logically OR'ed. +class PlacementTargeting { + /// Mobile application targeting information in a deal. + /// This doesn't apply to Auction Packages. + MobileApplicationTargeting mobileApplicationTargeting; + + /// URLs to be included/excluded. + UrlTargeting urlTargeting; + + PlacementTargeting(); + + PlacementTargeting.fromJson(core.Map _json) { + if (_json.containsKey("mobileApplicationTargeting")) { + mobileApplicationTargeting = new MobileApplicationTargeting.fromJson( + _json["mobileApplicationTargeting"]); + } + if (_json.containsKey("urlTargeting")) { + urlTargeting = new UrlTargeting.fromJson(_json["urlTargeting"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (mobileApplicationTargeting != null) { + _json["mobileApplicationTargeting"] = + (mobileApplicationTargeting).toJson(); + } + if (urlTargeting != null) { + _json["urlTargeting"] = (urlTargeting).toJson(); + } + return _json; + } +} + /// @OutputOnly The type of platform the restriction applies to. class PlatformContext { /// The platforms this restriction applies to. @@ -6424,6 +9252,719 @@ } } +/// Represents a price and a pricing type for a product / deal. +class Price { + /// The actual price with currency specified. + Money amount; + + /// The pricing type for the deal/product. (default: CPM) + /// Possible string values are: + /// - "PRICING_TYPE_UNSPECIFIED" : A placeholder for an undefined pricing + /// type. If the pricing type is + /// unpsecified, `COST_PER_MILLE` will be used instead. + /// - "COST_PER_MILLE" : Cost per thousand impressions. + /// - "COST_PER_DAY" : Cost per day + core.String pricingType; + + Price(); + + Price.fromJson(core.Map _json) { + if (_json.containsKey("amount")) { + amount = new Money.fromJson(_json["amount"]); + } + if (_json.containsKey("pricingType")) { + pricingType = _json["pricingType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (amount != null) { + _json["amount"] = (amount).toJson(); + } + if (pricingType != null) { + _json["pricingType"] = pricingType; + } + return _json; + } +} + +/// Used to specify pricing rules for buyers/advertisers. Each PricePerBuyer in +/// a product can become 0 or 1 deals. To check if there is a PricePerBuyer for +/// a particular buyer or buyer/advertiser pair, we look for the most specific +/// matching rule - we first look for a rule matching the buyer and advertiser, +/// next a rule with the buyer but an empty advertiser list, and otherwise look +/// for a matching rule where no buyer is set. +class PricePerBuyer { + /// The list of advertisers for this price when associated with this buyer. + /// If empty, all advertisers with this buyer pay this price. + core.List<core.String> advertiserIds; + + /// The buyer who will pay this price. If unset, all buyers can pay this price + /// (if the + /// advertisers match, and there's no more specific rule matching the buyer). + Buyer buyer; + + /// The specified price. + Price price; + + PricePerBuyer(); + + PricePerBuyer.fromJson(core.Map _json) { + if (_json.containsKey("advertiserIds")) { + advertiserIds = (_json["advertiserIds"] as core.List).cast<core.String>(); + } + if (_json.containsKey("buyer")) { + buyer = new Buyer.fromJson(_json["buyer"]); + } + if (_json.containsKey("price")) { + price = new Price.fromJson(_json["price"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (advertiserIds != null) { + _json["advertiserIds"] = advertiserIds; + } + if (buyer != null) { + _json["buyer"] = (buyer).toJson(); + } + if (price != null) { + _json["price"] = (price).toJson(); + } + return _json; + } +} + +/// Buyers are allowed to store certain types of private data in a +/// proposal/deal. +class PrivateData { + /// A buyer or seller specified reference ID. This can be queried in the list + /// operations (max-length: 1024 unicode code units). + core.String referenceId; + + PrivateData(); + + PrivateData.fromJson(core.Map _json) { + if (_json.containsKey("referenceId")) { + referenceId = _json["referenceId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (referenceId != null) { + _json["referenceId"] = referenceId; + } + return _json; + } +} + +/// Note: this resource requires whitelisting for access. Please contact your +/// account manager for access to Marketplace resources. +/// +/// A product is a segment of inventory that a seller wishes to sell. It is +/// associated with certain terms and targeting information which helps the +/// buyer +/// know more about the inventory. +class Product { + /// The proposed end time for the deal. The field will be truncated to the + /// order of + /// seconds during serving. + core.String availableEndTime; + + /// Inventory availability dates. The start time will be truncated to seconds + /// during serving. + /// Thus, a field specified as 3:23:34.456 (HH:mm:ss.SSS) will be truncated to + /// 3:23:34 + /// when serving. + core.String availableStartTime; + + /// Creation time. + core.String createTime; + + /// Optional contact information for the creator of this product. + core.List<ContactInformation> creatorContacts; + + /// The display name for this product as set by the seller. + core.String displayName; + + /// If the creator has already signed off on the product, then the buyer can + /// finalize the deal by accepting the product as is. When copying to a + /// proposal, if any of the terms are changed, then auto_finalize is + /// automatically set to false. + core.bool hasCreatorSignedOff; + + /// The unique ID for the product. + core.String productId; + + /// The revision number of the product (auto-assigned by Marketplace). + core.String productRevision; + + /// An ID which can be used by the Publisher Profile API to get more + /// information about the seller that created this product. + core.String publisherProfileId; + + /// Information about the seller that created this product. + Seller seller; + + /// The syndication product associated with the deal. + /// Possible string values are: + /// - "SYNDICATION_PRODUCT_UNSPECIFIED" : A placeholder for an undefined + /// syndication product. + /// - "CONTENT" : This typically represents a web page. + /// - "MOBILE" : This represents a mobile property. + /// - "VIDEO" : This represents video ad formats. + /// - "GAMES" : This represents ads shown within games. + core.String syndicationProduct; + + /// Targeting that is shared between the buyer and the seller. Each targeting + /// criterion has a specified key and for each key there is a list of + /// inclusion + /// value or exclusion values. + core.List<TargetingCriteria> targetingCriterion; + + /// The negotiable terms of the deal. + DealTerms terms; + + /// Time of last update. + core.String updateTime; + + /// The web-property code for the seller. This needs to be copied as is when + /// adding a new deal to a proposal. + core.String webPropertyCode; + + Product(); + + Product.fromJson(core.Map _json) { + if (_json.containsKey("availableEndTime")) { + availableEndTime = _json["availableEndTime"]; + } + if (_json.containsKey("availableStartTime")) { + availableStartTime = _json["availableStartTime"]; + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("creatorContacts")) { + creatorContacts = (_json["creatorContacts"] as core.List) + .map<ContactInformation>( + (value) => new ContactInformation.fromJson(value)) + .toList(); + } + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("hasCreatorSignedOff")) { + hasCreatorSignedOff = _json["hasCreatorSignedOff"]; + } + if (_json.containsKey("productId")) { + productId = _json["productId"]; + } + if (_json.containsKey("productRevision")) { + productRevision = _json["productRevision"]; + } + if (_json.containsKey("publisherProfileId")) { + publisherProfileId = _json["publisherProfileId"]; + } + if (_json.containsKey("seller")) { + seller = new Seller.fromJson(_json["seller"]); + } + if (_json.containsKey("syndicationProduct")) { + syndicationProduct = _json["syndicationProduct"]; + } + if (_json.containsKey("targetingCriterion")) { + targetingCriterion = (_json["targetingCriterion"] as core.List) + .map<TargetingCriteria>( + (value) => new TargetingCriteria.fromJson(value)) + .toList(); + } + if (_json.containsKey("terms")) { + terms = new DealTerms.fromJson(_json["terms"]); + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + if (_json.containsKey("webPropertyCode")) { + webPropertyCode = _json["webPropertyCode"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (availableEndTime != null) { + _json["availableEndTime"] = availableEndTime; + } + if (availableStartTime != null) { + _json["availableStartTime"] = availableStartTime; + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (creatorContacts != null) { + _json["creatorContacts"] = + creatorContacts.map((value) => (value).toJson()).toList(); + } + if (displayName != null) { + _json["displayName"] = displayName; + } + if (hasCreatorSignedOff != null) { + _json["hasCreatorSignedOff"] = hasCreatorSignedOff; + } + if (productId != null) { + _json["productId"] = productId; + } + if (productRevision != null) { + _json["productRevision"] = productRevision; + } + if (publisherProfileId != null) { + _json["publisherProfileId"] = publisherProfileId; + } + if (seller != null) { + _json["seller"] = (seller).toJson(); + } + if (syndicationProduct != null) { + _json["syndicationProduct"] = syndicationProduct; + } + if (targetingCriterion != null) { + _json["targetingCriterion"] = + targetingCriterion.map((value) => (value).toJson()).toList(); + } + if (terms != null) { + _json["terms"] = (terms).toJson(); + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + if (webPropertyCode != null) { + _json["webPropertyCode"] = webPropertyCode; + } + return _json; + } +} + +/// Note: this resource requires whitelisting for access. Please contact your +/// account manager for access to Marketplace resources. +/// +/// Represents a proposal in the Marketplace. A proposal is the unit of +/// negotiation between a seller and a buyer and contains deals which +/// are served. +/// +/// Note: you can not update, create, or otherwise modify Private +/// Auction or Preferred Deals deals through the API. +/// +/// Fields are updatable unless noted otherwise. +class Proposal { + /// Reference to the buyer that will get billed for this proposal. + /// @OutputOnly + Buyer billedBuyer; + + /// Reference to the buyer on the proposal. + /// + /// Note: This field may be set only when creating the resource. Modifying + /// this field while updating the resource will result in an error. + Buyer buyer; + + /// Contact information for the buyer. + core.List<ContactInformation> buyerContacts; + + /// Private data for buyer. (hidden from seller). + PrivateData buyerPrivateData; + + /// The deals associated with this proposal. For Private Auction proposals + /// (whose deals have + /// NonGuaranteedAuctionTerms), there will only be one deal. + core.List<Deal> deals; + + /// The name for the proposal. + core.String displayName; + + /// True if the proposal is being renegotiated. + /// @OutputOnly + core.bool isRenegotiating; + + /// True, if the buyside inventory setup is complete for this proposal. + /// @OutputOnly + core.bool isSetupComplete; + + /// The role of the last user that either updated the proposal or left a + /// comment. + /// @OutputOnly + /// Possible string values are: + /// - "BUYER_SELLER_ROLE_UNSPECIFIED" : A placeholder for an undefined + /// buyer/seller role. + /// - "BUYER" : Specifies the role as buyer. + /// - "SELLER" : Specifies the role as seller. + core.String lastUpdaterOrCommentorRole; + + /// The notes associated with this proposal. + /// @OutputOnly + core.List<Note> notes; + + /// Indicates whether the buyer/seller created the proposal. + /// @OutputOnly + /// Possible string values are: + /// - "BUYER_SELLER_ROLE_UNSPECIFIED" : A placeholder for an undefined + /// buyer/seller role. + /// - "BUYER" : Specifies the role as buyer. + /// - "SELLER" : Specifies the role as seller. + core.String originatorRole; + + /// Private auction ID if this proposal is a private auction proposal. + /// @OutputOnly + core.String privateAuctionId; + + /// The unique ID of the proposal. + /// @OutputOnly + core.String proposalId; + + /// The revision number for the proposal. + /// Each update to the proposal or the deal causes the proposal revision + /// number + /// to auto-increment. The buyer keeps track of the last revision number they + /// know of and pass it in when making an update. If the head revision number + /// on the server has since incremented, then an ABORTED error is returned + /// during the update operation to let the buyer know that a subsequent update + /// was made. + /// @OutputOnly + core.String proposalRevision; + + /// The current state of the proposal. + /// @OutputOnly + /// Possible string values are: + /// - "PROPOSAL_STATE_UNSPECIFIED" : A placeholder for an undefined proposal + /// state. + /// - "PROPOSED" : The proposal is under negotiation or renegotiation. + /// - "BUYER_ACCEPTED" : The proposal has been accepted by the buyer. + /// - "SELLER_ACCEPTED" : The proposal has been accepted by the seller. + /// - "CANCELED" : The negotiations on the proposal were canceled and the + /// proposal was never + /// finalized. + /// - "FINALIZED" : The proposal is finalized. During renegotiation, the + /// proposal may + /// not be in this state. + core.String proposalState; + + /// Reference to the seller on the proposal. + /// + /// Note: This field may be set only when creating the resource. Modifying + /// this field while updating the resource will result in an error. + Seller seller; + + /// Contact information for the seller. + /// @OutputOnly + core.List<ContactInformation> sellerContacts; + + /// The time when the proposal was last revised. + /// @OutputOnly + core.String updateTime; + + Proposal(); + + Proposal.fromJson(core.Map _json) { + if (_json.containsKey("billedBuyer")) { + billedBuyer = new Buyer.fromJson(_json["billedBuyer"]); + } + if (_json.containsKey("buyer")) { + buyer = new Buyer.fromJson(_json["buyer"]); + } + if (_json.containsKey("buyerContacts")) { + buyerContacts = (_json["buyerContacts"] as core.List) + .map<ContactInformation>( + (value) => new ContactInformation.fromJson(value)) + .toList(); + } + if (_json.containsKey("buyerPrivateData")) { + buyerPrivateData = new PrivateData.fromJson(_json["buyerPrivateData"]); + } + if (_json.containsKey("deals")) { + deals = (_json["deals"] as core.List) + .map<Deal>((value) => new Deal.fromJson(value)) + .toList(); + } + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("isRenegotiating")) { + isRenegotiating = _json["isRenegotiating"]; + } + if (_json.containsKey("isSetupComplete")) { + isSetupComplete = _json["isSetupComplete"]; + } + if (_json.containsKey("lastUpdaterOrCommentorRole")) { + lastUpdaterOrCommentorRole = _json["lastUpdaterOrCommentorRole"]; + } + if (_json.containsKey("notes")) { + notes = (_json["notes"] as core.List) + .map<Note>((value) => new Note.fromJson(value)) + .toList(); + } + if (_json.containsKey("originatorRole")) { + originatorRole = _json["originatorRole"]; + } + if (_json.containsKey("privateAuctionId")) { + privateAuctionId = _json["privateAuctionId"]; + } + if (_json.containsKey("proposalId")) { + proposalId = _json["proposalId"]; + } + if (_json.containsKey("proposalRevision")) { + proposalRevision = _json["proposalRevision"]; + } + if (_json.containsKey("proposalState")) { + proposalState = _json["proposalState"]; + } + if (_json.containsKey("seller")) { + seller = new Seller.fromJson(_json["seller"]); + } + if (_json.containsKey("sellerContacts")) { + sellerContacts = (_json["sellerContacts"] as core.List) + .map<ContactInformation>( + (value) => new ContactInformation.fromJson(value)) + .toList(); + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (billedBuyer != null) { + _json["billedBuyer"] = (billedBuyer).toJson(); + } + if (buyer != null) { + _json["buyer"] = (buyer).toJson(); + } + if (buyerContacts != null) { + _json["buyerContacts"] = + buyerContacts.map((value) => (value).toJson()).toList(); + } + if (buyerPrivateData != null) { + _json["buyerPrivateData"] = (buyerPrivateData).toJson(); + } + if (deals != null) { + _json["deals"] = deals.map((value) => (value).toJson()).toList(); + } + if (displayName != null) { + _json["displayName"] = displayName; + } + if (isRenegotiating != null) { + _json["isRenegotiating"] = isRenegotiating; + } + if (isSetupComplete != null) { + _json["isSetupComplete"] = isSetupComplete; + } + if (lastUpdaterOrCommentorRole != null) { + _json["lastUpdaterOrCommentorRole"] = lastUpdaterOrCommentorRole; + } + if (notes != null) { + _json["notes"] = notes.map((value) => (value).toJson()).toList(); + } + if (originatorRole != null) { + _json["originatorRole"] = originatorRole; + } + if (privateAuctionId != null) { + _json["privateAuctionId"] = privateAuctionId; + } + if (proposalId != null) { + _json["proposalId"] = proposalId; + } + if (proposalRevision != null) { + _json["proposalRevision"] = proposalRevision; + } + if (proposalState != null) { + _json["proposalState"] = proposalState; + } + if (seller != null) { + _json["seller"] = (seller).toJson(); + } + if (sellerContacts != null) { + _json["sellerContacts"] = + sellerContacts.map((value) => (value).toJson()).toList(); + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + return _json; + } +} + +/// Note: this resource requires whitelisting for access. Please contact your +/// account manager for access to Marketplace resources. +/// +/// Represents a publisher profile in Marketplace. +/// +/// All fields are read only. All string fields are free-form text entered by +/// the publisher +/// unless noted otherwise. +class PublisherProfile { + /// Description on the publisher's audience. + core.String audienceDescription; + + /// Statement explaining what's unique about publisher's business, and why + /// buyers should + /// partner with the publisher. + core.String buyerPitchStatement; + + /// Contact information for direct reservation deals. This is free text + /// entered by the publisher + /// and may include information like names, phone numbers and email addresses. + core.String directDealsContact; + + /// Name of the publisher profile. + core.String displayName; + + /// The list of domains represented in this publisher profile. Empty if this + /// is a parent profile. + /// These are top private domains, meaning that these will not contain a + /// string like + /// "photos.google.co.uk/123", but will instead contain "google.co.uk". + core.List<core.String> domains; + + /// URL to publisher's Google+ page. + core.String googlePlusUrl; + + /// A Google public URL to the logo for this publisher profile. The logo is + /// stored as + /// a PNG, JPG, or GIF image. + core.String logoUrl; + + /// URL to additional marketing and sales materials. + core.String mediaKitUrl; + + /// Overview of the publisher. + core.String overview; + + /// Contact information for programmatic deals. This is free text entered by + /// the publisher + /// and may include information like names, phone numbers and email addresses. + core.String programmaticDealsContact; + + /// Unique ID for publisher profile. + core.String publisherProfileId; + + /// URL to a publisher rate card. + core.String rateCardInfoUrl; + + /// URL to a sample content page. + core.String samplePageUrl; + + /// Seller of the publisher profile. + Seller seller; + + /// Up to three key metrics and rankings. Max 100 characters each. + /// For example "#1 Mobile News Site for 20 Straight Months". + core.List<core.String> topHeadlines; + + PublisherProfile(); + + PublisherProfile.fromJson(core.Map _json) { + if (_json.containsKey("audienceDescription")) { + audienceDescription = _json["audienceDescription"]; + } + if (_json.containsKey("buyerPitchStatement")) { + buyerPitchStatement = _json["buyerPitchStatement"]; + } + if (_json.containsKey("directDealsContact")) { + directDealsContact = _json["directDealsContact"]; + } + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("domains")) { + domains = (_json["domains"] as core.List).cast<core.String>(); + } + if (_json.containsKey("googlePlusUrl")) { + googlePlusUrl = _json["googlePlusUrl"]; + } + if (_json.containsKey("logoUrl")) { + logoUrl = _json["logoUrl"]; + } + if (_json.containsKey("mediaKitUrl")) { + mediaKitUrl = _json["mediaKitUrl"]; + } + if (_json.containsKey("overview")) { + overview = _json["overview"]; + } + if (_json.containsKey("programmaticDealsContact")) { + programmaticDealsContact = _json["programmaticDealsContact"]; + } + if (_json.containsKey("publisherProfileId")) { + publisherProfileId = _json["publisherProfileId"]; + } + if (_json.containsKey("rateCardInfoUrl")) { + rateCardInfoUrl = _json["rateCardInfoUrl"]; + } + if (_json.containsKey("samplePageUrl")) { + samplePageUrl = _json["samplePageUrl"]; + } + if (_json.containsKey("seller")) { + seller = new Seller.fromJson(_json["seller"]); + } + if (_json.containsKey("topHeadlines")) { + topHeadlines = (_json["topHeadlines"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (audienceDescription != null) { + _json["audienceDescription"] = audienceDescription; + } + if (buyerPitchStatement != null) { + _json["buyerPitchStatement"] = buyerPitchStatement; + } + if (directDealsContact != null) { + _json["directDealsContact"] = directDealsContact; + } + if (displayName != null) { + _json["displayName"] = displayName; + } + if (domains != null) { + _json["domains"] = domains; + } + if (googlePlusUrl != null) { + _json["googlePlusUrl"] = googlePlusUrl; + } + if (logoUrl != null) { + _json["logoUrl"] = logoUrl; + } + if (mediaKitUrl != null) { + _json["mediaKitUrl"] = mediaKitUrl; + } + if (overview != null) { + _json["overview"] = overview; + } + if (programmaticDealsContact != null) { + _json["programmaticDealsContact"] = programmaticDealsContact; + } + if (publisherProfileId != null) { + _json["publisherProfileId"] = publisherProfileId; + } + if (rateCardInfoUrl != null) { + _json["rateCardInfoUrl"] = rateCardInfoUrl; + } + if (samplePageUrl != null) { + _json["samplePageUrl"] = samplePageUrl; + } + if (seller != null) { + _json["seller"] = (seller).toJson(); + } + if (topHeadlines != null) { + _json["topHeadlines"] = topHeadlines; + } + return _json; + } +} + /// An open-ended realtime time range specified by the start timestamp. /// For filter sets that specify a realtime time range RTB metrics continue to /// be aggregated throughout the lifetime of the filter set. @@ -6485,18 +10026,18 @@ } /// A relative date range, specified by an offset and a duration. -/// The supported range of dates begins 30 days before today and ends today. -/// I.e. the limits for these values are: +/// The supported range of dates begins 30 days before today and ends today, +/// i.e., the limits for these values are: /// offset_days >= 0 /// duration_days >= 1 /// offset_days + duration_days <= 30 class RelativeDateRange { - /// The number of days in the requested date range. E.g. for a range spanning - /// today, 1. For a range spanning the last 7 days, 7. + /// The number of days in the requested date range, e.g., for a range spanning + /// today: 1. For a range spanning the last 7 days: 7. core.int durationDays; /// The end date of the filter set, specified as the number of days before - /// today. E.g. for a range where the last date is today, 0. + /// today, e.g., for a range where the last date is today: 0. core.int offsetDays; RelativeDateRange(); @@ -6546,16 +10087,38 @@ } } +/// Request message to resume (unpause) serving for an already-finalized +/// proposal. +class ResumeProposalRequest { + ResumeProposalRequest(); + + ResumeProposalRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + /// A response may include multiple rows, breaking down along various /// dimensions. /// Encapsulates the values of all dimensions for a given row. class RowDimensions { + /// The publisher identifier for this row, if a breakdown by + /// [BreakdownDimension.PUBLISHER_IDENTIFIER](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/bidders.accounts.filterSets#FilterSet.BreakdownDimension) + /// was requested. + core.String publisherIdentifier; + /// The time interval that this row represents. TimeInterval timeInterval; RowDimensions(); RowDimensions.fromJson(core.Map _json) { + if (_json.containsKey("publisherIdentifier")) { + publisherIdentifier = _json["publisherIdentifier"]; + } if (_json.containsKey("timeInterval")) { timeInterval = new TimeInterval.fromJson(_json["timeInterval"]); } @@ -6564,6 +10127,9 @@ core.Map<core.String, core.Object> toJson() { final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>(); + if (publisherIdentifier != null) { + _json["publisherIdentifier"] = publisherIdentifier; + } if (timeInterval != null) { _json["timeInterval"] = (timeInterval).toJson(); } @@ -6594,6 +10160,40 @@ } } +/// Represents a seller of inventory. Each seller is identified by a unique +/// Ad Manager account ID. +class Seller { + /// The unique ID for the seller. The seller fills in this field. + /// The seller account ID is then available to buyer in the product. + core.String accountId; + + /// Optional sub-account ID for the seller. + core.String subAccountId; + + Seller(); + + Seller.fromJson(core.Map _json) { + if (_json.containsKey("accountId")) { + accountId = _json["accountId"]; + } + if (_json.containsKey("subAccountId")) { + subAccountId = _json["subAccountId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (accountId != null) { + _json["accountId"] = accountId; + } + if (subAccountId != null) { + _json["subAccountId"] = subAccountId; + } + return _json; + } +} + /// The serving context for this restriction. class ServingContext { /// Matches all contexts. @@ -6740,6 +10340,39 @@ } } +/// Message depicting the size of the creative. The units of width and +/// height depend on the type of the targeting. +class Size { + /// The height of the creative. + core.int height; + + /// The width of the creative + core.int width; + + Size(); + + Size.fromJson(core.Map _json) { + if (_json.containsKey("height")) { + height = _json["height"]; + } + if (_json.containsKey("width")) { + width = _json["width"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (height != null) { + _json["height"] = height; + } + if (width != null) { + _json["width"] = width; + } + return _json; + } +} + /// A request for stopping notifications for changes to creative Status. class StopWatchingCreativeRequest { StopWatchingCreativeRequest(); @@ -6753,6 +10386,160 @@ } } +/// Advertisers can target different attributes of an ad slot. For example, +/// they can choose to show ads only if the user is in the U.S. Such +/// targeting criteria can be specified as part of Shared Targeting. +class TargetingCriteria { + /// The list of values to exclude from targeting. Each value is AND'd + /// together. + core.List<TargetingValue> exclusions; + + /// The list of value to include as part of the targeting. Each value is OR'd + /// together. + core.List<TargetingValue> inclusions; + + /// The key representing the shared targeting criterion. + /// Targeting criteria defined by Google ad servers will begin with GOOG_. + /// Third parties may define their own keys. + /// A list of permissible keys along with the acceptable values will be + /// provided as part of the external documentation. + core.String key; + + TargetingCriteria(); + + TargetingCriteria.fromJson(core.Map _json) { + if (_json.containsKey("exclusions")) { + exclusions = (_json["exclusions"] as core.List) + .map<TargetingValue>((value) => new TargetingValue.fromJson(value)) + .toList(); + } + if (_json.containsKey("inclusions")) { + inclusions = (_json["inclusions"] as core.List) + .map<TargetingValue>((value) => new TargetingValue.fromJson(value)) + .toList(); + } + if (_json.containsKey("key")) { + key = _json["key"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (exclusions != null) { + _json["exclusions"] = + exclusions.map((value) => (value).toJson()).toList(); + } + if (inclusions != null) { + _json["inclusions"] = + inclusions.map((value) => (value).toJson()).toList(); + } + if (key != null) { + _json["key"] = key; + } + return _json; + } +} + +/// A polymorphic targeting value used as part of Shared Targeting. +class TargetingValue { + /// The creative size value to include/exclude. + /// Filled in when key = GOOG_CREATIVE_SIZE + CreativeSize creativeSizeValue; + + /// The daypart targeting to include / exclude. + /// Filled in when the key is GOOG_DAYPART_TARGETING. + /// The definition of this targeting is derived from the structure + /// used by Ad Manager. + DayPartTargeting dayPartTargetingValue; + + /// The long value to include/exclude. + core.String longValue; + + /// The string value to include/exclude. + core.String stringValue; + + TargetingValue(); + + TargetingValue.fromJson(core.Map _json) { + if (_json.containsKey("creativeSizeValue")) { + creativeSizeValue = new CreativeSize.fromJson(_json["creativeSizeValue"]); + } + if (_json.containsKey("dayPartTargetingValue")) { + dayPartTargetingValue = + new DayPartTargeting.fromJson(_json["dayPartTargetingValue"]); + } + if (_json.containsKey("longValue")) { + longValue = _json["longValue"]; + } + if (_json.containsKey("stringValue")) { + stringValue = _json["stringValue"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (creativeSizeValue != null) { + _json["creativeSizeValue"] = (creativeSizeValue).toJson(); + } + if (dayPartTargetingValue != null) { + _json["dayPartTargetingValue"] = (dayPartTargetingValue).toJson(); + } + if (longValue != null) { + _json["longValue"] = longValue; + } + if (stringValue != null) { + _json["stringValue"] = stringValue; + } + return _json; + } +} + +/// Represents targeting about various types of technology. +class TechnologyTargeting { + /// IDs of device capabilities to be included/excluded. + CriteriaTargeting deviceCapabilityTargeting; + + /// IDs of device categories to be included/excluded. + CriteriaTargeting deviceCategoryTargeting; + + /// Operating system related targeting information. + OperatingSystemTargeting operatingSystemTargeting; + + TechnologyTargeting(); + + TechnologyTargeting.fromJson(core.Map _json) { + if (_json.containsKey("deviceCapabilityTargeting")) { + deviceCapabilityTargeting = + new CriteriaTargeting.fromJson(_json["deviceCapabilityTargeting"]); + } + if (_json.containsKey("deviceCategoryTargeting")) { + deviceCategoryTargeting = + new CriteriaTargeting.fromJson(_json["deviceCategoryTargeting"]); + } + if (_json.containsKey("operatingSystemTargeting")) { + operatingSystemTargeting = new OperatingSystemTargeting.fromJson( + _json["operatingSystemTargeting"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (deviceCapabilityTargeting != null) { + _json["deviceCapabilityTargeting"] = (deviceCapabilityTargeting).toJson(); + } + if (deviceCategoryTargeting != null) { + _json["deviceCategoryTargeting"] = (deviceCategoryTargeting).toJson(); + } + if (operatingSystemTargeting != null) { + _json["operatingSystemTargeting"] = (operatingSystemTargeting).toJson(); + } + return _json; + } +} + /// An interval of time, with an absolute start and end. class TimeInterval { /// The timestamp marking the end of the range (exclusive) for which data is @@ -6787,6 +10574,96 @@ } } +/// Represents a time of day. The date and time zone are either not significant +/// or are specified elsewhere. An API may choose to allow leap seconds. Related +/// types are google.type.Date and `google.protobuf.Timestamp`. +class TimeOfDay { + /// Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + /// to allow the value "24:00:00" for scenarios like business closing time. + core.int hours; + + /// Minutes of hour of day. Must be from 0 to 59. + core.int minutes; + + /// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + core.int nanos; + + /// Seconds of minutes of the time. Must normally be from 0 to 59. An API may + /// allow the value 60 if it allows leap-seconds. + core.int seconds; + + TimeOfDay(); + + TimeOfDay.fromJson(core.Map _json) { + if (_json.containsKey("hours")) { + hours = _json["hours"]; + } + if (_json.containsKey("minutes")) { + minutes = _json["minutes"]; + } + if (_json.containsKey("nanos")) { + nanos = _json["nanos"]; + } + if (_json.containsKey("seconds")) { + seconds = _json["seconds"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (hours != null) { + _json["hours"] = hours; + } + if (minutes != null) { + _json["minutes"] = minutes; + } + if (nanos != null) { + _json["nanos"] = nanos; + } + if (seconds != null) { + _json["seconds"] = seconds; + } + return _json; + } +} + +/// Represents a list of targeted and excluded URLs (e.g., google.com). +/// For Private Auction and AdX Preferred Deals, URLs are either included or +/// excluded. +/// For Programmatic Guaranteed and Preferred Deals, this doesn't +/// apply. +class UrlTargeting { + /// A list of URLs to be excluded. + core.List<core.String> excludedUrls; + + /// A list of URLs to be included. + core.List<core.String> targetedUrls; + + UrlTargeting(); + + UrlTargeting.fromJson(core.Map _json) { + if (_json.containsKey("excludedUrls")) { + excludedUrls = (_json["excludedUrls"] as core.List).cast<core.String>(); + } + if (_json.containsKey("targetedUrls")) { + targetedUrls = (_json["targetedUrls"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (excludedUrls != null) { + _json["excludedUrls"] = excludedUrls; + } + if (targetedUrls != null) { + _json["targetedUrls"] = targetedUrls; + } + return _json; + } +} + /// Video content for a creative. class VideoContent { /// The URL to fetch a video ad. @@ -6820,6 +10697,43 @@ } } +/// Represents targeting information about video. +class VideoTargeting { + /// A list of video positions to be excluded. + /// Position types can either be included or excluded (XOR). + core.List<core.String> excludedPositionTypes; + + /// A list of video positions to be included. + /// When the included list is present, the excluded list must be empty. + /// When the excluded list is present, the included list must be empty. + core.List<core.String> targetedPositionTypes; + + VideoTargeting(); + + VideoTargeting.fromJson(core.Map _json) { + if (_json.containsKey("excludedPositionTypes")) { + excludedPositionTypes = + (_json["excludedPositionTypes"] as core.List).cast<core.String>(); + } + if (_json.containsKey("targetedPositionTypes")) { + targetedPositionTypes = + (_json["targetedPositionTypes"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (excludedPositionTypes != null) { + _json["excludedPositionTypes"] = excludedPositionTypes; + } + if (targetedPositionTypes != null) { + _json["targetedPositionTypes"] = targetedPositionTypes; + } + return _json; + } +} + /// A request for watching changes to creative Status. class WatchCreativeRequest { /// The Pub/Sub topic to publish notifications to.
diff --git a/generated/googleapis_beta/lib/alertcenter/v1beta1.dart b/generated/googleapis_beta/lib/alertcenter/v1beta1.dart new file mode 100644 index 0000000..ee3c038 --- /dev/null +++ b/generated/googleapis_beta/lib/alertcenter/v1beta1.dart
@@ -0,0 +1,1740 @@ +// This is a generated file (see the discoveryapis_generator project). + +// ignore_for_file: unnecessary_cast + +library googleapis_beta.alertcenter.v1beta1; + +import 'dart:core' as core; +import 'dart:async' as async; +import 'dart:convert' as convert; + +import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; +import 'package:http/http.dart' as http; + +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' + show ApiRequestError, DetailedApiRequestError; + +const core.String USER_AGENT = 'dart-api-client alertcenter/v1beta1'; + +/// Manages alerts on issues affecting your domain. +class AlertcenterApi { + /// See and delete your domain's G Suite alerts, and send alert feedback + static const AppsAlertsScope = "https://www.googleapis.com/auth/apps.alerts"; + + final commons.ApiRequester _requester; + + AlertsResourceApi get alerts => new AlertsResourceApi(_requester); + V1beta1ResourceApi get v1beta1 => new V1beta1ResourceApi(_requester); + + AlertcenterApi(http.Client client, + {core.String rootUrl: "https://alertcenter.googleapis.com/", + core.String servicePath: ""}) + : _requester = + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); +} + +class AlertsResourceApi { + final commons.ApiRequester _requester; + + AlertsFeedbackResourceApi get feedback => + new AlertsFeedbackResourceApi(_requester); + + AlertsResourceApi(commons.ApiRequester client) : _requester = client; + + /// Marks the specified alert for deletion. An alert that has been marked for + /// deletion is removed from Alert Center after 30 days. + /// Marking an alert for deletion has no effect on an alert which has + /// already been marked for deletion. Attempting to mark a nonexistent alert + /// for deletion results in a `NOT_FOUND` error. + /// + /// Request parameters: + /// + /// [alertId] - Required. The identifier of the alert to delete. + /// + /// [customerId] - Optional. The unique identifier of the G Suite organization + /// account of the + /// customer the alert is associated with. + /// Inferred from the caller identity if not provided. + /// + /// [$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 alertId, + {core.String customerId, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (alertId == null) { + throw new core.ArgumentError("Parameter alertId is required."); + } + if (customerId != null) { + _queryParams["customerId"] = [customerId]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/alerts/' + commons.Escaper.ecapeVariable('$alertId'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Empty.fromJson(data)); + } + + /// Gets the specified alert. + /// + /// Request parameters: + /// + /// [alertId] - Required. The identifier of the alert to retrieve. + /// Returns a NOT_FOUND error if no such alert. + /// + /// [customerId] - Optional. The unique identifier of the G Suite organization + /// account of the + /// customer the alert is associated with. + /// Inferred from the caller identity if not provided. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Alert]. + /// + /// 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<Alert> get(core.String alertId, + {core.String customerId, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (alertId == null) { + throw new core.ArgumentError("Parameter alertId is required."); + } + if (customerId != null) { + _queryParams["customerId"] = [customerId]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/alerts/' + commons.Escaper.ecapeVariable('$alertId'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Alert.fromJson(data)); + } + + /// Lists the alerts. + /// + /// Request parameters: + /// + /// [filter] - Optional. A query string for filtering alert results. + /// For more details, see [Query + /// filters](/admin-sdk/alertcenter/guides/query-filters) and [Supported + /// query filter + /// fields](/admin-sdk/alertcenter/reference/filter-fields#alerts.list). + /// + /// [pageToken] - Optional. A token identifying a page of results the server + /// should return. + /// If empty, a new iteration is started. To continue an iteration, pass in + /// the value from the previous ListAlertsResponse's + /// next_page_token field. + /// + /// [orderBy] - Optional. The sort order of the list results. + /// If not specified results may be returned in arbitrary order. + /// You can sort the results in descending order based on the creation + /// timestamp using `order_by="create_time desc"`. + /// Currently, only sorting by `create_time desc` is supported. + /// + /// [customerId] - Optional. The unique identifier of the G Suite organization + /// account of the + /// customer the alerts are associated with. + /// Inferred from the caller identity if not provided. + /// + /// [pageSize] - Optional. The requested page size. Server may return fewer + /// items than + /// requested. If unspecified, server picks an appropriate default. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListAlertsResponse]. + /// + /// 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<ListAlertsResponse> list( + {core.String filter, + core.String pageToken, + core.String orderBy, + core.String customerId, + core.int pageSize, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (orderBy != null) { + _queryParams["orderBy"] = [orderBy]; + } + if (customerId != null) { + _queryParams["customerId"] = [customerId]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/alerts'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListAlertsResponse.fromJson(data)); + } + + /// Restores, or "undeletes", an alert that was marked for deletion within the + /// past 30 days. Attempting to undelete an alert which was marked for + /// deletion + /// over 30 days ago (which has been removed from the Alert Center database) + /// or + /// a nonexistent alert returns a `NOT_FOUND` error. Attempting to + /// undelete an alert which has not been marked for deletion has no effect. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [alertId] - Required. The identifier of the alert to undelete. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Alert]. + /// + /// 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<Alert> undelete( + UndeleteAlertRequest request, core.String alertId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (alertId == null) { + throw new core.ArgumentError("Parameter alertId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/alerts/' + + commons.Escaper.ecapeVariable('$alertId') + + ':undelete'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Alert.fromJson(data)); + } +} + +class AlertsFeedbackResourceApi { + final commons.ApiRequester _requester; + + AlertsFeedbackResourceApi(commons.ApiRequester client) : _requester = client; + + /// Creates new feedback for an alert. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [alertId] - Required. The identifier of the alert this feedback belongs + /// to. + /// Returns a `NOT_FOUND` error if no such alert. + /// + /// [customerId] - Optional. The unique identifier of the G Suite organization + /// account of the + /// customer the alert is associated with. + /// Inferred from the caller identity if not provided. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [AlertFeedback]. + /// + /// 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<AlertFeedback> create(AlertFeedback request, core.String alertId, + {core.String customerId, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (alertId == null) { + throw new core.ArgumentError("Parameter alertId is required."); + } + if (customerId != null) { + _queryParams["customerId"] = [customerId]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/alerts/' + + commons.Escaper.ecapeVariable('$alertId') + + '/feedback'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new AlertFeedback.fromJson(data)); + } + + /// Lists all the feedback for an alert. + /// + /// Request parameters: + /// + /// [alertId] - Required. The alert identifier. + /// The "-" wildcard could be used to represent all alerts. + /// If alert does not exist returns a `NOT_FOUND` error. + /// + /// [customerId] - Optional. The unique identifier of the G Suite organization + /// account of the + /// customer the alert feedback are associated with. + /// Inferred from the caller identity if not provided. + /// + /// [filter] - Optional. A query string for filtering alert feedback results. + /// For more details, see [Query + /// filters](/admin-sdk/alertcenter/guides/query-filters) and [Supported + /// query filter + /// fields](/admin-sdk/alertcenter/reference/filter-fields#alerts.feedback.list). + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListAlertFeedbackResponse]. + /// + /// 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<ListAlertFeedbackResponse> list(core.String alertId, + {core.String customerId, core.String filter, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (alertId == null) { + throw new core.ArgumentError("Parameter alertId is required."); + } + if (customerId != null) { + _queryParams["customerId"] = [customerId]; + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/alerts/' + + commons.Escaper.ecapeVariable('$alertId') + + '/feedback'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new ListAlertFeedbackResponse.fromJson(data)); + } +} + +class V1beta1ResourceApi { + final commons.ApiRequester _requester; + + V1beta1ResourceApi(commons.ApiRequester client) : _requester = client; + + /// Returns customer-level settings. + /// + /// Request parameters: + /// + /// [customerId] - Optional. The unique identifier of the G Suite organization + /// account of the + /// customer the alert settings are associated with. + /// Inferred from the caller identity if not provided. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Settings]. + /// + /// 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<Settings> getSettings( + {core.String customerId, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (customerId != null) { + _queryParams["customerId"] = [customerId]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/settings'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Settings.fromJson(data)); + } + + /// Update the customer-level settings. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [customerId] - Optional. The unique identifier of the G Suite organization + /// account of the + /// customer the alert settings are associated with. + /// Inferred from the caller identity if not provided. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Settings]. + /// + /// 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<Settings> updateSettings(Settings request, + {core.String customerId, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (customerId != null) { + _queryParams["customerId"] = [customerId]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/settings'; + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Settings.fromJson(data)); + } +} + +/// Alerts for user account warning events. +class AccountWarning { + /// Required. The email of the user that this event belongs to. + core.String email; + + /// Optional. Details of the login action associated with the warning event. + /// This is only available for: + /// + /// * Suspicious login + /// * Suspicious login (less secure app) + /// * Suspicious programmatic login + /// * User suspended (suspicious activity) + LoginDetails loginDetails; + + AccountWarning(); + + AccountWarning.fromJson(core.Map _json) { + if (_json.containsKey("email")) { + email = _json["email"]; + } + if (_json.containsKey("loginDetails")) { + loginDetails = new LoginDetails.fromJson(_json["loginDetails"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (email != null) { + _json["email"] = email; + } + if (loginDetails != null) { + _json["loginDetails"] = (loginDetails).toJson(); + } + return _json; + } +} + +/// An alert affecting a customer. +/// All fields are read-only once created. +class Alert { + /// Output only. The unique identifier for the alert. + core.String alertId; + + /// Output only. The time this alert was created. + core.String createTime; + + /// Output only. The unique identifier of the Google account of the customer. + core.String customerId; + + /// Optional. The data associated with this alert, for example + /// google.apps.alertcenter.type.DeviceCompromised. + /// + /// 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> data; + + /// Output only. `True` if this alert is marked for deletion. + core.bool deleted; + + /// Optional. The time the event that caused this alert ceased being active. + /// If provided, the end time must not be earlier than the start time. + /// If not provided, the end time defaults to the start time. + core.String endTime; + + /// Output only. An optional + /// [Security Investigation Tool](https://support.google.com/a/answer/7575955) + /// query for this alert. + core.String securityInvestigationToolLink; + + /// Required. A unique identifier for the system that reported the alert. + /// + /// Supported sources are any of the following: + /// + /// * Google Operations + /// * Mobile device management + /// * Gmail phishing + /// * Domain wide takeout + /// * Government attack warning + /// * Google identity + core.String source; + + /// Required. The time the event that caused this alert was started or + /// detected. + core.String startTime; + + /// Required. The type of the alert. + /// For a list of available alert types see + /// [G Suite Alert types](/admin-sdk/alertcenter/reference/alert-types). + core.String type; + + Alert(); + + Alert.fromJson(core.Map _json) { + if (_json.containsKey("alertId")) { + alertId = _json["alertId"]; + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("customerId")) { + customerId = _json["customerId"]; + } + if (_json.containsKey("data")) { + data = (_json["data"] as core.Map).cast<core.String, core.Object>(); + } + if (_json.containsKey("deleted")) { + deleted = _json["deleted"]; + } + if (_json.containsKey("endTime")) { + endTime = _json["endTime"]; + } + if (_json.containsKey("securityInvestigationToolLink")) { + securityInvestigationToolLink = _json["securityInvestigationToolLink"]; + } + if (_json.containsKey("source")) { + source = _json["source"]; + } + if (_json.containsKey("startTime")) { + startTime = _json["startTime"]; + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (alertId != null) { + _json["alertId"] = alertId; + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (customerId != null) { + _json["customerId"] = customerId; + } + if (data != null) { + _json["data"] = data; + } + if (deleted != null) { + _json["deleted"] = deleted; + } + if (endTime != null) { + _json["endTime"] = endTime; + } + if (securityInvestigationToolLink != null) { + _json["securityInvestigationToolLink"] = securityInvestigationToolLink; + } + if (source != null) { + _json["source"] = source; + } + if (startTime != null) { + _json["startTime"] = startTime; + } + if (type != null) { + _json["type"] = type; + } + return _json; + } +} + +/// A customer feedback about an alert. +class AlertFeedback { + /// Output only. The alert identifier. + core.String alertId; + + /// Output only. The time this feedback was created. + core.String createTime; + + /// Output only. The unique identifier of the Google account of the customer. + core.String customerId; + + /// Output only. The email of the user that provided the feedback. + core.String email; + + /// Output only. The unique identifier for the feedback. + core.String feedbackId; + + /// Required. The type of the feedback. + /// Possible string values are: + /// - "ALERT_FEEDBACK_TYPE_UNSPECIFIED" : The feedback type is not specified. + /// - "NOT_USEFUL" : The alert report is not useful. + /// - "SOMEWHAT_USEFUL" : The alert report is somewhat useful. + /// - "VERY_USEFUL" : The alert report is very useful. + core.String type; + + AlertFeedback(); + + AlertFeedback.fromJson(core.Map _json) { + if (_json.containsKey("alertId")) { + alertId = _json["alertId"]; + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("customerId")) { + customerId = _json["customerId"]; + } + if (_json.containsKey("email")) { + email = _json["email"]; + } + if (_json.containsKey("feedbackId")) { + feedbackId = _json["feedbackId"]; + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (alertId != null) { + _json["alertId"] = alertId; + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (customerId != null) { + _json["customerId"] = customerId; + } + if (email != null) { + _json["email"] = email; + } + if (feedbackId != null) { + _json["feedbackId"] = feedbackId; + } + if (type != null) { + _json["type"] = type; + } + return _json; + } +} + +/// Attachment with application-specific information about an alert. +class Attachment { + /// A CSV file attachment. + Csv csv; + + Attachment(); + + Attachment.fromJson(core.Map _json) { + if (_json.containsKey("csv")) { + csv = new Csv.fromJson(_json["csv"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (csv != null) { + _json["csv"] = (csv).toJson(); + } + return _json; + } +} + +/// Alert for setting the domain or IP that malicious email comes from as +/// whitelisted domain or IP in Gmail advanced settings. +class BadWhitelist { + /// The domain ID. + DomainId domainId; + + /// The entity whose actions triggered a Gmail phishing alert. + MaliciousEntity maliciousEntity; + + /// The list of messages contained by this alert. + core.List<GmailMessageInfo> messages; + + /// The source IP address of the malicious email, for example, + /// `127.0.0.1`. + core.String sourceIp; + + BadWhitelist(); + + BadWhitelist.fromJson(core.Map _json) { + if (_json.containsKey("domainId")) { + domainId = new DomainId.fromJson(_json["domainId"]); + } + if (_json.containsKey("maliciousEntity")) { + maliciousEntity = new MaliciousEntity.fromJson(_json["maliciousEntity"]); + } + if (_json.containsKey("messages")) { + messages = (_json["messages"] as core.List) + .map<GmailMessageInfo>( + (value) => new GmailMessageInfo.fromJson(value)) + .toList(); + } + if (_json.containsKey("sourceIp")) { + sourceIp = _json["sourceIp"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (domainId != null) { + _json["domainId"] = (domainId).toJson(); + } + if (maliciousEntity != null) { + _json["maliciousEntity"] = (maliciousEntity).toJson(); + } + if (messages != null) { + _json["messages"] = messages.map((value) => (value).toJson()).toList(); + } + if (sourceIp != null) { + _json["sourceIp"] = sourceIp; + } + return _json; + } +} + +/// A reference to a Cloud Pubsub topic. +/// +/// To register for notifications, the owner of the topic must grant +/// `alerts-api-push-notifications@system.gserviceaccount.com` the +/// `projects.topics.publish` permission. +class CloudPubsubTopic { + /// Optional. The format of the payload that would be sent. + /// If not specified the format will be JSON. + /// Possible string values are: + /// - "PAYLOAD_FORMAT_UNSPECIFIED" : Payload format is not specified (will use + /// JSON as default). + /// - "JSON" : Use JSON. + core.String payloadFormat; + + /// The `name` field of a Cloud Pubsub [Topic] + /// (https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic). + core.String topicName; + + CloudPubsubTopic(); + + CloudPubsubTopic.fromJson(core.Map _json) { + if (_json.containsKey("payloadFormat")) { + payloadFormat = _json["payloadFormat"]; + } + if (_json.containsKey("topicName")) { + topicName = _json["topicName"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (payloadFormat != null) { + _json["payloadFormat"] = payloadFormat; + } + if (topicName != null) { + _json["topicName"] = topicName; + } + return _json; + } +} + +/// A representation of a CSV file attachment, as a list of column headers and +/// a list of data rows. +class Csv { + /// The list of data rows in a CSV file, as string arrays rather than as a + /// single comma-separated string. + core.List<CsvRow> dataRows; + + /// The list of headers for data columns in a CSV file. + core.List<core.String> headers; + + Csv(); + + Csv.fromJson(core.Map _json) { + if (_json.containsKey("dataRows")) { + dataRows = (_json["dataRows"] as core.List) + .map<CsvRow>((value) => new CsvRow.fromJson(value)) + .toList(); + } + if (_json.containsKey("headers")) { + headers = (_json["headers"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (dataRows != null) { + _json["dataRows"] = dataRows.map((value) => (value).toJson()).toList(); + } + if (headers != null) { + _json["headers"] = headers; + } + return _json; + } +} + +/// A representation of a single data row in a CSV file. +class CsvRow { + /// The data entries in a CSV file row, as a string array rather than a + /// single comma-separated string. + core.List<core.String> entries; + + CsvRow(); + + CsvRow.fromJson(core.Map _json) { + if (_json.containsKey("entries")) { + entries = (_json["entries"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (entries != null) { + _json["entries"] = entries; + } + return _json; + } +} + +/// A mobile device compromised alert. Derived from audit logs. +class DeviceCompromised { + /// The email of the user this alert was created for. + core.String email; + + /// Required. The list of security events. + core.List<DeviceCompromisedSecurityDetail> events; + + DeviceCompromised(); + + DeviceCompromised.fromJson(core.Map _json) { + if (_json.containsKey("email")) { + email = _json["email"]; + } + if (_json.containsKey("events")) { + events = (_json["events"] as core.List) + .map<DeviceCompromisedSecurityDetail>( + (value) => new DeviceCompromisedSecurityDetail.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (email != null) { + _json["email"] = email; + } + if (events != null) { + _json["events"] = events.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Detailed information of a single MDM device compromised event. +class DeviceCompromisedSecurityDetail { + /// The device compromised state. Possible values are "`Compromised`" or + /// "`Not Compromised`". + core.String deviceCompromisedState; + + /// Required. The device ID. + core.String deviceId; + + /// The model of the device. + core.String deviceModel; + + /// The type of the device. + core.String deviceType; + + /// Required for iOS, empty for others. + core.String iosVendorId; + + /// The device resource ID. + core.String resourceId; + + /// The serial number of the device. + core.String serialNumber; + + DeviceCompromisedSecurityDetail(); + + DeviceCompromisedSecurityDetail.fromJson(core.Map _json) { + if (_json.containsKey("deviceCompromisedState")) { + deviceCompromisedState = _json["deviceCompromisedState"]; + } + if (_json.containsKey("deviceId")) { + deviceId = _json["deviceId"]; + } + if (_json.containsKey("deviceModel")) { + deviceModel = _json["deviceModel"]; + } + if (_json.containsKey("deviceType")) { + deviceType = _json["deviceType"]; + } + if (_json.containsKey("iosVendorId")) { + iosVendorId = _json["iosVendorId"]; + } + if (_json.containsKey("resourceId")) { + resourceId = _json["resourceId"]; + } + if (_json.containsKey("serialNumber")) { + serialNumber = _json["serialNumber"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (deviceCompromisedState != null) { + _json["deviceCompromisedState"] = deviceCompromisedState; + } + if (deviceId != null) { + _json["deviceId"] = deviceId; + } + if (deviceModel != null) { + _json["deviceModel"] = deviceModel; + } + if (deviceType != null) { + _json["deviceType"] = deviceType; + } + if (iosVendorId != null) { + _json["iosVendorId"] = iosVendorId; + } + if (resourceId != null) { + _json["resourceId"] = resourceId; + } + if (serialNumber != null) { + _json["serialNumber"] = serialNumber; + } + return _json; + } +} + +/// Domain ID of Gmail phishing alerts. +class DomainId { + /// The primary domain for the customer. + core.String customerPrimaryDomain; + + DomainId(); + + DomainId.fromJson(core.Map _json) { + if (_json.containsKey("customerPrimaryDomain")) { + customerPrimaryDomain = _json["customerPrimaryDomain"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (customerPrimaryDomain != null) { + _json["customerPrimaryDomain"] = customerPrimaryDomain; + } + return _json; + } +} + +/// A takeout operation for the entire domain was initiated by an admin. Derived +/// from audit logs. +class DomainWideTakeoutInitiated { + /// The email of the admin who initiated the takeout. + core.String email; + + /// The takeout request ID. + core.String takeoutRequestId; + + DomainWideTakeoutInitiated(); + + DomainWideTakeoutInitiated.fromJson(core.Map _json) { + if (_json.containsKey("email")) { + email = _json["email"]; + } + if (_json.containsKey("takeoutRequestId")) { + takeoutRequestId = _json["takeoutRequestId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (email != null) { + _json["email"] = email; + } + if (takeoutRequestId != null) { + _json["takeoutRequestId"] = takeoutRequestId; + } + return _json; + } +} + +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. +class Empty { + Empty(); + + Empty.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// Details of a message in phishing spike alert. +class GmailMessageInfo { + /// The `SHA256` hash of email's attachment and all MIME parts. + core.List<core.String> attachmentsSha256Hash; + + /// The date the malicious email was sent. + core.String date; + + /// The hash of the message body text. + core.String md5HashMessageBody; + + /// The MD5 Hash of email's subject (only available for reported emails). + core.String md5HashSubject; + + /// The snippet of the message body text (only available for reported emails). + core.String messageBodySnippet; + + /// The message ID. + core.String messageId; + + /// The recipient of this email. + core.String recipient; + + /// The email subject text (only available for reported emails). + core.String subjectText; + + GmailMessageInfo(); + + GmailMessageInfo.fromJson(core.Map _json) { + if (_json.containsKey("attachmentsSha256Hash")) { + attachmentsSha256Hash = + (_json["attachmentsSha256Hash"] as core.List).cast<core.String>(); + } + if (_json.containsKey("date")) { + date = _json["date"]; + } + if (_json.containsKey("md5HashMessageBody")) { + md5HashMessageBody = _json["md5HashMessageBody"]; + } + if (_json.containsKey("md5HashSubject")) { + md5HashSubject = _json["md5HashSubject"]; + } + if (_json.containsKey("messageBodySnippet")) { + messageBodySnippet = _json["messageBodySnippet"]; + } + if (_json.containsKey("messageId")) { + messageId = _json["messageId"]; + } + if (_json.containsKey("recipient")) { + recipient = _json["recipient"]; + } + if (_json.containsKey("subjectText")) { + subjectText = _json["subjectText"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (attachmentsSha256Hash != null) { + _json["attachmentsSha256Hash"] = attachmentsSha256Hash; + } + if (date != null) { + _json["date"] = date; + } + if (md5HashMessageBody != null) { + _json["md5HashMessageBody"] = md5HashMessageBody; + } + if (md5HashSubject != null) { + _json["md5HashSubject"] = md5HashSubject; + } + if (messageBodySnippet != null) { + _json["messageBodySnippet"] = messageBodySnippet; + } + if (messageId != null) { + _json["messageId"] = messageId; + } + if (recipient != null) { + _json["recipient"] = recipient; + } + if (subjectText != null) { + _json["subjectText"] = subjectText; + } + return _json; + } +} + +/// An incident reported by Google Operations for a G Suite application. +class GoogleOperations { + /// The list of emails which correspond to the users directly affected by the + /// incident. + core.List<core.String> affectedUserEmails; + + /// Optional. Application-specific data for an incident, provided when the + /// G Suite application which reported the incident cannot be completely + /// restored to a valid state. + Attachment attachmentData; + + /// A detailed, freeform incident description. + core.String description; + + /// A one-line incident description. + core.String title; + + GoogleOperations(); + + GoogleOperations.fromJson(core.Map _json) { + if (_json.containsKey("affectedUserEmails")) { + affectedUserEmails = + (_json["affectedUserEmails"] as core.List).cast<core.String>(); + } + if (_json.containsKey("attachmentData")) { + attachmentData = new Attachment.fromJson(_json["attachmentData"]); + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("title")) { + title = _json["title"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (affectedUserEmails != null) { + _json["affectedUserEmails"] = affectedUserEmails; + } + if (attachmentData != null) { + _json["attachmentData"] = (attachmentData).toJson(); + } + if (description != null) { + _json["description"] = description; + } + if (title != null) { + _json["title"] = title; + } + return _json; + } +} + +/// Response message for an alert feedback listing request. +class ListAlertFeedbackResponse { + /// The list of alert feedback. + /// Feedback entries for each alert are ordered by creation time descending. + core.List<AlertFeedback> feedback; + + ListAlertFeedbackResponse(); + + ListAlertFeedbackResponse.fromJson(core.Map _json) { + if (_json.containsKey("feedback")) { + feedback = (_json["feedback"] as core.List) + .map<AlertFeedback>((value) => new AlertFeedback.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (feedback != null) { + _json["feedback"] = feedback.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Response message for an alert listing request. +class ListAlertsResponse { + /// The list of alerts. + core.List<Alert> alerts; + + /// The token for the next page. If not empty, indicates that there may be + /// more + /// alerts that match the listing request; this value can be used in a + /// subsequent ListAlertsRequest to get alerts continuing from last result + /// of the current list call. + core.String nextPageToken; + + ListAlertsResponse(); + + ListAlertsResponse.fromJson(core.Map _json) { + if (_json.containsKey("alerts")) { + alerts = (_json["alerts"] as core.List) + .map<Alert>((value) => new Alert.fromJson(value)) + .toList(); + } + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (alerts != null) { + _json["alerts"] = alerts.map((value) => (value).toJson()).toList(); + } + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + return _json; + } +} + +/// The details of the login action. +class LoginDetails { + /// Optional. The human-readable IP address (for example, + /// `11.22.33.44`) that is associated with the warning event. + core.String ipAddress; + + /// Optional. The successful login time that is associated with the warning + /// event. This will not be present for blocked login attempts. + core.String loginTime; + + LoginDetails(); + + LoginDetails.fromJson(core.Map _json) { + if (_json.containsKey("ipAddress")) { + ipAddress = _json["ipAddress"]; + } + if (_json.containsKey("loginTime")) { + loginTime = _json["loginTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (ipAddress != null) { + _json["ipAddress"] = ipAddress; + } + if (loginTime != null) { + _json["loginTime"] = loginTime; + } + return _json; + } +} + +/// Proto for all phishing alerts with common payload. +/// Supported types are any of the following: +/// +/// * User reported phishing +/// * User reported spam spike +/// * Suspicious message reported +/// * Phishing reclassification +/// * Malware reclassification +class MailPhishing { + /// The domain ID. + DomainId domainId; + + /// If `true`, the email originated from within the organization. + core.bool isInternal; + + /// The entity whose actions triggered a Gmail phishing alert. + MaliciousEntity maliciousEntity; + + /// The list of messages contained by this alert. + core.List<GmailMessageInfo> messages; + + MailPhishing(); + + MailPhishing.fromJson(core.Map _json) { + if (_json.containsKey("domainId")) { + domainId = new DomainId.fromJson(_json["domainId"]); + } + if (_json.containsKey("isInternal")) { + isInternal = _json["isInternal"]; + } + if (_json.containsKey("maliciousEntity")) { + maliciousEntity = new MaliciousEntity.fromJson(_json["maliciousEntity"]); + } + if (_json.containsKey("messages")) { + messages = (_json["messages"] as core.List) + .map<GmailMessageInfo>( + (value) => new GmailMessageInfo.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (domainId != null) { + _json["domainId"] = (domainId).toJson(); + } + if (isInternal != null) { + _json["isInternal"] = isInternal; + } + if (maliciousEntity != null) { + _json["maliciousEntity"] = (maliciousEntity).toJson(); + } + if (messages != null) { + _json["messages"] = messages.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Entity whose actions triggered a Gmail phishing alert. +class MaliciousEntity { + /// The sender email address. + core.String fromHeader; + + MaliciousEntity(); + + MaliciousEntity.fromJson(core.Map _json) { + if (_json.containsKey("fromHeader")) { + fromHeader = _json["fromHeader"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fromHeader != null) { + _json["fromHeader"] = fromHeader; + } + return _json; + } +} + +/// Settings for callback notifications. +/// For more details see [G Suite Alert +/// Notification](/admin-sdk/alertcenter/guides/notifications). +class Notification { + /// A Google Cloud Pub/sub topic destination. + CloudPubsubTopic cloudPubsubTopic; + + Notification(); + + Notification.fromJson(core.Map _json) { + if (_json.containsKey("cloudPubsubTopic")) { + cloudPubsubTopic = + new CloudPubsubTopic.fromJson(_json["cloudPubsubTopic"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cloudPubsubTopic != null) { + _json["cloudPubsubTopic"] = (cloudPubsubTopic).toJson(); + } + return _json; + } +} + +/// Alert for a spike in user reported phishing. +/// <aside class="warning"><b>Warning</b>: This type has been deprecated. Use +/// [MailPhishing](/admin-sdk/alertcenter/reference/rest/v1beta1/MailPhishing) +/// instead.</aside> +class PhishingSpike { + /// The domain ID. + DomainId domainId; + + /// If `true`, the email originated from within the organization. + core.bool isInternal; + + /// The entity whose actions triggered a Gmail phishing alert. + MaliciousEntity maliciousEntity; + + /// The list of messages contained by this alert. + core.List<GmailMessageInfo> messages; + + PhishingSpike(); + + PhishingSpike.fromJson(core.Map _json) { + if (_json.containsKey("domainId")) { + domainId = new DomainId.fromJson(_json["domainId"]); + } + if (_json.containsKey("isInternal")) { + isInternal = _json["isInternal"]; + } + if (_json.containsKey("maliciousEntity")) { + maliciousEntity = new MaliciousEntity.fromJson(_json["maliciousEntity"]); + } + if (_json.containsKey("messages")) { + messages = (_json["messages"] as core.List) + .map<GmailMessageInfo>( + (value) => new GmailMessageInfo.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (domainId != null) { + _json["domainId"] = (domainId).toJson(); + } + if (isInternal != null) { + _json["isInternal"] = isInternal; + } + if (maliciousEntity != null) { + _json["maliciousEntity"] = (maliciousEntity).toJson(); + } + if (messages != null) { + _json["messages"] = messages.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Customer-level settings. +class Settings { + /// The list of notifications. + core.List<Notification> notifications; + + Settings(); + + Settings.fromJson(core.Map _json) { + if (_json.containsKey("notifications")) { + notifications = (_json["notifications"] as core.List) + .map<Notification>((value) => new Notification.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (notifications != null) { + _json["notifications"] = + notifications.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A state-sponsored attack alert. Derived from audit logs. +class StateSponsoredAttack { + /// The email of the user this incident was created for. + core.String email; + + StateSponsoredAttack(); + + StateSponsoredAttack.fromJson(core.Map _json) { + if (_json.containsKey("email")) { + email = _json["email"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (email != null) { + _json["email"] = email; + } + return _json; + } +} + +/// A mobile suspicious activity alert. Derived from audit logs. +class SuspiciousActivity { + /// The email of the user this alert was created for. + core.String email; + + /// Required. The list of security events. + core.List<SuspiciousActivitySecurityDetail> events; + + SuspiciousActivity(); + + SuspiciousActivity.fromJson(core.Map _json) { + if (_json.containsKey("email")) { + email = _json["email"]; + } + if (_json.containsKey("events")) { + events = (_json["events"] as core.List) + .map<SuspiciousActivitySecurityDetail>( + (value) => new SuspiciousActivitySecurityDetail.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (email != null) { + _json["email"] = email; + } + if (events != null) { + _json["events"] = events.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Detailed information of a single MDM suspicious activity event. +class SuspiciousActivitySecurityDetail { + /// Required. The device ID. + core.String deviceId; + + /// The model of the device. + core.String deviceModel; + + /// The device property which was changed. + core.String deviceProperty; + + /// The type of the device. + core.String deviceType; + + /// Required for iOS, empty for others. + core.String iosVendorId; + + /// The new value of the device property after the change. + core.String newValue; + + /// The old value of the device property before the change. + core.String oldValue; + + /// The device resource ID. + core.String resourceId; + + /// The serial number of the device. + core.String serialNumber; + + SuspiciousActivitySecurityDetail(); + + SuspiciousActivitySecurityDetail.fromJson(core.Map _json) { + if (_json.containsKey("deviceId")) { + deviceId = _json["deviceId"]; + } + if (_json.containsKey("deviceModel")) { + deviceModel = _json["deviceModel"]; + } + if (_json.containsKey("deviceProperty")) { + deviceProperty = _json["deviceProperty"]; + } + if (_json.containsKey("deviceType")) { + deviceType = _json["deviceType"]; + } + if (_json.containsKey("iosVendorId")) { + iosVendorId = _json["iosVendorId"]; + } + if (_json.containsKey("newValue")) { + newValue = _json["newValue"]; + } + if (_json.containsKey("oldValue")) { + oldValue = _json["oldValue"]; + } + if (_json.containsKey("resourceId")) { + resourceId = _json["resourceId"]; + } + if (_json.containsKey("serialNumber")) { + serialNumber = _json["serialNumber"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (deviceId != null) { + _json["deviceId"] = deviceId; + } + if (deviceModel != null) { + _json["deviceModel"] = deviceModel; + } + if (deviceProperty != null) { + _json["deviceProperty"] = deviceProperty; + } + if (deviceType != null) { + _json["deviceType"] = deviceType; + } + if (iosVendorId != null) { + _json["iosVendorId"] = iosVendorId; + } + if (newValue != null) { + _json["newValue"] = newValue; + } + if (oldValue != null) { + _json["oldValue"] = oldValue; + } + if (resourceId != null) { + _json["resourceId"] = resourceId; + } + if (serialNumber != null) { + _json["serialNumber"] = serialNumber; + } + return _json; + } +} + +/// A request to undelete a specific alert that was marked for deletion. +class UndeleteAlertRequest { + /// Optional. The unique identifier of the G Suite organization account of the + /// customer the alert is associated with. + /// Inferred from the caller identity if not provided. + core.String customerId; + + UndeleteAlertRequest(); + + UndeleteAlertRequest.fromJson(core.Map _json) { + if (_json.containsKey("customerId")) { + customerId = _json["customerId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (customerId != null) { + _json["customerId"] = customerId; + } + return _json; + } +}
diff --git a/generated/googleapis_beta/lib/appengine/v1beta.dart b/generated/googleapis_beta/lib/appengine/v1beta.dart index a437997..33ccf4f 100644 --- a/generated/googleapis_beta/lib/appengine/v1beta.dart +++ b/generated/googleapis_beta/lib/appengine/v1beta.dart
@@ -16,8 +16,7 @@ const core.String USER_AGENT = 'dart-api-client appengine/v1beta'; -/// The App Engine Admin API enables developers to provision and manage their -/// App Engine applications. +/// Provisions and manages developers' App Engine applications. class AppengineApi { /// View and manage your applications deployed on Google App Engine static const AppengineAdminScope = @@ -596,10 +595,10 @@ /// [appsId] - Part of `parent`. Name of the parent Application resource. /// Example: apps/myapp. /// - /// [pageToken] - Continuation token for fetching the next page of results. - /// /// [pageSize] - Maximum results to return per page. /// + /// [pageToken] - Continuation token for fetching the next page of results. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -611,7 +610,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListAuthorizedDomainsResponse> list(core.String appsId, - {core.String pageToken, core.int pageSize, core.String $fields}) { + {core.int pageSize, core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -622,12 +621,12 @@ if (appsId == null) { throw new core.ArgumentError("Parameter appsId is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1182,14 +1181,14 @@ /// [appsId] - Part of `parent`. Name of the Firewall collection to retrieve. /// Example: apps/myapp/firewall/ingressRules. /// + /// [pageToken] - Continuation token for fetching the next page of results. + /// /// [pageSize] - Maximum results to return per page. /// /// [matchingAddress] - A valid IP Address. If set, only rules matching this /// address will be returned. The first returned rule will be the rule that /// fires on requests from this IP. /// - /// [pageToken] - Continuation token for fetching the next page of results. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1201,9 +1200,9 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListIngressRulesResponse> list(core.String appsId, - {core.int pageSize, + {core.String pageToken, + core.int pageSize, core.String matchingAddress, - core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -1215,15 +1214,15 @@ if (appsId == null) { throw new core.ArgumentError("Parameter appsId is required."); } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } if (matchingAddress != null) { _queryParams["matchingAddress"] = [matchingAddress]; } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1369,12 +1368,12 @@ /// [appsId] - Part of `name`. The resource that owns the locations /// collection, if applicable. /// + /// [pageToken] - The standard list page token. + /// /// [pageSize] - The standard list page size. /// /// [filter] - The standard list filter. /// - /// [pageToken] - The standard list page token. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1386,9 +1385,9 @@ /// 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 appsId, - {core.int pageSize, + {core.String pageToken, + core.int pageSize, core.String filter, - core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -1400,15 +1399,15 @@ if (appsId == null) { throw new core.ArgumentError("Parameter appsId is required."); } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } if (filter != null) { _queryParams["filter"] = [filter]; } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1499,12 +1498,12 @@ /// /// [appsId] - Part of `name`. The name of the operation's parent resource. /// + /// [filter] - The standard list filter. + /// /// [pageToken] - The standard list page token. /// /// [pageSize] - The standard list page size. /// - /// [filter] - The standard list filter. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1516,9 +1515,9 @@ /// 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 appsId, - {core.String pageToken, + {core.String filter, + core.String pageToken, core.int pageSize, - core.String filter, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -1530,15 +1529,15 @@ if (appsId == null) { throw new core.ArgumentError("Parameter appsId is required."); } + if (filter != null) { + _queryParams["filter"] = [filter]; + } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } - if (filter != null) { - _queryParams["filter"] = [filter]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1739,11 +1738,11 @@ /// versions that you specify. By default, traffic is shifted immediately. For /// gradual traffic migration, the target versions must be located within /// instances that are configured for both warmup requests - /// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#inboundservicetype) + /// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#InboundServiceType) /// and automatic scaling - /// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#automaticscaling). + /// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#AutomaticScaling). /// You must specify the shardBy - /// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#shardby) + /// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#ShardBy) /// field in the Service resource. Gradual traffic migration is not supported /// in the App Engine flexible environment. For examples, see Migrating and /// Splitting Traffic @@ -2011,8 +2010,6 @@ /// /// [servicesId] - Part of `parent`. See documentation of `appsId`. /// - /// [pageToken] - Continuation token for fetching the next page of results. - /// /// [pageSize] - Maximum results to return per page. /// /// [view] - Controls the set of fields returned in the List response. @@ -2020,6 +2017,8 @@ /// - "BASIC" : A BASIC. /// - "FULL" : A FULL. /// + /// [pageToken] - Continuation token for fetching the next page of results. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -2032,9 +2031,9 @@ /// this method will complete with the same error. async.Future<ListVersionsResponse> list( core.String appsId, core.String servicesId, - {core.String pageToken, - core.int pageSize, + {core.int pageSize, core.String view, + core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -2049,15 +2048,15 @@ if (servicesId == null) { throw new core.ArgumentError("Parameter servicesId is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } if (view != null) { _queryParams["view"] = [view]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -2616,7 +2615,7 @@ /// HTTP path dispatch rules for requests to the application that do not /// explicitly target a service or version. Rules are order-dependent. Up to - /// 20 dispatch rules can be supported.@OutputOnly + /// 20 dispatch rules can be supported. core.List<UrlDispatchRule> dispatchRules; /// The feature specific settings to be used in the application. @@ -2902,10 +2901,12 @@ /// Automatic scaling is based on request rate, response latencies, and other /// application metrics. class AutomaticScaling { - /// Amount of time that the Autoscaler - /// (https://cloud.google.com/compute/docs/autoscaler/) should wait between - /// changes to the number of virtual machines. Only applicable in the App - /// Engine flexible environment. + /// The time period that the Autoscaler + /// (https://cloud.google.com/compute/docs/autoscaler/) should wait before it + /// starts collecting information from a new instance. This prevents the + /// autoscaler from collecting information when the instance is initializing, + /// during which the collected usage would not be reliable. Only applicable in + /// the App Engine flexible environment. core.String coolDownPeriod; /// Target scaling by CPU usage. @@ -3479,10 +3480,9 @@ BuildInfo build; /// Options for any Google Cloud Build builds created as a part of this - /// deployment.Note that this is orthogonal to the build parameter, where the - /// deployment depends on an already existing cloud build. These options will - /// only be used if a new build is created, such as when deploying to the App - /// Engine flexible environment using files or zip. + /// deployment.These options will only be used if a new build is created, such + /// as when deploying to the App Engine flexible environment using files or + /// zip. CloudBuildOptions cloudBuildOptions; /// The Docker image for the container that runs the version. Only applicable @@ -6395,7 +6395,7 @@ /// Duration that static files should be cached by web proxies and browsers. /// Only applicable if the corresponding StaticFilesHandler - /// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#staticfileshandler) + /// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StaticFilesHandler) /// does not specify its own expiration time.Only returned in GET requests if /// view=FULL is set. core.String defaultExpiration; @@ -6500,6 +6500,9 @@ /// Defaults to the default channel. core.String runtimeChannel; + /// The path or name of the app's main executable. + core.String runtimeMainExecutablePath; + /// Current serving status of this version. Only the versions with a SERVING /// status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an /// invalid value. Defaults to SERVING. @@ -6521,6 +6524,9 @@ /// Whether to deploy this version in a container on a virtual machine. core.bool vm; + /// Enables VPC connectivity for standard apps. + VpcAccessConnector vpcAccessConnector; + /// The Google Compute Engine zones that are supported by this version in the /// App Engine flexible environment. core.List<core.String> zones; @@ -6629,6 +6635,9 @@ if (_json.containsKey("runtimeChannel")) { runtimeChannel = _json["runtimeChannel"]; } + if (_json.containsKey("runtimeMainExecutablePath")) { + runtimeMainExecutablePath = _json["runtimeMainExecutablePath"]; + } if (_json.containsKey("servingStatus")) { servingStatus = _json["servingStatus"]; } @@ -6641,6 +6650,10 @@ if (_json.containsKey("vm")) { vm = _json["vm"]; } + if (_json.containsKey("vpcAccessConnector")) { + vpcAccessConnector = + new VpcAccessConnector.fromJson(_json["vpcAccessConnector"]); + } if (_json.containsKey("zones")) { zones = (_json["zones"] as core.List).cast<core.String>(); } @@ -6740,6 +6753,9 @@ if (runtimeChannel != null) { _json["runtimeChannel"] = runtimeChannel; } + if (runtimeMainExecutablePath != null) { + _json["runtimeMainExecutablePath"] = runtimeMainExecutablePath; + } if (servingStatus != null) { _json["servingStatus"] = servingStatus; } @@ -6752,6 +6768,9 @@ if (vm != null) { _json["vm"] = vm; } + if (vpcAccessConnector != null) { + _json["vpcAccessConnector"] = (vpcAccessConnector).toJson(); + } if (zones != null) { _json["zones"] = zones; } @@ -6801,6 +6820,30 @@ } } +/// VPC access connector specification. +class VpcAccessConnector { + /// Full Serverless VPC Access Connector name e.g. + /// /projects/my-project/locations/us-central1/connectors/c1. + core.String name; + + VpcAccessConnector(); + + VpcAccessConnector.fromJson(core.Map _json) { + if (_json.containsKey("name")) { + name = _json["name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (name != null) { + _json["name"] = name; + } + return _json; + } +} + /// The zip file information for a zip deployment. class ZipInfo { /// An estimate of the number of files in a zip for a zip deployment. If set,
diff --git a/generated/googleapis_beta/lib/appengine/v1beta4.dart b/generated/googleapis_beta/lib/appengine/v1beta4.dart index 3b617fe..1db3ac6 100644 --- a/generated/googleapis_beta/lib/appengine/v1beta4.dart +++ b/generated/googleapis_beta/lib/appengine/v1beta4.dart
@@ -16,8 +16,7 @@ const core.String USER_AGENT = 'dart-api-client appengine/v1beta4'; -/// The App Engine Admin API enables developers to provision and manage their -/// App Engine applications. +/// Provisions and manages developers' App Engine applications. class AppengineApi { /// View and manage your applications deployed on Google App Engine static const AppengineAdminScope = @@ -789,8 +788,6 @@ /// /// [modulesId] - Part of `name`. See documentation of `appsId`. /// - /// [pageToken] - Continuation token for fetching the next page of results. - /// /// [pageSize] - Maximum results to return per page. /// /// [view] - Controls the set of fields returned in the List response. @@ -798,6 +795,8 @@ /// - "BASIC" : A BASIC. /// - "FULL" : A FULL. /// + /// [pageToken] - Continuation token for fetching the next page of results. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -810,9 +809,9 @@ /// this method will complete with the same error. async.Future<ListVersionsResponse> list( core.String appsId, core.String modulesId, - {core.String pageToken, - core.int pageSize, + {core.int pageSize, core.String view, + core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -827,15 +826,15 @@ if (modulesId == null) { throw new core.ArgumentError("Parameter modulesId is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } if (view != null) { _queryParams["view"] = [view]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1178,10 +1177,10 @@ /// /// [versionsId] - Part of `name`. See documentation of `appsId`. /// - /// [pageToken] - Continuation token for fetching the next page of results. - /// /// [pageSize] - Maximum results to return per page. /// + /// [pageToken] - Continuation token for fetching the next page of results. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1194,7 +1193,7 @@ /// this method will complete with the same error. async.Future<ListInstancesResponse> list( core.String appsId, core.String modulesId, core.String versionsId, - {core.String pageToken, core.int pageSize, core.String $fields}) { + {core.int pageSize, core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -1211,12 +1210,12 @@ if (versionsId == null) { throw new core.ArgumentError("Parameter versionsId is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1311,12 +1310,12 @@ /// /// [appsId] - Part of `name`. The name of the operation's parent resource. /// + /// [filter] - The standard list filter. + /// /// [pageToken] - The standard list page token. /// /// [pageSize] - The standard list page size. /// - /// [filter] - The standard list filter. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1328,9 +1327,9 @@ /// 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 appsId, - {core.String pageToken, + {core.String filter, + core.String pageToken, core.int pageSize, - core.String filter, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -1342,15 +1341,15 @@ if (appsId == null) { throw new core.ArgumentError("Parameter appsId is required."); } + if (filter != null) { + _queryParams["filter"] = [filter]; + } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } - if (filter != null) { - _queryParams["filter"] = [filter]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1607,10 +1606,12 @@ /// Automatic scaling is based on request rate, response latencies, and other /// application metrics. class AutomaticScaling { - /// Amount of time that the Autoscaler - /// (https://cloud.google.com/compute/docs/autoscaler/) should wait between - /// changes to the number of virtual machines. Only applicable for VM - /// runtimes. + /// The time period that the Autoscaler + /// (https://cloud.google.com/compute/docs/autoscaler/) should wait before it + /// starts collecting information from a new instance. This prevents the + /// autoscaler from collecting information when the instance is initializing, + /// during which the collected usage would not be reliable. Only applicable in + /// the App Engine flexible environment. core.String coolDownPeriod; /// Target scaling by CPU usage. @@ -4210,6 +4211,9 @@ /// https://cloud.google.com/appengine/docs/standard/<language>/config/appref core.String runtimeApiVersion; + /// The path or name of the app's main executable. + core.String runtimeMainExecutablePath; + /// Current serving status of this version. Only the versions with a SERVING /// status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an /// invalid value. Defaults to SERVING. @@ -4316,6 +4320,9 @@ if (_json.containsKey("runtimeApiVersion")) { runtimeApiVersion = _json["runtimeApiVersion"]; } + if (_json.containsKey("runtimeMainExecutablePath")) { + runtimeMainExecutablePath = _json["runtimeMainExecutablePath"]; + } if (_json.containsKey("servingStatus")) { servingStatus = _json["servingStatus"]; } @@ -4406,6 +4413,9 @@ if (runtimeApiVersion != null) { _json["runtimeApiVersion"] = runtimeApiVersion; } + if (runtimeMainExecutablePath != null) { + _json["runtimeMainExecutablePath"] = runtimeMainExecutablePath; + } if (servingStatus != null) { _json["servingStatus"] = servingStatus; }
diff --git a/generated/googleapis_beta/lib/appengine/v1beta5.dart b/generated/googleapis_beta/lib/appengine/v1beta5.dart index 5b4b7fa..c3db5d5 100644 --- a/generated/googleapis_beta/lib/appengine/v1beta5.dart +++ b/generated/googleapis_beta/lib/appengine/v1beta5.dart
@@ -16,8 +16,7 @@ const core.String USER_AGENT = 'dart-api-client appengine/v1beta5'; -/// The App Engine Admin API enables developers to provision and manage their -/// App Engine applications. +/// Provisions and manages developers' App Engine applications. class AppengineApi { /// View and manage your applications deployed on Google App Engine static const AppengineAdminScope = @@ -279,12 +278,12 @@ /// [appsId] - Part of `name`. The resource that owns the locations /// collection, if applicable. /// - /// [pageToken] - The standard list page token. - /// /// [pageSize] - The standard list page size. /// /// [filter] - The standard list filter. /// + /// [pageToken] - The standard list page token. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -296,9 +295,9 @@ /// 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 appsId, - {core.String pageToken, - core.int pageSize, + {core.int pageSize, core.String filter, + core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -310,15 +309,15 @@ if (appsId == null) { throw new core.ArgumentError("Parameter appsId is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } if (filter != null) { _queryParams["filter"] = [filter]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -409,12 +408,12 @@ /// /// [appsId] - Part of `name`. The name of the operation's parent resource. /// + /// [filter] - The standard list filter. + /// /// [pageToken] - The standard list page token. /// /// [pageSize] - The standard list page size. /// - /// [filter] - The standard list filter. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -426,9 +425,9 @@ /// 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 appsId, - {core.String pageToken, + {core.String filter, + core.String pageToken, core.int pageSize, - core.String filter, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -440,15 +439,15 @@ if (appsId == null) { throw new core.ArgumentError("Parameter appsId is required."); } + if (filter != null) { + _queryParams["filter"] = [filter]; + } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } - if (filter != null) { - _queryParams["filter"] = [filter]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -922,6 +921,8 @@ /// /// [servicesId] - Part of `name`. See documentation of `appsId`. /// + /// [pageToken] - Continuation token for fetching the next page of results. + /// /// [pageSize] - Maximum results to return per page. /// /// [view] - Controls the set of fields returned in the List response. @@ -929,8 +930,6 @@ /// - "BASIC" : A BASIC. /// - "FULL" : A FULL. /// - /// [pageToken] - Continuation token for fetching the next page of results. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -943,9 +942,9 @@ /// this method will complete with the same error. async.Future<ListVersionsResponse> list( core.String appsId, core.String servicesId, - {core.int pageSize, + {core.String pageToken, + core.int pageSize, core.String view, - core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -960,15 +959,15 @@ if (servicesId == null) { throw new core.ArgumentError("Parameter servicesId is required."); } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } if (view != null) { _queryParams["view"] = [view]; } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1610,10 +1609,12 @@ /// Automatic scaling is based on request rate, response latencies, and other /// application metrics. class AutomaticScaling { - /// Amount of time that the Autoscaler - /// (https://cloud.google.com/compute/docs/autoscaler/) should wait between - /// changes to the number of virtual machines. Only applicable for VM - /// runtimes. + /// The time period that the Autoscaler + /// (https://cloud.google.com/compute/docs/autoscaler/) should wait before it + /// starts collecting information from a new instance. This prevents the + /// autoscaler from collecting information when the instance is initializing, + /// during which the collected usage would not be reliable. Only applicable in + /// the App Engine flexible environment. core.String coolDownPeriod; /// Target scaling by CPU usage. @@ -4146,6 +4147,9 @@ /// https://cloud.google.com/appengine/docs/standard/<language>/config/appref core.String runtimeApiVersion; + /// The path or name of the app's main executable. + core.String runtimeMainExecutablePath; + /// Current serving status of this version. Only the versions with a SERVING /// status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an /// invalid value. Defaults to SERVING. @@ -4256,6 +4260,9 @@ if (_json.containsKey("runtimeApiVersion")) { runtimeApiVersion = _json["runtimeApiVersion"]; } + if (_json.containsKey("runtimeMainExecutablePath")) { + runtimeMainExecutablePath = _json["runtimeMainExecutablePath"]; + } if (_json.containsKey("servingStatus")) { servingStatus = _json["servingStatus"]; } @@ -4349,6 +4356,9 @@ if (runtimeApiVersion != null) { _json["runtimeApiVersion"] = runtimeApiVersion; } + if (runtimeMainExecutablePath != null) { + _json["runtimeMainExecutablePath"] = runtimeMainExecutablePath; + } if (servingStatus != null) { _json["servingStatus"] = servingStatus; }
diff --git a/generated/googleapis_beta/lib/binaryauthorization/v1beta1.dart b/generated/googleapis_beta/lib/binaryauthorization/v1beta1.dart index d7c1201..2e58f17 100644 --- a/generated/googleapis_beta/lib/binaryauthorization/v1beta1.dart +++ b/generated/googleapis_beta/lib/binaryauthorization/v1beta1.dart
@@ -360,15 +360,15 @@ /// attestors, in the format `projects / * `. /// Value must have pattern "^projects/[^/]+$". /// - /// [pageSize] - Requested page size. The server may return fewer results than - /// requested. If - /// unspecified, the server will pick an appropriate default. - /// /// [pageToken] - A token identifying a page of results the server should /// return. Typically, /// this is the value of ListAttestorsResponse.next_page_token returned /// from the previous call to the `ListAttestors` method. /// + /// [pageSize] - Requested page size. The server may return fewer results than + /// requested. If + /// unspecified, the server will pick an appropriate default. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -380,7 +380,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListAttestorsResponse> list(core.String parent, - {core.int pageSize, core.String pageToken, core.String $fields}) { + {core.String pageToken, core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -391,12 +391,12 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; }
diff --git a/generated/googleapis_beta/lib/cloudasset/v1beta1.dart b/generated/googleapis_beta/lib/cloudasset/v1beta1.dart new file mode 100644 index 0000000..ba8e25d --- /dev/null +++ b/generated/googleapis_beta/lib/cloudasset/v1beta1.dart
@@ -0,0 +1,1406 @@ +// This is a generated file (see the discoveryapis_generator project). + +// ignore_for_file: unnecessary_cast + +library googleapis_beta.cloudasset.v1beta1; + +import 'dart:core' as core; +import 'dart:async' as async; +import 'dart:convert' as convert; + +import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; +import 'package:http/http.dart' as http; + +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' + show ApiRequestError, DetailedApiRequestError; + +const core.String USER_AGENT = 'dart-api-client cloudasset/v1beta1'; + +/// The cloud asset API manages the history and inventory of cloud resources. +class CloudassetApi { + /// View and manage your data across Google Cloud Platform services + static const CloudPlatformScope = + "https://www.googleapis.com/auth/cloud-platform"; + + final commons.ApiRequester _requester; + + OrganizationsResourceApi get organizations => + new OrganizationsResourceApi(_requester); + ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); + + CloudassetApi(http.Client client, + {core.String rootUrl: "https://cloudasset.googleapis.com/", + core.String servicePath: ""}) + : _requester = + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); +} + +class OrganizationsResourceApi { + final commons.ApiRequester _requester; + + OrganizationsOperationsResourceApi get operations => + new OrganizationsOperationsResourceApi(_requester); + + OrganizationsResourceApi(commons.ApiRequester client) : _requester = client; + + /// Batch gets the update history of assets that overlap a time window. + /// For RESOURCE content, this API outputs history with asset in both + /// non-delete or deleted status. + /// For IAM_POLICY content, this API outputs history when the asset and its + /// attached IAM POLICY both exist. This can create gaps in the output + /// history. + /// + /// Request parameters: + /// + /// [parent] - Required. The relative name of the root asset. It can only be + /// an + /// organization number (such as "organizations/123"), a project ID (such as + /// "projects/my-project-id")", or a project number (such as + /// "projects/12345"). + /// Value must have pattern "^organizations/[^/]+$". + /// + /// [readTimeWindow_endTime] - End time of the time window (inclusive). + /// Current timestamp if not specified. + /// + /// [readTimeWindow_startTime] - Start time of the time window (exclusive). + /// + /// [assetNames] - A list of the full names of the assets. For example: + /// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + /// See [Resource + /// Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + /// for more info. + /// + /// The request becomes a no-op if the asset name list is empty, and the max + /// size of the asset name list is 100 in one request. + /// + /// [contentType] - Required. The content type. + /// Possible string values are: + /// - "CONTENT_TYPE_UNSPECIFIED" : A CONTENT_TYPE_UNSPECIFIED. + /// - "RESOURCE" : A RESOURCE. + /// - "IAM_POLICY" : A IAM_POLICY. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [BatchGetAssetsHistoryResponse]. + /// + /// 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<BatchGetAssetsHistoryResponse> batchGetAssetsHistory( + core.String parent, + {core.String readTimeWindow_endTime, + core.String readTimeWindow_startTime, + core.List<core.String> assetNames, + core.String contentType, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (readTimeWindow_endTime != null) { + _queryParams["readTimeWindow.endTime"] = [readTimeWindow_endTime]; + } + if (readTimeWindow_startTime != null) { + _queryParams["readTimeWindow.startTime"] = [readTimeWindow_startTime]; + } + if (assetNames != null) { + _queryParams["assetNames"] = assetNames; + } + if (contentType != null) { + _queryParams["contentType"] = [contentType]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + ':batchGetAssetsHistory'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new BatchGetAssetsHistoryResponse.fromJson(data)); + } + + /// Exports assets with time and resource types to a given Cloud Storage + /// location. The output format is newline-delimited JSON. + /// This API implements the google.longrunning.Operation API allowing you + /// to keep track of the export. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. The relative name of the root asset. This can only be + /// an organization + /// number (such as "organizations/123"), a project ID (such as + /// "projects/my-project-id"), or a project number (such as "projects/12345"). + /// Value must have pattern "^organizations/[^/]+$". + /// + /// [$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> exportAssets( + ExportAssetsRequest request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + ':exportAssets'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +class OrganizationsOperationsResourceApi { + final commons.ApiRequester _requester; + + OrganizationsOperationsResourceApi(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 "^organizations/[^/]+/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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +class ProjectsResourceApi { + final commons.ApiRequester _requester; + + ProjectsOperationsResourceApi get operations => + new ProjectsOperationsResourceApi(_requester); + + ProjectsResourceApi(commons.ApiRequester client) : _requester = client; + + /// Batch gets the update history of assets that overlap a time window. + /// For RESOURCE content, this API outputs history with asset in both + /// non-delete or deleted status. + /// For IAM_POLICY content, this API outputs history when the asset and its + /// attached IAM POLICY both exist. This can create gaps in the output + /// history. + /// + /// Request parameters: + /// + /// [parent] - Required. The relative name of the root asset. It can only be + /// an + /// organization number (such as "organizations/123"), a project ID (such as + /// "projects/my-project-id")", or a project number (such as + /// "projects/12345"). + /// Value must have pattern "^projects/[^/]+$". + /// + /// [readTimeWindow_endTime] - End time of the time window (inclusive). + /// Current timestamp if not specified. + /// + /// [readTimeWindow_startTime] - Start time of the time window (exclusive). + /// + /// [assetNames] - A list of the full names of the assets. For example: + /// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + /// See [Resource + /// Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + /// for more info. + /// + /// The request becomes a no-op if the asset name list is empty, and the max + /// size of the asset name list is 100 in one request. + /// + /// [contentType] - Required. The content type. + /// Possible string values are: + /// - "CONTENT_TYPE_UNSPECIFIED" : A CONTENT_TYPE_UNSPECIFIED. + /// - "RESOURCE" : A RESOURCE. + /// - "IAM_POLICY" : A IAM_POLICY. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [BatchGetAssetsHistoryResponse]. + /// + /// 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<BatchGetAssetsHistoryResponse> batchGetAssetsHistory( + core.String parent, + {core.String readTimeWindow_endTime, + core.String readTimeWindow_startTime, + core.List<core.String> assetNames, + core.String contentType, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (readTimeWindow_endTime != null) { + _queryParams["readTimeWindow.endTime"] = [readTimeWindow_endTime]; + } + if (readTimeWindow_startTime != null) { + _queryParams["readTimeWindow.startTime"] = [readTimeWindow_startTime]; + } + if (assetNames != null) { + _queryParams["assetNames"] = assetNames; + } + if (contentType != null) { + _queryParams["contentType"] = [contentType]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + ':batchGetAssetsHistory'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new BatchGetAssetsHistoryResponse.fromJson(data)); + } + + /// Exports assets with time and resource types to a given Cloud Storage + /// location. The output format is newline-delimited JSON. + /// This API implements the google.longrunning.Operation API allowing you + /// to keep track of the export. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. The relative name of the root asset. This can only be + /// an organization + /// number (such as "organizations/123"), a project ID (such as + /// "projects/my-project-id"), or a project number (such as "projects/12345"). + /// Value must have pattern "^projects/[^/]+$". + /// + /// [$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> exportAssets( + ExportAssetsRequest request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + ':exportAssets'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +class ProjectsOperationsResourceApi { + final commons.ApiRequester _requester; + + ProjectsOperationsResourceApi(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/[^/]+/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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +/// Cloud asset. This includes all Google Cloud Platform resources, +/// Cloud IAM policies, and other non-GCP assets. +class Asset { + /// Type of the asset. Example: "google.compute.Disk". + core.String assetType; + + /// Representation of the actual Cloud IAM policy set on a cloud resource. For + /// each + /// resource, there must be at most one Cloud IAM policy set on it. + Policy iamPolicy; + + /// The full name of the asset. For example: + /// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + /// See [Resource + /// Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + /// for more information. + core.String name; + + /// Representation of the resource. + Resource resource; + + Asset(); + + Asset.fromJson(core.Map _json) { + if (_json.containsKey("assetType")) { + assetType = _json["assetType"]; + } + if (_json.containsKey("iamPolicy")) { + iamPolicy = new Policy.fromJson(_json["iamPolicy"]); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("resource")) { + resource = new Resource.fromJson(_json["resource"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (assetType != null) { + _json["assetType"] = assetType; + } + if (iamPolicy != null) { + _json["iamPolicy"] = (iamPolicy).toJson(); + } + if (name != null) { + _json["name"] = name; + } + if (resource != null) { + _json["resource"] = (resource).toJson(); + } + return _json; + } +} + +/// 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:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// }, +/// { +/// "log_type": "ADMIN_READ", +/// } +/// ] +/// }, +/// { +/// "service": "fooservice.googleapis.com" +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// "exempted_members": [ +/// "user:bar@gmail.com" +/// ] +/// } +/// ] +/// } +/// ] +/// } +/// +/// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ +/// logging. It also exempts foo@gmail.com from DATA_READ logging, and +/// bar@gmail.com from DATA_WRITE logging. +class AuditConfig { + /// The configuration for logging of each type of permission. + core.List<AuditLogConfig> auditLogConfigs; + + /// Specifies a service that will be enabled for audit logging. + /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + /// `allServices` is a special value that covers all services. + core.String service; + + AuditConfig(); + + AuditConfig.fromJson(core.Map _json) { + if (_json.containsKey("auditLogConfigs")) { + auditLogConfigs = (_json["auditLogConfigs"] as core.List) + .map<AuditLogConfig>((value) => new AuditLogConfig.fromJson(value)) + .toList(); + } + if (_json.containsKey("service")) { + service = _json["service"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (auditLogConfigs != null) { + _json["auditLogConfigs"] = + auditLogConfigs.map((value) => (value).toJson()).toList(); + } + if (service != null) { + _json["service"] = service; + } + return _json; + } +} + +/// Provides the configuration for logging a type of permissions. +/// Example: +/// +/// { +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// "exempted_members": [ +/// "user:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// } +/// ] +/// } +/// +/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting +/// foo@gmail.com from DATA_READ logging. +class AuditLogConfig { + /// Specifies the identities that do not cause logging for this type of + /// permission. + /// Follows the same format of Binding.members. + core.List<core.String> exemptedMembers; + + /// The log type that this config enables. + /// Possible string values are: + /// - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. + /// - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy + /// - "DATA_WRITE" : Data writes. Example: CloudSQL Users create + /// - "DATA_READ" : Data reads. Example: CloudSQL Users list + core.String logType; + + AuditLogConfig(); + + AuditLogConfig.fromJson(core.Map _json) { + if (_json.containsKey("exemptedMembers")) { + exemptedMembers = + (_json["exemptedMembers"] as core.List).cast<core.String>(); + } + if (_json.containsKey("logType")) { + logType = _json["logType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (exemptedMembers != null) { + _json["exemptedMembers"] = exemptedMembers; + } + if (logType != null) { + _json["logType"] = logType; + } + return _json; + } +} + +/// Batch get assets history response. +class BatchGetAssetsHistoryResponse { + /// A list of assets with valid time windows. + core.List<TemporalAsset> assets; + + BatchGetAssetsHistoryResponse(); + + BatchGetAssetsHistoryResponse.fromJson(core.Map _json) { + if (_json.containsKey("assets")) { + assets = (_json["assets"] as core.List) + .map<TemporalAsset>((value) => new TemporalAsset.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (assets != null) { + _json["assets"] = assets.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Associates `members` with a `role`. +class Binding { + /// Unimplemented. The condition that is associated with this binding. + /// NOTE: an unsatisfied condition will not allow user access via current + /// binding. Different bindings, including their conditions, are examined + /// independently. + Expr condition; + + /// Specifies the identities requesting access for a Cloud Platform resource. + /// `members` can have the following values: + /// + /// * `allUsers`: A special identifier that represents anyone who is + /// on the internet; with or without a Google account. + /// + /// * `allAuthenticatedUsers`: A special identifier that represents anyone + /// who is authenticated with a Google account or a service account. + /// + /// * `user:{emailid}`: An email address that represents a specific Google + /// account. For example, `alice@gmail.com` . + /// + /// + /// * `serviceAccount:{emailid}`: An email address that represents a service + /// account. For example, `my-other-app@appspot.gserviceaccount.com`. + /// + /// * `group:{emailid}`: An email address that represents a Google group. + /// For example, `admins@example.com`. + /// + /// + /// * `domain:{domain}`: A Google Apps domain name 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 `members`. + /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + core.String role; + + Binding(); + + Binding.fromJson(core.Map _json) { + if (_json.containsKey("condition")) { + condition = new Expr.fromJson(_json["condition"]); + } + if (_json.containsKey("members")) { + members = (_json["members"] as core.List).cast<core.String>(); + } + if (_json.containsKey("role")) { + role = _json["role"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (condition != null) { + _json["condition"] = (condition).toJson(); + } + if (members != null) { + _json["members"] = members; + } + if (role != null) { + _json["role"] = role; + } + return _json; + } +} + +/// Export asset request. +class ExportAssetsRequest { + /// A list of asset types of which to take a snapshot for. For example: + /// "google.compute.Disk". If specified, only matching assets will be + /// returned. + /// See [Introduction to Cloud Asset + /// Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + /// for all supported asset types. + core.List<core.String> assetTypes; + + /// Asset content type. If not specified, no content but the asset name will + /// be + /// returned. + /// Possible string values are: + /// - "CONTENT_TYPE_UNSPECIFIED" : Unspecified content type. + /// - "RESOURCE" : Resource metadata. + /// - "IAM_POLICY" : The actual IAM policy set on a resource. + core.String contentType; + + /// Required. Output configuration indicating where the results will be output + /// to. All results will be in newline delimited JSON format. + OutputConfig outputConfig; + + /// Timestamp to take an asset snapshot. This can only be set to a timestamp + /// between 2018-10-02 UTC (inclusive) and the current time. If not specified, + /// the current time will be used. Due to delays in resource data collection + /// and indexing, there is a volatile window during which running the same + /// query may get different results. + core.String readTime; + + ExportAssetsRequest(); + + ExportAssetsRequest.fromJson(core.Map _json) { + if (_json.containsKey("assetTypes")) { + assetTypes = (_json["assetTypes"] as core.List).cast<core.String>(); + } + if (_json.containsKey("contentType")) { + contentType = _json["contentType"]; + } + if (_json.containsKey("outputConfig")) { + outputConfig = new OutputConfig.fromJson(_json["outputConfig"]); + } + if (_json.containsKey("readTime")) { + readTime = _json["readTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (assetTypes != null) { + _json["assetTypes"] = assetTypes; + } + if (contentType != null) { + _json["contentType"] = contentType; + } + if (outputConfig != null) { + _json["outputConfig"] = (outputConfig).toJson(); + } + if (readTime != null) { + _json["readTime"] = readTime; + } + return _json; + } +} + +/// Represents an expression text. Example: +/// +/// title: "User account presence" +/// description: "Determines whether the request has a user account" +/// expression: "size(request.user) > 0" +class Expr { + /// An optional description of the expression. This is a longer text which + /// describes the expression, e.g. when hovered over it in a UI. + core.String description; + + /// Textual representation of an expression in + /// Common Expression Language syntax. + /// + /// The application context of the containing message determines which + /// well-known feature set of CEL is supported. + core.String expression; + + /// An optional string indicating the location of the expression for error + /// reporting, e.g. a file name and a position in the file. + core.String location; + + /// An optional title for the expression, i.e. a short string describing + /// its purpose. This can be used e.g. in UIs which allow to enter the + /// expression. + core.String title; + + Expr(); + + Expr.fromJson(core.Map _json) { + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("expression")) { + expression = _json["expression"]; + } + if (_json.containsKey("location")) { + location = _json["location"]; + } + if (_json.containsKey("title")) { + title = _json["title"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (description != null) { + _json["description"] = description; + } + if (expression != null) { + _json["expression"] = expression; + } + if (location != null) { + _json["location"] = location; + } + if (title != null) { + _json["title"] = title; + } + return _json; + } +} + +/// A Cloud Storage location. +class GcsDestination { + /// The uri of the Cloud Storage object. It's the same uri that is used by + /// gsutil. For example: "gs://bucket_name/object_name". See [Viewing and + /// Editing Object + /// Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + /// for more information. + core.String uri; + + GcsDestination(); + + GcsDestination.fromJson(core.Map _json) { + if (_json.containsKey("uri")) { + uri = _json["uri"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (uri != null) { + _json["uri"] = uri; + } + return _json; + } +} + +/// 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 have the format of `operations/some/unique/name`. + 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(); + + Operation.fromJson(core.Map _json) { + if (_json.containsKey("done")) { + done = _json["done"]; + } + if (_json.containsKey("error")) { + error = new Status.fromJson(_json["error"]); + } + if (_json.containsKey("metadata")) { + metadata = + (_json["metadata"] as core.Map).cast<core.String, core.Object>(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("response")) { + response = + (_json["response"] as core.Map).cast<core.String, core.Object>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (done != null) { + _json["done"] = done; + } + if (error != null) { + _json["error"] = (error).toJson(); + } + if (metadata != null) { + _json["metadata"] = metadata; + } + if (name != null) { + _json["name"] = name; + } + if (response != null) { + _json["response"] = response; + } + return _json; + } +} + +/// Output configuration for export assets destination. +class OutputConfig { + /// Destination on Cloud Storage. + GcsDestination gcsDestination; + + OutputConfig(); + + OutputConfig.fromJson(core.Map _json) { + if (_json.containsKey("gcsDestination")) { + gcsDestination = new GcsDestination.fromJson(_json["gcsDestination"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (gcsDestination != null) { + _json["gcsDestination"] = (gcsDestination).toJson(); + } + return _json; + } +} + +/// Defines an Identity and Access Management (IAM) policy. It is used to +/// specify access control policies for Cloud Platform resources. +/// +/// +/// A `Policy` consists of a list of `bindings`. A `binding` binds a list of +/// `members` to a `role`, where the members can be user accounts, Google +/// groups, +/// Google domains, and service accounts. A `role` is a named list of +/// permissions +/// defined by IAM. +/// +/// **JSON Example** +/// +/// { +/// "bindings": [ +/// { +/// "role": "roles/owner", +/// "members": [ +/// "user:mike@example.com", +/// "group:admins@example.com", +/// "domain:google.com", +/// "serviceAccount:my-other-app@appspot.gserviceaccount.com" +/// ] +/// }, +/// { +/// "role": "roles/viewer", +/// "members": ["user:sean@example.com"] +/// } +/// ] +/// } +/// +/// **YAML Example** +/// +/// bindings: +/// - members: +/// - user:mike@example.com +/// - group:admins@example.com +/// - domain:google.com +/// - serviceAccount:my-other-app@appspot.gserviceaccount.com +/// role: roles/owner +/// - members: +/// - user:sean@example.com +/// role: roles/viewer +/// +/// +/// For a description of IAM and its features, see the +/// [IAM developer's guide](https://cloud.google.com/iam/docs). +class Policy { + /// Specifies cloud audit logging configuration for this policy. + core.List<AuditConfig> auditConfigs; + + /// Associates a list of `members` to a `role`. + /// `bindings` with no members will result in an error. + core.List<Binding> bindings; + + /// `etag` is used for optimistic concurrency control as a way to help + /// prevent simultaneous updates of a policy from overwriting each other. + /// It is strongly suggested that systems make use of the `etag` in the + /// read-modify-write cycle to perform policy updates in order to avoid race + /// conditions: An `etag` is returned in the response to `getIamPolicy`, and + /// systems are expected to put that etag in the request to `setIamPolicy` to + /// ensure that their change will be applied to the same version of the + /// policy. + /// + /// If no `etag` is provided in the call to `setIamPolicy`, then the existing + /// policy is overwritten blindly. + core.String etag; + core.List<core.int> get etagAsBytes { + return convert.base64.decode(etag); + } + + void set etagAsBytes(core.List<core.int> _bytes) { + etag = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + + /// Deprecated. + core.int version; + + Policy(); + + Policy.fromJson(core.Map _json) { + if (_json.containsKey("auditConfigs")) { + auditConfigs = (_json["auditConfigs"] as core.List) + .map<AuditConfig>((value) => new AuditConfig.fromJson(value)) + .toList(); + } + if (_json.containsKey("bindings")) { + bindings = (_json["bindings"] as core.List) + .map<Binding>((value) => new Binding.fromJson(value)) + .toList(); + } + if (_json.containsKey("etag")) { + etag = _json["etag"]; + } + if (_json.containsKey("version")) { + version = _json["version"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (auditConfigs != null) { + _json["auditConfigs"] = + auditConfigs.map((value) => (value).toJson()).toList(); + } + if (bindings != null) { + _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); + } + if (etag != null) { + _json["etag"] = etag; + } + if (version != null) { + _json["version"] = version; + } + return _json; + } +} + +/// Representation of a cloud resource. +class Resource { + /// The content of the resource, in which some sensitive fields are scrubbed + /// away and may not be present. + /// + /// 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> data; + + /// The URL of the discovery document containing the resource's JSON schema. + /// For example: + /// `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + /// It will be left unspecified for resources without a discovery-based API, + /// such as Cloud Bigtable. + core.String discoveryDocumentUri; + + /// The JSON schema name listed in the discovery document. + /// Example: "Project". It will be left unspecified for resources (such as + /// Cloud Bigtable) without a discovery-based API. + core.String discoveryName; + + /// The full name of the immediate parent of this resource. See + /// [Resource + /// Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + /// for more information. + /// + /// For GCP assets, it is the parent resource defined in the [Cloud IAM policy + /// hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + /// For example: + /// `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + /// + /// For third-party assets, it is up to the users to define. + core.String parent; + + /// The REST URL for accessing the resource. An HTTP GET operation using this + /// URL returns the resource itself. + /// Example: + /// `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + /// It will be left unspecified for resources without a REST API. + core.String resourceUrl; + + /// The API version. Example: "v1". + core.String version; + + Resource(); + + Resource.fromJson(core.Map _json) { + if (_json.containsKey("data")) { + data = (_json["data"] as core.Map).cast<core.String, core.Object>(); + } + if (_json.containsKey("discoveryDocumentUri")) { + discoveryDocumentUri = _json["discoveryDocumentUri"]; + } + if (_json.containsKey("discoveryName")) { + discoveryName = _json["discoveryName"]; + } + if (_json.containsKey("parent")) { + parent = _json["parent"]; + } + if (_json.containsKey("resourceUrl")) { + resourceUrl = _json["resourceUrl"]; + } + if (_json.containsKey("version")) { + version = _json["version"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (data != null) { + _json["data"] = data; + } + if (discoveryDocumentUri != null) { + _json["discoveryDocumentUri"] = discoveryDocumentUri; + } + if (discoveryName != null) { + _json["discoveryName"] = discoveryName; + } + if (parent != null) { + _json["parent"] = parent; + } + if (resourceUrl != null) { + _json["resourceUrl"] = resourceUrl; + } + if (version != null) { + _json["version"] = version; + } + return _json; + } +} + +/// 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). The error model is designed to be: +/// +/// - Simple to use and understand for most users +/// - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error +/// message, +/// and error details. The error code should be an enum value of +/// google.rpc.Code, but it may accept additional error codes if needed. The +/// error message should be a developer-facing English message that helps +/// developers *understand* and *resolve* the error. If a localized user-facing +/// error message is needed, put the localized message in the error details or +/// localize it in the client. The optional error details may contain arbitrary +/// information about the error. There is a predefined set of error detail types +/// in the package `google.rpc` that can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but +/// it +/// is not necessarily the actual wire format. When the `Status` message is +/// exposed in different client libraries and different wire protocols, it can +/// be +/// mapped differently. For example, it will likely be mapped to some exceptions +/// in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of +/// environments, either with or without APIs, to provide a +/// consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, +/// it may embed the `Status` in the normal response to indicate the partial +/// errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may +/// have a `Status` message for error reporting. +/// +/// - Batch operations. If a client uses batch request and batch response, the +/// `Status` message should be used directly inside batch response, one for +/// each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation +/// results in its response, the status of those operations should be +/// represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could +/// be used directly after any stripping needed for security/privacy reasons. +class Status { + /// The status code, which should be an enum value of google.rpc.Code. + core.int code; + + /// A list of messages that carry the error details. There is a common set of + /// message types for APIs to use. + /// + /// 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.List<core.Map<core.String, core.Object>> details; + + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// google.rpc.Status.details field, or localized by the client. + core.String message; + + Status(); + + Status.fromJson(core.Map _json) { + if (_json.containsKey("code")) { + code = _json["code"]; + } + if (_json.containsKey("details")) { + details = (_json["details"] as core.List) + .map<core.Map<core.String, core.Object>>( + (value) => (value as core.Map).cast<core.String, core.Object>()) + .toList(); + } + if (_json.containsKey("message")) { + message = _json["message"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (code != null) { + _json["code"] = code; + } + if (details != null) { + _json["details"] = details; + } + if (message != null) { + _json["message"] = message; + } + return _json; + } +} + +/// Temporal asset. In addition to the asset, the temporal asset includes the +/// status of the asset and valid from and to time of it. +class TemporalAsset { + /// Asset. + Asset asset; + + /// If the asset is deleted or not. + core.bool deleted; + + /// The time window when the asset data and state was observed. + TimeWindow window; + + TemporalAsset(); + + TemporalAsset.fromJson(core.Map _json) { + if (_json.containsKey("asset")) { + asset = new Asset.fromJson(_json["asset"]); + } + if (_json.containsKey("deleted")) { + deleted = _json["deleted"]; + } + if (_json.containsKey("window")) { + window = new TimeWindow.fromJson(_json["window"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (asset != null) { + _json["asset"] = (asset).toJson(); + } + if (deleted != null) { + _json["deleted"] = deleted; + } + if (window != null) { + _json["window"] = (window).toJson(); + } + return _json; + } +} + +/// A time window of (start_time, end_time]. +class TimeWindow { + /// End time of the time window (inclusive). + /// Current timestamp if not specified. + core.String endTime; + + /// Start time of the time window (exclusive). + core.String startTime; + + TimeWindow(); + + TimeWindow.fromJson(core.Map _json) { + if (_json.containsKey("endTime")) { + endTime = _json["endTime"]; + } + if (_json.containsKey("startTime")) { + startTime = _json["startTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (endTime != null) { + _json["endTime"] = endTime; + } + if (startTime != null) { + _json["startTime"] = startTime; + } + return _json; + } +}
diff --git a/generated/googleapis_beta/lib/clouderrorreporting/v1beta1.dart b/generated/googleapis_beta/lib/clouderrorreporting/v1beta1.dart index 44864aa..0788efa 100644 --- a/generated/googleapis_beta/lib/clouderrorreporting/v1beta1.dart +++ b/generated/googleapis_beta/lib/clouderrorreporting/v1beta1.dart
@@ -118,12 +118,12 @@ /// /// [groupId] - [Required] The group for which events shall be returned. /// - /// [pageToken] - [Optional] A `next_page_token` provided by a previous - /// response. - /// /// [serviceFilter_service] - [Optional] The exact value to match against /// [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). /// + /// [pageToken] - [Optional] A `next_page_token` provided by a previous + /// response. + /// /// [pageSize] - [Optional] The maximum number of results to return per /// response. /// @@ -154,8 +154,8 @@ /// this method will complete with the same error. async.Future<ListEventsResponse> list(core.String projectName, {core.String groupId, - core.String pageToken, core.String serviceFilter_service, + core.String pageToken, core.int pageSize, core.String serviceFilter_version, core.String serviceFilter_resourceType, @@ -174,12 +174,12 @@ if (groupId != null) { _queryParams["groupId"] = [groupId]; } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (serviceFilter_service != null) { _queryParams["serviceFilter.service"] = [serviceFilter_service]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } @@ -296,6 +296,15 @@ /// Example: <code>projects/my-project-123</code>. /// Value must have pattern "^projects/[^/]+$". /// + /// [timedCountDuration] - [Optional] The preferred duration for a single + /// returned `TimedCount`. + /// If not set, no timed counts are returned. + /// + /// [pageToken] - [Optional] A `next_page_token` provided by a previous + /// response. To view + /// additional results, pass this token along with the identical query + /// parameters as the first request. + /// /// [timeRange_period] - Restricts the query to the specified time range. /// Possible string values are: /// - "PERIOD_UNSPECIFIED" : A PERIOD_UNSPECIFIED. @@ -342,15 +351,6 @@ /// if rounded /// alignment is chosen. Default is 00:00 UTC. /// - /// [timedCountDuration] - [Optional] The preferred duration for a single - /// returned `TimedCount`. - /// If not set, no timed counts are returned. - /// - /// [pageToken] - [Optional] A `next_page_token` provided by a previous - /// response. To view - /// additional results, pass this token along with the identical query - /// parameters as the first request. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -362,7 +362,9 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListGroupStatsResponse> list(core.String projectName, - {core.String timeRange_period, + {core.String timedCountDuration, + core.String pageToken, + core.String timeRange_period, core.String alignment, core.List<core.String> groupId, core.String serviceFilter_service, @@ -371,8 +373,6 @@ core.String order, core.String serviceFilter_resourceType, core.String alignmentTime, - core.String timedCountDuration, - core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -384,6 +384,12 @@ if (projectName == null) { throw new core.ArgumentError("Parameter projectName is required."); } + if (timedCountDuration != null) { + _queryParams["timedCountDuration"] = [timedCountDuration]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if (timeRange_period != null) { _queryParams["timeRange.period"] = [timeRange_period]; } @@ -411,12 +417,6 @@ if (alignmentTime != null) { _queryParams["alignmentTime"] = [alignmentTime]; } - if (timedCountDuration != null) { - _queryParams["timedCountDuration"] = [timedCountDuration]; - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; }
diff --git a/generated/googleapis_beta/lib/cloudresourcemanager/v1beta1.dart b/generated/googleapis_beta/lib/cloudresourcemanager/v1beta1.dart index 9ae73fd..b752a40 100644 --- a/generated/googleapis_beta/lib/cloudresourcemanager/v1beta1.dart +++ b/generated/googleapis_beta/lib/cloudresourcemanager/v1beta1.dart
@@ -16,8 +16,8 @@ const core.String USER_AGENT = 'dart-api-client cloudresourcemanager/v1beta1'; -/// The Google Cloud Resource Manager API provides methods for creating, -/// reading, and updating project metadata. +/// Creates, reads, and updates metadata for Google Cloud Platform resource +/// containers. class CloudresourcemanagerApi { /// View and manage your data across Google Cloud Platform services static const CloudPlatformScope = @@ -700,18 +700,6 @@ /// /// Request parameters: /// - /// [pageToken] - A pagination token returned from a previous call to - /// ListProjects - /// that indicates from where listing should continue. - /// - /// Optional. - /// - /// [pageSize] - The maximum number of Projects to return in the response. - /// The server can return fewer Projects than requested. - /// If unspecified, server picks an appropriate default. - /// - /// Optional. - /// /// [filter] - An expression for filtering the results of the request. Filter /// rules are /// case insensitive. The fields eligible for filtering are: @@ -745,6 +733,18 @@ /// /// Optional. /// + /// [pageToken] - A pagination token returned from a previous call to + /// ListProjects + /// that indicates from where listing should continue. + /// + /// Optional. + /// + /// [pageSize] - The maximum number of Projects to return in the response. + /// The server can return fewer Projects than requested. + /// If unspecified, server picks an appropriate default. + /// + /// Optional. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -756,9 +756,9 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListProjectsResponse> list( - {core.String pageToken, + {core.String filter, + core.String pageToken, core.int pageSize, - core.String filter, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -767,15 +767,15 @@ var _downloadOptions = commons.DownloadOptions.Metadata; var _body = null; + if (filter != null) { + _queryParams["filter"] = [filter]; + } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } - if (filter != null) { - _queryParams["filter"] = [filter]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1863,7 +1863,8 @@ /// to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. /// /// Label values must be between 0 and 63 characters long and must conform - /// to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + /// to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label + /// value can be empty. /// /// No more than 256 labels can be associated with a given resource. ///
diff --git a/generated/googleapis_beta/lib/cloudscheduler/v1beta1.dart b/generated/googleapis_beta/lib/cloudscheduler/v1beta1.dart new file mode 100644 index 0000000..d7b09d9 --- /dev/null +++ b/generated/googleapis_beta/lib/cloudscheduler/v1beta1.dart
@@ -0,0 +1,1737 @@ +// This is a generated file (see the discoveryapis_generator project). + +// ignore_for_file: unnecessary_cast + +library googleapis_beta.cloudscheduler.v1beta1; + +import 'dart:core' as core; +import 'dart:async' as async; +import 'dart:convert' as convert; + +import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; +import 'package:http/http.dart' as http; + +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' + show ApiRequestError, DetailedApiRequestError; + +const core.String USER_AGENT = 'dart-api-client cloudscheduler/v1beta1'; + +/// Creates and manages jobs run on a regular recurring schedule. +class CloudschedulerApi { + /// View and manage your data across Google Cloud Platform services + static const CloudPlatformScope = + "https://www.googleapis.com/auth/cloud-platform"; + + final commons.ApiRequester _requester; + + ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); + + CloudschedulerApi(http.Client client, + {core.String rootUrl: "https://cloudscheduler.googleapis.com/", + core.String servicePath: ""}) + : _requester = + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); +} + +class ProjectsResourceApi { + final commons.ApiRequester _requester; + + ProjectsLocationsResourceApi get locations => + new ProjectsLocationsResourceApi(_requester); + + ProjectsResourceApi(commons.ApiRequester client) : _requester = client; +} + +class ProjectsLocationsResourceApi { + final commons.ApiRequester _requester; + + ProjectsLocationsJobsResourceApi get jobs => + new ProjectsLocationsJobsResourceApi(_requester); + + ProjectsLocationsResourceApi(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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Location.fromJson(data)); + } + + /// 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/[^/]+$". + /// + /// [pageToken] - The standard list page token. + /// + /// [pageSize] - The standard list page size. + /// + /// [filter] - The standard list filter. + /// + /// [$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 pageToken, + core.int pageSize, + core.String filter, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$name') + + '/locations'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListLocationsResponse.fromJson(data)); + } +} + +class ProjectsLocationsJobsResourceApi { + final commons.ApiRequester _requester; + + ProjectsLocationsJobsResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Creates a job. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. + /// + /// The location name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID`. + /// Value must have pattern "^projects/[^/]+/locations/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Job]. + /// + /// 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<Job> create(Job request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = + 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/jobs'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Job.fromJson(data)); + } + + /// Deletes a job. + /// + /// Request parameters: + /// + /// [name] - Required. + /// + /// The job name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + /// Value must have pattern "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$". + /// + /// [$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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Empty.fromJson(data)); + } + + /// Gets a job. + /// + /// Request parameters: + /// + /// [name] - Required. + /// + /// The job name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + /// Value must have pattern "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Job]. + /// + /// 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<Job> get(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Job.fromJson(data)); + } + + /// Lists jobs. + /// + /// Request parameters: + /// + /// [parent] - Required. + /// + /// The location name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID`. + /// Value must have pattern "^projects/[^/]+/locations/[^/]+$". + /// + /// [pageToken] - A token identifying a page of results the server will + /// return. To + /// request the first page results, page_token must be empty. To + /// request the next page of results, page_token must be the value of + /// next_page_token returned from + /// the previous call to ListJobs. It is an error to + /// switch the value of filter or + /// order_by while iterating through pages. + /// + /// [pageSize] - Requested page size. + /// + /// The maximum page size is 500. If unspecified, the page size will + /// be the maximum. Fewer jobs than requested might be returned, + /// even if more jobs exist; use next_page_token to determine if more + /// jobs exist. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListJobsResponse]. + /// + /// 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<ListJobsResponse> list(core.String parent, + {core.String pageToken, core.int pageSize, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = + 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/jobs'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListJobsResponse.fromJson(data)); + } + + /// Updates a job. + /// + /// If successful, the updated Job is returned. If the job does + /// not exist, `NOT_FOUND` is returned. + /// + /// If UpdateJob does not successfully return, it is possible for the + /// job to be in an Job.State.UPDATE_FAILED state. A job in this state may + /// not be executed. If this happens, retry the UpdateJob request + /// until a successful response is received. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The job name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + /// + /// * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + /// hyphens (-), colons (:), or periods (.). + /// For more information, see + /// [Identifying + /// projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + /// * `LOCATION_ID` is the canonical ID for the job's location. + /// The list of available locations can be obtained by calling + /// ListLocations. + /// For more information, see https://cloud.google.com/about/locations/. + /// * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + /// hyphens (-), or underscores (_). The maximum length is 500 characters. + /// Value must have pattern "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$". + /// + /// [updateMask] - A mask used to specify which fields of the job are being + /// updated. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Job]. + /// + /// 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<Job> patch(Job request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Job.fromJson(data)); + } + + /// Pauses a job. + /// + /// If a job is paused then the system will stop executing the job + /// until it is re-enabled via ResumeJob. The + /// state of the job is stored in state; if paused it + /// will be set to Job.State.PAUSED. A job must be in Job.State.ENABLED + /// to be paused. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - Required. + /// + /// The job name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + /// Value must have pattern "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Job]. + /// + /// 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<Job> pause(PauseJobRequest request, core.String name, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = + 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':pause'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Job.fromJson(data)); + } + + /// Resume a job. + /// + /// This method reenables a job after it has been Job.State.PAUSED. The + /// state of a job is stored in Job.state; after calling this method it + /// will be set to Job.State.ENABLED. A job must be in + /// Job.State.PAUSED to be resumed. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - Required. + /// + /// The job name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + /// Value must have pattern "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Job]. + /// + /// 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<Job> resume(ResumeJobRequest request, core.String name, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = + 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':resume'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Job.fromJson(data)); + } + + /// Forces a job to run now. + /// + /// When this method is called, Cloud Scheduler will dispatch the job, even + /// if the job is already running. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - Required. + /// + /// The job name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + /// Value must have pattern "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Job]. + /// + /// 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<Job> run(RunJobRequest request, core.String name, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':run'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Job.fromJson(data)); + } +} + +/// App Engine target. The job will be pushed to a job handler by means +/// of an HTTP request via an http_method such +/// as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an +/// HTTP response code in the range [200 - 299]. Error 503 is +/// considered an App Engine system error instead of an application +/// error. Requests returning error 503 will be retried regardless of +/// retry configuration and not counted against retry counts. Any other +/// response code, or a failure to receive a response before the +/// deadline, constitutes a failed attempt. +class AppEngineHttpTarget { + /// App Engine Routing setting for the job. + AppEngineRouting appEngineRouting; + + /// Body. + /// + /// HTTP request body. A request body is allowed only if the HTTP method is + /// POST or PUT. It will result in invalid argument error to set a body on a + /// job with an incompatible HttpMethod. + core.String body; + core.List<core.int> get bodyAsBytes { + return convert.base64.decode(body); + } + + void set bodyAsBytes(core.List<core.int> _bytes) { + body = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + + /// HTTP request headers. + /// + /// This map contains the header field names and values. Headers can be set + /// when the job is created. + /// + /// Cloud Scheduler sets some headers to default values: + /// + /// * `User-Agent`: By default, this header is + /// `"AppEngine-Google; (+http://code.google.com/appengine)"`. + /// This header can be modified, but Cloud Scheduler will append + /// `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + /// modified `User-Agent`. + /// * `X-CloudScheduler`: This header will be set to true. + /// + /// If the job has an body, Cloud Scheduler sets the + /// following headers: + /// + /// * `Content-Type`: By default, the `Content-Type` header is set to + /// `"application/octet-stream"`. The default can be overridden by explictly + /// setting `Content-Type` to a particular media type when the job is + /// created. + /// For example, `Content-Type` can be set to `"application/json"`. + /// * `Content-Length`: This is computed by Cloud Scheduler. This value is + /// output only. It cannot be changed. + /// + /// The headers below are output only. They cannot be set or overridden: + /// + /// * `X-Google-*`: For Google internal use only. + /// * `X-AppEngine-*`: For Google internal use only. + /// + /// In addition, some App Engine headers, which contain + /// job-specific information, are also be sent to the job handler. + core.Map<core.String, core.String> headers; + + /// The HTTP method to use for the request. PATCH and OPTIONS are not + /// permitted. + /// Possible string values are: + /// - "HTTP_METHOD_UNSPECIFIED" : HTTP method unspecified. Defaults to POST. + /// - "POST" : HTTP POST + /// - "GET" : HTTP GET + /// - "HEAD" : HTTP HEAD + /// - "PUT" : HTTP PUT + /// - "DELETE" : HTTP DELETE + /// - "PATCH" : HTTP PATCH + /// - "OPTIONS" : HTTP OPTIONS + core.String httpMethod; + + /// The relative URI. + /// + /// The relative URL must begin with "/" and must be a valid HTTP relative + /// URL. + /// It can contain a path, query string arguments, and `#` fragments. + /// If the relative URL is empty, then the root path "/" will be used. + /// No spaces are allowed, and the maximum length allowed is 2083 characters. + core.String relativeUri; + + AppEngineHttpTarget(); + + AppEngineHttpTarget.fromJson(core.Map _json) { + if (_json.containsKey("appEngineRouting")) { + appEngineRouting = + new AppEngineRouting.fromJson(_json["appEngineRouting"]); + } + if (_json.containsKey("body")) { + body = _json["body"]; + } + if (_json.containsKey("headers")) { + headers = (_json["headers"] as core.Map).cast<core.String, core.String>(); + } + if (_json.containsKey("httpMethod")) { + httpMethod = _json["httpMethod"]; + } + if (_json.containsKey("relativeUri")) { + relativeUri = _json["relativeUri"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (appEngineRouting != null) { + _json["appEngineRouting"] = (appEngineRouting).toJson(); + } + if (body != null) { + _json["body"] = body; + } + if (headers != null) { + _json["headers"] = headers; + } + if (httpMethod != null) { + _json["httpMethod"] = httpMethod; + } + if (relativeUri != null) { + _json["relativeUri"] = relativeUri; + } + return _json; + } +} + +/// App Engine Routing. +/// +/// For more information about services, versions, and instances see +/// [An Overview of App +/// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), +/// [Microservices Architecture on Google App +/// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), +/// [App Engine Standard request +/// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), +/// and +/// [App Engine Flex request +/// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). +class AppEngineRouting { + /// Output only. The host that the job is sent to. + /// + /// For more information about how App Engine requests are routed, see + /// [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + /// + /// The host is constructed as: + /// + /// + /// * `host = [application_domain_name]`</br> + /// `| [service] + '.' + [application_domain_name]`</br> + /// `| [version] + '.' + [application_domain_name]`</br> + /// `| [version_dot_service]+ '.' + [application_domain_name]`</br> + /// `| [instance] + '.' + [application_domain_name]`</br> + /// `| [instance_dot_service] + '.' + [application_domain_name]`</br> + /// `| [instance_dot_version] + '.' + [application_domain_name]`</br> + /// `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + /// + /// * `application_domain_name` = The domain name of the app, for + /// example <app-id>.appspot.com, which is associated with the + /// job's project ID. + /// + /// * `service =` service + /// + /// * `version =` version + /// + /// * `version_dot_service =` + /// version `+ '.' +` + /// service + /// + /// * `instance =` instance + /// + /// * `instance_dot_service =` + /// instance `+ '.' +` + /// service + /// + /// * `instance_dot_version =` + /// instance `+ '.' +` + /// version + /// + /// * `instance_dot_version_dot_service =` + /// instance `+ '.' +` + /// version `+ '.' +` + /// service + /// + /// + /// If service is empty, then the job will be sent + /// to the service which is the default service when the job is attempted. + /// + /// If version is empty, then the job will be sent + /// to the version which is the default version when the job is attempted. + /// + /// If instance is empty, then the job will be + /// sent to an instance which is available when the job is attempted. + /// + /// If service, + /// version, or + /// instance is invalid, then the job will be sent + /// to the default version of the default service when the job is attempted. + core.String host; + + /// App instance. + /// + /// By default, the job is sent to an instance which is available when + /// the job is attempted. + /// + /// Requests can only be sent to a specific instance if + /// [manual scaling is used in App Engine + /// Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + /// App Engine Flex does not support instances. For more information, see + /// [App Engine Standard request + /// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + /// and + /// [App Engine Flex request + /// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + core.String instance; + + /// App service. + /// + /// By default, the job is sent to the service which is the default + /// service when the job is attempted. + core.String service; + + /// App version. + /// + /// By default, the job is sent to the version which is the default + /// version when the job is attempted. + core.String version; + + AppEngineRouting(); + + AppEngineRouting.fromJson(core.Map _json) { + if (_json.containsKey("host")) { + host = _json["host"]; + } + if (_json.containsKey("instance")) { + instance = _json["instance"]; + } + if (_json.containsKey("service")) { + service = _json["service"]; + } + if (_json.containsKey("version")) { + version = _json["version"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (host != null) { + _json["host"] = host; + } + if (instance != null) { + _json["instance"] = instance; + } + if (service != null) { + _json["service"] = service; + } + if (version != null) { + _json["version"] = version; + } + return _json; + } +} + +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. +class Empty { + Empty(); + + Empty.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// Http target. The job will be pushed to the job handler by means of +/// an HTTP request via an http_method such as HTTP +/// POST, HTTP GET, etc. The job is acknowledged by means of an HTTP +/// response code in the range [200 - 299]. A failure to receive a response +/// constitutes a failed execution. For a redirected request, the response +/// returned by the redirected request is considered. +class HttpTarget { + /// HTTP request body. A request body is allowed only if the HTTP + /// method is POST, PUT, or PATCH. It is an error to set body on a job with an + /// incompatible HttpMethod. + core.String body; + core.List<core.int> get bodyAsBytes { + return convert.base64.decode(body); + } + + void set bodyAsBytes(core.List<core.int> _bytes) { + body = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + + /// The user can specify HTTP request headers to send with the job's + /// HTTP request. This map contains the header field names and + /// values. Repeated headers are not supported, but a header value can + /// contain commas. These headers represent a subset of the headers + /// that will accompany the job's HTTP request. Some HTTP request + /// headers will be ignored or replaced. A partial list of headers that + /// will be ignored or replaced is below: + /// - Host: This will be computed by Cloud Scheduler and derived from + /// uri. + /// * `Content-Length`: This will be computed by Cloud Scheduler. + /// * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. + /// * `X-Google-*`: Google internal use only. + /// * `X-AppEngine-*`: Google internal use only. + /// + /// The total size of headers must be less than 80KB. + core.Map<core.String, core.String> headers; + + /// Which HTTP method to use for the request. + /// Possible string values are: + /// - "HTTP_METHOD_UNSPECIFIED" : HTTP method unspecified. Defaults to POST. + /// - "POST" : HTTP POST + /// - "GET" : HTTP GET + /// - "HEAD" : HTTP HEAD + /// - "PUT" : HTTP PUT + /// - "DELETE" : HTTP DELETE + /// - "PATCH" : HTTP PATCH + /// - "OPTIONS" : HTTP OPTIONS + core.String httpMethod; + + /// Required. + /// + /// The full URI path that the request will be sent to. This string + /// must begin with either "http://" or "https://". Some examples of + /// valid values for uri are: + /// `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will + /// encode some characters for safety and compatibility. The maximum allowed + /// URL length is 2083 characters after encoding. + core.String uri; + + HttpTarget(); + + HttpTarget.fromJson(core.Map _json) { + if (_json.containsKey("body")) { + body = _json["body"]; + } + if (_json.containsKey("headers")) { + headers = (_json["headers"] as core.Map).cast<core.String, core.String>(); + } + if (_json.containsKey("httpMethod")) { + httpMethod = _json["httpMethod"]; + } + if (_json.containsKey("uri")) { + uri = _json["uri"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (body != null) { + _json["body"] = body; + } + if (headers != null) { + _json["headers"] = headers; + } + if (httpMethod != null) { + _json["httpMethod"] = httpMethod; + } + if (uri != null) { + _json["uri"] = uri; + } + return _json; + } +} + +/// Configuration for a job. +/// The maximum allowed size for a job is 100KB. +class Job { + /// App Engine HTTP target. + AppEngineHttpTarget appEngineHttpTarget; + + /// A human-readable description for the job. This string must not contain + /// more than 500 characters. + core.String description; + + /// HTTP target. + HttpTarget httpTarget; + + /// Output only. The time the last job attempt started. + core.String lastAttemptTime; + + /// The job name. For example: + /// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. + /// + /// * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + /// hyphens (-), colons (:), or periods (.). + /// For more information, see + /// [Identifying + /// projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + /// * `LOCATION_ID` is the canonical ID for the job's location. + /// The list of available locations can be obtained by calling + /// ListLocations. + /// For more information, see https://cloud.google.com/about/locations/. + /// * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + /// hyphens (-), or underscores (_). The maximum length is 500 characters. + core.String name; + + /// Pub/Sub target. + PubsubTarget pubsubTarget; + + /// Settings that determine the retry behavior. + RetryConfig retryConfig; + + /// Required. + /// + /// Describes the schedule on which the job will be executed. + /// + /// As a general rule, execution `n + 1` of a job will not begin + /// until execution `n` has finished. Cloud Scheduler will never + /// allow two simultaneously outstanding executions. For example, + /// this implies that if the `n+1`th execution is scheduled to run at + /// 16:00 but the `n`th execution takes until 16:15, the `n+1`th + /// execution will not start until `16:15`. + /// A scheduled start time will be delayed if the previous + /// execution has not ended when its scheduled time occurs. + /// + /// If retry_count > 0 and a job attempt fails, + /// the job will be tried a total of retry_count + /// times, with exponential backoff, until the next scheduled start + /// time. + /// + /// The schedule can be either of the following types: + /// + /// * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) + /// * English-like + /// [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) + core.String schedule; + + /// Output only. The next time the job is scheduled. Note that this may be a + /// retry of a previously failed attempt or the next execution time + /// according to the schedule. + core.String scheduleTime; + + /// Output only. State of the job. + /// Possible string values are: + /// - "STATE_UNSPECIFIED" : Unspecified state. + /// - "ENABLED" : The job is executing normally. + /// - "PAUSED" : The job is paused by the user. It will not execute. A user + /// can + /// intentionally pause the job using + /// PauseJobRequest. + /// - "DISABLED" : The job is disabled by the system due to error. The user + /// cannot directly set a job to be disabled. + /// - "UPDATE_FAILED" : The job state resulting from a failed + /// CloudScheduler.UpdateJob + /// operation. To recover a job from this state, retry + /// CloudScheduler.UpdateJob until a successful response is received. + core.String state; + + /// Output only. The response from the target for the last attempted + /// execution. + Status status; + + /// Specifies the time zone to be used in interpreting + /// schedule. The value of this field must be a time + /// zone name from the [tz + /// database](http://en.wikipedia.org/wiki/Tz_database). + /// + /// Note that some time zones include a provision for + /// daylight savings time. The rules for daylight saving time are + /// determined by the chosen tz. For UTC use the string "utc". If a + /// time zone is not specified, the default will be in UTC (also known + /// as GMT). + core.String timeZone; + + /// Output only. The creation time of the job. + core.String userUpdateTime; + + Job(); + + Job.fromJson(core.Map _json) { + if (_json.containsKey("appEngineHttpTarget")) { + appEngineHttpTarget = + new AppEngineHttpTarget.fromJson(_json["appEngineHttpTarget"]); + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("httpTarget")) { + httpTarget = new HttpTarget.fromJson(_json["httpTarget"]); + } + if (_json.containsKey("lastAttemptTime")) { + lastAttemptTime = _json["lastAttemptTime"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("pubsubTarget")) { + pubsubTarget = new PubsubTarget.fromJson(_json["pubsubTarget"]); + } + if (_json.containsKey("retryConfig")) { + retryConfig = new RetryConfig.fromJson(_json["retryConfig"]); + } + if (_json.containsKey("schedule")) { + schedule = _json["schedule"]; + } + if (_json.containsKey("scheduleTime")) { + scheduleTime = _json["scheduleTime"]; + } + if (_json.containsKey("state")) { + state = _json["state"]; + } + if (_json.containsKey("status")) { + status = new Status.fromJson(_json["status"]); + } + if (_json.containsKey("timeZone")) { + timeZone = _json["timeZone"]; + } + if (_json.containsKey("userUpdateTime")) { + userUpdateTime = _json["userUpdateTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (appEngineHttpTarget != null) { + _json["appEngineHttpTarget"] = (appEngineHttpTarget).toJson(); + } + if (description != null) { + _json["description"] = description; + } + if (httpTarget != null) { + _json["httpTarget"] = (httpTarget).toJson(); + } + if (lastAttemptTime != null) { + _json["lastAttemptTime"] = lastAttemptTime; + } + if (name != null) { + _json["name"] = name; + } + if (pubsubTarget != null) { + _json["pubsubTarget"] = (pubsubTarget).toJson(); + } + if (retryConfig != null) { + _json["retryConfig"] = (retryConfig).toJson(); + } + if (schedule != null) { + _json["schedule"] = schedule; + } + if (scheduleTime != null) { + _json["scheduleTime"] = scheduleTime; + } + if (state != null) { + _json["state"] = state; + } + if (status != null) { + _json["status"] = (status).toJson(); + } + if (timeZone != null) { + _json["timeZone"] = timeZone; + } + if (userUpdateTime != null) { + _json["userUpdateTime"] = userUpdateTime; + } + return _json; + } +} + +/// Response message for listing jobs using ListJobs. +class ListJobsResponse { + /// The list of jobs. + core.List<Job> jobs; + + /// A token to retrieve next page of results. Pass this value in the + /// page_token field in the subsequent call to + /// ListJobs to retrieve the next page of results. + /// If this is empty it indicates that there are no more results + /// through which to paginate. + /// + /// The page token is valid for only 2 hours. + core.String nextPageToken; + + ListJobsResponse(); + + ListJobsResponse.fromJson(core.Map _json) { + if (_json.containsKey("jobs")) { + jobs = (_json["jobs"] as core.List) + .map<Job>((value) => new Job.fromJson(value)) + .toList(); + } + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (jobs != null) { + _json["jobs"] = jobs.map((value) => (value).toJson()).toList(); + } + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + return _json; + } +} + +/// 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(); + + ListLocationsResponse.fromJson(core.Map _json) { + if (_json.containsKey("locations")) { + locations = (_json["locations"] as core.List) + .map<Location>((value) => new Location.fromJson(value)) + .toList(); + } + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (locations != null) { + _json["locations"] = locations.map((value) => (value).toJson()).toList(); + } + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + return _json; + } +} + +/// A resource that represents Google Cloud Platform location. +class Location { + /// The friendly name for this location, typically a nearby city name. + /// For example, "Tokyo". + core.String displayName; + + /// Cross-service attributes for the location. For example + /// + /// {"cloud.googleapis.com/region": "us-east1"} + core.Map<core.String, core.String> labels; + + /// The canonical id for this location. For example: `"us-east1"`. + core.String locationId; + + /// Service-specific metadata. For example the available capacity at the given + /// location. + /// + /// 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; + + /// Resource name for the location, which may vary between implementations. + /// For example: `"projects/example-project/locations/us-east1"` + core.String name; + + Location(); + + Location.fromJson(core.Map _json) { + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("labels")) { + labels = (_json["labels"] as core.Map).cast<core.String, core.String>(); + } + if (_json.containsKey("locationId")) { + locationId = _json["locationId"]; + } + if (_json.containsKey("metadata")) { + metadata = + (_json["metadata"] as core.Map).cast<core.String, core.Object>(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (displayName != null) { + _json["displayName"] = displayName; + } + if (labels != null) { + _json["labels"] = labels; + } + if (locationId != null) { + _json["locationId"] = locationId; + } + if (metadata != null) { + _json["metadata"] = metadata; + } + if (name != null) { + _json["name"] = name; + } + return _json; + } +} + +/// Request message for PauseJob. +class PauseJobRequest { + PauseJobRequest(); + + PauseJobRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// A message that is published by publishers and consumed by subscribers. The +/// message must contain either a non-empty data field or at least one +/// attribute. +/// Note that client libraries represent this object differently +/// depending on the language. See the corresponding +/// <a href="https://cloud.google.com/pubsub/docs/reference/libraries">client +/// library documentation</a> for more information. See +/// <a href="https://cloud.google.com/pubsub/quotas">Quotas and limits</a> +/// for more information about message limits. +class PubsubMessage { + /// Optional attributes for this message. + core.Map<core.String, core.String> attributes; + + /// The message data field. If this field is empty, the message must contain + /// at least one attribute. + core.String data; + core.List<core.int> get dataAsBytes { + return convert.base64.decode(data); + } + + void set dataAsBytes(core.List<core.int> _bytes) { + data = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + + /// ID of this message, assigned by the server when the message is published. + /// Guaranteed to be unique within the topic. This value may be read by a + /// subscriber that receives a `PubsubMessage` via a `Pull` call or a push + /// delivery. It must not be populated by the publisher in a `Publish` call. + core.String messageId; + + /// The time at which the message was published, populated by the server when + /// it receives the `Publish` call. It must not be populated by the + /// publisher in a `Publish` call. + core.String publishTime; + + PubsubMessage(); + + PubsubMessage.fromJson(core.Map _json) { + if (_json.containsKey("attributes")) { + attributes = + (_json["attributes"] as core.Map).cast<core.String, core.String>(); + } + if (_json.containsKey("data")) { + data = _json["data"]; + } + if (_json.containsKey("messageId")) { + messageId = _json["messageId"]; + } + if (_json.containsKey("publishTime")) { + publishTime = _json["publishTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (attributes != null) { + _json["attributes"] = attributes; + } + if (data != null) { + _json["data"] = data; + } + if (messageId != null) { + _json["messageId"] = messageId; + } + if (publishTime != null) { + _json["publishTime"] = publishTime; + } + return _json; + } +} + +/// Pub/Sub target. The job will be delivered by publishing a message to +/// the given Pub/Sub topic. +class PubsubTarget { + /// Attributes for PubsubMessage. + /// + /// Pubsub message must contain either non-empty data, or at least one + /// attribute. + core.Map<core.String, core.String> attributes; + + /// The message payload for PubsubMessage. + /// + /// Pubsub message must contain either non-empty data, or at least one + /// attribute. + core.String data; + core.List<core.int> get dataAsBytes { + return convert.base64.decode(data); + } + + void set dataAsBytes(core.List<core.int> _bytes) { + data = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + + /// Required. + /// + /// The name of the Cloud Pub/Sub topic to which messages will + /// be published when a job is delivered. The topic name must be in the + /// same format as required by PubSub's + /// [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), + /// for example `projects/PROJECT_ID/topics/TOPIC_ID`. + /// + /// The topic must be in the same project as the Cloud Scheduler job. + core.String topicName; + + PubsubTarget(); + + PubsubTarget.fromJson(core.Map _json) { + if (_json.containsKey("attributes")) { + attributes = + (_json["attributes"] as core.Map).cast<core.String, core.String>(); + } + if (_json.containsKey("data")) { + data = _json["data"]; + } + if (_json.containsKey("topicName")) { + topicName = _json["topicName"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (attributes != null) { + _json["attributes"] = attributes; + } + if (data != null) { + _json["data"] = data; + } + if (topicName != null) { + _json["topicName"] = topicName; + } + return _json; + } +} + +/// Request message for ResumeJob. +class ResumeJobRequest { + ResumeJobRequest(); + + ResumeJobRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// Settings that determine the retry behavior. +/// +/// By default, if a job does not complete successfully (meaning that +/// an acknowledgement is not received from the handler, then it will be retried +/// with exponential backoff according to the settings in RetryConfig. +class RetryConfig { + /// The maximum amount of time to wait before retrying a job after + /// it fails. + /// + /// The default value of this field is 1 hour. + core.String maxBackoffDuration; + + /// The time between retries will double `max_doublings` times. + /// + /// A job's retry interval starts at + /// min_backoff_duration, then doubles + /// `max_doublings` times, then increases linearly, and finally + /// retries retries at intervals of + /// max_backoff_duration up to + /// retry_count times. + /// + /// For example, if min_backoff_duration is + /// 10s, max_backoff_duration is 300s, and + /// `max_doublings` is 3, then the a job will first be retried in 10s. The + /// retry interval will double three times, and then increase linearly by + /// 2^3 * 10s. Finally, the job will retry at intervals of + /// max_backoff_duration until the job has + /// been attempted retry_count times. Thus, the + /// requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + /// + /// The default value of this field is 5. + core.int maxDoublings; + + /// The time limit for retrying a failed job, measured from time when an + /// execution was first attempted. If specified with + /// retry_count, the job will be retried until both limits are + /// reached. + /// + /// The default value for max_retry_duration is zero, which means retry + /// duration is unlimited. + core.String maxRetryDuration; + + /// The minimum amount of time to wait before retrying a job after + /// it fails. + /// + /// The default value of this field is 5 seconds. + core.String minBackoffDuration; + + /// The number of attempts that the system will make to run a job using the + /// exponential backoff procedure described by + /// max_doublings. + /// + /// The default value of retry_count is zero. + /// + /// If retry_count is zero, a job attempt will *not* be retried if + /// it fails. Instead the Cloud Scheduler system will wait for the + /// next scheduled execution time. + /// + /// If retry_count is set to a non-zero number then Cloud Scheduler + /// will retry failed attempts, using exponential backoff, + /// retry_count times, or until the next scheduled execution time, + /// whichever comes first. + /// + /// Values greater than 5 and negative values are not allowed. + core.int retryCount; + + RetryConfig(); + + RetryConfig.fromJson(core.Map _json) { + if (_json.containsKey("maxBackoffDuration")) { + maxBackoffDuration = _json["maxBackoffDuration"]; + } + if (_json.containsKey("maxDoublings")) { + maxDoublings = _json["maxDoublings"]; + } + if (_json.containsKey("maxRetryDuration")) { + maxRetryDuration = _json["maxRetryDuration"]; + } + if (_json.containsKey("minBackoffDuration")) { + minBackoffDuration = _json["minBackoffDuration"]; + } + if (_json.containsKey("retryCount")) { + retryCount = _json["retryCount"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (maxBackoffDuration != null) { + _json["maxBackoffDuration"] = maxBackoffDuration; + } + if (maxDoublings != null) { + _json["maxDoublings"] = maxDoublings; + } + if (maxRetryDuration != null) { + _json["maxRetryDuration"] = maxRetryDuration; + } + if (minBackoffDuration != null) { + _json["minBackoffDuration"] = minBackoffDuration; + } + if (retryCount != null) { + _json["retryCount"] = retryCount; + } + return _json; + } +} + +/// Request message for forcing a job to run now using +/// RunJob. +class RunJobRequest { + RunJobRequest(); + + RunJobRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// 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). The error model is designed to be: +/// +/// - Simple to use and understand for most users +/// - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error +/// message, +/// and error details. The error code should be an enum value of +/// google.rpc.Code, but it may accept additional error codes if needed. The +/// error message should be a developer-facing English message that helps +/// developers *understand* and *resolve* the error. If a localized user-facing +/// error message is needed, put the localized message in the error details or +/// localize it in the client. The optional error details may contain arbitrary +/// information about the error. There is a predefined set of error detail types +/// in the package `google.rpc` that can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but +/// it +/// is not necessarily the actual wire format. When the `Status` message is +/// exposed in different client libraries and different wire protocols, it can +/// be +/// mapped differently. For example, it will likely be mapped to some exceptions +/// in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of +/// environments, either with or without APIs, to provide a +/// consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, +/// it may embed the `Status` in the normal response to indicate the partial +/// errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may +/// have a `Status` message for error reporting. +/// +/// - Batch operations. If a client uses batch request and batch response, the +/// `Status` message should be used directly inside batch response, one for +/// each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation +/// results in its response, the status of those operations should be +/// represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could +/// be used directly after any stripping needed for security/privacy reasons. +class Status { + /// The status code, which should be an enum value of google.rpc.Code. + core.int code; + + /// A list of messages that carry the error details. There is a common set of + /// message types for APIs to use. + /// + /// 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.List<core.Map<core.String, core.Object>> details; + + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// google.rpc.Status.details field, or localized by the client. + core.String message; + + Status(); + + Status.fromJson(core.Map _json) { + if (_json.containsKey("code")) { + code = _json["code"]; + } + if (_json.containsKey("details")) { + details = (_json["details"] as core.List) + .map<core.Map<core.String, core.Object>>( + (value) => (value as core.Map).cast<core.String, core.Object>()) + .toList(); + } + if (_json.containsKey("message")) { + message = _json["message"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (code != null) { + _json["code"] = code; + } + if (details != null) { + _json["details"] = details; + } + if (message != null) { + _json["message"] = message; + } + return _json; + } +}
diff --git a/generated/googleapis_beta/lib/cloudtasks/v2beta2.dart b/generated/googleapis_beta/lib/cloudtasks/v2beta3.dart similarity index 74% rename from generated/googleapis_beta/lib/cloudtasks/v2beta2.dart rename to generated/googleapis_beta/lib/cloudtasks/v2beta3.dart index fd2e1aa..9bab6be 100644 --- a/generated/googleapis_beta/lib/cloudtasks/v2beta2.dart +++ b/generated/googleapis_beta/lib/cloudtasks/v2beta3.dart
@@ -2,7 +2,7 @@ // ignore_for_file: unnecessary_cast -library googleapis_beta.cloudtasks.v2beta2; +library googleapis_beta.cloudtasks.v2beta3; import 'dart:core' as core; import 'dart:async' as async; @@ -14,7 +14,7 @@ export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show ApiRequestError, DetailedApiRequestError; -const core.String USER_AGENT = 'dart-api-client cloudtasks/v2beta2'; +const core.String USER_AGENT = 'dart-api-client cloudtasks/v2beta3'; /// Manages the execution of large numbers of distributed requests. class CloudtasksApi { @@ -83,7 +83,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name'); + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name'); var _response = _requester.request(_url, "GET", body: _body, @@ -101,12 +101,12 @@ /// [name] - The resource that owns the locations collection, if applicable. /// Value must have pattern "^projects/[^/]+$". /// + /// [pageToken] - The standard list page token. + /// /// [pageSize] - The standard list page size. /// /// [filter] - The standard list filter. /// - /// [pageToken] - The standard list page token. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -118,9 +118,9 @@ /// 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.int pageSize, + {core.String pageToken, + core.int pageSize, core.String filter, - core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -132,20 +132,20 @@ if (name == null) { throw new core.ArgumentError("Parameter name is required."); } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } if (filter != null) { _queryParams["filter"] = [filter]; } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name') + '/locations'; @@ -226,7 +226,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$parent') + '/queues'; @@ -287,7 +287,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name'); + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name'); var _response = _requester.request(_url, "DELETE", body: _body, @@ -333,7 +333,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name'); + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name'); var _response = _requester.request(_url, "GET", body: _body, @@ -393,7 +393,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIamPolicy'; @@ -425,10 +425,10 @@ /// [Stackdriver's Advanced Logs /// Filters](https://cloud.google.com/logging/docs/view/advanced_filters). /// - /// Sample filter "app_engine_http_target: *". + /// Sample filter "state: PAUSED". /// /// Note that using filters might cause fewer queues than the - /// requested_page size to be returned. + /// requested page_size to be returned. /// /// [pageToken] - A token identifying the page of results to return. /// @@ -485,7 +485,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$parent') + '/queues'; @@ -578,7 +578,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name'); + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name'); var _response = _requester.request(_url, "PATCH", body: _body, @@ -637,7 +637,7 @@ } _url = - 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name') + ':pause'; + 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name') + ':pause'; var _response = _requester.request(_url, "POST", body: _body, @@ -696,7 +696,7 @@ } _url = - 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name') + ':purge'; + 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name') + ':purge'; var _response = _requester.request(_url, "POST", body: _body, @@ -761,7 +761,7 @@ } _url = - 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name') + ':resume'; + 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name') + ':resume'; var _response = _requester.request(_url, "POST", body: _body, @@ -823,7 +823,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIamPolicy'; @@ -883,7 +883,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIamPermissions'; @@ -904,141 +904,12 @@ ProjectsLocationsQueuesTasksResourceApi(commons.ApiRequester client) : _requester = client; - /// Acknowledges a pull task. - /// - /// The worker, that is, the entity that - /// leased this task must call this method - /// to indicate that the work associated with the task has finished. - /// - /// The worker must acknowledge a task within the - /// lease_duration or the lease - /// will expire and the task will become available to be leased - /// again. After the task is acknowledged, it will not be returned - /// by a later LeaseTasks, - /// GetTask, or - /// ListTasks. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [name] - Required. - /// - /// The task name. For example: - /// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - /// Value must have pattern - /// "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$". - /// - /// [$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> acknowledge( - AcknowledgeTaskRequest request, core.String name, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (name == null) { - throw new core.ArgumentError("Parameter name is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v2beta2/' + - commons.Escaper.ecapeVariableReserved('$name') + - ':acknowledge'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Empty.fromJson(data)); - } - - /// Cancel a pull task's lease. - /// - /// The worker can use this method to cancel a task's lease by - /// setting its schedule_time to now. This will - /// make the task available to be leased to the next caller of - /// LeaseTasks. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [name] - Required. - /// - /// The task name. For example: - /// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - /// Value must have pattern - /// "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [Task]. - /// - /// 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<Task> cancelLease(CancelLeaseRequest request, core.String name, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (name == null) { - throw new core.ArgumentError("Parameter name is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v2beta2/' + - commons.Escaper.ecapeVariableReserved('$name') + - ':cancelLease'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Task.fromJson(data)); - } - /// Creates a task and adds it to a queue. /// /// Tasks cannot be updated after creation; there is no UpdateTask command. /// /// * For App Engine queues, the maximum task size is /// 100KB. - /// * For pull queues, the maximum task size is 1MB. /// /// [request] - The metadata request object. /// @@ -1081,7 +952,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$parent') + '/tasks'; @@ -1097,7 +968,7 @@ /// Deletes a task. /// /// A task can be deleted if it is scheduled or dispatched. A task - /// cannot be deleted if it has completed successfully or permanently + /// cannot be deleted if it has executed successfully or permanently /// failed. /// /// Request parameters: @@ -1134,7 +1005,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name'); + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name'); var _response = _requester.request(_url, "DELETE", body: _body, @@ -1203,7 +1074,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name'); + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name'); var _response = _requester.request(_url, "GET", body: _body, @@ -1214,82 +1085,6 @@ return _response.then((data) => new Task.fromJson(data)); } - /// Leases tasks from a pull queue for - /// lease_duration. - /// - /// This method is invoked by the worker to obtain a lease. The - /// worker must acknowledge the task via - /// AcknowledgeTask after they have - /// performed the work associated with the task. - /// - /// The payload is intended to store data that - /// the worker needs to perform the work associated with the task. To - /// return the payloads in the response, set - /// response_view to - /// FULL. - /// - /// A maximum of 10 qps of LeaseTasks - /// requests are allowed per - /// queue. RESOURCE_EXHAUSTED - /// is returned when this limit is - /// exceeded. RESOURCE_EXHAUSTED - /// is also returned when - /// max_tasks_dispatched_per_second - /// is exceeded. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [parent] - Required. - /// - /// The queue name. For example: - /// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - /// Value must have pattern "^projects/[^/]+/locations/[^/]+/queues/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [LeaseTasksResponse]. - /// - /// 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<LeaseTasksResponse> lease( - LeaseTasksRequest request, core.String parent, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (parent == null) { - throw new core.ArgumentError("Parameter parent is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v2beta2/' + - commons.Escaper.ecapeVariableReserved('$parent') + - '/tasks:lease'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new LeaseTasksResponse.fromJson(data)); - } - /// Lists the tasks in a queue. /// /// By default, only the BASIC view is retrieved @@ -1308,15 +1103,6 @@ /// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` /// Value must have pattern "^projects/[^/]+/locations/[^/]+/queues/[^/]+$". /// - /// [pageSize] - Requested page size. Fewer tasks than requested might be - /// returned. - /// - /// The maximum page size is 1000. If unspecified, the page size will - /// be the maximum. Fewer tasks than requested might be returned, - /// even if more tasks exist; use - /// next_page_token in the - /// response to determine if more tasks exist. - /// /// [responseView] - The response_view specifies which subset of the Task will /// be /// returned. @@ -1345,6 +1131,15 @@ /// /// The page token is valid for only 2 hours. /// + /// [pageSize] - Requested page size. Fewer tasks than requested might be + /// returned. + /// + /// The maximum page size is 1000. If unspecified, the page size will + /// be the maximum. Fewer tasks than requested might be returned, + /// even if more tasks exist; use + /// next_page_token in the + /// response to determine if more tasks exist. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1356,9 +1151,9 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListTasksResponse> list(core.String parent, - {core.int pageSize, - core.String responseView, + {core.String responseView, core.String pageToken, + core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -1370,20 +1165,20 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if (responseView != null) { _queryParams["responseView"] = [responseView]; } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$parent') + '/tasks'; @@ -1396,65 +1191,6 @@ return _response.then((data) => new ListTasksResponse.fromJson(data)); } - /// Renew the current lease of a pull task. - /// - /// The worker can use this method to extend the lease by a new - /// duration, starting from now. The new task lease will be - /// returned in the task's schedule_time. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [name] - Required. - /// - /// The task name. For example: - /// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - /// Value must have pattern - /// "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [Task]. - /// - /// 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<Task> renewLease(RenewLeaseRequest request, core.String name, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (name == null) { - throw new core.ArgumentError("Parameter name is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v2beta2/' + - commons.Escaper.ecapeVariableReserved('$name') + - ':renewLease'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Task.fromJson(data)); - } - /// Forces a task to run now. /// /// When this method is called, Cloud Tasks will dispatch the task, even if @@ -1480,9 +1216,6 @@ /// NOT_FOUND when it is called on a /// task that has already succeeded or permanently failed. /// - /// RunTask cannot be called on a - /// pull task. - /// /// [request] - The metadata request object. /// /// Request parameters: @@ -1523,7 +1256,7 @@ _queryParams["fields"] = [$fields]; } - _url = 'v2beta2/' + commons.Escaper.ecapeVariableReserved('$name') + ':run'; + _url = 'v2beta3/' + commons.Escaper.ecapeVariableReserved('$name') + ':run'; var _response = _requester.request(_url, "POST", body: _body, @@ -1535,31 +1268,42 @@ } } -/// Request message for acknowledging a task using -/// AcknowledgeTask. -class AcknowledgeTaskRequest { - /// Required. +/// App Engine HTTP queue. +/// +/// The task will be delivered to the App Engine application hostname +/// specified by its AppEngineHttpQueue and AppEngineHttpRequest. +/// The documentation for AppEngineHttpRequest explains how the +/// task's host URL is constructed. +/// +/// Using AppEngineHttpQueue requires +/// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) +/// Google IAM permission for the project +/// and the following scope: +/// +/// `https://www.googleapis.com/auth/cloud-platform` +class AppEngineHttpQueue { + /// Overrides for the + /// task-level app_engine_routing. /// - /// The task's current schedule time, available in the - /// schedule_time returned by - /// LeaseTasks response or - /// RenewLease response. This restriction is - /// to ensure that your worker currently holds the lease. - core.String scheduleTime; + /// If set, `app_engine_routing_override` is used for all tasks in + /// the queue, no matter what the setting is for the + /// task-level app_engine_routing. + AppEngineRouting appEngineRoutingOverride; - AcknowledgeTaskRequest(); + AppEngineHttpQueue(); - AcknowledgeTaskRequest.fromJson(core.Map _json) { - if (_json.containsKey("scheduleTime")) { - scheduleTime = _json["scheduleTime"]; + AppEngineHttpQueue.fromJson(core.Map _json) { + if (_json.containsKey("appEngineRoutingOverride")) { + appEngineRoutingOverride = + new AppEngineRouting.fromJson(_json["appEngineRoutingOverride"]); } } core.Map<core.String, core.Object> toJson() { final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>(); - if (scheduleTime != null) { - _json["scheduleTime"] = scheduleTime; + if (appEngineRoutingOverride != null) { + _json["appEngineRoutingOverride"] = (appEngineRoutingOverride).toJson(); } return _json; } @@ -1571,7 +1315,7 @@ /// the task is dispatched. /// /// This proto can only be used for tasks in a queue which has -/// app_engine_http_target set. +/// app_engine_http_queue set. /// /// Using AppEngineHttpRequest requires /// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) @@ -1587,6 +1331,11 @@ /// and how routing is affected by /// [dispatch /// files](https://cloud.google.com/appengine/docs/python/config/dispatchref). +/// Traffic is encrypted during transport and never leaves Google datacenters. +/// Because this traffic is carried over a communication mechanism internal to +/// Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). +/// The request to the handler, however, will appear to have used the HTTP +/// protocol. /// /// The AppEngineRouting used to construct the URL that the task is /// delivered to can be set at the queue-level or task-level: @@ -1601,7 +1350,17 @@ /// The `url` that the task will be sent to is: /// /// * `url =` host `+` -/// relative_url +/// relative_uri +/// +/// Tasks can be dispatched to secure app handlers, unsecure app handlers, and +/// URIs restricted with +/// [`login: +/// admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). +/// Because tasks are not run as any user, they cannot be dispatched to URIs +/// restricted with +/// [`login: +/// required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) +/// Task dispatches also do not follow redirects. /// /// The task attempt has succeeded if the app's request handler returns /// an HTTP response code in the range [`200` - `299`]. `503` is @@ -1619,6 +1378,20 @@ /// task-level app_engine_routing. AppEngineRouting appEngineRouting; + /// HTTP request body. + /// + /// A request body is allowed only if the HTTP method is POST or PUT. It is + /// an error to set a body on a task with an incompatible HttpMethod. + core.String body; + core.List<core.int> get bodyAsBytes { + return convert.base64.decode(body); + } + + void set bodyAsBytes(core.List<core.int> _bytes) { + body = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + /// HTTP request headers. /// /// This map contains the header field names and values. @@ -1634,7 +1407,7 @@ /// `"AppEngine-Google; (+http://code.google.com/appengine)"` to the /// modified `User-Agent`. /// - /// If the task has a payload, Cloud + /// If the task has a body, Cloud /// Tasks sets the following headers: /// /// * `Content-Type`: By default, the `Content-Type` header is set to @@ -1683,30 +1456,14 @@ /// - "DELETE" : HTTP DELETE core.String httpMethod; - /// Payload. + /// The relative URI. /// - /// The payload will be sent as the HTTP message body. A message - /// body, and thus a payload, is allowed only if the HTTP method is - /// POST or PUT. It is an error to set a data payload on a task with - /// an incompatible HttpMethod. - core.String payload; - core.List<core.int> get payloadAsBytes { - return convert.base64.decode(payload); - } - - void set payloadAsBytes(core.List<core.int> _bytes) { - payload = - convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); - } - - /// The relative URL. - /// - /// The relative URL must begin with "/" and must be a valid HTTP relative - /// URL. + /// The relative URI must begin with "/" and must be a valid HTTP relative + /// URI. /// It can contain a path and query string arguments. - /// If the relative URL is empty, then the root path "/" will be used. + /// If the relative URI is empty, then the root path "/" will be used. /// No spaces are allowed, and the maximum length allowed is 2083 characters. - core.String relativeUrl; + core.String relativeUri; AppEngineHttpRequest(); @@ -1715,17 +1472,17 @@ appEngineRouting = new AppEngineRouting.fromJson(_json["appEngineRouting"]); } + if (_json.containsKey("body")) { + body = _json["body"]; + } if (_json.containsKey("headers")) { headers = (_json["headers"] as core.Map).cast<core.String, core.String>(); } if (_json.containsKey("httpMethod")) { httpMethod = _json["httpMethod"]; } - if (_json.containsKey("payload")) { - payload = _json["payload"]; - } - if (_json.containsKey("relativeUrl")) { - relativeUrl = _json["relativeUrl"]; + if (_json.containsKey("relativeUri")) { + relativeUri = _json["relativeUri"]; } } @@ -1735,58 +1492,17 @@ if (appEngineRouting != null) { _json["appEngineRouting"] = (appEngineRouting).toJson(); } + if (body != null) { + _json["body"] = body; + } if (headers != null) { _json["headers"] = headers; } if (httpMethod != null) { _json["httpMethod"] = httpMethod; } - if (payload != null) { - _json["payload"] = payload; - } - if (relativeUrl != null) { - _json["relativeUrl"] = relativeUrl; - } - return _json; - } -} - -/// App Engine HTTP target. -/// -/// The task will be delivered to the App Engine application hostname -/// specified by its AppEngineHttpTarget and AppEngineHttpRequest. -/// The documentation for AppEngineHttpRequest explains how the -/// task's host URL is constructed. -/// -/// Using AppEngineHttpTarget requires -/// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) -/// Google IAM permission for the project -/// and the following scope: -/// -/// `https://www.googleapis.com/auth/cloud-platform` -class AppEngineHttpTarget { - /// Overrides for the - /// task-level app_engine_routing. - /// - /// If set, `app_engine_routing_override` is used for all tasks in - /// the queue, no matter what the setting is for the - /// task-level app_engine_routing. - AppEngineRouting appEngineRoutingOverride; - - AppEngineHttpTarget(); - - AppEngineHttpTarget.fromJson(core.Map _json) { - if (_json.containsKey("appEngineRoutingOverride")) { - appEngineRoutingOverride = - new AppEngineRouting.fromJson(_json["appEngineRoutingOverride"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (appEngineRoutingOverride != null) { - _json["appEngineRoutingOverride"] = (appEngineRoutingOverride).toJson(); + if (relativeUri != null) { + _json["relativeUri"] = relativeUri; } return _json; } @@ -1794,6 +1510,9 @@ /// App Engine Routing. /// +/// Defines routing characteristics specific to App Engine - service, version, +/// and instance. +/// /// For more information about services, versions, and instances see /// [An Overview of App /// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), @@ -1806,65 +1525,15 @@ class AppEngineRouting { /// Output only. The host that the task is sent to. /// + /// The host is constructed from the domain name of the app associated with + /// the queue's project ID (for example <app-id>.appspot.com), and the + /// service, version, + /// and instance. Tasks which were created using + /// the App Engine SDK might have a custom domain name. + /// /// For more information, see /// [How Requests are /// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - /// - /// The host is constructed as: - /// - /// - /// * `host = [application_domain_name]`</br> - /// `| [service] + '.' + [application_domain_name]`</br> - /// `| [version] + '.' + [application_domain_name]`</br> - /// `| [version_dot_service]+ '.' + [application_domain_name]`</br> - /// `| [instance] + '.' + [application_domain_name]`</br> - /// `| [instance_dot_service] + '.' + [application_domain_name]`</br> - /// `| [instance_dot_version] + '.' + [application_domain_name]`</br> - /// `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` - /// - /// * `application_domain_name` = The domain name of the app, for - /// example <app-id>.appspot.com, which is associated with the - /// queue's project ID. Some tasks which were created using the App Engine - /// SDK use a custom domain name. - /// - /// * `service =` service - /// - /// * `version =` version - /// - /// * `version_dot_service =` - /// version `+ '.' +` - /// service - /// - /// * `instance =` instance - /// - /// * `instance_dot_service =` - /// instance `+ '.' +` - /// service - /// - /// * `instance_dot_version =` - /// instance `+ '.' +` - /// version - /// - /// * `instance_dot_version_dot_service =` - /// instance `+ '.' +` - /// version `+ '.' +` - /// service - /// - /// If service is empty, then the task will be sent - /// to the service which is the default service when the task is attempted. - /// - /// If version is empty, then the task will be sent - /// to the version which is the default version when the task is attempted. - /// - /// If instance is empty, then the task - /// will be sent to an instance which is available when the task is - /// attempted. - /// - /// If service, - /// version, or - /// instance is invalid, then the task - /// will be sent to the default version of the default service when - /// the task is attempted. core.String host; /// App instance. @@ -1955,16 +1624,16 @@ } /// The status of a task attempt. -class AttemptStatus { +class Attempt { /// Output only. The time that this attempt was dispatched. /// /// `dispatch_time` will be truncated to the nearest microsecond. core.String dispatchTime; - /// Output only. The response from the target for this attempt. + /// Output only. The response from the worker for this attempt. /// - /// If the task has not been attempted or the task is currently running - /// then the response status is unset. + /// If `response_time` is unset, then the task has not been attempted or is + /// currently running and the `response_status` field is meaningless. Status responseStatus; /// Output only. The time that this attempt response was received. @@ -1977,9 +1646,9 @@ /// `schedule_time` will be truncated to the nearest microsecond. core.String scheduleTime; - AttemptStatus(); + Attempt(); - AttemptStatus.fromJson(core.Map _json) { + Attempt.fromJson(core.Map _json) { if (_json.containsKey("dispatchTime")) { dispatchTime = _json["dispatchTime"]; } @@ -2079,72 +1748,6 @@ } } -/// Request message for canceling a lease using -/// CancelLease. -class CancelLeaseRequest { - /// The response_view specifies which subset of the Task will be - /// returned. - /// - /// By default response_view is BASIC; not all - /// information is retrieved by default because some data, such as - /// payloads, might be desirable to return only when needed because - /// of its large size or because of the sensitivity of data that it - /// contains. - /// - /// Authorization for FULL requires - /// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - /// permission on the Task resource. - /// Possible string values are: - /// - "VIEW_UNSPECIFIED" : Unspecified. Defaults to BASIC. - /// - "BASIC" : The basic view omits fields which can be large or can contain - /// sensitive data. - /// - /// This view does not include the - /// (payload in AppEngineHttpRequest and - /// payload in PullMessage). These payloads are - /// desirable to return only when needed, because they can be large - /// and because of the sensitivity of the data that you choose to - /// store in it. - /// - "FULL" : All information is returned. - /// - /// Authorization for FULL requires - /// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - /// permission on the Queue resource. - core.String responseView; - - /// Required. - /// - /// The task's current schedule time, available in the - /// schedule_time returned by - /// LeaseTasks response or - /// RenewLease response. This restriction is - /// to ensure that your worker currently holds the lease. - core.String scheduleTime; - - CancelLeaseRequest(); - - CancelLeaseRequest.fromJson(core.Map _json) { - if (_json.containsKey("responseView")) { - responseView = _json["responseView"]; - } - if (_json.containsKey("scheduleTime")) { - scheduleTime = _json["scheduleTime"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (responseView != null) { - _json["responseView"] = responseView; - } - if (scheduleTime != null) { - _json["scheduleTime"] = scheduleTime; - } - return _json; - } -} - /// Request message for CreateTask. class CreateTaskRequest { /// The response_view specifies which subset of the Task will be @@ -2165,11 +1768,10 @@ /// sensitive data. /// /// This view does not include the - /// (payload in AppEngineHttpRequest and - /// payload in PullMessage). These payloads are - /// desirable to return only when needed, because they can be large - /// and because of the sensitivity of the data that you choose to - /// store in it. + /// body in AppEngineHttpRequest. + /// Bodies are desirable to return only when needed, because they + /// can be large and because of the sensitivity of the data that you + /// choose to store in it. /// - "FULL" : All information is returned. /// /// Authorization for FULL requires @@ -2195,13 +1797,13 @@ /// /// Explicitly specifying a task ID enables task de-duplication. If /// a task's ID is identical to that of an existing task or a task - /// that was deleted or completed recently then the call will fail + /// that was deleted or executed recently then the call will fail /// with ALREADY_EXISTS. /// If the task's queue was created using Cloud Tasks, then another task with /// the same name can't be created for ~1hour after the original task was - /// deleted or completed. If the task's queue was created using queue.yaml or + /// deleted or executed. If the task's queue was created using queue.yaml or /// queue.xml, then another task with the same name can't be created - /// for ~9days after the original task was deleted or completed. + /// for ~9days after the original task was deleted or executed. /// /// Because there is an extra lookup cost to identify duplicate task /// names, these CreateTask calls have significantly @@ -2334,154 +1936,6 @@ } } -/// Request message for leasing tasks using LeaseTasks. -class LeaseTasksRequest { - /// `filter` can be used to specify a subset of tasks to lease. - /// - /// When `filter` is set to `tag=<my-tag>` then the - /// response will contain only tasks whose - /// tag is equal to `<my-tag>`. `<my-tag>` must be - /// less than 500 characters. - /// - /// When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - /// the same tag as the task with the oldest - /// schedule_time will be returned. - /// - /// Grammar Syntax: - /// - /// * `filter = "tag=" tag | "tag_function=" function` - /// - /// * `tag = string` - /// - /// * `function = "oldest_tag()"` - /// - /// The `oldest_tag()` function returns tasks which have the same tag as the - /// oldest task (ordered by schedule time). - /// - /// SDK compatibility: Although the SDK allows tags to be either - /// string or - /// [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - /// only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - /// aren't UTF-8 encoded can't be used in the - /// filter and the task's - /// tag will be displayed as empty in Cloud Tasks. - core.String filter; - - /// - /// After the worker has successfully finished the work associated - /// with the task, the worker must call via - /// AcknowledgeTask before the - /// schedule_time. Otherwise the task will be - /// returned to a later LeaseTasks call so - /// that another worker can retry it. - /// - /// The maximum lease duration is 1 week. - /// `lease_duration` will be truncated to the nearest second. - core.String leaseDuration; - - /// The maximum number of tasks to lease. - /// - /// The system will make a best effort to return as close to as - /// `max_tasks` as possible. - /// - /// The largest that `max_tasks` can be is 1000. - /// - /// The maximum total size of a lease tasks response is - /// 32 MB. If the sum of all task sizes requested reaches this limit, - /// fewer tasks than requested are returned. - core.int maxTasks; - - /// The response_view specifies which subset of the Task will be - /// returned. - /// - /// By default response_view is BASIC; not all - /// information is retrieved by default because some data, such as - /// payloads, might be desirable to return only when needed because - /// of its large size or because of the sensitivity of data that it - /// contains. - /// - /// Authorization for FULL requires - /// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - /// permission on the Task resource. - /// Possible string values are: - /// - "VIEW_UNSPECIFIED" : Unspecified. Defaults to BASIC. - /// - "BASIC" : The basic view omits fields which can be large or can contain - /// sensitive data. - /// - /// This view does not include the - /// (payload in AppEngineHttpRequest and - /// payload in PullMessage). These payloads are - /// desirable to return only when needed, because they can be large - /// and because of the sensitivity of the data that you choose to - /// store in it. - /// - "FULL" : All information is returned. - /// - /// Authorization for FULL requires - /// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - /// permission on the Queue resource. - core.String responseView; - - LeaseTasksRequest(); - - LeaseTasksRequest.fromJson(core.Map _json) { - if (_json.containsKey("filter")) { - filter = _json["filter"]; - } - if (_json.containsKey("leaseDuration")) { - leaseDuration = _json["leaseDuration"]; - } - if (_json.containsKey("maxTasks")) { - maxTasks = _json["maxTasks"]; - } - if (_json.containsKey("responseView")) { - responseView = _json["responseView"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (filter != null) { - _json["filter"] = filter; - } - if (leaseDuration != null) { - _json["leaseDuration"] = leaseDuration; - } - if (maxTasks != null) { - _json["maxTasks"] = maxTasks; - } - if (responseView != null) { - _json["responseView"] = responseView; - } - return _json; - } -} - -/// Response message for leasing tasks using LeaseTasks. -class LeaseTasksResponse { - /// The leased tasks. - core.List<Task> tasks; - - LeaseTasksResponse(); - - LeaseTasksResponse.fromJson(core.Map _json) { - if (_json.containsKey("tasks")) { - tasks = (_json["tasks"] as core.List) - .map<Task>((value) => new Task.fromJson(value)) - .toList(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (tasks != null) { - _json["tasks"] = tasks.map((value) => (value).toJson()).toList(); - } - return _json; - } -} - /// The response message for Locations.ListLocations. class ListLocationsResponse { /// A list of locations that matches the specified filter in the request. @@ -2787,81 +2241,6 @@ } } -/// The pull message contains data that can be used by the caller of -/// LeaseTasks to process the task. -/// -/// This proto can only be used for tasks in a queue which has -/// pull_target set. -class PullMessage { - /// A data payload consumed by the worker to execute the task. - core.String payload; - core.List<core.int> get payloadAsBytes { - return convert.base64.decode(payload); - } - - void set payloadAsBytes(core.List<core.int> _bytes) { - payload = - convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); - } - - /// The task's tag. - /// - /// Tags allow similar tasks to be processed in a batch. If you label - /// tasks with a tag, your worker can - /// lease tasks with the same tag using - /// filter. For example, if you want to - /// aggregate the events associated with a specific user once a day, - /// you could tag tasks with the user ID. - /// - /// The task's tag can only be set when the - /// task is created. - /// - /// The tag must be less than 500 characters. - /// - /// SDK compatibility: Although the SDK allows tags to be either - /// string or - /// [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - /// only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - /// encoded, the tag will be empty when the task is returned by Cloud Tasks. - core.String tag; - - PullMessage(); - - PullMessage.fromJson(core.Map _json) { - if (_json.containsKey("payload")) { - payload = _json["payload"]; - } - if (_json.containsKey("tag")) { - tag = _json["tag"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (payload != null) { - _json["payload"] = payload; - } - if (tag != null) { - _json["tag"] = tag; - } - return _json; - } -} - -/// Pull target. -class PullTarget { - PullTarget(); - - PullTarget.fromJson(core.Map _json) {} - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - return _json; - } -} - /// Request message for PurgeQueue. class PurgeQueueRequest { PurgeQueueRequest(); @@ -2877,12 +2256,11 @@ /// A queue is a container of related tasks. Queues are configured to manage /// how those tasks are dispatched. Configurable properties include rate limits, -/// retry options, target types, and others. +/// retry options, queue types, and others. class Queue { - /// App Engine HTTP target. - /// - /// An App Engine queue is a queue that has an AppEngineHttpTarget. - AppEngineHttpTarget appEngineHttpTarget; + /// AppEngineHttpQueue settings apply only to + /// AppEngine tasks in this queue. + AppEngineHttpQueue appEngineHttpQueue; /// Caller-specified and required in CreateQueue, /// after which it becomes output only. @@ -2905,11 +2283,6 @@ /// hyphens (-). The maximum length is 100 characters. core.String name; - /// Pull target. - /// - /// A pull queue is a queue that has a PullTarget. - PullTarget pullTarget; - /// Output only. The last time this queue was purged. /// /// All tasks that were created before this time @@ -2925,10 +2298,9 @@ /// Rate limits for task dispatches. /// - /// rate_limits and - /// retry_config are related because they both - /// control task attempts however they control how tasks are - /// attempted in different ways: + /// rate_limits and retry_config are + /// related because they both control task attempts. However they control task + /// attempts in different ways: /// /// * rate_limits controls the total rate of /// dispatches from a queue (i.e. all traffic dispatched from the @@ -2938,6 +2310,16 @@ /// particular a task after its first attempt fails. That is, /// retry_config controls task retries (the /// second attempt, third attempt, etc). + /// + /// The queue's actual dispatch rate is the result of: + /// + /// * Number of tasks in the queue + /// * User-specified throttling: rate limits + /// retry configuration, and the + /// queue's state. + /// * System throttling due to `429` (Too Many Requests) or `503` (Service + /// Unavailable) responses from the worker, high error rates, or to smooth + /// sudden large traffic spikes. RateLimits rateLimits; /// Settings that determine the retry behavior. @@ -2972,22 +2354,18 @@ /// - "PAUSED" : Tasks are paused by the user. If the queue is paused then /// Cloud /// Tasks will stop delivering tasks from it, but more tasks can - /// still be added to it by the user. When a pull queue is paused, - /// all LeaseTasks calls will return a - /// FAILED_PRECONDITION. + /// still be added to it by the user. /// - "DISABLED" : The queue is disabled. /// /// A queue becomes `DISABLED` when /// [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) /// or /// [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - /// is uploaded - /// which does not contain the queue. You cannot directly disable a queue. + /// is uploaded which does not contain the queue. You cannot directly disable + /// a queue. /// /// When a queue is disabled, tasks can still be added to a queue - /// but the tasks are not dispatched and - /// LeaseTasks calls return a - /// `FAILED_PRECONDITION` error. + /// but the tasks are not dispatched. /// /// To permanently delete this queue and all of its tasks, call /// DeleteQueue. @@ -2996,16 +2374,13 @@ Queue(); Queue.fromJson(core.Map _json) { - if (_json.containsKey("appEngineHttpTarget")) { - appEngineHttpTarget = - new AppEngineHttpTarget.fromJson(_json["appEngineHttpTarget"]); + if (_json.containsKey("appEngineHttpQueue")) { + appEngineHttpQueue = + new AppEngineHttpQueue.fromJson(_json["appEngineHttpQueue"]); } if (_json.containsKey("name")) { name = _json["name"]; } - if (_json.containsKey("pullTarget")) { - pullTarget = new PullTarget.fromJson(_json["pullTarget"]); - } if (_json.containsKey("purgeTime")) { purgeTime = _json["purgeTime"]; } @@ -3023,15 +2398,12 @@ core.Map<core.String, core.Object> toJson() { final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>(); - if (appEngineHttpTarget != null) { - _json["appEngineHttpTarget"] = (appEngineHttpTarget).toJson(); + if (appEngineHttpQueue != null) { + _json["appEngineHttpQueue"] = (appEngineHttpQueue).toJson(); } if (name != null) { _json["name"] = name; } - if (pullTarget != null) { - _json["pullTarget"] = (pullTarget).toJson(); - } if (purgeTime != null) { _json["purgeTime"] = purgeTime; } @@ -3072,11 +2444,11 @@ /// token is removed from the bucket. Tasks will be dispatched until /// the queue's bucket runs out of tokens. The bucket will be /// continuously refilled with new tokens based on - /// max_tasks_dispatched_per_second. + /// max_dispatches_per_second. /// /// Cloud Tasks will pick the value of `max_burst_size` based on the /// value of - /// max_tasks_dispatched_per_second. + /// max_dispatches_per_second. /// /// For App Engine queues that were created or updated using /// `queue.yaml/xml`, `max_burst_size` is equal to @@ -3085,9 +2457,9 @@ /// UpdateQueue is called on a queue /// created by `queue.yaml/xml`, `max_burst_size` will be reset based /// on the value of - /// max_tasks_dispatched_per_second, + /// max_dispatches_per_second, /// regardless of whether - /// max_tasks_dispatched_per_second + /// max_dispatches_per_second /// is updated. core.int maxBurstSize; @@ -3102,15 +2474,11 @@ /// /// The maximum allowed value is 5,000. /// - /// This field is output only for - /// pull queues and always -1, which indicates no limit. No other - /// queue types can have `max_concurrent_tasks` set to -1. - /// /// /// This field has the same meaning as /// [max_concurrent_requests in /// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - core.int maxConcurrentTasks; + core.int maxConcurrentDispatches; /// The maximum rate at which tasks are dispatched from this queue. /// @@ -3119,15 +2487,12 @@ /// /// * For App Engine queues, the maximum allowed value /// is 500. - /// * This field is output only for pull queues. In addition to the - /// `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - /// LeaseTasks requests are allowed per pull queue. /// /// /// This field has the same meaning as /// [rate in /// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - core.double maxTasksDispatchedPerSecond; + core.double maxDispatchesPerSecond; RateLimits(); @@ -3135,12 +2500,11 @@ if (_json.containsKey("maxBurstSize")) { maxBurstSize = _json["maxBurstSize"]; } - if (_json.containsKey("maxConcurrentTasks")) { - maxConcurrentTasks = _json["maxConcurrentTasks"]; + if (_json.containsKey("maxConcurrentDispatches")) { + maxConcurrentDispatches = _json["maxConcurrentDispatches"]; } - if (_json.containsKey("maxTasksDispatchedPerSecond")) { - maxTasksDispatchedPerSecond = - _json["maxTasksDispatchedPerSecond"].toDouble(); + if (_json.containsKey("maxDispatchesPerSecond")) { + maxDispatchesPerSecond = _json["maxDispatchesPerSecond"].toDouble(); } } @@ -3150,92 +2514,11 @@ if (maxBurstSize != null) { _json["maxBurstSize"] = maxBurstSize; } - if (maxConcurrentTasks != null) { - _json["maxConcurrentTasks"] = maxConcurrentTasks; + if (maxConcurrentDispatches != null) { + _json["maxConcurrentDispatches"] = maxConcurrentDispatches; } - if (maxTasksDispatchedPerSecond != null) { - _json["maxTasksDispatchedPerSecond"] = maxTasksDispatchedPerSecond; - } - return _json; - } -} - -/// Request message for renewing a lease using -/// RenewLease. -class RenewLeaseRequest { - /// Required. - /// - /// The desired new lease duration, starting from now. - /// - /// - /// The maximum lease duration is 1 week. - /// `lease_duration` will be truncated to the nearest second. - core.String leaseDuration; - - /// The response_view specifies which subset of the Task will be - /// returned. - /// - /// By default response_view is BASIC; not all - /// information is retrieved by default because some data, such as - /// payloads, might be desirable to return only when needed because - /// of its large size or because of the sensitivity of data that it - /// contains. - /// - /// Authorization for FULL requires - /// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - /// permission on the Task resource. - /// Possible string values are: - /// - "VIEW_UNSPECIFIED" : Unspecified. Defaults to BASIC. - /// - "BASIC" : The basic view omits fields which can be large or can contain - /// sensitive data. - /// - /// This view does not include the - /// (payload in AppEngineHttpRequest and - /// payload in PullMessage). These payloads are - /// desirable to return only when needed, because they can be large - /// and because of the sensitivity of the data that you choose to - /// store in it. - /// - "FULL" : All information is returned. - /// - /// Authorization for FULL requires - /// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - /// permission on the Queue resource. - core.String responseView; - - /// Required. - /// - /// The task's current schedule time, available in the - /// schedule_time returned by - /// LeaseTasks response or - /// RenewLease response. This restriction is - /// to ensure that your worker currently holds the lease. - core.String scheduleTime; - - RenewLeaseRequest(); - - RenewLeaseRequest.fromJson(core.Map _json) { - if (_json.containsKey("leaseDuration")) { - leaseDuration = _json["leaseDuration"]; - } - if (_json.containsKey("responseView")) { - responseView = _json["responseView"]; - } - if (_json.containsKey("scheduleTime")) { - scheduleTime = _json["scheduleTime"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (leaseDuration != null) { - _json["leaseDuration"] = leaseDuration; - } - if (responseView != null) { - _json["responseView"] = responseView; - } - if (scheduleTime != null) { - _json["scheduleTime"] = scheduleTime; + if (maxDispatchesPerSecond != null) { + _json["maxDispatchesPerSecond"] = maxDispatchesPerSecond; } return _json; } @@ -3256,13 +2539,22 @@ /// Retry config. /// -/// These settings determine how a failed task attempt is retried. +/// These settings determine when a failed task attempt is retried. class RetryConfig { - /// The maximum number of attempts for a task. + /// Number of attempts per task. /// - /// Cloud Tasks will attempt the task `max_attempts` times (that - /// is, if the first attempt fails, then there will be - /// `max_attempts - 1` retries). Must be > 0. + /// Cloud Tasks will attempt the task `max_attempts` times (that is, if the + /// first attempt fails, then there will be `max_attempts - 1` retries). Must + /// be >= -1. + /// + /// If unspecified when the queue is created, Cloud Tasks will pick the + /// default. + /// + /// -1 indicates unlimited attempts. + /// + /// This field has the same meaning as + /// [task_retry_limit in + /// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). core.int maxAttempts; /// A task will be scheduled for retry between @@ -3274,8 +2566,6 @@ /// If unspecified when the queue is created, Cloud Tasks will pick the /// default. /// - /// This field is output only for pull queues. - /// /// /// `max_backoff` will be truncated to the nearest second. /// @@ -3306,8 +2596,6 @@ /// If unspecified when the queue is created, Cloud Tasks will pick the /// default. /// - /// This field is output only for pull queues. - /// /// /// This field has the same meaning as /// [max_doublings in @@ -3326,8 +2614,6 @@ /// If unspecified when the queue is created, Cloud Tasks will pick the /// default. /// - /// This field is output only for pull queues. - /// /// /// `max_retry_duration` will be truncated to the nearest second. /// @@ -3345,8 +2631,6 @@ /// If unspecified when the queue is created, Cloud Tasks will pick the /// default. /// - /// This field is output only for pull queues. - /// /// /// `min_backoff` will be truncated to the nearest second. /// @@ -3355,9 +2639,6 @@ /// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). core.String minBackoff; - /// If true, then the number of attempts is unlimited. - core.bool unlimitedAttempts; - RetryConfig(); RetryConfig.fromJson(core.Map _json) { @@ -3376,9 +2657,6 @@ if (_json.containsKey("minBackoff")) { minBackoff = _json["minBackoff"]; } - if (_json.containsKey("unlimitedAttempts")) { - unlimitedAttempts = _json["unlimitedAttempts"]; - } } core.Map<core.String, core.Object> toJson() { @@ -3399,9 +2677,6 @@ if (minBackoff != null) { _json["minBackoff"] = minBackoff; } - if (unlimitedAttempts != null) { - _json["unlimitedAttempts"] = unlimitedAttempts; - } return _json; } } @@ -3427,11 +2702,10 @@ /// sensitive data. /// /// This view does not include the - /// (payload in AppEngineHttpRequest and - /// payload in PullMessage). These payloads are - /// desirable to return only when needed, because they can be large - /// and because of the sensitivity of the data that you choose to - /// store in it. + /// body in AppEngineHttpRequest. + /// Bodies are desirable to return only when needed, because they + /// can be large and because of the sensitivity of the data that you + /// choose to store in it. /// - "FULL" : All information is returned. /// /// Authorization for FULL requires @@ -3590,10 +2864,7 @@ /// A unit of scheduled work. class Task { - /// App Engine HTTP request that is sent to the task's target. Can - /// be set only if - /// app_engine_http_target is set - /// on the queue. + /// HTTP request that is sent to the App Engine app handler. /// /// An App Engine task is a task that has AppEngineHttpRequest set. AppEngineHttpRequest appEngineHttpRequest; @@ -3603,6 +2874,21 @@ /// `create_time` will be truncated to the nearest second. core.String createTime; + /// Output only. The number of attempts dispatched. + /// + /// This count includes tasks which have been dispatched but haven't + /// received a response. + core.int dispatchCount; + + /// Output only. The status of the task's first attempt. + /// + /// Only dispatch_time will be set. + /// The other Attempt information is not retained by Cloud Tasks. + Attempt firstAttempt; + + /// Output only. The status of the task's last attempt. + Attempt lastAttempt; + /// Optionally caller-specified in CreateTask. /// /// The task name. @@ -3625,27 +2911,16 @@ /// hyphens (-), or underscores (_). The maximum length is 500 characters. core.String name; - /// LeaseTasks to process the task. Can be - /// set only if pull_target is set on the queue. - /// - /// A pull task is a task that has PullMessage set. - PullMessage pullMessage; + /// Output only. The number of attempts which have received a response. + core.int responseCount; /// The time when the task is scheduled to be attempted. /// /// For App Engine queues, this is when the task will be attempted or retried. /// - /// For pull queues, this is the time when the task is available to - /// be leased; if a task is currently leased, this is the time when - /// the current lease expires, that is, the time that the task was - /// leased plus the lease_duration. - /// /// `schedule_time` will be truncated to the nearest microsecond. core.String scheduleTime; - /// Output only. The task status. - TaskStatus status; - /// Output only. The view specifies which subset of the Task has /// been returned. /// Possible string values are: @@ -3654,11 +2929,10 @@ /// sensitive data. /// /// This view does not include the - /// (payload in AppEngineHttpRequest and - /// payload in PullMessage). These payloads are - /// desirable to return only when needed, because they can be large - /// and because of the sensitivity of the data that you choose to - /// store in it. + /// body in AppEngineHttpRequest. + /// Bodies are desirable to return only when needed, because they + /// can be large and because of the sensitivity of the data that you + /// choose to store in it. /// - "FULL" : All information is returned. /// /// Authorization for FULL requires @@ -3676,18 +2950,24 @@ if (_json.containsKey("createTime")) { createTime = _json["createTime"]; } + if (_json.containsKey("dispatchCount")) { + dispatchCount = _json["dispatchCount"]; + } + if (_json.containsKey("firstAttempt")) { + firstAttempt = new Attempt.fromJson(_json["firstAttempt"]); + } + if (_json.containsKey("lastAttempt")) { + lastAttempt = new Attempt.fromJson(_json["lastAttempt"]); + } if (_json.containsKey("name")) { name = _json["name"]; } - if (_json.containsKey("pullMessage")) { - pullMessage = new PullMessage.fromJson(_json["pullMessage"]); + if (_json.containsKey("responseCount")) { + responseCount = _json["responseCount"]; } if (_json.containsKey("scheduleTime")) { scheduleTime = _json["scheduleTime"]; } - if (_json.containsKey("status")) { - status = new TaskStatus.fromJson(_json["status"]); - } if (_json.containsKey("view")) { view = _json["view"]; } @@ -3702,18 +2982,24 @@ if (createTime != null) { _json["createTime"] = createTime; } + if (dispatchCount != null) { + _json["dispatchCount"] = dispatchCount; + } + if (firstAttempt != null) { + _json["firstAttempt"] = (firstAttempt).toJson(); + } + if (lastAttempt != null) { + _json["lastAttempt"] = (lastAttempt).toJson(); + } if (name != null) { _json["name"] = name; } - if (pullMessage != null) { - _json["pullMessage"] = (pullMessage).toJson(); + if (responseCount != null) { + _json["responseCount"] = responseCount; } if (scheduleTime != null) { _json["scheduleTime"] = scheduleTime; } - if (status != null) { - _json["status"] = (status).toJson(); - } if (view != null) { _json["view"] = view; } @@ -3721,70 +3007,6 @@ } } -/// Status of the task. -class TaskStatus { - /// Output only. The number of attempts dispatched. - /// - /// This count includes tasks which have been dispatched but haven't - /// received a response. - core.int attemptDispatchCount; - - /// Output only. The number of attempts which have received a response. - /// - /// This field is not calculated for pull tasks. - core.int attemptResponseCount; - - /// Output only. The status of the task's first attempt. - /// - /// Only dispatch_time will be set. - /// The other AttemptStatus information is not retained by Cloud Tasks. - /// - /// This field is not calculated for pull tasks. - AttemptStatus firstAttemptStatus; - - /// Output only. The status of the task's last attempt. - /// - /// This field is not calculated for pull tasks. - AttemptStatus lastAttemptStatus; - - TaskStatus(); - - TaskStatus.fromJson(core.Map _json) { - if (_json.containsKey("attemptDispatchCount")) { - attemptDispatchCount = _json["attemptDispatchCount"]; - } - if (_json.containsKey("attemptResponseCount")) { - attemptResponseCount = _json["attemptResponseCount"]; - } - if (_json.containsKey("firstAttemptStatus")) { - firstAttemptStatus = - new AttemptStatus.fromJson(_json["firstAttemptStatus"]); - } - if (_json.containsKey("lastAttemptStatus")) { - lastAttemptStatus = - new AttemptStatus.fromJson(_json["lastAttemptStatus"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (attemptDispatchCount != null) { - _json["attemptDispatchCount"] = attemptDispatchCount; - } - if (attemptResponseCount != null) { - _json["attemptResponseCount"] = attemptResponseCount; - } - if (firstAttemptStatus != null) { - _json["firstAttemptStatus"] = (firstAttemptStatus).toJson(); - } - if (lastAttemptStatus != null) { - _json["lastAttemptStatus"] = (lastAttemptStatus).toJson(); - } - return _json; - } -} - /// Request message for `TestIamPermissions` method. class TestIamPermissionsRequest { /// The set of permissions to check for the `resource`. Permissions with
diff --git a/generated/googleapis_beta/lib/containeranalysis/v1beta1.dart b/generated/googleapis_beta/lib/containeranalysis/v1beta1.dart new file mode 100644 index 0000000..2f5c3c3 --- /dev/null +++ b/generated/googleapis_beta/lib/containeranalysis/v1beta1.dart
@@ -0,0 +1,5104 @@ +// This is a generated file (see the discoveryapis_generator project). + +// ignore_for_file: unnecessary_cast + +library googleapis_beta.containeranalysis.v1beta1; + +import 'dart:core' as core; +import 'dart:async' as async; +import 'dart:convert' as convert; + +import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; +import 'package:http/http.dart' as http; + +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' + show ApiRequestError, DetailedApiRequestError; + +const core.String USER_AGENT = 'dart-api-client containeranalysis/v1beta1'; + +/// An implementation of the Grafeas API, which stores, and enables querying and +/// retrieval of critical metadata about all of your software artifacts. +class ContaineranalysisApi { + /// View and manage your data across Google Cloud Platform services + static const CloudPlatformScope = + "https://www.googleapis.com/auth/cloud-platform"; + + final commons.ApiRequester _requester; + + ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); + + ContaineranalysisApi(http.Client client, + {core.String rootUrl: "https://containeranalysis.googleapis.com/", + core.String servicePath: ""}) + : _requester = + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); +} + +class ProjectsResourceApi { + final commons.ApiRequester _requester; + + ProjectsNotesResourceApi get notes => + new ProjectsNotesResourceApi(_requester); + ProjectsOccurrencesResourceApi get occurrences => + new ProjectsOccurrencesResourceApi(_requester); + ProjectsScanConfigsResourceApi get scanConfigs => + new ProjectsScanConfigsResourceApi(_requester); + + ProjectsResourceApi(commons.ApiRequester client) : _requester = client; +} + +class ProjectsNotesResourceApi { + final commons.ApiRequester _requester; + + ProjectsNotesOccurrencesResourceApi get occurrences => + new ProjectsNotesOccurrencesResourceApi(_requester); + + ProjectsNotesResourceApi(commons.ApiRequester client) : _requester = client; + + /// Creates new notes in batch. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - The name of the project in the form of `projects/[PROJECT_ID]`, + /// under which + /// the notes are to be created. + /// Value must have pattern "^projects/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [BatchCreateNotesResponse]. + /// + /// 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<BatchCreateNotesResponse> batchCreate( + BatchCreateNotesRequest request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/notes:batchCreate'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new BatchCreateNotesResponse.fromJson(data)); + } + + /// Creates a new note. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - The name of the project in the form of `projects/[PROJECT_ID]`, + /// under which + /// the note is to be created. + /// Value must have pattern "^projects/[^/]+$". + /// + /// [noteId] - The ID to use for this note. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Note]. + /// + /// 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<Note> create(Note request, core.String parent, + {core.String noteId, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (noteId != null) { + _queryParams["noteId"] = [noteId]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/notes'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Note.fromJson(data)); + } + + /// Deletes the specified note. + /// + /// Request parameters: + /// + /// [name] - The name of the note in the form of + /// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + /// Value must have pattern "^projects/[^/]+/notes/[^/]+$". + /// + /// [$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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Empty.fromJson(data)); + } + + /// Gets the specified note. + /// + /// Request parameters: + /// + /// [name] - The name of the note in the form of + /// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + /// Value must have pattern "^projects/[^/]+/notes/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Note]. + /// + /// 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<Note> get(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Note.fromJson(data)); + } + + /// Gets the access control policy for a note or an occurrence resource. + /// Requires `containeranalysis.notes.setIamPolicy` or + /// `containeranalysis.occurrences.setIamPolicy` permission if the resource is + /// a note or occurrence, respectively. + /// + /// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + /// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + /// occurrences. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [resource] - REQUIRED: The resource for which the policy is being + /// requested. + /// See the operation documentation for the appropriate value for this field. + /// Value must have pattern "^projects/[^/]+/notes/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Policy]. + /// + /// Completes with a [commons.ApiRequestError] if the API endpoint returned an + /// error. + /// + /// If the used [http.Client] completes with an error when making a REST call, + /// this method will complete with the same error. + async.Future<Policy> getIamPolicy( + GetIamPolicyRequest request, core.String resource, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (resource == null) { + throw new core.ArgumentError("Parameter resource is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$resource') + + ':getIamPolicy'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Policy.fromJson(data)); + } + + /// Lists notes for the specified project. + /// + /// Request parameters: + /// + /// [parent] - The name of the project to list notes for in the form of + /// `projects/[PROJECT_ID]`. + /// Value must have pattern "^projects/[^/]+$". + /// + /// [filter] - The filter expression. + /// + /// [pageToken] - Token to provide to skip to a particular spot in the list. + /// + /// [pageSize] - Number of notes to return in the list. Must be positive. Max + /// allowed page + /// size is 1000. If not specified, page size defaults to 20. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListNotesResponse]. + /// + /// 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<ListNotesResponse> list(core.String parent, + {core.String filter, + core.String pageToken, + core.int pageSize, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/notes'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListNotesResponse.fromJson(data)); + } + + /// Updates the specified note. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The name of the note in the form of + /// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + /// Value must have pattern "^projects/[^/]+/notes/[^/]+$". + /// + /// [updateMask] - The fields to update. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Note]. + /// + /// 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<Note> patch(Note request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Note.fromJson(data)); + } + + /// Sets the access control policy on the specified note or occurrence. + /// Requires `containeranalysis.notes.setIamPolicy` or + /// `containeranalysis.occurrences.setIamPolicy` permission if the resource is + /// a note or an occurrence, respectively. + /// + /// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + /// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + /// occurrences. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [resource] - REQUIRED: The resource for which the policy is being + /// specified. + /// See the operation documentation for the appropriate value for this field. + /// Value must have pattern "^projects/[^/]+/notes/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Policy]. + /// + /// Completes with a [commons.ApiRequestError] if the API endpoint returned an + /// error. + /// + /// If the used [http.Client] completes with an error when making a REST call, + /// this method will complete with the same error. + async.Future<Policy> setIamPolicy( + SetIamPolicyRequest request, core.String resource, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (resource == null) { + throw new core.ArgumentError("Parameter resource is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$resource') + + ':setIamPolicy'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Policy.fromJson(data)); + } + + /// Returns the permissions that a caller has on the specified note or + /// occurrence. Requires list permission on the project (for example, + /// `containeranalysis.notes.list`). + /// + /// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + /// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + /// occurrences. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [resource] - REQUIRED: The resource for which the policy detail is being + /// requested. + /// See the operation documentation for the appropriate value for this field. + /// Value must have pattern "^projects/[^/]+/notes/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [TestIamPermissionsResponse]. + /// + /// Completes with a [commons.ApiRequestError] if the API endpoint returned an + /// error. + /// + /// If the used [http.Client] completes with an error when making a REST call, + /// this method will complete with the same error. + async.Future<TestIamPermissionsResponse> testIamPermissions( + TestIamPermissionsRequest request, core.String resource, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (resource == null) { + throw new core.ArgumentError("Parameter resource is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$resource') + + ':testIamPermissions'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new TestIamPermissionsResponse.fromJson(data)); + } +} + +class ProjectsNotesOccurrencesResourceApi { + final commons.ApiRequester _requester; + + ProjectsNotesOccurrencesResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Lists occurrences referencing the specified note. Provider projects can + /// use + /// this method to get all occurrences across consumer projects referencing + /// the + /// specified note. + /// + /// Request parameters: + /// + /// [name] - The name of the note to list occurrences for in the form of + /// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + /// Value must have pattern "^projects/[^/]+/notes/[^/]+$". + /// + /// [pageSize] - Number of occurrences to return in the list. + /// + /// [filter] - The filter expression. + /// + /// [pageToken] - Token to provide to skip to a particular spot in the list. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListNoteOccurrencesResponse]. + /// + /// 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<ListNoteOccurrencesResponse> list(core.String name, + {core.int pageSize, + core.String filter, + core.String pageToken, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$name') + + '/occurrences'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new ListNoteOccurrencesResponse.fromJson(data)); + } +} + +class ProjectsOccurrencesResourceApi { + final commons.ApiRequester _requester; + + ProjectsOccurrencesResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Creates new occurrences in batch. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - The name of the project in the form of `projects/[PROJECT_ID]`, + /// under which + /// the occurrences are to be created. + /// Value must have pattern "^projects/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [BatchCreateOccurrencesResponse]. + /// + /// 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<BatchCreateOccurrencesResponse> batchCreate( + BatchCreateOccurrencesRequest request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/occurrences:batchCreate'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new BatchCreateOccurrencesResponse.fromJson(data)); + } + + /// Creates a new occurrence. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - The name of the project in the form of `projects/[PROJECT_ID]`, + /// under which + /// the occurrence is to be created. + /// Value must have pattern "^projects/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Occurrence]. + /// + /// 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<Occurrence> create(Occurrence request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/occurrences'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Occurrence.fromJson(data)); + } + + /// Deletes the specified occurrence. For example, use this method to delete + /// an + /// occurrence when the occurrence is no longer applicable for the given + /// resource. + /// + /// Request parameters: + /// + /// [name] - The name of the occurrence in the form of + /// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + /// Value must have pattern "^projects/[^/]+/occurrences/[^/]+$". + /// + /// [$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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Empty.fromJson(data)); + } + + /// Gets the specified occurrence. + /// + /// Request parameters: + /// + /// [name] - The name of the occurrence in the form of + /// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + /// Value must have pattern "^projects/[^/]+/occurrences/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Occurrence]. + /// + /// 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<Occurrence> get(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Occurrence.fromJson(data)); + } + + /// Gets the access control policy for a note or an occurrence resource. + /// Requires `containeranalysis.notes.setIamPolicy` or + /// `containeranalysis.occurrences.setIamPolicy` permission if the resource is + /// a note or occurrence, respectively. + /// + /// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + /// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + /// occurrences. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [resource] - REQUIRED: The resource for which the policy is being + /// requested. + /// See the operation documentation for the appropriate value for this field. + /// Value must have pattern "^projects/[^/]+/occurrences/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Policy]. + /// + /// Completes with a [commons.ApiRequestError] if the API endpoint returned an + /// error. + /// + /// If the used [http.Client] completes with an error when making a REST call, + /// this method will complete with the same error. + async.Future<Policy> getIamPolicy( + GetIamPolicyRequest request, core.String resource, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (resource == null) { + throw new core.ArgumentError("Parameter resource is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$resource') + + ':getIamPolicy'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Policy.fromJson(data)); + } + + /// Gets the note attached to the specified occurrence. Consumer projects can + /// use this method to get a note that belongs to a provider project. + /// + /// Request parameters: + /// + /// [name] - The name of the occurrence in the form of + /// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + /// Value must have pattern "^projects/[^/]+/occurrences/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Note]. + /// + /// 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<Note> getNotes(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = + 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name') + '/notes'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Note.fromJson(data)); + } + + /// Gets a summary of the number and severity of occurrences. + /// + /// Request parameters: + /// + /// [parent] - The name of the project to get a vulnerability summary for in + /// the form of + /// `projects/[PROJECT_ID]`. + /// Value must have pattern "^projects/[^/]+$". + /// + /// [filter] - The filter expression. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [VulnerabilityOccurrencesSummary]. + /// + /// 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<VulnerabilityOccurrencesSummary> getVulnerabilitySummary( + core.String parent, + {core.String filter, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/occurrences:vulnerabilitySummary'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new VulnerabilityOccurrencesSummary.fromJson(data)); + } + + /// Lists occurrences for the specified project. + /// + /// Request parameters: + /// + /// [parent] - The name of the project to list occurrences for in the form of + /// `projects/[PROJECT_ID]`. + /// Value must have pattern "^projects/[^/]+$". + /// + /// [pageSize] - Number of occurrences to return in the list. Must be + /// positive. Max allowed + /// page size is 1000. If not specified, page size defaults to 20. + /// + /// [filter] - The filter expression. + /// + /// [pageToken] - Token to provide to skip to a particular spot in the list. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListOccurrencesResponse]. + /// + /// 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<ListOccurrencesResponse> list(core.String parent, + {core.int pageSize, + core.String filter, + core.String pageToken, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/occurrences'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListOccurrencesResponse.fromJson(data)); + } + + /// Updates the specified occurrence. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The name of the occurrence in the form of + /// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + /// Value must have pattern "^projects/[^/]+/occurrences/[^/]+$". + /// + /// [updateMask] - The fields to update. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Occurrence]. + /// + /// 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<Occurrence> patch(Occurrence request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Occurrence.fromJson(data)); + } + + /// Sets the access control policy on the specified note or occurrence. + /// Requires `containeranalysis.notes.setIamPolicy` or + /// `containeranalysis.occurrences.setIamPolicy` permission if the resource is + /// a note or an occurrence, respectively. + /// + /// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + /// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + /// occurrences. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [resource] - REQUIRED: The resource for which the policy is being + /// specified. + /// See the operation documentation for the appropriate value for this field. + /// Value must have pattern "^projects/[^/]+/occurrences/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Policy]. + /// + /// Completes with a [commons.ApiRequestError] if the API endpoint returned an + /// error. + /// + /// If the used [http.Client] completes with an error when making a REST call, + /// this method will complete with the same error. + async.Future<Policy> setIamPolicy( + SetIamPolicyRequest request, core.String resource, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (resource == null) { + throw new core.ArgumentError("Parameter resource is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$resource') + + ':setIamPolicy'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Policy.fromJson(data)); + } + + /// Returns the permissions that a caller has on the specified note or + /// occurrence. Requires list permission on the project (for example, + /// `containeranalysis.notes.list`). + /// + /// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + /// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + /// occurrences. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [resource] - REQUIRED: The resource for which the policy detail is being + /// requested. + /// See the operation documentation for the appropriate value for this field. + /// Value must have pattern "^projects/[^/]+/occurrences/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [TestIamPermissionsResponse]. + /// + /// Completes with a [commons.ApiRequestError] if the API endpoint returned an + /// error. + /// + /// If the used [http.Client] completes with an error when making a REST call, + /// this method will complete with the same error. + async.Future<TestIamPermissionsResponse> testIamPermissions( + TestIamPermissionsRequest request, core.String resource, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (resource == null) { + throw new core.ArgumentError("Parameter resource is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$resource') + + ':testIamPermissions'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new TestIamPermissionsResponse.fromJson(data)); + } +} + +class ProjectsScanConfigsResourceApi { + final commons.ApiRequester _requester; + + ProjectsScanConfigsResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Gets the specified scan configuration. + /// + /// Request parameters: + /// + /// [name] - The name of the scan configuration in the form of + /// `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + /// Value must have pattern "^projects/[^/]+/scanConfigs/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ScanConfig]. + /// + /// 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<ScanConfig> get(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ScanConfig.fromJson(data)); + } + + /// Lists scan configurations for the specified project. + /// + /// Request parameters: + /// + /// [parent] - The name of the project to list scan configurations for in the + /// form of + /// `projects/[PROJECT_ID]`. + /// Value must have pattern "^projects/[^/]+$". + /// + /// [filter] - The filter expression. + /// + /// [pageToken] - Token to provide to skip to a particular spot in the list. + /// + /// [pageSize] - The number of scan configs to return in the list. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListScanConfigsResponse]. + /// + /// 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<ListScanConfigsResponse> list(core.String parent, + {core.String filter, + core.String pageToken, + core.int pageSize, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (filter != null) { + _queryParams["filter"] = [filter]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/scanConfigs'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListScanConfigsResponse.fromJson(data)); + } + + /// Updates the specified scan configuration. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The name of the scan configuration in the form of + /// `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + /// Value must have pattern "^projects/[^/]+/scanConfigs/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ScanConfig]. + /// + /// 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<ScanConfig> update(ScanConfig request, core.String name, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PUT", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ScanConfig.fromJson(data)); + } +} + +/// An alias to a repo revision. +class AliasContext { + /// The alias kind. + /// Possible string values are: + /// - "KIND_UNSPECIFIED" : Unknown. + /// - "FIXED" : Git tag. + /// - "MOVABLE" : Git branch. + /// - "OTHER" : Used to specify non-standard aliases. For example, if a Git + /// repo has a + /// ref named "refs/foo/bar". + core.String kind; + + /// The alias name. + core.String name; + + AliasContext(); + + AliasContext.fromJson(core.Map _json) { + if (_json.containsKey("kind")) { + kind = _json["kind"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (kind != null) { + _json["kind"] = kind; + } + if (name != null) { + _json["name"] = name; + } + return _json; + } +} + +/// Artifact describes a build product. +class Artifact { + /// Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + /// container. + core.String checksum; + + /// Artifact ID, if any; for container images, this will be a URL by digest + /// like `gcr.io/projectID/imagename@sha256:123456`. + core.String id; + + /// Related artifact names. This may be the path to a binary or jar file, or + /// in + /// the case of a container build, the name used to push the container image + /// to + /// Google Container Registry, as presented to `docker push`. Note that a + /// single Artifact ID can have multiple names, for example if two tags are + /// applied to one image. + core.List<core.String> names; + + Artifact(); + + Artifact.fromJson(core.Map _json) { + if (_json.containsKey("checksum")) { + checksum = _json["checksum"]; + } + if (_json.containsKey("id")) { + id = _json["id"]; + } + if (_json.containsKey("names")) { + names = (_json["names"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (checksum != null) { + _json["checksum"] = checksum; + } + if (id != null) { + _json["id"] = id; + } + if (names != null) { + _json["names"] = names; + } + return _json; + } +} + +/// Occurrence that represents a single "attestation". The authenticity of an +/// attestation can be verified using the attached signature. If the verifier +/// trusts the public key of the signer, then verifying the signature is +/// sufficient to establish trust. In this circumstance, the authority to which +/// this attestation is attached is primarily useful for look-up (how to find +/// this attestation if you already know the authority and artifact to be +/// verified) and intent (which authority was this attestation intended to sign +/// for). +class Attestation { + /// A PGP signed attestation. + PgpSignedAttestation pgpSignedAttestation; + + Attestation(); + + Attestation.fromJson(core.Map _json) { + if (_json.containsKey("pgpSignedAttestation")) { + pgpSignedAttestation = + new PgpSignedAttestation.fromJson(_json["pgpSignedAttestation"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (pgpSignedAttestation != null) { + _json["pgpSignedAttestation"] = (pgpSignedAttestation).toJson(); + } + return _json; + } +} + +/// 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:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// }, +/// { +/// "log_type": "ADMIN_READ", +/// } +/// ] +/// }, +/// { +/// "service": "fooservice.googleapis.com" +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// "exempted_members": [ +/// "user:bar@gmail.com" +/// ] +/// } +/// ] +/// } +/// ] +/// } +/// +/// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ +/// logging. It also exempts foo@gmail.com from DATA_READ logging, and +/// bar@gmail.com from DATA_WRITE logging. +class AuditConfig { + /// The configuration for logging of each type of permission. + core.List<AuditLogConfig> auditLogConfigs; + + /// Specifies a service that will be enabled for audit logging. + /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + /// `allServices` is a special value that covers all services. + core.String service; + + AuditConfig(); + + AuditConfig.fromJson(core.Map _json) { + if (_json.containsKey("auditLogConfigs")) { + auditLogConfigs = (_json["auditLogConfigs"] as core.List) + .map<AuditLogConfig>((value) => new AuditLogConfig.fromJson(value)) + .toList(); + } + if (_json.containsKey("service")) { + service = _json["service"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (auditLogConfigs != null) { + _json["auditLogConfigs"] = + auditLogConfigs.map((value) => (value).toJson()).toList(); + } + if (service != null) { + _json["service"] = service; + } + return _json; + } +} + +/// Provides the configuration for logging a type of permissions. +/// Example: +/// +/// { +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// "exempted_members": [ +/// "user:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// } +/// ] +/// } +/// +/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting +/// foo@gmail.com from DATA_READ logging. +class AuditLogConfig { + /// Specifies the identities that do not cause logging for this type of + /// permission. + /// Follows the same format of Binding.members. + core.List<core.String> exemptedMembers; + + /// The log type that this config enables. + /// Possible string values are: + /// - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. + /// - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy + /// - "DATA_WRITE" : Data writes. Example: CloudSQL Users create + /// - "DATA_READ" : Data reads. Example: CloudSQL Users list + core.String logType; + + AuditLogConfig(); + + AuditLogConfig.fromJson(core.Map _json) { + if (_json.containsKey("exemptedMembers")) { + exemptedMembers = + (_json["exemptedMembers"] as core.List).cast<core.String>(); + } + if (_json.containsKey("logType")) { + logType = _json["logType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (exemptedMembers != null) { + _json["exemptedMembers"] = exemptedMembers; + } + if (logType != null) { + _json["logType"] = logType; + } + return _json; + } +} + +/// Note kind that represents a logical attestation "role" or "authority". For +/// example, an organization might have one `Authority` for "QA" and one for +/// "build". This note is intended to act strictly as a grouping mechanism for +/// the attached occurrences (Attestations). This grouping mechanism also +/// provides a security boundary, since IAM ACLs gate the ability for a +/// principle +/// to attach an occurrence to a given note. It also provides a single point of +/// lookup to find all attached attestation occurrences, even if they don't all +/// live in the same project. +class Authority { + /// Hint hints at the purpose of the attestation authority. + Hint hint; + + Authority(); + + Authority.fromJson(core.Map _json) { + if (_json.containsKey("hint")) { + hint = new Hint.fromJson(_json["hint"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (hint != null) { + _json["hint"] = (hint).toJson(); + } + return _json; + } +} + +/// Basis describes the base image portion (Note) of the DockerImage +/// relationship. Linked occurrences are derived from this or an +/// equivalent image via: +/// FROM <Basis.resource_url> +/// Or an equivalent reference, e.g. a tag of the resource_url. +class Basis { + /// Required. Immutable. The fingerprint of the base image. + Fingerprint fingerprint; + + /// Required. Immutable. The resource_url for the resource representing the + /// basis of associated occurrence images. + core.String resourceUrl; + + Basis(); + + Basis.fromJson(core.Map _json) { + if (_json.containsKey("fingerprint")) { + fingerprint = new Fingerprint.fromJson(_json["fingerprint"]); + } + if (_json.containsKey("resourceUrl")) { + resourceUrl = _json["resourceUrl"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fingerprint != null) { + _json["fingerprint"] = (fingerprint).toJson(); + } + if (resourceUrl != null) { + _json["resourceUrl"] = resourceUrl; + } + return _json; + } +} + +/// Request to create notes in batch. +class BatchCreateNotesRequest { + /// The notes to create. Max allowed length is 1000. + core.Map<core.String, Note> notes; + + BatchCreateNotesRequest(); + + BatchCreateNotesRequest.fromJson(core.Map _json) { + if (_json.containsKey("notes")) { + notes = commons.mapMap<core.Map, Note>( + _json["notes"].cast<core.String, core.Map>(), + (core.Map item) => new Note.fromJson(item)); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (notes != null) { + _json["notes"] = commons.mapMap<Note, core.Map<core.String, core.Object>>( + notes, (Note item) => (item).toJson()); + } + return _json; + } +} + +/// Response for creating notes in batch. +class BatchCreateNotesResponse { + /// The notes that were created. + core.List<Note> notes; + + BatchCreateNotesResponse(); + + BatchCreateNotesResponse.fromJson(core.Map _json) { + if (_json.containsKey("notes")) { + notes = (_json["notes"] as core.List) + .map<Note>((value) => new Note.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (notes != null) { + _json["notes"] = notes.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Request to create occurrences in batch. +class BatchCreateOccurrencesRequest { + /// The occurrences to create. Max allowed length is 1000. + core.List<Occurrence> occurrences; + + BatchCreateOccurrencesRequest(); + + BatchCreateOccurrencesRequest.fromJson(core.Map _json) { + if (_json.containsKey("occurrences")) { + occurrences = (_json["occurrences"] as core.List) + .map<Occurrence>((value) => new Occurrence.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (occurrences != null) { + _json["occurrences"] = + occurrences.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Response for creating occurrences in batch. +class BatchCreateOccurrencesResponse { + /// The occurrences that were created. + core.List<Occurrence> occurrences; + + BatchCreateOccurrencesResponse(); + + BatchCreateOccurrencesResponse.fromJson(core.Map _json) { + if (_json.containsKey("occurrences")) { + occurrences = (_json["occurrences"] as core.List) + .map<Occurrence>((value) => new Occurrence.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (occurrences != null) { + _json["occurrences"] = + occurrences.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Associates `members` with a `role`. +class Binding { + /// Unimplemented. The condition that is associated with this binding. + /// NOTE: an unsatisfied condition will not allow user access via current + /// binding. Different bindings, including their conditions, are examined + /// independently. + Expr condition; + + /// Specifies the identities requesting access for a Cloud Platform resource. + /// `members` can have the following values: + /// + /// * `allUsers`: A special identifier that represents anyone who is + /// on the internet; with or without a Google account. + /// + /// * `allAuthenticatedUsers`: A special identifier that represents anyone + /// who is authenticated with a Google account or a service account. + /// + /// * `user:{emailid}`: An email address that represents a specific Google + /// account. For example, `alice@gmail.com` . + /// + /// + /// * `serviceAccount:{emailid}`: An email address that represents a service + /// account. For example, `my-other-app@appspot.gserviceaccount.com`. + /// + /// * `group:{emailid}`: An email address that represents a Google group. + /// For example, `admins@example.com`. + /// + /// + /// * `domain:{domain}`: A Google Apps domain name 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 `members`. + /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + core.String role; + + Binding(); + + Binding.fromJson(core.Map _json) { + if (_json.containsKey("condition")) { + condition = new Expr.fromJson(_json["condition"]); + } + if (_json.containsKey("members")) { + members = (_json["members"] as core.List).cast<core.String>(); + } + if (_json.containsKey("role")) { + role = _json["role"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (condition != null) { + _json["condition"] = (condition).toJson(); + } + if (members != null) { + _json["members"] = members; + } + if (role != null) { + _json["role"] = role; + } + return _json; + } +} + +/// Note holding the version of the provider's builder and the signature of the +/// provenance message in the build details occurrence. +class Build { + /// Required. Immutable. Version of the builder which produced this build. + core.String builderVersion; + + /// Signature of the build in occurrences pointing to this build note + /// containing build details. + BuildSignature signature; + + Build(); + + Build.fromJson(core.Map _json) { + if (_json.containsKey("builderVersion")) { + builderVersion = _json["builderVersion"]; + } + if (_json.containsKey("signature")) { + signature = new BuildSignature.fromJson(_json["signature"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (builderVersion != null) { + _json["builderVersion"] = builderVersion; + } + if (signature != null) { + _json["signature"] = (signature).toJson(); + } + return _json; + } +} + +/// Provenance of a build. Contains all information needed to verify the full +/// details about the build from source to completion. +class BuildProvenance { + /// Special options applied to this build. This is a catch-all field where + /// build providers can enter any desired additional details. + core.Map<core.String, core.String> buildOptions; + + /// Version string of the builder at the time this build was executed. + core.String builderVersion; + + /// Output of the build. + core.List<Artifact> builtArtifacts; + + /// Commands requested by the build. + core.List<Command> commands; + + /// Time at which the build was created. + core.String createTime; + + /// E-mail address of the user who initiated this build. Note that this was + /// the + /// user's e-mail address at the time the build was initiated; this address + /// may + /// not represent the same end-user for all time. + core.String creator; + + /// Time at which execution of the build was finished. + core.String endTime; + + /// Required. Unique identifier of the build. + core.String id; + + /// URI where any logs for this provenance were written. + core.String logsUri; + + /// ID of the project. + core.String projectId; + + /// Details of the Source input to the build. + Source sourceProvenance; + + /// Time at which execution of the build was started. + core.String startTime; + + /// Trigger identifier if the build was triggered automatically; empty if not. + core.String triggerId; + + BuildProvenance(); + + BuildProvenance.fromJson(core.Map _json) { + if (_json.containsKey("buildOptions")) { + buildOptions = + (_json["buildOptions"] as core.Map).cast<core.String, core.String>(); + } + if (_json.containsKey("builderVersion")) { + builderVersion = _json["builderVersion"]; + } + if (_json.containsKey("builtArtifacts")) { + builtArtifacts = (_json["builtArtifacts"] as core.List) + .map<Artifact>((value) => new Artifact.fromJson(value)) + .toList(); + } + if (_json.containsKey("commands")) { + commands = (_json["commands"] as core.List) + .map<Command>((value) => new Command.fromJson(value)) + .toList(); + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("creator")) { + creator = _json["creator"]; + } + if (_json.containsKey("endTime")) { + endTime = _json["endTime"]; + } + if (_json.containsKey("id")) { + id = _json["id"]; + } + if (_json.containsKey("logsUri")) { + logsUri = _json["logsUri"]; + } + if (_json.containsKey("projectId")) { + projectId = _json["projectId"]; + } + if (_json.containsKey("sourceProvenance")) { + sourceProvenance = new Source.fromJson(_json["sourceProvenance"]); + } + if (_json.containsKey("startTime")) { + startTime = _json["startTime"]; + } + if (_json.containsKey("triggerId")) { + triggerId = _json["triggerId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (buildOptions != null) { + _json["buildOptions"] = buildOptions; + } + if (builderVersion != null) { + _json["builderVersion"] = builderVersion; + } + if (builtArtifacts != null) { + _json["builtArtifacts"] = + builtArtifacts.map((value) => (value).toJson()).toList(); + } + if (commands != null) { + _json["commands"] = commands.map((value) => (value).toJson()).toList(); + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (creator != null) { + _json["creator"] = creator; + } + if (endTime != null) { + _json["endTime"] = endTime; + } + if (id != null) { + _json["id"] = id; + } + if (logsUri != null) { + _json["logsUri"] = logsUri; + } + if (projectId != null) { + _json["projectId"] = projectId; + } + if (sourceProvenance != null) { + _json["sourceProvenance"] = (sourceProvenance).toJson(); + } + if (startTime != null) { + _json["startTime"] = startTime; + } + if (triggerId != null) { + _json["triggerId"] = triggerId; + } + return _json; + } +} + +/// Message encapsulating the signature of the verified build. +class BuildSignature { + /// An ID for the key used to sign. This could be either an ID for the key + /// stored in `public_key` (such as the ID or fingerprint for a PGP key, or + /// the + /// CN for a cert), or a reference to an external key (such as a reference to + /// a + /// key in Cloud Key Management Service). + core.String keyId; + + /// The type of the key, either stored in `public_key` or referenced in + /// `key_id`. + /// Possible string values are: + /// - "KEY_TYPE_UNSPECIFIED" : `KeyType` is not set. + /// - "PGP_ASCII_ARMORED" : `PGP ASCII Armored` public key. + /// - "PKIX_PEM" : `PKIX PEM` public key. + core.String keyType; + + /// Public key of the builder which can be used to verify that the related + /// findings are valid and unchanged. If `key_type` is empty, this defaults + /// to PEM encoded public keys. + /// + /// This field may be empty if `key_id` references an external key. + /// + /// For Cloud Build based signatures, this is a PEM encoded public + /// key. To verify the Cloud Build signature, place the contents of + /// this field into a file (public.pem). The signature field is base64-decoded + /// into its binary representation in signature.bin, and the provenance bytes + /// from `BuildDetails` are base64-decoded into a binary representation in + /// signed.bin. OpenSSL can then verify the signature: + /// `openssl sha256 -verify public.pem -signature signature.bin signed.bin` + core.String publicKey; + + /// Required. Signature of the related `BuildProvenance`. In JSON, this is + /// base-64 encoded. + core.String signature; + core.List<core.int> get signatureAsBytes { + return convert.base64.decode(signature); + } + + void set signatureAsBytes(core.List<core.int> _bytes) { + signature = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + + BuildSignature(); + + BuildSignature.fromJson(core.Map _json) { + if (_json.containsKey("keyId")) { + keyId = _json["keyId"]; + } + if (_json.containsKey("keyType")) { + keyType = _json["keyType"]; + } + if (_json.containsKey("publicKey")) { + publicKey = _json["publicKey"]; + } + if (_json.containsKey("signature")) { + signature = _json["signature"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (keyId != null) { + _json["keyId"] = keyId; + } + if (keyType != null) { + _json["keyType"] = keyType; + } + if (publicKey != null) { + _json["publicKey"] = publicKey; + } + if (signature != null) { + _json["signature"] = signature; + } + return _json; + } +} + +/// A CloudRepoSourceContext denotes a particular revision in a Google Cloud +/// Source Repo. +class CloudRepoSourceContext { + /// An alias, which may be a branch or tag. + AliasContext aliasContext; + + /// The ID of the repo. + RepoId repoId; + + /// A revision ID. + core.String revisionId; + + CloudRepoSourceContext(); + + CloudRepoSourceContext.fromJson(core.Map _json) { + if (_json.containsKey("aliasContext")) { + aliasContext = new AliasContext.fromJson(_json["aliasContext"]); + } + if (_json.containsKey("repoId")) { + repoId = new RepoId.fromJson(_json["repoId"]); + } + if (_json.containsKey("revisionId")) { + revisionId = _json["revisionId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (aliasContext != null) { + _json["aliasContext"] = (aliasContext).toJson(); + } + if (repoId != null) { + _json["repoId"] = (repoId).toJson(); + } + if (revisionId != null) { + _json["revisionId"] = revisionId; + } + return _json; + } +} + +/// Command describes a step performed as part of the build pipeline. +class Command { + /// Command-line arguments used when executing this command. + core.List<core.String> args; + + /// Working directory (relative to project source root) used when running this + /// command. + core.String dir; + + /// Environment variables set before running this command. + core.List<core.String> env; + + /// Optional unique identifier for this command, used in wait_for to reference + /// this command as a dependency. + core.String id; + + /// Required. Name of the command, as presented on the command line, or if the + /// command is packaged as a Docker container, as presented to `docker pull`. + core.String name; + + /// The ID(s) of the command(s) that this command depends on. + core.List<core.String> waitFor; + + Command(); + + Command.fromJson(core.Map _json) { + if (_json.containsKey("args")) { + args = (_json["args"] as core.List).cast<core.String>(); + } + if (_json.containsKey("dir")) { + dir = _json["dir"]; + } + if (_json.containsKey("env")) { + env = (_json["env"] as core.List).cast<core.String>(); + } + if (_json.containsKey("id")) { + id = _json["id"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("waitFor")) { + waitFor = (_json["waitFor"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (args != null) { + _json["args"] = args; + } + if (dir != null) { + _json["dir"] = dir; + } + if (env != null) { + _json["env"] = env; + } + if (id != null) { + _json["id"] = id; + } + if (name != null) { + _json["name"] = name; + } + if (waitFor != null) { + _json["waitFor"] = waitFor; + } + return _json; + } +} + +/// An artifact that can be deployed in some runtime. +class Deployable { + /// Required. Resource URI for the artifact being deployed. + core.List<core.String> resourceUri; + + Deployable(); + + Deployable.fromJson(core.Map _json) { + if (_json.containsKey("resourceUri")) { + resourceUri = (_json["resourceUri"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (resourceUri != null) { + _json["resourceUri"] = resourceUri; + } + return _json; + } +} + +/// The period during which some deployable was active in a runtime. +class Deployment { + /// Address of the runtime element hosting this deployment. + core.String address; + + /// Configuration used to create this deployment. + core.String config; + + /// Required. Beginning of the lifetime of this deployment. + core.String deployTime; + + /// Platform hosting this deployment. + /// Possible string values are: + /// - "PLATFORM_UNSPECIFIED" : Unknown. + /// - "GKE" : Google Container Engine. + /// - "FLEX" : Google App Engine: Flexible Environment. + /// - "CUSTOM" : Custom user-defined platform. + core.String platform; + + /// Output only. Resource URI for the artifact being deployed taken from + /// the deployable field with the same name. + core.List<core.String> resourceUri; + + /// End of the lifetime of this deployment. + core.String undeployTime; + + /// Identity of the user that triggered this deployment. + core.String userEmail; + + Deployment(); + + Deployment.fromJson(core.Map _json) { + if (_json.containsKey("address")) { + address = _json["address"]; + } + if (_json.containsKey("config")) { + config = _json["config"]; + } + if (_json.containsKey("deployTime")) { + deployTime = _json["deployTime"]; + } + if (_json.containsKey("platform")) { + platform = _json["platform"]; + } + if (_json.containsKey("resourceUri")) { + resourceUri = (_json["resourceUri"] as core.List).cast<core.String>(); + } + if (_json.containsKey("undeployTime")) { + undeployTime = _json["undeployTime"]; + } + if (_json.containsKey("userEmail")) { + userEmail = _json["userEmail"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (address != null) { + _json["address"] = address; + } + if (config != null) { + _json["config"] = config; + } + if (deployTime != null) { + _json["deployTime"] = deployTime; + } + if (platform != null) { + _json["platform"] = platform; + } + if (resourceUri != null) { + _json["resourceUri"] = resourceUri; + } + if (undeployTime != null) { + _json["undeployTime"] = undeployTime; + } + if (userEmail != null) { + _json["userEmail"] = userEmail; + } + return _json; + } +} + +/// Derived describes the derived image portion (Occurrence) of the DockerImage +/// relationship. This image would be produced from a Dockerfile with FROM +/// <DockerImage.Basis in attached Note>. +class Derived { + /// Output only. This contains the base image URL for the derived image + /// occurrence. + core.String baseResourceUrl; + + /// Output only. The number of layers by which this image differs from the + /// associated image basis. + core.int distance; + + /// Required. The fingerprint of the derived image. + Fingerprint fingerprint; + + /// This contains layer-specific metadata, if populated it has length + /// "distance" and is ordered with [distance] being the layer immediately + /// following the base image and [1] being the final layer. + core.List<Layer> layerInfo; + + Derived(); + + Derived.fromJson(core.Map _json) { + if (_json.containsKey("baseResourceUrl")) { + baseResourceUrl = _json["baseResourceUrl"]; + } + if (_json.containsKey("distance")) { + distance = _json["distance"]; + } + if (_json.containsKey("fingerprint")) { + fingerprint = new Fingerprint.fromJson(_json["fingerprint"]); + } + if (_json.containsKey("layerInfo")) { + layerInfo = (_json["layerInfo"] as core.List) + .map<Layer>((value) => new Layer.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (baseResourceUrl != null) { + _json["baseResourceUrl"] = baseResourceUrl; + } + if (distance != null) { + _json["distance"] = distance; + } + if (fingerprint != null) { + _json["fingerprint"] = (fingerprint).toJson(); + } + if (layerInfo != null) { + _json["layerInfo"] = layerInfo.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Identifies all appearances of this vulnerability in the package for a +/// specific distro/location. For example: glibc in +/// cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 +class Detail { + /// Required. The CPE URI in + /// [cpe format](https://cpe.mitre.org/specification/) in which the + /// vulnerability manifests. Examples include distro or storage location for + /// vulnerable jar. + core.String cpeUri; + + /// A vendor-specific description of this note. + core.String description; + + /// The fix for this specific package version. + VulnerabilityLocation fixedLocation; + + /// Whether this detail is obsolete. Occurrences are expected not to point to + /// obsolete details. + core.bool isObsolete; + + /// The max version of the package in which the vulnerability exists. + Version maxAffectedVersion; + + /// The min version of the package in which the vulnerability exists. + Version minAffectedVersion; + + /// Required. The name of the package where the vulnerability was found. + core.String package; + + /// The type of package; whether native or non native(ruby gems, node.js + /// packages etc). + core.String packageType; + + /// The severity (eg: distro assigned severity) for this vulnerability. + core.String severityName; + + Detail(); + + Detail.fromJson(core.Map _json) { + if (_json.containsKey("cpeUri")) { + cpeUri = _json["cpeUri"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("fixedLocation")) { + fixedLocation = + new VulnerabilityLocation.fromJson(_json["fixedLocation"]); + } + if (_json.containsKey("isObsolete")) { + isObsolete = _json["isObsolete"]; + } + if (_json.containsKey("maxAffectedVersion")) { + maxAffectedVersion = new Version.fromJson(_json["maxAffectedVersion"]); + } + if (_json.containsKey("minAffectedVersion")) { + minAffectedVersion = new Version.fromJson(_json["minAffectedVersion"]); + } + if (_json.containsKey("package")) { + package = _json["package"]; + } + if (_json.containsKey("packageType")) { + packageType = _json["packageType"]; + } + if (_json.containsKey("severityName")) { + severityName = _json["severityName"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cpeUri != null) { + _json["cpeUri"] = cpeUri; + } + if (description != null) { + _json["description"] = description; + } + if (fixedLocation != null) { + _json["fixedLocation"] = (fixedLocation).toJson(); + } + if (isObsolete != null) { + _json["isObsolete"] = isObsolete; + } + if (maxAffectedVersion != null) { + _json["maxAffectedVersion"] = (maxAffectedVersion).toJson(); + } + if (minAffectedVersion != null) { + _json["minAffectedVersion"] = (minAffectedVersion).toJson(); + } + if (package != null) { + _json["package"] = package; + } + if (packageType != null) { + _json["packageType"] = packageType; + } + if (severityName != null) { + _json["severityName"] = severityName; + } + return _json; + } +} + +/// Details of an attestation occurrence. +class Details { + /// Required. Attestation for the resource. + Attestation attestation; + + Details(); + + Details.fromJson(core.Map _json) { + if (_json.containsKey("attestation")) { + attestation = new Attestation.fromJson(_json["attestation"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (attestation != null) { + _json["attestation"] = (attestation).toJson(); + } + return _json; + } +} + +/// Provides information about the analysis status of a discovered resource. +class Discovered { + /// The status of discovery for the resource. + /// Possible string values are: + /// - "ANALYSIS_STATUS_UNSPECIFIED" : Unknown. + /// - "PENDING" : Resource is known but no action has been taken yet. + /// - "SCANNING" : Resource is being analyzed. + /// - "FINISHED_SUCCESS" : Analysis has finished successfully. + /// - "FINISHED_FAILED" : Analysis has finished unsuccessfully, the analysis + /// itself is in a bad + /// state. + /// - "FINISHED_UNSUPPORTED" : The resource is known not to be supported + core.String analysisStatus; + + /// When an error is encountered this will contain a LocalizedMessage under + /// details to show to the user. The LocalizedMessage is output only and + /// populated by the API. + Status analysisStatusError; + + /// Whether the resource is continuously analyzed. + /// Possible string values are: + /// - "CONTINUOUS_ANALYSIS_UNSPECIFIED" : Unknown. + /// - "ACTIVE" : The resource is continuously analyzed. + /// - "INACTIVE" : The resource is ignored for continuous analysis. + core.String continuousAnalysis; + + /// The last time continuous analysis was done for this resource. + /// Deprecated, do not use. + core.String lastAnalysisTime; + + Discovered(); + + Discovered.fromJson(core.Map _json) { + if (_json.containsKey("analysisStatus")) { + analysisStatus = _json["analysisStatus"]; + } + if (_json.containsKey("analysisStatusError")) { + analysisStatusError = new Status.fromJson(_json["analysisStatusError"]); + } + if (_json.containsKey("continuousAnalysis")) { + continuousAnalysis = _json["continuousAnalysis"]; + } + if (_json.containsKey("lastAnalysisTime")) { + lastAnalysisTime = _json["lastAnalysisTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (analysisStatus != null) { + _json["analysisStatus"] = analysisStatus; + } + if (analysisStatusError != null) { + _json["analysisStatusError"] = (analysisStatusError).toJson(); + } + if (continuousAnalysis != null) { + _json["continuousAnalysis"] = continuousAnalysis; + } + if (lastAnalysisTime != null) { + _json["lastAnalysisTime"] = lastAnalysisTime; + } + return _json; + } +} + +/// A note that indicates a type of analysis a provider would perform. This note +/// exists in a provider's project. A `Discovery` occurrence is created in a +/// consumer's project at the start of analysis. +class Discovery { + /// Required. Immutable. The kind of analysis that is handled by this + /// discovery. + /// Possible string values are: + /// - "NOTE_KIND_UNSPECIFIED" : Unknown. + /// - "VULNERABILITY" : The note and occurrence represent a package + /// vulnerability. + /// - "BUILD" : The note and occurrence assert build provenance. + /// - "IMAGE" : This represents an image basis relationship. + /// - "PACKAGE" : This represents a package installed via a package manager. + /// - "DEPLOYMENT" : The note and occurrence track deployment events. + /// - "DISCOVERY" : The note and occurrence track the initial discovery status + /// of a resource. + /// - "ATTESTATION" : This represents a logical "role" that can attest to + /// artifacts. + core.String analysisKind; + + Discovery(); + + Discovery.fromJson(core.Map _json) { + if (_json.containsKey("analysisKind")) { + analysisKind = _json["analysisKind"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (analysisKind != null) { + _json["analysisKind"] = analysisKind; + } + return _json; + } +} + +/// This represents a particular channel of distribution for a given package. +/// E.g., Debian's jessie-backports dpkg mirror. +class Distribution { + /// The CPU architecture for which packages in this distribution channel were + /// built. + /// Possible string values are: + /// - "ARCHITECTURE_UNSPECIFIED" : Unknown architecture. + /// - "X86" : X86 architecture. + /// - "X64" : X64 architecture. + core.String architecture; + + /// Required. The cpe_uri in [CPE + /// format](https://cpe.mitre.org/specification/) + /// denoting the package manager version distributing a package. + core.String cpeUri; + + /// The distribution channel-specific description of this package. + core.String description; + + /// The latest available version of this package in this distribution channel. + Version latestVersion; + + /// A freeform string denoting the maintainer of this package. + core.String maintainer; + + /// The distribution channel-specific homepage for this package. + core.String url; + + Distribution(); + + Distribution.fromJson(core.Map _json) { + if (_json.containsKey("architecture")) { + architecture = _json["architecture"]; + } + if (_json.containsKey("cpeUri")) { + cpeUri = _json["cpeUri"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("latestVersion")) { + latestVersion = new Version.fromJson(_json["latestVersion"]); + } + if (_json.containsKey("maintainer")) { + maintainer = _json["maintainer"]; + } + if (_json.containsKey("url")) { + url = _json["url"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (architecture != null) { + _json["architecture"] = architecture; + } + if (cpeUri != null) { + _json["cpeUri"] = cpeUri; + } + if (description != null) { + _json["description"] = description; + } + if (latestVersion != null) { + _json["latestVersion"] = (latestVersion).toJson(); + } + if (maintainer != null) { + _json["maintainer"] = maintainer; + } + if (url != null) { + _json["url"] = url; + } + return _json; + } +} + +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. +class Empty { + Empty(); + + Empty.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// Represents an expression text. Example: +/// +/// title: "User account presence" +/// description: "Determines whether the request has a user account" +/// expression: "size(request.user) > 0" +class Expr { + /// An optional description of the expression. This is a longer text which + /// describes the expression, e.g. when hovered over it in a UI. + core.String description; + + /// Textual representation of an expression in + /// Common Expression Language syntax. + /// + /// The application context of the containing message determines which + /// well-known feature set of CEL is supported. + core.String expression; + + /// An optional string indicating the location of the expression for error + /// reporting, e.g. a file name and a position in the file. + core.String location; + + /// An optional title for the expression, i.e. a short string describing + /// its purpose. This can be used e.g. in UIs which allow to enter the + /// expression. + core.String title; + + Expr(); + + Expr.fromJson(core.Map _json) { + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("expression")) { + expression = _json["expression"]; + } + if (_json.containsKey("location")) { + location = _json["location"]; + } + if (_json.containsKey("title")) { + title = _json["title"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (description != null) { + _json["description"] = description; + } + if (expression != null) { + _json["expression"] = expression; + } + if (location != null) { + _json["location"] = location; + } + if (title != null) { + _json["title"] = title; + } + return _json; + } +} + +/// Container message for hashes of byte content of files, used in source +/// messages to verify integrity of source input to the build. +class FileHashes { + /// Required. Collection of file hashes. + core.List<Hash> fileHash; + + FileHashes(); + + FileHashes.fromJson(core.Map _json) { + if (_json.containsKey("fileHash")) { + fileHash = (_json["fileHash"] as core.List) + .map<Hash>((value) => new Hash.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fileHash != null) { + _json["fileHash"] = fileHash.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A set of properties that uniquely identify a given Docker image. +class Fingerprint { + /// Required. The layer ID of the final layer in the Docker image's v1 + /// representation. + core.String v1Name; + + /// Required. The ordered list of v2 blobs that represent a given image. + core.List<core.String> v2Blob; + + /// Output only. The name of the image's v2 blobs computed via: + /// [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) + /// Only the name of the final blob is kept. + core.String v2Name; + + Fingerprint(); + + Fingerprint.fromJson(core.Map _json) { + if (_json.containsKey("v1Name")) { + v1Name = _json["v1Name"]; + } + if (_json.containsKey("v2Blob")) { + v2Blob = (_json["v2Blob"] as core.List).cast<core.String>(); + } + if (_json.containsKey("v2Name")) { + v2Name = _json["v2Name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (v1Name != null) { + _json["v1Name"] = v1Name; + } + if (v2Blob != null) { + _json["v2Blob"] = v2Blob; + } + if (v2Name != null) { + _json["v2Name"] = v2Name; + } + return _json; + } +} + +/// Per resource and severity counts of fixable and total vulnerabilites. +class FixableTotalByDigest { + /// The number of fixable vulnerabilities associated with this resource. + core.String fixableCount; + + /// The affected resource. + Resource resource; + + /// The severity for this count. SEVERITY_UNSPECIFIED indicates total across + /// all severities. + /// Possible string values are: + /// - "SEVERITY_UNSPECIFIED" : Unknown. + /// - "MINIMAL" : Minimal severity. + /// - "LOW" : Low severity. + /// - "MEDIUM" : Medium severity. + /// - "HIGH" : High severity. + /// - "CRITICAL" : Critical severity. + core.String severity; + + /// The total number of vulnerabilities associated with this resource. + core.String totalCount; + + FixableTotalByDigest(); + + FixableTotalByDigest.fromJson(core.Map _json) { + if (_json.containsKey("fixableCount")) { + fixableCount = _json["fixableCount"]; + } + if (_json.containsKey("resource")) { + resource = new Resource.fromJson(_json["resource"]); + } + if (_json.containsKey("severity")) { + severity = _json["severity"]; + } + if (_json.containsKey("totalCount")) { + totalCount = _json["totalCount"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fixableCount != null) { + _json["fixableCount"] = fixableCount; + } + if (resource != null) { + _json["resource"] = (resource).toJson(); + } + if (severity != null) { + _json["severity"] = severity; + } + if (totalCount != null) { + _json["totalCount"] = totalCount; + } + return _json; + } +} + +/// A SourceContext referring to a Gerrit project. +class GerritSourceContext { + /// An alias, which may be a branch or tag. + AliasContext aliasContext; + + /// The full project name within the host. Projects may be nested, so + /// "project/subproject" is a valid project name. The "repo name" is the + /// hostURI/project. + core.String gerritProject; + + /// The URI of a running Gerrit instance. + core.String hostUri; + + /// A revision (commit) ID. + core.String revisionId; + + GerritSourceContext(); + + GerritSourceContext.fromJson(core.Map _json) { + if (_json.containsKey("aliasContext")) { + aliasContext = new AliasContext.fromJson(_json["aliasContext"]); + } + if (_json.containsKey("gerritProject")) { + gerritProject = _json["gerritProject"]; + } + if (_json.containsKey("hostUri")) { + hostUri = _json["hostUri"]; + } + if (_json.containsKey("revisionId")) { + revisionId = _json["revisionId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (aliasContext != null) { + _json["aliasContext"] = (aliasContext).toJson(); + } + if (gerritProject != null) { + _json["gerritProject"] = gerritProject; + } + if (hostUri != null) { + _json["hostUri"] = hostUri; + } + if (revisionId != null) { + _json["revisionId"] = revisionId; + } + return _json; + } +} + +/// Request message for `GetIamPolicy` method. +class GetIamPolicyRequest { + GetIamPolicyRequest(); + + GetIamPolicyRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// A GitSourceContext denotes a particular revision in a third party Git +/// repository (e.g., GitHub). +class GitSourceContext { + /// Git commit hash. + core.String revisionId; + + /// Git repository URL. + core.String url; + + GitSourceContext(); + + GitSourceContext.fromJson(core.Map _json) { + if (_json.containsKey("revisionId")) { + revisionId = _json["revisionId"]; + } + if (_json.containsKey("url")) { + url = _json["url"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (revisionId != null) { + _json["revisionId"] = revisionId; + } + if (url != null) { + _json["url"] = url; + } + return _json; + } +} + +/// Metadata for all operations used and required for all operations +/// that created by Container Analysis Providers +class GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata { + /// Output only. The time this operation was created. + core.String createTime; + + /// Output only. The time that this operation was marked completed or failed. + core.String endTime; + + GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata(); + + GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata.fromJson( + core.Map _json) { + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("endTime")) { + endTime = _json["endTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (createTime != null) { + _json["createTime"] = createTime; + } + if (endTime != null) { + _json["endTime"] = endTime; + } + return _json; + } +} + +/// Details of a build occurrence. +class GrafeasV1beta1BuildDetails { + /// Required. The actual provenance for the build. + BuildProvenance provenance; + + /// Serialized JSON representation of the provenance, used in generating the + /// build signature in the corresponding build note. After verifying the + /// signature, `provenance_bytes` can be unmarshalled and compared to the + /// provenance to confirm that it is unchanged. A base64-encoded string + /// representation of the provenance bytes is used for the signature in order + /// to interoperate with openssl which expects this format for signature + /// verification. + /// + /// The serialized form is captured both to avoid ambiguity in how the + /// provenance is marshalled to json as well to prevent incompatibilities with + /// future changes. + core.String provenanceBytes; + + GrafeasV1beta1BuildDetails(); + + GrafeasV1beta1BuildDetails.fromJson(core.Map _json) { + if (_json.containsKey("provenance")) { + provenance = new BuildProvenance.fromJson(_json["provenance"]); + } + if (_json.containsKey("provenanceBytes")) { + provenanceBytes = _json["provenanceBytes"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (provenance != null) { + _json["provenance"] = (provenance).toJson(); + } + if (provenanceBytes != null) { + _json["provenanceBytes"] = provenanceBytes; + } + return _json; + } +} + +/// Details of a deployment occurrence. +class GrafeasV1beta1DeploymentDetails { + /// Required. Deployment history for the resource. + Deployment deployment; + + GrafeasV1beta1DeploymentDetails(); + + GrafeasV1beta1DeploymentDetails.fromJson(core.Map _json) { + if (_json.containsKey("deployment")) { + deployment = new Deployment.fromJson(_json["deployment"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (deployment != null) { + _json["deployment"] = (deployment).toJson(); + } + return _json; + } +} + +/// Details of a discovery occurrence. +class GrafeasV1beta1DiscoveryDetails { + /// Required. Analysis status for the discovered resource. + Discovered discovered; + + GrafeasV1beta1DiscoveryDetails(); + + GrafeasV1beta1DiscoveryDetails.fromJson(core.Map _json) { + if (_json.containsKey("discovered")) { + discovered = new Discovered.fromJson(_json["discovered"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (discovered != null) { + _json["discovered"] = (discovered).toJson(); + } + return _json; + } +} + +/// Details of an image occurrence. +class GrafeasV1beta1ImageDetails { + /// Required. Immutable. The child image derived from the base image. + Derived derivedImage; + + GrafeasV1beta1ImageDetails(); + + GrafeasV1beta1ImageDetails.fromJson(core.Map _json) { + if (_json.containsKey("derivedImage")) { + derivedImage = new Derived.fromJson(_json["derivedImage"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (derivedImage != null) { + _json["derivedImage"] = (derivedImage).toJson(); + } + return _json; + } +} + +/// Details of a package occurrence. +class GrafeasV1beta1PackageDetails { + /// Required. Where the package was installed. + Installation installation; + + GrafeasV1beta1PackageDetails(); + + GrafeasV1beta1PackageDetails.fromJson(core.Map _json) { + if (_json.containsKey("installation")) { + installation = new Installation.fromJson(_json["installation"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (installation != null) { + _json["installation"] = (installation).toJson(); + } + return _json; + } +} + +/// Details of a vulnerability Occurrence. +class GrafeasV1beta1VulnerabilityDetails { + /// Output only. The CVSS score of this vulnerability. CVSS score is on a + /// scale of 0-10 where 0 indicates low severity and 10 indicates high + /// severity. + core.double cvssScore; + + /// Output only. A detailed description of this vulnerability. + core.String longDescription; + + /// Required. The set of affected locations and their fixes (if available) + /// within the associated resource. + core.List<PackageIssue> packageIssue; + + /// Output only. URLs related to this vulnerability. + core.List<RelatedUrl> relatedUrls; + + /// Output only. The note provider assigned Severity of the vulnerability. + /// Possible string values are: + /// - "SEVERITY_UNSPECIFIED" : Unknown. + /// - "MINIMAL" : Minimal severity. + /// - "LOW" : Low severity. + /// - "MEDIUM" : Medium severity. + /// - "HIGH" : High severity. + /// - "CRITICAL" : Critical severity. + core.String severity; + + /// Output only. A one sentence description of this vulnerability. + core.String shortDescription; + + /// The type of package; whether native or non native(ruby gems, node.js + /// packages etc) + core.String type; + + GrafeasV1beta1VulnerabilityDetails(); + + GrafeasV1beta1VulnerabilityDetails.fromJson(core.Map _json) { + if (_json.containsKey("cvssScore")) { + cvssScore = _json["cvssScore"].toDouble(); + } + if (_json.containsKey("longDescription")) { + longDescription = _json["longDescription"]; + } + if (_json.containsKey("packageIssue")) { + packageIssue = (_json["packageIssue"] as core.List) + .map<PackageIssue>((value) => new PackageIssue.fromJson(value)) + .toList(); + } + if (_json.containsKey("relatedUrls")) { + relatedUrls = (_json["relatedUrls"] as core.List) + .map<RelatedUrl>((value) => new RelatedUrl.fromJson(value)) + .toList(); + } + if (_json.containsKey("severity")) { + severity = _json["severity"]; + } + if (_json.containsKey("shortDescription")) { + shortDescription = _json["shortDescription"]; + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cvssScore != null) { + _json["cvssScore"] = cvssScore; + } + if (longDescription != null) { + _json["longDescription"] = longDescription; + } + if (packageIssue != null) { + _json["packageIssue"] = + packageIssue.map((value) => (value).toJson()).toList(); + } + if (relatedUrls != null) { + _json["relatedUrls"] = + relatedUrls.map((value) => (value).toJson()).toList(); + } + if (severity != null) { + _json["severity"] = severity; + } + if (shortDescription != null) { + _json["shortDescription"] = shortDescription; + } + if (type != null) { + _json["type"] = type; + } + return _json; + } +} + +/// Container message for hash values. +class Hash { + /// Required. The type of hash that was performed. + /// Possible string values are: + /// - "HASH_TYPE_UNSPECIFIED" : Unknown. + /// - "SHA256" : A SHA-256 hash. + core.String type; + + /// Required. The hash value. + core.String value; + core.List<core.int> get valueAsBytes { + return convert.base64.decode(value); + } + + void set valueAsBytes(core.List<core.int> _bytes) { + value = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + + Hash(); + + Hash.fromJson(core.Map _json) { + if (_json.containsKey("type")) { + type = _json["type"]; + } + if (_json.containsKey("value")) { + value = _json["value"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (type != null) { + _json["type"] = type; + } + if (value != null) { + _json["value"] = value; + } + return _json; + } +} + +/// This submessage provides human-readable hints about the purpose of the +/// authority. Because the name of a note acts as its resource reference, it is +/// important to disambiguate the canonical name of the Note (which might be a +/// UUID for security purposes) from "readable" names more suitable for debug +/// output. Note that these hints should not be used to look up authorities in +/// security sensitive contexts, such as when looking up attestations to +/// verify. +class Hint { + /// Required. The human readable name of this attestation authority, for + /// example "qa". + core.String humanReadableName; + + Hint(); + + Hint.fromJson(core.Map _json) { + if (_json.containsKey("humanReadableName")) { + humanReadableName = _json["humanReadableName"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (humanReadableName != null) { + _json["humanReadableName"] = humanReadableName; + } + return _json; + } +} + +/// This represents how a particular software package may be installed on a +/// system. +class Installation { + /// Required. All of the places within the filesystem versions of this package + /// have been found. + core.List<Location> location; + + /// Output only. The name of the installed package. + core.String name; + + Installation(); + + Installation.fromJson(core.Map _json) { + if (_json.containsKey("location")) { + location = (_json["location"] as core.List) + .map<Location>((value) => new Location.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (location != null) { + _json["location"] = location.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + return _json; + } +} + +class KnowledgeBase { + /// The KB name (generally of the form KB[0-9]+ i.e. KB123456). + core.String name; + + /// A link to the KB in the Windows update catalog - + /// https://www.catalog.update.microsoft.com/ + core.String url; + + KnowledgeBase(); + + KnowledgeBase.fromJson(core.Map _json) { + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("url")) { + url = _json["url"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (name != null) { + _json["name"] = name; + } + if (url != null) { + _json["url"] = url; + } + return _json; + } +} + +/// Layer holds metadata specific to a layer of a Docker image. +class Layer { + /// The recovered arguments to the Dockerfile directive. + core.String arguments; + + /// Required. The recovered Dockerfile directive used to construct this layer. + /// Possible string values are: + /// - "DIRECTIVE_UNSPECIFIED" : Default value for unsupported/missing + /// directive. + /// - "MAINTAINER" : https://docs.docker.com/reference/builder/#maintainer + /// - "RUN" : https://docs.docker.com/reference/builder/#run + /// - "CMD" : https://docs.docker.com/reference/builder/#cmd + /// - "LABEL" : https://docs.docker.com/reference/builder/#label + /// - "EXPOSE" : https://docs.docker.com/reference/builder/#expose + /// - "ENV" : https://docs.docker.com/reference/builder/#env + /// - "ADD" : https://docs.docker.com/reference/builder/#add + /// - "COPY" : https://docs.docker.com/reference/builder/#copy + /// - "ENTRYPOINT" : https://docs.docker.com/reference/builder/#entrypoint + /// - "VOLUME" : https://docs.docker.com/reference/builder/#volume + /// - "USER" : https://docs.docker.com/reference/builder/#user + /// - "WORKDIR" : https://docs.docker.com/reference/builder/#workdir + /// - "ARG" : https://docs.docker.com/reference/builder/#arg + /// - "ONBUILD" : https://docs.docker.com/reference/builder/#onbuild + /// - "STOPSIGNAL" : https://docs.docker.com/reference/builder/#stopsignal + /// - "HEALTHCHECK" : https://docs.docker.com/reference/builder/#healthcheck + /// - "SHELL" : https://docs.docker.com/reference/builder/#shell + core.String directive; + + Layer(); + + Layer.fromJson(core.Map _json) { + if (_json.containsKey("arguments")) { + arguments = _json["arguments"]; + } + if (_json.containsKey("directive")) { + directive = _json["directive"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (arguments != null) { + _json["arguments"] = arguments; + } + if (directive != null) { + _json["directive"] = directive; + } + return _json; + } +} + +/// Response for listing occurrences for a note. +class ListNoteOccurrencesResponse { + /// Token to provide to skip to a particular spot in the list. + core.String nextPageToken; + + /// The occurrences attached to the specified note. + core.List<Occurrence> occurrences; + + ListNoteOccurrencesResponse(); + + ListNoteOccurrencesResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("occurrences")) { + occurrences = (_json["occurrences"] as core.List) + .map<Occurrence>((value) => new Occurrence.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (occurrences != null) { + _json["occurrences"] = + occurrences.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Response for listing notes. +class ListNotesResponse { + /// The next pagination token in the list response. It should be used as + /// `page_token` for the following request. An empty value means no more + /// results. + core.String nextPageToken; + + /// The notes requested. + core.List<Note> notes; + + ListNotesResponse(); + + ListNotesResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("notes")) { + notes = (_json["notes"] as core.List) + .map<Note>((value) => new Note.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (notes != null) { + _json["notes"] = notes.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Response for listing occurrences. +class ListOccurrencesResponse { + /// The next pagination token in the list response. It should be used as + /// `page_token` for the following request. An empty value means no more + /// results. + core.String nextPageToken; + + /// The occurrences requested. + core.List<Occurrence> occurrences; + + ListOccurrencesResponse(); + + ListOccurrencesResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("occurrences")) { + occurrences = (_json["occurrences"] as core.List) + .map<Occurrence>((value) => new Occurrence.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (occurrences != null) { + _json["occurrences"] = + occurrences.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Response for listing scan configurations. +class ListScanConfigsResponse { + /// The next pagination token in the list response. It should be used as + /// `page_token` for the following request. An empty value means no more + /// results. + core.String nextPageToken; + + /// The scan configurations requested. + core.List<ScanConfig> scanConfigs; + + ListScanConfigsResponse(); + + ListScanConfigsResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("scanConfigs")) { + scanConfigs = (_json["scanConfigs"] as core.List) + .map<ScanConfig>((value) => new ScanConfig.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (scanConfigs != null) { + _json["scanConfigs"] = + scanConfigs.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// An occurrence of a particular package installation found within a system's +/// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. +class Location { + /// Required. The CPE URI in [CPE + /// format](https://cpe.mitre.org/specification/) + /// denoting the package manager version distributing a package. + core.String cpeUri; + + /// The path from which we gathered that this package/version is installed. + core.String path; + + /// The version installed at this location. + Version version; + + Location(); + + Location.fromJson(core.Map _json) { + if (_json.containsKey("cpeUri")) { + cpeUri = _json["cpeUri"]; + } + if (_json.containsKey("path")) { + path = _json["path"]; + } + if (_json.containsKey("version")) { + version = new Version.fromJson(_json["version"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cpeUri != null) { + _json["cpeUri"] = cpeUri; + } + if (path != null) { + _json["path"] = path; + } + if (version != null) { + _json["version"] = (version).toJson(); + } + return _json; + } +} + +/// A type of analysis that can be done for a resource. +class Note { + /// A note describing an attestation role. + Authority attestationAuthority; + + /// A note describing a base image. + Basis baseImage; + + /// A note describing build provenance for a verifiable build. + Build build; + + /// Output only. The time this note was created. This field can be used as a + /// filter in list requests. + core.String createTime; + + /// A note describing something that can be deployed. + Deployable deployable; + + /// A note describing the initial analysis of a resource. + Discovery discovery; + + /// Time of expiration for this note. Empty if note does not expire. + core.String expirationTime; + + /// Output only. The type of analysis. This field can be used as a filter in + /// list requests. + /// Possible string values are: + /// - "NOTE_KIND_UNSPECIFIED" : Unknown. + /// - "VULNERABILITY" : The note and occurrence represent a package + /// vulnerability. + /// - "BUILD" : The note and occurrence assert build provenance. + /// - "IMAGE" : This represents an image basis relationship. + /// - "PACKAGE" : This represents a package installed via a package manager. + /// - "DEPLOYMENT" : The note and occurrence track deployment events. + /// - "DISCOVERY" : The note and occurrence track the initial discovery status + /// of a resource. + /// - "ATTESTATION" : This represents a logical "role" that can attest to + /// artifacts. + core.String kind; + + /// A detailed description of this note. + core.String longDescription; + + /// Output only. The name of the note in the form of + /// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + core.String name; + + /// A note describing a package hosted by various package managers. + Package package; + + /// Other notes related to this note. + core.List<core.String> relatedNoteNames; + + /// URLs associated with this note. + core.List<RelatedUrl> relatedUrl; + + /// A one sentence description of this note. + core.String shortDescription; + + /// Output only. The time this note was last updated. This field can be used + /// as + /// a filter in list requests. + core.String updateTime; + + /// A note describing a package vulnerability. + Vulnerability vulnerability; + + Note(); + + Note.fromJson(core.Map _json) { + if (_json.containsKey("attestationAuthority")) { + attestationAuthority = + new Authority.fromJson(_json["attestationAuthority"]); + } + if (_json.containsKey("baseImage")) { + baseImage = new Basis.fromJson(_json["baseImage"]); + } + if (_json.containsKey("build")) { + build = new Build.fromJson(_json["build"]); + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("deployable")) { + deployable = new Deployable.fromJson(_json["deployable"]); + } + if (_json.containsKey("discovery")) { + discovery = new Discovery.fromJson(_json["discovery"]); + } + if (_json.containsKey("expirationTime")) { + expirationTime = _json["expirationTime"]; + } + if (_json.containsKey("kind")) { + kind = _json["kind"]; + } + if (_json.containsKey("longDescription")) { + longDescription = _json["longDescription"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("package")) { + package = new Package.fromJson(_json["package"]); + } + if (_json.containsKey("relatedNoteNames")) { + relatedNoteNames = + (_json["relatedNoteNames"] as core.List).cast<core.String>(); + } + if (_json.containsKey("relatedUrl")) { + relatedUrl = (_json["relatedUrl"] as core.List) + .map<RelatedUrl>((value) => new RelatedUrl.fromJson(value)) + .toList(); + } + if (_json.containsKey("shortDescription")) { + shortDescription = _json["shortDescription"]; + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + if (_json.containsKey("vulnerability")) { + vulnerability = new Vulnerability.fromJson(_json["vulnerability"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (attestationAuthority != null) { + _json["attestationAuthority"] = (attestationAuthority).toJson(); + } + if (baseImage != null) { + _json["baseImage"] = (baseImage).toJson(); + } + if (build != null) { + _json["build"] = (build).toJson(); + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (deployable != null) { + _json["deployable"] = (deployable).toJson(); + } + if (discovery != null) { + _json["discovery"] = (discovery).toJson(); + } + if (expirationTime != null) { + _json["expirationTime"] = expirationTime; + } + if (kind != null) { + _json["kind"] = kind; + } + if (longDescription != null) { + _json["longDescription"] = longDescription; + } + if (name != null) { + _json["name"] = name; + } + if (package != null) { + _json["package"] = (package).toJson(); + } + if (relatedNoteNames != null) { + _json["relatedNoteNames"] = relatedNoteNames; + } + if (relatedUrl != null) { + _json["relatedUrl"] = + relatedUrl.map((value) => (value).toJson()).toList(); + } + if (shortDescription != null) { + _json["shortDescription"] = shortDescription; + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + if (vulnerability != null) { + _json["vulnerability"] = (vulnerability).toJson(); + } + return _json; + } +} + +/// An instance of an analysis type that has been found on a resource. +class Occurrence { + /// Describes an attestation of an artifact. + Details attestation; + + /// Describes a verifiable build. + GrafeasV1beta1BuildDetails build; + + /// Output only. The time this occurrence was created. + core.String createTime; + + /// Describes the deployment of an artifact on a runtime. + GrafeasV1beta1DeploymentDetails deployment; + + /// Describes how this resource derives from the basis in the associated + /// note. + GrafeasV1beta1ImageDetails derivedImage; + + /// Describes when a resource was discovered. + GrafeasV1beta1DiscoveryDetails discovered; + + /// Describes the installation of a package on the linked resource. + GrafeasV1beta1PackageDetails installation; + + /// Output only. This explicitly denotes which of the occurrence details are + /// specified. This field can be used as a filter in list requests. + /// Possible string values are: + /// - "NOTE_KIND_UNSPECIFIED" : Unknown. + /// - "VULNERABILITY" : The note and occurrence represent a package + /// vulnerability. + /// - "BUILD" : The note and occurrence assert build provenance. + /// - "IMAGE" : This represents an image basis relationship. + /// - "PACKAGE" : This represents a package installed via a package manager. + /// - "DEPLOYMENT" : The note and occurrence track deployment events. + /// - "DISCOVERY" : The note and occurrence track the initial discovery status + /// of a resource. + /// - "ATTESTATION" : This represents a logical "role" that can attest to + /// artifacts. + core.String kind; + + /// Output only. The name of the occurrence in the form of + /// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + core.String name; + + /// Required. Immutable. The analysis note associated with this occurrence, in + /// the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + /// used as a filter in list requests. + core.String noteName; + + /// A description of actions that can be taken to remedy the note. + core.String remediation; + + /// Required. Immutable. The resource for which the occurrence applies. + Resource resource; + + /// Output only. The time this occurrence was last updated. + core.String updateTime; + + /// Describes a security vulnerability. + GrafeasV1beta1VulnerabilityDetails vulnerability; + + Occurrence(); + + Occurrence.fromJson(core.Map _json) { + if (_json.containsKey("attestation")) { + attestation = new Details.fromJson(_json["attestation"]); + } + if (_json.containsKey("build")) { + build = new GrafeasV1beta1BuildDetails.fromJson(_json["build"]); + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("deployment")) { + deployment = + new GrafeasV1beta1DeploymentDetails.fromJson(_json["deployment"]); + } + if (_json.containsKey("derivedImage")) { + derivedImage = + new GrafeasV1beta1ImageDetails.fromJson(_json["derivedImage"]); + } + if (_json.containsKey("discovered")) { + discovered = + new GrafeasV1beta1DiscoveryDetails.fromJson(_json["discovered"]); + } + if (_json.containsKey("installation")) { + installation = + new GrafeasV1beta1PackageDetails.fromJson(_json["installation"]); + } + if (_json.containsKey("kind")) { + kind = _json["kind"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("noteName")) { + noteName = _json["noteName"]; + } + if (_json.containsKey("remediation")) { + remediation = _json["remediation"]; + } + if (_json.containsKey("resource")) { + resource = new Resource.fromJson(_json["resource"]); + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + if (_json.containsKey("vulnerability")) { + vulnerability = new GrafeasV1beta1VulnerabilityDetails.fromJson( + _json["vulnerability"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (attestation != null) { + _json["attestation"] = (attestation).toJson(); + } + if (build != null) { + _json["build"] = (build).toJson(); + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (deployment != null) { + _json["deployment"] = (deployment).toJson(); + } + if (derivedImage != null) { + _json["derivedImage"] = (derivedImage).toJson(); + } + if (discovered != null) { + _json["discovered"] = (discovered).toJson(); + } + if (installation != null) { + _json["installation"] = (installation).toJson(); + } + if (kind != null) { + _json["kind"] = kind; + } + if (name != null) { + _json["name"] = name; + } + if (noteName != null) { + _json["noteName"] = noteName; + } + if (remediation != null) { + _json["remediation"] = remediation; + } + if (resource != null) { + _json["resource"] = (resource).toJson(); + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + if (vulnerability != null) { + _json["vulnerability"] = (vulnerability).toJson(); + } + return _json; + } +} + +/// This represents a particular package that is distributed over various +/// channels. E.g., glibc (aka libc6) is distributed by many, at various +/// versions. +class Package { + /// The various channels by which a package is distributed. + core.List<Distribution> distribution; + + /// Required. Immutable. The name of the package. + core.String name; + + Package(); + + Package.fromJson(core.Map _json) { + if (_json.containsKey("distribution")) { + distribution = (_json["distribution"] as core.List) + .map<Distribution>((value) => new Distribution.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (distribution != null) { + _json["distribution"] = + distribution.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + return _json; + } +} + +/// This message wraps a location affected by a vulnerability and its +/// associated fix (if one is available). +class PackageIssue { + /// Required. The location of the vulnerability. + VulnerabilityLocation affectedLocation; + + /// The location of the available fix for vulnerability. + VulnerabilityLocation fixedLocation; + + /// The severity (e.g., distro assigned severity) for this vulnerability. + core.String severityName; + + PackageIssue(); + + PackageIssue.fromJson(core.Map _json) { + if (_json.containsKey("affectedLocation")) { + affectedLocation = + new VulnerabilityLocation.fromJson(_json["affectedLocation"]); + } + if (_json.containsKey("fixedLocation")) { + fixedLocation = + new VulnerabilityLocation.fromJson(_json["fixedLocation"]); + } + if (_json.containsKey("severityName")) { + severityName = _json["severityName"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (affectedLocation != null) { + _json["affectedLocation"] = (affectedLocation).toJson(); + } + if (fixedLocation != null) { + _json["fixedLocation"] = (fixedLocation).toJson(); + } + if (severityName != null) { + _json["severityName"] = severityName; + } + return _json; + } +} + +/// An attestation wrapper with a PGP-compatible signature. This message only +/// supports `ATTACHED` signatures, where the payload that is signed is included +/// alongside the signature itself in the same file. +class PgpSignedAttestation { + /// Type (for example schema) of the attestation payload that was signed. + /// The verifier must ensure that the provided type is one that the verifier + /// supports, and that the attestation payload is a valid instantiation of + /// that + /// type (for example by validating a JSON schema). + /// Possible string values are: + /// - "CONTENT_TYPE_UNSPECIFIED" : `ContentType` is not set. + /// - "SIMPLE_SIGNING_JSON" : Atomic format attestation signature. See + /// https://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md + /// The payload extracted from `signature` is a JSON blob conforming to the + /// linked schema. + core.String contentType; + + /// The cryptographic fingerprint of the key used to generate the signature, + /// as output by, e.g. `gpg --list-keys`. This should be the version 4, full + /// 160-bit fingerprint, expressed as a 40 character hexidecimal string. See + /// https://tools.ietf.org/html/rfc4880#section-12.2 for details. + /// Implementations may choose to acknowledge "LONG", "SHORT", or other + /// abbreviated key IDs, but only the full fingerprint is guaranteed to work. + /// In gpg, the full fingerprint can be retrieved from the `fpr` field + /// returned when calling --list-keys with --with-colons. For example: + /// ``` + /// gpg --with-colons --with-fingerprint --force-v4-certs \ + /// --list-keys attester@example.com + /// tru::1:1513631572:0:3:1:5 + /// pub:...<SNIP>... + /// fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: + /// ``` + /// Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. + core.String pgpKeyId; + + /// Required. The raw content of the signature, as output by GNU Privacy Guard + /// (GPG) or equivalent. Since this message only supports attached signatures, + /// the payload that was signed must be attached. While the signature format + /// supported is dependent on the verification implementation, currently only + /// ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than + /// `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor + /// --output=signature.gpg payload.json` will create the signature content + /// expected in this field in `signature.gpg` for the `payload.json` + /// attestation payload. + core.String signature; + + PgpSignedAttestation(); + + PgpSignedAttestation.fromJson(core.Map _json) { + if (_json.containsKey("contentType")) { + contentType = _json["contentType"]; + } + if (_json.containsKey("pgpKeyId")) { + pgpKeyId = _json["pgpKeyId"]; + } + if (_json.containsKey("signature")) { + signature = _json["signature"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (contentType != null) { + _json["contentType"] = contentType; + } + if (pgpKeyId != null) { + _json["pgpKeyId"] = pgpKeyId; + } + if (signature != null) { + _json["signature"] = signature; + } + return _json; + } +} + +/// Defines an Identity and Access Management (IAM) policy. It is used to +/// specify access control policies for Cloud Platform resources. +/// +/// +/// A `Policy` consists of a list of `bindings`. A `binding` binds a list of +/// `members` to a `role`, where the members can be user accounts, Google +/// groups, +/// Google domains, and service accounts. A `role` is a named list of +/// permissions +/// defined by IAM. +/// +/// **JSON Example** +/// +/// { +/// "bindings": [ +/// { +/// "role": "roles/owner", +/// "members": [ +/// "user:mike@example.com", +/// "group:admins@example.com", +/// "domain:google.com", +/// "serviceAccount:my-other-app@appspot.gserviceaccount.com" +/// ] +/// }, +/// { +/// "role": "roles/viewer", +/// "members": ["user:sean@example.com"] +/// } +/// ] +/// } +/// +/// **YAML Example** +/// +/// bindings: +/// - members: +/// - user:mike@example.com +/// - group:admins@example.com +/// - domain:google.com +/// - serviceAccount:my-other-app@appspot.gserviceaccount.com +/// role: roles/owner +/// - members: +/// - user:sean@example.com +/// role: roles/viewer +/// +/// +/// For a description of IAM and its features, see the +/// [IAM developer's guide](https://cloud.google.com/iam/docs). +class Policy { + /// Specifies cloud audit logging configuration for this policy. + core.List<AuditConfig> auditConfigs; + + /// Associates a list of `members` to a `role`. + /// `bindings` with no members will result in an error. + core.List<Binding> bindings; + + /// `etag` is used for optimistic concurrency control as a way to help + /// prevent simultaneous updates of a policy from overwriting each other. + /// It is strongly suggested that systems make use of the `etag` in the + /// read-modify-write cycle to perform policy updates in order to avoid race + /// conditions: An `etag` is returned in the response to `getIamPolicy`, and + /// systems are expected to put that etag in the request to `setIamPolicy` to + /// ensure that their change will be applied to the same version of the + /// policy. + /// + /// If no `etag` is provided in the call to `setIamPolicy`, then the existing + /// policy is overwritten blindly. + core.String etag; + core.List<core.int> get etagAsBytes { + return convert.base64.decode(etag); + } + + void set etagAsBytes(core.List<core.int> _bytes) { + etag = + convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); + } + + /// Deprecated. + core.int version; + + Policy(); + + Policy.fromJson(core.Map _json) { + if (_json.containsKey("auditConfigs")) { + auditConfigs = (_json["auditConfigs"] as core.List) + .map<AuditConfig>((value) => new AuditConfig.fromJson(value)) + .toList(); + } + if (_json.containsKey("bindings")) { + bindings = (_json["bindings"] as core.List) + .map<Binding>((value) => new Binding.fromJson(value)) + .toList(); + } + if (_json.containsKey("etag")) { + etag = _json["etag"]; + } + if (_json.containsKey("version")) { + version = _json["version"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (auditConfigs != null) { + _json["auditConfigs"] = + auditConfigs.map((value) => (value).toJson()).toList(); + } + if (bindings != null) { + _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); + } + if (etag != null) { + _json["etag"] = etag; + } + if (version != null) { + _json["version"] = version; + } + return _json; + } +} + +/// Selects a repo using a Google Cloud Platform project ID (e.g., +/// winged-cargo-31) and a repo name within that project. +class ProjectRepoId { + /// The ID of the project. + core.String projectId; + + /// The name of the repo. Leave empty for the default repo. + core.String repoName; + + ProjectRepoId(); + + ProjectRepoId.fromJson(core.Map _json) { + if (_json.containsKey("projectId")) { + projectId = _json["projectId"]; + } + if (_json.containsKey("repoName")) { + repoName = _json["repoName"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (projectId != null) { + _json["projectId"] = projectId; + } + if (repoName != null) { + _json["repoName"] = repoName; + } + return _json; + } +} + +/// Metadata for any related URL information. +class RelatedUrl { + /// Label to describe usage of the URL. + core.String label; + + /// Specific URL associated with the resource. + core.String url; + + RelatedUrl(); + + RelatedUrl.fromJson(core.Map _json) { + if (_json.containsKey("label")) { + label = _json["label"]; + } + if (_json.containsKey("url")) { + url = _json["url"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (label != null) { + _json["label"] = label; + } + if (url != null) { + _json["url"] = url; + } + return _json; + } +} + +/// A unique identifier for a Cloud Repo. +class RepoId { + /// A combination of a project ID and a repo name. + ProjectRepoId projectRepoId; + + /// A server-assigned, globally unique identifier. + core.String uid; + + RepoId(); + + RepoId.fromJson(core.Map _json) { + if (_json.containsKey("projectRepoId")) { + projectRepoId = new ProjectRepoId.fromJson(_json["projectRepoId"]); + } + if (_json.containsKey("uid")) { + uid = _json["uid"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (projectRepoId != null) { + _json["projectRepoId"] = (projectRepoId).toJson(); + } + if (uid != null) { + _json["uid"] = uid; + } + return _json; + } +} + +/// An entity that can have metadata. For example, a Docker image. +class Resource { + /// The hash of the resource content. For example, the Docker digest. + Hash contentHash; + + /// The name of the resource. For example, the name of a Docker image - + /// "Debian". + core.String name; + + /// Required. The unique URI of the resource. For example, + /// `https://gcr.io/project/image@sha256:foo` for a Docker image. + core.String uri; + + Resource(); + + Resource.fromJson(core.Map _json) { + if (_json.containsKey("contentHash")) { + contentHash = new Hash.fromJson(_json["contentHash"]); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("uri")) { + uri = _json["uri"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (contentHash != null) { + _json["contentHash"] = (contentHash).toJson(); + } + if (name != null) { + _json["name"] = name; + } + if (uri != null) { + _json["uri"] = uri; + } + return _json; + } +} + +/// A scan configuration specifies whether Cloud components in a project have a +/// particular type of analysis being run. For example, it can configure whether +/// vulnerability scanning is being done on Docker images or not. +class ScanConfig { + /// Output only. The time this scan config was created. + core.String createTime; + + /// Output only. A human-readable description of what the scan configuration + /// does. + core.String description; + + /// Whether the scan is enabled. + core.bool enabled; + + /// Output only. The name of the scan configuration in the form of + /// `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + core.String name; + + /// Output only. The time this scan config was last updated. + core.String updateTime; + + ScanConfig(); + + ScanConfig.fromJson(core.Map _json) { + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("enabled")) { + enabled = _json["enabled"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (createTime != null) { + _json["createTime"] = createTime; + } + if (description != null) { + _json["description"] = description; + } + if (enabled != null) { + _json["enabled"] = enabled; + } + if (name != null) { + _json["name"] = name; + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + return _json; + } +} + +/// Request message for `SetIamPolicy` method. +class SetIamPolicyRequest { + /// REQUIRED: The complete policy to be applied to the `resource`. The size of + /// the policy is limited to a few 10s of KB. An empty policy is a + /// valid policy but certain Cloud Platform services (such as Projects) + /// might reject them. + Policy policy; + + /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. + /// Only + /// the fields in the mask will be modified. If no mask is provided, the + /// following default mask is used: + /// paths: "bindings, etag" + /// This field is only used by Cloud IAM. + core.String updateMask; + + SetIamPolicyRequest(); + + SetIamPolicyRequest.fromJson(core.Map _json) { + if (_json.containsKey("policy")) { + policy = new Policy.fromJson(_json["policy"]); + } + if (_json.containsKey("updateMask")) { + updateMask = _json["updateMask"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (policy != null) { + _json["policy"] = (policy).toJson(); + } + if (updateMask != null) { + _json["updateMask"] = updateMask; + } + return _json; + } +} + +/// Source describes the location of the source used for the build. +class Source { + /// If provided, some of the source code used for the build may be found in + /// these locations, in the case where the source repository had multiple + /// remotes or submodules. This list will not include the context specified in + /// the context field. + core.List<SourceContext> additionalContexts; + + /// If provided, the input binary artifacts for the build came from this + /// location. + core.String artifactStorageSourceUri; + + /// If provided, the source code used for the build came from this location. + SourceContext context; + + /// Hash(es) of the build source, which can be used to verify that the + /// original + /// source integrity was maintained in the build. + /// + /// The keys to this map are file paths used as build source and the values + /// contain the hash values for those files. + /// + /// If the build source came in a single package such as a gzipped tarfile + /// (.tar.gz), the FileHash will be for the single path to that file. + core.Map<core.String, FileHashes> fileHashes; + + Source(); + + Source.fromJson(core.Map _json) { + if (_json.containsKey("additionalContexts")) { + additionalContexts = (_json["additionalContexts"] as core.List) + .map<SourceContext>((value) => new SourceContext.fromJson(value)) + .toList(); + } + if (_json.containsKey("artifactStorageSourceUri")) { + artifactStorageSourceUri = _json["artifactStorageSourceUri"]; + } + if (_json.containsKey("context")) { + context = new SourceContext.fromJson(_json["context"]); + } + if (_json.containsKey("fileHashes")) { + fileHashes = commons.mapMap<core.Map, FileHashes>( + _json["fileHashes"].cast<core.String, core.Map>(), + (core.Map item) => new FileHashes.fromJson(item)); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (additionalContexts != null) { + _json["additionalContexts"] = + additionalContexts.map((value) => (value).toJson()).toList(); + } + if (artifactStorageSourceUri != null) { + _json["artifactStorageSourceUri"] = artifactStorageSourceUri; + } + if (context != null) { + _json["context"] = (context).toJson(); + } + if (fileHashes != null) { + _json["fileHashes"] = + commons.mapMap<FileHashes, core.Map<core.String, core.Object>>( + fileHashes, (FileHashes item) => (item).toJson()); + } + return _json; + } +} + +/// A SourceContext is a reference to a tree of files. A SourceContext together +/// with a path point to a unique revision of a single file or directory. +class SourceContext { + /// A SourceContext referring to a revision in a Google Cloud Source Repo. + CloudRepoSourceContext cloudRepo; + + /// A SourceContext referring to a Gerrit project. + GerritSourceContext gerrit; + + /// A SourceContext referring to any third party Git repo (e.g., GitHub). + GitSourceContext git; + + /// Labels with user defined metadata. + core.Map<core.String, core.String> labels; + + SourceContext(); + + SourceContext.fromJson(core.Map _json) { + if (_json.containsKey("cloudRepo")) { + cloudRepo = new CloudRepoSourceContext.fromJson(_json["cloudRepo"]); + } + if (_json.containsKey("gerrit")) { + gerrit = new GerritSourceContext.fromJson(_json["gerrit"]); + } + if (_json.containsKey("git")) { + git = new GitSourceContext.fromJson(_json["git"]); + } + if (_json.containsKey("labels")) { + labels = (_json["labels"] as core.Map).cast<core.String, core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cloudRepo != null) { + _json["cloudRepo"] = (cloudRepo).toJson(); + } + if (gerrit != null) { + _json["gerrit"] = (gerrit).toJson(); + } + if (git != null) { + _json["git"] = (git).toJson(); + } + if (labels != null) { + _json["labels"] = labels; + } + return _json; + } +} + +/// 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). The error model is designed to be: +/// +/// - Simple to use and understand for most users +/// - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error +/// message, +/// and error details. The error code should be an enum value of +/// google.rpc.Code, but it may accept additional error codes if needed. The +/// error message should be a developer-facing English message that helps +/// developers *understand* and *resolve* the error. If a localized user-facing +/// error message is needed, put the localized message in the error details or +/// localize it in the client. The optional error details may contain arbitrary +/// information about the error. There is a predefined set of error detail types +/// in the package `google.rpc` that can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but +/// it +/// is not necessarily the actual wire format. When the `Status` message is +/// exposed in different client libraries and different wire protocols, it can +/// be +/// mapped differently. For example, it will likely be mapped to some exceptions +/// in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of +/// environments, either with or without APIs, to provide a +/// consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, +/// it may embed the `Status` in the normal response to indicate the partial +/// errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may +/// have a `Status` message for error reporting. +/// +/// - Batch operations. If a client uses batch request and batch response, the +/// `Status` message should be used directly inside batch response, one for +/// each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation +/// results in its response, the status of those operations should be +/// represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could +/// be used directly after any stripping needed for security/privacy reasons. +class Status { + /// The status code, which should be an enum value of google.rpc.Code. + core.int code; + + /// A list of messages that carry the error details. There is a common set of + /// message types for APIs to use. + /// + /// 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.List<core.Map<core.String, core.Object>> details; + + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// google.rpc.Status.details field, or localized by the client. + core.String message; + + Status(); + + Status.fromJson(core.Map _json) { + if (_json.containsKey("code")) { + code = _json["code"]; + } + if (_json.containsKey("details")) { + details = (_json["details"] as core.List) + .map<core.Map<core.String, core.Object>>( + (value) => (value as core.Map).cast<core.String, core.Object>()) + .toList(); + } + if (_json.containsKey("message")) { + message = _json["message"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (code != null) { + _json["code"] = code; + } + if (details != null) { + _json["details"] = details; + } + if (message != null) { + _json["message"] = message; + } + return _json; + } +} + +/// Request message for `TestIamPermissions` method. +class TestIamPermissionsRequest { + /// The set of permissions to check for the `resource`. Permissions with + /// wildcards (such as '*' or 'storage.*') are not allowed. For more + /// information see + /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + core.List<core.String> permissions; + + TestIamPermissionsRequest(); + + TestIamPermissionsRequest.fromJson(core.Map _json) { + if (_json.containsKey("permissions")) { + permissions = (_json["permissions"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (permissions != null) { + _json["permissions"] = permissions; + } + return _json; + } +} + +/// Response message for `TestIamPermissions` method. +class TestIamPermissionsResponse { + /// A subset of `TestPermissionsRequest.permissions` that the caller is + /// allowed. + core.List<core.String> permissions; + + TestIamPermissionsResponse(); + + TestIamPermissionsResponse.fromJson(core.Map _json) { + if (_json.containsKey("permissions")) { + permissions = (_json["permissions"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (permissions != null) { + _json["permissions"] = permissions; + } + return _json; + } +} + +/// Version contains structured information about the version of a package. +class Version { + /// Used to correct mistakes in the version numbering scheme. + core.int epoch; + + /// Required. Distinguishes between sentinel MIN/MAX versions and normal + /// versions. + /// Possible string values are: + /// - "VERSION_KIND_UNSPECIFIED" : Unknown. + /// - "NORMAL" : A standard package version. + /// - "MINIMUM" : A special version representing negative infinity. + /// - "MAXIMUM" : A special version representing positive infinity. + core.String kind; + + /// Required only when version kind is NORMAL. The main part of the version + /// name. + core.String name; + + /// The iteration of the package build from the above version. + core.String revision; + + Version(); + + Version.fromJson(core.Map _json) { + if (_json.containsKey("epoch")) { + epoch = _json["epoch"]; + } + if (_json.containsKey("kind")) { + kind = _json["kind"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("revision")) { + revision = _json["revision"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (epoch != null) { + _json["epoch"] = epoch; + } + if (kind != null) { + _json["kind"] = kind; + } + if (name != null) { + _json["name"] = name; + } + if (revision != null) { + _json["revision"] = revision; + } + return _json; + } +} + +/// Vulnerability provides metadata about a security vulnerability in a Note. +class Vulnerability { + /// The CVSS score for this vulnerability. + core.double cvssScore; + + /// All information about the package to specifically identify this + /// vulnerability. One entry per (version range and cpe_uri) the package + /// vulnerability has manifested in. + core.List<Detail> details; + + /// Note provider assigned impact of the vulnerability. + /// Possible string values are: + /// - "SEVERITY_UNSPECIFIED" : Unknown. + /// - "MINIMAL" : Minimal severity. + /// - "LOW" : Low severity. + /// - "MEDIUM" : Medium severity. + /// - "HIGH" : High severity. + /// - "CRITICAL" : Critical severity. + core.String severity; + + /// Windows details get their own format because the information format and + /// model don't match a normal detail. Specifically Windows updates are done + /// as + /// patches, thus Windows vulnerabilities really are a missing package, rather + /// than a package being at an incorrect version. + core.List<WindowsDetail> windowsDetails; + + Vulnerability(); + + Vulnerability.fromJson(core.Map _json) { + if (_json.containsKey("cvssScore")) { + cvssScore = _json["cvssScore"].toDouble(); + } + if (_json.containsKey("details")) { + details = (_json["details"] as core.List) + .map<Detail>((value) => new Detail.fromJson(value)) + .toList(); + } + if (_json.containsKey("severity")) { + severity = _json["severity"]; + } + if (_json.containsKey("windowsDetails")) { + windowsDetails = (_json["windowsDetails"] as core.List) + .map<WindowsDetail>((value) => new WindowsDetail.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cvssScore != null) { + _json["cvssScore"] = cvssScore; + } + if (details != null) { + _json["details"] = details.map((value) => (value).toJson()).toList(); + } + if (severity != null) { + _json["severity"] = severity; + } + if (windowsDetails != null) { + _json["windowsDetails"] = + windowsDetails.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// The location of the vulnerability. +class VulnerabilityLocation { + /// Required. The CPE URI in [cpe + /// format](https://cpe.mitre.org/specification/) + /// format. Examples include distro or storage location for vulnerable jar. + core.String cpeUri; + + /// Required. The package being described. + core.String package; + + /// Required. The version of the package being described. + Version version; + + VulnerabilityLocation(); + + VulnerabilityLocation.fromJson(core.Map _json) { + if (_json.containsKey("cpeUri")) { + cpeUri = _json["cpeUri"]; + } + if (_json.containsKey("package")) { + package = _json["package"]; + } + if (_json.containsKey("version")) { + version = new Version.fromJson(_json["version"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cpeUri != null) { + _json["cpeUri"] = cpeUri; + } + if (package != null) { + _json["package"] = package; + } + if (version != null) { + _json["version"] = (version).toJson(); + } + return _json; + } +} + +/// A summary of how many vulnerability occurrences there are per resource and +/// severity type. +class VulnerabilityOccurrencesSummary { + /// A listing by resource of the number of fixable and total vulnerabilities. + core.List<FixableTotalByDigest> counts; + + VulnerabilityOccurrencesSummary(); + + VulnerabilityOccurrencesSummary.fromJson(core.Map _json) { + if (_json.containsKey("counts")) { + counts = (_json["counts"] as core.List) + .map<FixableTotalByDigest>( + (value) => new FixableTotalByDigest.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (counts != null) { + _json["counts"] = counts.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +class WindowsDetail { + /// Required. The CPE URI in + /// [cpe format](https://cpe.mitre.org/specification/) in which the + /// vulnerability manifests. Examples include distro or storage location for + /// vulnerable jar. + core.String cpeUri; + + /// The description of the vulnerability. + core.String description; + + /// Required. The names of the KBs which have hotfixes to mitigate this + /// vulnerability. Note that there may be multiple hotfixes (and thus + /// multiple KBs) that mitigate a given vulnerability. Currently any listed + /// kb's presence is considered a fix. + core.List<KnowledgeBase> fixingKbs; + + /// Required. The name of the vulnerability. + core.String name; + + WindowsDetail(); + + WindowsDetail.fromJson(core.Map _json) { + if (_json.containsKey("cpeUri")) { + cpeUri = _json["cpeUri"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("fixingKbs")) { + fixingKbs = (_json["fixingKbs"] as core.List) + .map<KnowledgeBase>((value) => new KnowledgeBase.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cpeUri != null) { + _json["cpeUri"] = cpeUri; + } + if (description != null) { + _json["description"] = description; + } + if (fixingKbs != null) { + _json["fixingKbs"] = fixingKbs.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + return _json; + } +}
diff --git a/generated/googleapis_beta/lib/dataflow/v1b3.dart b/generated/googleapis_beta/lib/dataflow/v1b3.dart index 56743b1..bd0d516 100644 --- a/generated/googleapis_beta/lib/dataflow/v1b3.dart +++ b/generated/googleapis_beta/lib/dataflow/v1b3.dart
@@ -126,18 +126,6 @@ /// /// [projectId] - The project which owns the jobs. /// - /// [pageSize] - If there are many jobs, limit response to at most this many. - /// The actual number of jobs returned will be the lesser of max_responses - /// and an unspecified server-defined limit. - /// - /// [view] - Level of information requested in response. Default is - /// `JOB_VIEW_SUMMARY`. - /// Possible string values are: - /// - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. - /// - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. - /// - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. - /// - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. - /// /// [filter] - The kind of filter to use. /// Possible string values are: /// - "UNKNOWN" : A UNKNOWN. @@ -151,6 +139,18 @@ /// response /// to request additional results in a long list. /// + /// [pageSize] - If there are many jobs, limit response to at most this many. + /// The actual number of jobs returned will be the lesser of max_responses + /// and an unspecified server-defined limit. + /// + /// [view] - Level of information requested in response. Default is + /// `JOB_VIEW_SUMMARY`. + /// Possible string values are: + /// - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. + /// - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. + /// - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. + /// - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -162,11 +162,11 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListJobsResponse> aggregated(core.String projectId, - {core.int pageSize, - core.String view, - core.String filter, + {core.String filter, core.String location, core.String pageToken, + core.int pageSize, + core.String view, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -178,12 +178,6 @@ if (projectId == null) { throw new core.ArgumentError("Parameter projectId is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } - if (view != null) { - _queryParams["view"] = [view]; - } if (filter != null) { _queryParams["filter"] = [filter]; } @@ -193,6 +187,12 @@ if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if (view != null) { + _queryParams["view"] = [view]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -219,6 +219,10 @@ /// [projectId] - The ID of the Cloud Platform project that the job belongs /// to. /// + /// [location] - The location that contains this job. + /// + /// [replaceJobId] - Deprecated. This field is now in the Job message. + /// /// [view] - The level of information requested in response. /// Possible string values are: /// - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. @@ -226,10 +230,6 @@ /// - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. /// - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. /// - /// [location] - The location that contains this job. - /// - /// [replaceJobId] - Deprecated. This field is now in the Job message. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -241,9 +241,9 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<Job> create(Job request, core.String projectId, - {core.String view, - core.String location, + {core.String location, core.String replaceJobId, + core.String view, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -258,15 +258,15 @@ if (projectId == null) { throw new core.ArgumentError("Parameter projectId is required."); } - if (view != null) { - _queryParams["view"] = [view]; - } if (location != null) { _queryParams["location"] = [location]; } if (replaceJobId != null) { _queryParams["replaceJobId"] = [replaceJobId]; } + if (view != null) { + _queryParams["view"] = [view]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -420,18 +420,6 @@ /// /// [projectId] - The project which owns the jobs. /// - /// [pageSize] - If there are many jobs, limit response to at most this many. - /// The actual number of jobs returned will be the lesser of max_responses - /// and an unspecified server-defined limit. - /// - /// [view] - Level of information requested in response. Default is - /// `JOB_VIEW_SUMMARY`. - /// Possible string values are: - /// - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. - /// - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. - /// - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. - /// - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. - /// /// [filter] - The kind of filter to use. /// Possible string values are: /// - "UNKNOWN" : A UNKNOWN. @@ -445,6 +433,18 @@ /// response /// to request additional results in a long list. /// + /// [pageSize] - If there are many jobs, limit response to at most this many. + /// The actual number of jobs returned will be the lesser of max_responses + /// and an unspecified server-defined limit. + /// + /// [view] - Level of information requested in response. Default is + /// `JOB_VIEW_SUMMARY`. + /// Possible string values are: + /// - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. + /// - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. + /// - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. + /// - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -456,11 +456,11 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListJobsResponse> list(core.String projectId, - {core.int pageSize, - core.String view, - core.String filter, + {core.String filter, core.String location, core.String pageToken, + core.int pageSize, + core.String view, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -472,12 +472,6 @@ if (projectId == null) { throw new core.ArgumentError("Parameter projectId is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } - if (view != null) { - _queryParams["view"] = [view]; - } if (filter != null) { _queryParams["filter"] = [filter]; } @@ -487,6 +481,12 @@ if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if (view != null) { + _queryParams["view"] = [view]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -504,6 +504,64 @@ return _response.then((data) => new ListJobsResponse.fromJson(data)); } + /// Snapshot the state of a streaming job. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [projectId] - The project which owns the job to be snapshotted. + /// + /// [jobId] - The job to be snapshotted. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Snapshot]. + /// + /// 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<Snapshot> snapshot( + SnapshotJobRequest request, core.String projectId, core.String jobId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (projectId == null) { + throw new core.ArgumentError("Parameter projectId is required."); + } + if (jobId == null) { + throw new core.ArgumentError("Parameter jobId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1b3/projects/' + + commons.Escaper.ecapeVariable('$projectId') + + '/jobs/' + + commons.Escaper.ecapeVariable('$jobId') + + ':snapshot'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Snapshot.fromJson(data)); + } + /// Updates the state of an existing Cloud Dataflow job. /// /// [request] - The metadata request object. @@ -706,12 +764,12 @@ /// /// [jobId] - The job to get messages about. /// + /// [location] - The location which contains the job specified by job_id. + /// /// [endTime] - Return only messages with timestamps < end_time. The default /// is now /// (i.e. return up to the latest messages available). /// - /// [location] - The location which contains the job specified by job_id. - /// /// [pageToken] - If supplied, this should be the value of next_page_token /// returned /// by an earlier call. This will cause the next page of results to @@ -746,8 +804,8 @@ /// this method will complete with the same error. async.Future<ListJobMessagesResponse> list( core.String projectId, core.String jobId, - {core.String endTime, - core.String location, + {core.String location, + core.String endTime, core.String pageToken, core.String startTime, core.int pageSize, @@ -766,12 +824,12 @@ if (jobId == null) { throw new core.ArgumentError("Parameter jobId is required."); } - if (endTime != null) { - _queryParams["endTime"] = [endTime]; - } if (location != null) { _queryParams["location"] = [location]; } + if (endTime != null) { + _queryParams["endTime"] = [endTime]; + } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } @@ -1027,8 +1085,6 @@ /// /// [location] - The location that contains this job. /// - /// [replaceJobId] - Deprecated. This field is now in the Job message. - /// /// [view] - The level of information requested in response. /// Possible string values are: /// - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. @@ -1036,6 +1092,8 @@ /// - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. /// - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. /// + /// [replaceJobId] - Deprecated. This field is now in the Job message. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1048,7 +1106,7 @@ /// this method will complete with the same error. async.Future<Job> create( Job request, core.String projectId, core.String location, - {core.String replaceJobId, core.String view, core.String $fields}) { + {core.String view, core.String replaceJobId, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -1065,12 +1123,12 @@ if (location == null) { throw new core.ArgumentError("Parameter location is required."); } - if (replaceJobId != null) { - _queryParams["replaceJobId"] = [replaceJobId]; - } if (view != null) { _queryParams["view"] = [view]; } + if (replaceJobId != null) { + _queryParams["replaceJobId"] = [replaceJobId]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1318,6 +1376,71 @@ return _response.then((data) => new ListJobsResponse.fromJson(data)); } + /// Snapshot the state of a streaming job. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [projectId] - The project which owns the job to be snapshotted. + /// + /// [location] - The location that contains this job. + /// + /// [jobId] - The job to be snapshotted. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Snapshot]. + /// + /// 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<Snapshot> snapshot(SnapshotJobRequest request, + core.String projectId, core.String location, core.String jobId, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (projectId == null) { + throw new core.ArgumentError("Parameter projectId is required."); + } + if (location == null) { + throw new core.ArgumentError("Parameter location is required."); + } + if (jobId == null) { + throw new core.ArgumentError("Parameter jobId is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1b3/projects/' + + commons.Escaper.ecapeVariable('$projectId') + + '/locations/' + + commons.Escaper.ecapeVariable('$location') + + '/jobs/' + + commons.Escaper.ecapeVariable('$jobId') + + ':snapshot'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Snapshot.fromJson(data)); + } + /// Updates the state of an existing Cloud Dataflow job. /// /// [request] - The metadata request object. @@ -1859,7 +1982,7 @@ /// /// [gcsPath] - Required. A Cloud Storage path to the template from which to /// create the job. - /// Must be a valid Cloud Storage URL, beginning with `gs://`. + /// Must be valid Cloud Storage URL, beginning with 'gs://'. /// /// [$fields] - Selector specifying which fields to include in a partial /// response. @@ -1927,11 +2050,17 @@ /// executed. /// Defaults to false. /// - /// [gcsPath] - Required. A Cloud Storage path to the template from which to - /// create + /// [gcsPath] - A Cloud Storage path to the template from which to create /// the job. /// Must be valid Cloud Storage URL, beginning with 'gs://'. /// + /// [dynamicTemplate_gcsPath] - Path to dynamic template spec file on GCS. + /// The file must be a Json serialized DynamicTemplateFieSpec object. + /// + /// [dynamicTemplate_stagingLocation] - Cloud Storage path for staging + /// dependencies. + /// Must be a valid Cloud Storage URL, beginning with `gs://`. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1944,7 +2073,11 @@ /// this method will complete with the same error. async.Future<LaunchTemplateResponse> launch(LaunchTemplateParameters request, core.String projectId, core.String location, - {core.bool validateOnly, core.String gcsPath, core.String $fields}) { + {core.bool validateOnly, + core.String gcsPath, + core.String dynamicTemplate_gcsPath, + core.String dynamicTemplate_stagingLocation, + core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -1967,6 +2100,14 @@ if (gcsPath != null) { _queryParams["gcsPath"] = [gcsPath]; } + if (dynamicTemplate_gcsPath != null) { + _queryParams["dynamicTemplate.gcsPath"] = [dynamicTemplate_gcsPath]; + } + if (dynamicTemplate_stagingLocation != null) { + _queryParams["dynamicTemplate.stagingLocation"] = [ + dynamicTemplate_stagingLocation + ]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -2052,16 +2193,16 @@ /// [projectId] - Required. The ID of the Cloud Platform project that the job /// belongs to. /// - /// [gcsPath] - Required. A Cloud Storage path to the template from which to - /// create the job. - /// Must be a valid Cloud Storage URL, beginning with `gs://`. - /// /// [location] - The location to which to direct the request. /// /// [view] - The view to retrieve. Defaults to METADATA_ONLY. /// Possible string values are: /// - "METADATA_ONLY" : A METADATA_ONLY. /// + /// [gcsPath] - Required. A Cloud Storage path to the template from which to + /// create the job. + /// Must be valid Cloud Storage URL, beginning with 'gs://'. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -2073,9 +2214,9 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<GetTemplateResponse> get(core.String projectId, - {core.String gcsPath, - core.String location, + {core.String location, core.String view, + core.String gcsPath, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -2087,15 +2228,15 @@ if (projectId == null) { throw new core.ArgumentError("Parameter projectId is required."); } - if (gcsPath != null) { - _queryParams["gcsPath"] = [gcsPath]; - } if (location != null) { _queryParams["location"] = [location]; } if (view != null) { _queryParams["view"] = [view]; } + if (gcsPath != null) { + _queryParams["gcsPath"] = [gcsPath]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -2122,17 +2263,23 @@ /// [projectId] - Required. The ID of the Cloud Platform project that the job /// belongs to. /// - /// [location] - The location to which to direct the request. + /// [dynamicTemplate_gcsPath] - Path to dynamic template spec file on GCS. + /// The file must be a Json serialized DynamicTemplateFieSpec object. + /// + /// [dynamicTemplate_stagingLocation] - Cloud Storage path for staging + /// dependencies. + /// Must be a valid Cloud Storage URL, beginning with `gs://`. /// /// [validateOnly] - If true, the request is validated but not actually /// executed. /// Defaults to false. /// - /// [gcsPath] - Required. A Cloud Storage path to the template from which to - /// create + /// [gcsPath] - A Cloud Storage path to the template from which to create /// the job. /// Must be valid Cloud Storage URL, beginning with 'gs://'. /// + /// [location] - The location to which to direct the request. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -2145,9 +2292,11 @@ /// this method will complete with the same error. async.Future<LaunchTemplateResponse> launch( LaunchTemplateParameters request, core.String projectId, - {core.String location, + {core.String dynamicTemplate_gcsPath, + core.String dynamicTemplate_stagingLocation, core.bool validateOnly, core.String gcsPath, + core.String location, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -2162,8 +2311,13 @@ if (projectId == null) { throw new core.ArgumentError("Parameter projectId is required."); } - if (location != null) { - _queryParams["location"] = [location]; + if (dynamicTemplate_gcsPath != null) { + _queryParams["dynamicTemplate.gcsPath"] = [dynamicTemplate_gcsPath]; + } + if (dynamicTemplate_stagingLocation != null) { + _queryParams["dynamicTemplate.stagingLocation"] = [ + dynamicTemplate_stagingLocation + ]; } if (validateOnly != null) { _queryParams["validateOnly"] = ["${validateOnly}"]; @@ -2171,6 +2325,9 @@ if (gcsPath != null) { _queryParams["gcsPath"] = [gcsPath]; } + if (location != null) { + _queryParams["location"] = [location]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -2319,6 +2476,10 @@ /// input) to 1.0 (end of the input). core.double fractionConsumed; + /// The fraction of the remainder of work to split the work item at, from 0.0 + /// (split at the current position) to 1.0 (end of the input). + core.double fractionOfRemainder; + /// A Position at which to split the work item. Position position; @@ -2328,6 +2489,9 @@ if (_json.containsKey("fractionConsumed")) { fractionConsumed = _json["fractionConsumed"].toDouble(); } + if (_json.containsKey("fractionOfRemainder")) { + fractionOfRemainder = _json["fractionOfRemainder"].toDouble(); + } if (_json.containsKey("position")) { position = new Position.fromJson(_json["position"]); } @@ -2339,6 +2503,9 @@ if (fractionConsumed != null) { _json["fractionConsumed"] = fractionConsumed; } + if (fractionOfRemainder != null) { + _json["fractionOfRemainder"] = fractionOfRemainder; + } if (position != null) { _json["position"] = (position).toJson(); } @@ -3893,15 +4060,19 @@ /// processing any data that remained in-flight when draining was requested. /// This state is a terminal state, may only be set by the Cloud Dataflow /// service, and only as a transition from `JOB_STATE_DRAINING`. - /// - "JOB_STATE_PENDING" : 'JOB_STATE_PENDING' indicates that the job has + /// - "JOB_STATE_PENDING" : `JOB_STATE_PENDING` indicates that the job has /// been created but is not yet /// running. Jobs that are pending may only transition to /// `JOB_STATE_RUNNING`, /// or `JOB_STATE_FAILED`. - /// - "JOB_STATE_CANCELLING" : 'JOB_STATE_CANCELLING' indicates that the job + /// - "JOB_STATE_CANCELLING" : `JOB_STATE_CANCELLING` indicates that the job /// has been explicitly cancelled /// and is in the process of stopping. Jobs that are cancelling may only - /// transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. + /// transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. + /// - "JOB_STATE_QUEUED" : `JOB_STATE_QUEUED` indicates that the job has been + /// created but is being + /// delayed until launch. Jobs that are queued may only transition to + /// `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. core.String executionStageState; ExecutionStageState(); @@ -4525,6 +4696,10 @@ /// Cloud Dataflow service. core.String createTime; + /// If this is specified, the job's initial state is populated from the given + /// snapshot. + core.String createdFromSnapshotId; + /// The current state of the job. /// /// Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise @@ -4579,15 +4754,19 @@ /// processing any data that remained in-flight when draining was requested. /// This state is a terminal state, may only be set by the Cloud Dataflow /// service, and only as a transition from `JOB_STATE_DRAINING`. - /// - "JOB_STATE_PENDING" : 'JOB_STATE_PENDING' indicates that the job has + /// - "JOB_STATE_PENDING" : `JOB_STATE_PENDING` indicates that the job has /// been created but is not yet /// running. Jobs that are pending may only transition to /// `JOB_STATE_RUNNING`, /// or `JOB_STATE_FAILED`. - /// - "JOB_STATE_CANCELLING" : 'JOB_STATE_CANCELLING' indicates that the job + /// - "JOB_STATE_CANCELLING" : `JOB_STATE_CANCELLING` indicates that the job /// has been explicitly cancelled /// and is in the process of stopping. Jobs that are cancelling may only - /// transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. + /// transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. + /// - "JOB_STATE_QUEUED" : `JOB_STATE_QUEUED` indicates that the job has been + /// created but is being + /// delayed until launch. Jobs that are queued may only transition to + /// `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. core.String currentState; /// The timestamp associated with the current state. @@ -4708,24 +4887,43 @@ /// processing any data that remained in-flight when draining was requested. /// This state is a terminal state, may only be set by the Cloud Dataflow /// service, and only as a transition from `JOB_STATE_DRAINING`. - /// - "JOB_STATE_PENDING" : 'JOB_STATE_PENDING' indicates that the job has + /// - "JOB_STATE_PENDING" : `JOB_STATE_PENDING` indicates that the job has /// been created but is not yet /// running. Jobs that are pending may only transition to /// `JOB_STATE_RUNNING`, /// or `JOB_STATE_FAILED`. - /// - "JOB_STATE_CANCELLING" : 'JOB_STATE_CANCELLING' indicates that the job + /// - "JOB_STATE_CANCELLING" : `JOB_STATE_CANCELLING` indicates that the job /// has been explicitly cancelled /// and is in the process of stopping. Jobs that are cancelling may only - /// transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. + /// transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. + /// - "JOB_STATE_QUEUED" : `JOB_STATE_QUEUED` indicates that the job has been + /// created but is being + /// delayed until launch. Jobs that are queued may only transition to + /// `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. core.String requestedState; /// This field may be mutated by the Cloud Dataflow service; /// callers cannot mutate it. core.List<ExecutionStageState> stageStates; + /// The timestamp when the job was started (transitioned to + /// JOB_STATE_PENDING). + /// Flexible resource scheduling jobs are started with some delay after job + /// creation, so start_time is unset before start and is updated when the + /// job is started by the Cloud Dataflow service. For other jobs, start_time + /// always equals to create_time and is immutable and set by the Cloud + /// Dataflow + /// service. + core.String startTime; + + /// Exactly one of step or steps_location should be specified. + /// /// The top-level steps that constitute the entire job. core.List<Step> steps; + /// The GCS location where the steps are stored. + core.String stepsLocation; + /// A set of files the system should be aware of that are used /// for temporary storage. These temporary files will be /// removed on job completion. @@ -4764,6 +4962,9 @@ if (_json.containsKey("createTime")) { createTime = _json["createTime"]; } + if (_json.containsKey("createdFromSnapshotId")) { + createdFromSnapshotId = _json["createdFromSnapshotId"]; + } if (_json.containsKey("currentState")) { currentState = _json["currentState"]; } @@ -4813,11 +5014,17 @@ (value) => new ExecutionStageState.fromJson(value)) .toList(); } + if (_json.containsKey("startTime")) { + startTime = _json["startTime"]; + } if (_json.containsKey("steps")) { steps = (_json["steps"] as core.List) .map<Step>((value) => new Step.fromJson(value)) .toList(); } + if (_json.containsKey("stepsLocation")) { + stepsLocation = _json["stepsLocation"]; + } if (_json.containsKey("tempFiles")) { tempFiles = (_json["tempFiles"] as core.List).cast<core.String>(); } @@ -4839,6 +5046,9 @@ if (createTime != null) { _json["createTime"] = createTime; } + if (createdFromSnapshotId != null) { + _json["createdFromSnapshotId"] = createdFromSnapshotId; + } if (currentState != null) { _json["currentState"] = currentState; } @@ -4885,9 +5095,15 @@ _json["stageStates"] = stageStates.map((value) => (value).toJson()).toList(); } + if (startTime != null) { + _json["startTime"] = startTime; + } if (steps != null) { _json["steps"] = steps.map((value) => (value).toJson()).toList(); } + if (stepsLocation != null) { + _json["stepsLocation"] = stepsLocation; + } if (tempFiles != null) { _json["tempFiles"] = tempFiles; } @@ -5553,6 +5769,10 @@ /// Each instruction must appear in the list before any instructions which /// depends on its output. class MapTask { + /// Counter prefix that can be used to prefix counters. Not currently used in + /// Dataflow. + core.String counterPrefix; + /// The instructions in the MapTask. core.List<ParallelInstruction> instructions; @@ -5567,6 +5787,9 @@ MapTask(); MapTask.fromJson(core.Map _json) { + if (_json.containsKey("counterPrefix")) { + counterPrefix = _json["counterPrefix"]; + } if (_json.containsKey("instructions")) { instructions = (_json["instructions"] as core.List) .map<ParallelInstruction>( @@ -5584,6 +5807,9 @@ core.Map<core.String, core.Object> toJson() { final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>(); + if (counterPrefix != null) { + _json["counterPrefix"] = counterPrefix; + } if (instructions != null) { _json["instructions"] = instructions.map((value) => (value).toJson()).toList(); @@ -6765,6 +6991,9 @@ /// Additional experiment flags for the job. core.List<core.String> additionalExperiments; + /// Additional user labels attached to the job. + core.Map<core.String, core.String> additionalUserLabels; + /// Whether to bypass the safety checks for the job's temporary directory. /// Use with caution. core.bool bypassTempDirValidation; @@ -6781,6 +7010,9 @@ /// the service will use the network "default". core.String network; + /// The initial number of Google Compute Engine instnaces for the job. + core.int numWorkers; + /// The email address of the service account to run the job as. core.String serviceAccountEmail; @@ -6804,6 +7036,10 @@ additionalExperiments = (_json["additionalExperiments"] as core.List).cast<core.String>(); } + if (_json.containsKey("additionalUserLabels")) { + additionalUserLabels = (_json["additionalUserLabels"] as core.Map) + .cast<core.String, core.String>(); + } if (_json.containsKey("bypassTempDirValidation")) { bypassTempDirValidation = _json["bypassTempDirValidation"]; } @@ -6816,6 +7052,9 @@ if (_json.containsKey("network")) { network = _json["network"]; } + if (_json.containsKey("numWorkers")) { + numWorkers = _json["numWorkers"]; + } if (_json.containsKey("serviceAccountEmail")) { serviceAccountEmail = _json["serviceAccountEmail"]; } @@ -6836,6 +7075,9 @@ if (additionalExperiments != null) { _json["additionalExperiments"] = additionalExperiments; } + if (additionalUserLabels != null) { + _json["additionalUserLabels"] = additionalUserLabels; + } if (bypassTempDirValidation != null) { _json["bypassTempDirValidation"] = bypassTempDirValidation; } @@ -6848,6 +7090,9 @@ if (network != null) { _json["network"] = network; } + if (numWorkers != null) { + _json["numWorkers"] = numWorkers; + } if (serviceAccountEmail != null) { _json["serviceAccountEmail"] = serviceAccountEmail; } @@ -7272,6 +7517,97 @@ } } +/// Represents a snapshot of a job. +class Snapshot { + /// The time this snapshot was created. + core.String creationTime; + + /// The unique ID of this snapshot. + core.String id; + + /// The project this snapshot belongs to. + core.String projectId; + + /// The job this snapshot was created from. + core.String sourceJobId; + + /// The time after which this snapshot will be automatically deleted. + core.String ttl; + + Snapshot(); + + Snapshot.fromJson(core.Map _json) { + if (_json.containsKey("creationTime")) { + creationTime = _json["creationTime"]; + } + if (_json.containsKey("id")) { + id = _json["id"]; + } + if (_json.containsKey("projectId")) { + projectId = _json["projectId"]; + } + if (_json.containsKey("sourceJobId")) { + sourceJobId = _json["sourceJobId"]; + } + if (_json.containsKey("ttl")) { + ttl = _json["ttl"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (creationTime != null) { + _json["creationTime"] = creationTime; + } + if (id != null) { + _json["id"] = id; + } + if (projectId != null) { + _json["projectId"] = projectId; + } + if (sourceJobId != null) { + _json["sourceJobId"] = sourceJobId; + } + if (ttl != null) { + _json["ttl"] = ttl; + } + return _json; + } +} + +/// Request to create a snapshot of a job. +class SnapshotJobRequest { + /// The location that contains this job. + core.String location; + + /// TTL for the snapshot. + core.String ttl; + + SnapshotJobRequest(); + + SnapshotJobRequest.fromJson(core.Map _json) { + if (_json.containsKey("location")) { + location = _json["location"]; + } + if (_json.containsKey("ttl")) { + ttl = _json["ttl"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (location != null) { + _json["location"] = location; + } + if (ttl != null) { + _json["ttl"] = ttl; + } + return _json; + } +} + /// A source that records can be read and decoded from. class Source { /// While splitting, sources may specify the produced bundles @@ -8190,6 +8526,38 @@ } } +/// Streaming appliance snapshot configuration. +class StreamingApplianceSnapshotConfig { + /// Indicates which endpoint is used to import appliance state. + core.String importStateEndpoint; + + /// If set, indicates the snapshot id for the snapshot being performed. + core.String snapshotId; + + StreamingApplianceSnapshotConfig(); + + StreamingApplianceSnapshotConfig.fromJson(core.Map _json) { + if (_json.containsKey("importStateEndpoint")) { + importStateEndpoint = _json["importStateEndpoint"]; + } + if (_json.containsKey("snapshotId")) { + snapshotId = _json["snapshotId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (importStateEndpoint != null) { + _json["importStateEndpoint"] = importStateEndpoint; + } + if (snapshotId != null) { + _json["snapshotId"] = snapshotId; + } + return _json; + } +} + /// Configuration information for a single streaming computation. class StreamingComputationConfig { /// Unique identifier for this computation. @@ -8407,6 +8775,9 @@ /// other streaming computation workers. core.int receiveWorkPort; + /// Configures streaming appliance snapshot. + StreamingApplianceSnapshotConfig snapshotConfig; + /// The global topology of the streaming Dataflow job. TopologyConfig streamingComputationTopology; @@ -8423,6 +8794,10 @@ if (_json.containsKey("receiveWorkPort")) { receiveWorkPort = _json["receiveWorkPort"]; } + if (_json.containsKey("snapshotConfig")) { + snapshotConfig = new StreamingApplianceSnapshotConfig.fromJson( + _json["snapshotConfig"]); + } if (_json.containsKey("streamingComputationTopology")) { streamingComputationTopology = new TopologyConfig.fromJson(_json["streamingComputationTopology"]); @@ -8441,6 +8816,9 @@ if (receiveWorkPort != null) { _json["receiveWorkPort"] = receiveWorkPort; } + if (snapshotConfig != null) { + _json["snapshotConfig"] = (snapshotConfig).toJson(); + } if (streamingComputationTopology != null) { _json["streamingComputationTopology"] = (streamingComputationTopology).toJson();
diff --git a/generated/googleapis_beta/lib/dialogflow/v2beta1.dart b/generated/googleapis_beta/lib/dialogflow/v2beta1.dart index c0c8ffc..b590982 100644 --- a/generated/googleapis_beta/lib/dialogflow/v2beta1.dart +++ b/generated/googleapis_beta/lib/dialogflow/v2beta1.dart
@@ -16,13 +16,16 @@ const core.String USER_AGENT = 'dart-api-client dialogflow/v2beta1'; -/// An end-to-end development suite for conversational interfaces (e.g., -/// chatbots, voice-powered apps and devices). +/// Builds conversational interfaces (for example, chatbots, and voice-powered +/// apps and devices). class DialogflowApi { /// View and manage your data across Google Cloud Platform services static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"; + /// View, manage and query your Dialogflow agents + static const DialogflowScope = "https://www.googleapis.com/auth/dialogflow"; + final commons.ApiRequester _requester; ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); @@ -115,8 +118,7 @@ /// Exports the specified agent to a ZIP file. /// /// - /// Operation <response: ExportAgentResponse, - /// metadata: google.protobuf.Struct> + /// Operation <response: ExportAgentResponse> /// /// [request] - The metadata request object. /// @@ -179,8 +181,7 @@ /// versions from ImportAgentRequest. /// /// - /// Operation <response: google.protobuf.Empty, - /// metadata: google.protobuf.Struct> + /// Operation <response: google.protobuf.Empty> /// /// [request] - The metadata request object. /// @@ -242,8 +243,7 @@ /// entity types in the older version are deleted. /// /// - /// Operation <response: google.protobuf.Empty, - /// metadata: google.protobuf.Struct> + /// Operation <response: google.protobuf.Empty> /// /// [request] - The metadata request object. /// @@ -373,8 +373,7 @@ /// Trains the specified agent. /// /// - /// Operation <response: google.protobuf.Empty, - /// metadata: google.protobuf.Struct> + /// Operation <response: google.protobuf.Empty> /// /// [request] - The metadata request object. /// @@ -441,8 +440,7 @@ /// Deletes entity types in the specified agent. /// - /// Operation <response: google.protobuf.Empty, - /// metadata: google.protobuf.Struct> + /// Operation <response: google.protobuf.Empty> /// /// [request] - The metadata request object. /// @@ -500,8 +498,7 @@ /// Updates/Creates multiple entity types in the specified agent. /// - /// Operation <response: BatchUpdateEntityTypesResponse, - /// metadata: google.protobuf.Struct> + /// Operation <response: BatchUpdateEntityTypesResponse> /// /// [request] - The metadata request object. /// @@ -730,10 +727,6 @@ /// Format: `projects/<Project ID>/agent`. /// Value must have pattern "^projects/[^/]+/agent$". /// - /// [pageSize] - Optional. The maximum number of items to return in a single - /// page. By - /// default 100 and at most 1000. - /// /// [languageCode] - Optional. The language to list entity synonyms for. If /// not specified, /// the agent's default language is used. @@ -744,6 +737,10 @@ /// [pageToken] - Optional. The next_page_token value returned from a previous /// list request. /// + /// [pageSize] - Optional. The maximum number of items to return in a single + /// page. By + /// default 100 and at most 1000. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -756,9 +753,9 @@ /// this method will complete with the same error. async.Future<GoogleCloudDialogflowV2beta1ListEntityTypesResponse> list( core.String parent, - {core.int pageSize, - core.String languageCode, + {core.String languageCode, core.String pageToken, + core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -770,15 +767,15 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if (languageCode != null) { _queryParams["languageCode"] = [languageCode]; } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -803,11 +800,10 @@ /// /// Request parameters: /// - /// [name] - Required for all methods except `create` (`create` populates the - /// name - /// automatically. - /// The unique identifier of the entity type. Format: - /// `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. + /// [name] - The unique identifier of the entity type. + /// Required for EntityTypes.UpdateEntityType and + /// EntityTypes.BatchUpdateEntityTypes methods. + /// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. /// Value must have pattern "^projects/[^/]+/agent/entityTypes/[^/]+$". /// /// [languageCode] - Optional. The language of entity synonyms defined in @@ -874,8 +870,7 @@ ProjectsAgentEntityTypesEntitiesResourceApi(commons.ApiRequester client) : _requester = client; - /// Creates multiple new entities in the specified entity type (extends the - /// existing collection of entries). + /// Creates multiple new entities in the specified entity type. /// /// Operation <response: google.protobuf.Empty> /// @@ -935,8 +930,7 @@ /// Deletes entities in the specified entity type. /// - /// Operation <response: google.protobuf.Empty, - /// metadata: google.protobuf.Struct> + /// Operation <response: google.protobuf.Empty> /// /// [request] - The metadata request object. /// @@ -992,19 +986,19 @@ .then((data) => new GoogleLongrunningOperation.fromJson(data)); } - /// Updates entities in the specified entity type (replaces the existing - /// collection of entries). + /// Updates or creates multiple entities in the specified entity type. This + /// method does not affect entities in the entity type that aren't explicitly + /// specified in the request. /// - /// Operation <response: google.protobuf.Empty, - /// metadata: google.protobuf.Struct> + /// Operation <response: google.protobuf.Empty> /// /// [request] - The metadata request object. /// /// Request parameters: /// - /// [parent] - Required. The name of the entity type to update the entities - /// in. Format: - /// `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. + /// [parent] - Required. The name of the entity type to update or create + /// entities in. + /// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. /// Value must have pattern "^projects/[^/]+/agent/entityTypes/[^/]+$". /// /// [$fields] - Selector specifying which fields to include in a partial @@ -1216,6 +1210,8 @@ /// Creates a context. /// + /// If the specified context already exists, overrides the context. + /// /// [request] - The metadata request object. /// /// Request parameters: @@ -1454,10 +1450,13 @@ /// [name] - Required. The unique identifier of the context. Format: /// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, /// or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User - /// ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is - /// always converted to lowercase. If `Environment ID` is not specified, we - /// assume default 'draft' environment. If `User ID` is not specified, we - /// assume default '-' user. + /// ID>/sessions/<Session ID>/contexts/<Context ID>`. + /// + /// The `Context ID` is always converted to lowercase, may only contain + /// characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + /// + /// If `Environment ID` is not specified, we assume default 'draft' + /// environment. If `User ID` is not specified, we assume default '-' user. /// Value must have pattern /// "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$". /// @@ -1518,6 +1517,9 @@ /// Creates a session entity type. /// + /// If the specified session entity type already exists, overrides the + /// session entity type. + /// /// [request] - The metadata request object. /// /// Request parameters: @@ -1694,13 +1696,13 @@ /// Value must have pattern /// "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$". /// - /// [pageToken] - Optional. The next_page_token value returned from a previous - /// list request. - /// /// [pageSize] - Optional. The maximum number of items to return in a single /// page. By /// default 100 and at most 1000. /// + /// [pageToken] - Optional. The next_page_token value returned from a previous + /// list request. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1714,8 +1716,8 @@ /// this method will complete with the same error. async.Future<GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse> list( core.String parent, - {core.String pageToken, - core.int pageSize, + {core.int pageSize, + core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -1727,12 +1729,12 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1767,6 +1769,10 @@ /// ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. /// If `Environment ID` is not specified, we assume default 'draft' /// environment. If `User ID` is not specified, we assume default '-' user. + /// + /// `<Entity Type Display Name>` must be the display name of an existing + /// entity + /// type in the same agent that will be overridden or supplemented. /// Value must have pattern /// "^projects/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$". /// @@ -1949,6 +1955,12 @@ /// Format: `projects/<Project ID>/agent`. /// Value must have pattern "^projects/[^/]+/agent$". /// + /// [intentView] - Optional. The resource view to apply to the returned + /// intent. + /// Possible string values are: + /// - "INTENT_VIEW_UNSPECIFIED" : A INTENT_VIEW_UNSPECIFIED. + /// - "INTENT_VIEW_FULL" : A INTENT_VIEW_FULL. + /// /// [languageCode] - Optional. The language of training phrases, parameters /// and rich messages /// defined in `intent`. If not specified, the agent's default language is @@ -1956,12 +1968,6 @@ /// languages](https://dialogflow.com/docs/reference/language) are supported. /// Note: languages must be enabled in the agent, before they can be used. /// - /// [intentView] - Optional. The resource view to apply to the returned - /// intent. - /// Possible string values are: - /// - "INTENT_VIEW_UNSPECIFIED" : A INTENT_VIEW_UNSPECIFIED. - /// - "INTENT_VIEW_FULL" : A INTENT_VIEW_FULL. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1974,7 +1980,7 @@ /// this method will complete with the same error. async.Future<GoogleCloudDialogflowV2beta1Intent> create( GoogleCloudDialogflowV2beta1Intent request, core.String parent, - {core.String languageCode, core.String intentView, core.String $fields}) { + {core.String intentView, core.String languageCode, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -1988,12 +1994,12 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (languageCode != null) { - _queryParams["languageCode"] = [languageCode]; - } if (intentView != null) { _queryParams["intentView"] = [intentView]; } + if (languageCode != null) { + _queryParams["languageCode"] = [languageCode]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -2012,11 +2018,14 @@ .then((data) => new GoogleCloudDialogflowV2beta1Intent.fromJson(data)); } - /// Deletes the specified intent. + /// Deletes the specified intent and its direct or indirect followup intents. /// /// Request parameters: /// - /// [name] - Required. The name of the intent to delete. + /// [name] - Required. The name of the intent to delete. If this intent has + /// direct or + /// indirect followup intents, we also delete them. + /// /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. /// Value must have pattern "^projects/[^/]+/agent/intents/[^/]+$". /// @@ -2213,13 +2222,18 @@ /// /// Request parameters: /// - /// [name] - Required for all methods except `create` (`create` populates the - /// name - /// automatically. - /// The unique identifier of this intent. + /// [name] - The unique identifier of this intent. + /// Required for Intents.UpdateIntent and Intents.BatchUpdateIntents + /// methods. /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. /// Value must have pattern "^projects/[^/]+/agent/intents/[^/]+$". /// + /// [intentView] - Optional. The resource view to apply to the returned + /// intent. + /// Possible string values are: + /// - "INTENT_VIEW_UNSPECIFIED" : A INTENT_VIEW_UNSPECIFIED. + /// - "INTENT_VIEW_FULL" : A INTENT_VIEW_FULL. + /// /// [languageCode] - Optional. The language of training phrases, parameters /// and rich messages /// defined in `intent`. If not specified, the agent's default language is @@ -2229,12 +2243,6 @@ /// /// [updateMask] - Optional. The mask to control which fields get updated. /// - /// [intentView] - Optional. The resource view to apply to the returned - /// intent. - /// Possible string values are: - /// - "INTENT_VIEW_UNSPECIFIED" : A INTENT_VIEW_UNSPECIFIED. - /// - "INTENT_VIEW_FULL" : A INTENT_VIEW_FULL. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -2247,9 +2255,9 @@ /// this method will complete with the same error. async.Future<GoogleCloudDialogflowV2beta1Intent> patch( GoogleCloudDialogflowV2beta1Intent request, core.String name, - {core.String languageCode, + {core.String intentView, + core.String languageCode, core.String updateMask, - core.String intentView, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -2264,15 +2272,15 @@ if (name == null) { throw new core.ArgumentError("Parameter name is required."); } + if (intentView != null) { + _queryParams["intentView"] = [intentView]; + } if (languageCode != null) { _queryParams["languageCode"] = [languageCode]; } if (updateMask != null) { _queryParams["updateMask"] = [updateMask]; } - if (intentView != null) { - _queryParams["intentView"] = [intentView]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -2515,6 +2523,66 @@ new GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse.fromJson( data)); } + + /// Updates the specified knowledge base. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The knowledge base resource name. + /// The name must be empty when creating a knowledge base. + /// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. + /// Value must have pattern "^projects/[^/]+/agent/knowledgeBases/[^/]+$". + /// + /// [updateMask] - Optional. Not specified means `update all`. + /// Currently, only `display_name` can be updated, an InvalidArgument will be + /// returned for attempting to update other fields. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [GoogleCloudDialogflowV2beta1KnowledgeBase]. + /// + /// 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<GoogleCloudDialogflowV2beta1KnowledgeBase> patch( + GoogleCloudDialogflowV2beta1KnowledgeBase request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then( + (data) => new GoogleCloudDialogflowV2beta1KnowledgeBase.fromJson(data)); + } } class ProjectsAgentKnowledgeBasesDocumentsResourceApi { @@ -2742,6 +2810,131 @@ return _response.then((data) => new GoogleCloudDialogflowV2beta1ListDocumentsResponse.fromJson(data)); } + + /// Updates the specified document. + /// Operation <response: Document, + /// metadata: KnowledgeOperationMetadata> + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The document resource name. + /// The name must be empty when creating a document. + /// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base + /// ID>/documents/<Document ID>`. + /// Value must have pattern + /// "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$". + /// + /// [updateMask] - Optional. Not specified means `update all`. + /// Currently, only `display_name` can be updated, an InvalidArgument will be + /// returned for attempting to update other fields. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [GoogleLongrunningOperation]. + /// + /// 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<GoogleLongrunningOperation> patch( + GoogleCloudDialogflowV2beta1Document request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new GoogleLongrunningOperation.fromJson(data)); + } + + /// Reloads the specified document from its specified source, content_uri or + /// content. The previously loaded content of the document will be deleted. + /// Note: Even when the content of the document has not changed, there still + /// may be side effects because of internal implementation changes. + /// Operation <response: Document, + /// metadata: KnowledgeOperationMetadata> + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The name of the document to reload. + /// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base + /// ID>/documents/<Document ID>` + /// Value must have pattern + /// "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [GoogleLongrunningOperation]. + /// + /// 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<GoogleLongrunningOperation> reload( + GoogleCloudDialogflowV2beta1ReloadDocumentRequest request, + core.String name, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = + 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':reload'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new GoogleLongrunningOperation.fromJson(data)); + } } class ProjectsAgentSessionsResourceApi { @@ -2882,6 +3075,8 @@ /// Creates a context. /// + /// If the specified context already exists, overrides the context. + /// /// [request] - The metadata request object. /// /// Request parameters: @@ -3053,13 +3248,13 @@ /// default '-' user. /// Value must have pattern "^projects/[^/]+/agent/sessions/[^/]+$". /// + /// [pageToken] - Optional. The next_page_token value returned from a previous + /// list request. + /// /// [pageSize] - Optional. The maximum number of items to return in a single /// page. By /// default 100 and at most 1000. /// - /// [pageToken] - Optional. The next_page_token value returned from a previous - /// list request. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -3072,8 +3267,8 @@ /// this method will complete with the same error. async.Future<GoogleCloudDialogflowV2beta1ListContextsResponse> list( core.String parent, - {core.int pageSize, - core.String pageToken, + {core.String pageToken, + core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -3085,12 +3280,12 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -3118,10 +3313,13 @@ /// [name] - Required. The unique identifier of the context. Format: /// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, /// or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User - /// ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is - /// always converted to lowercase. If `Environment ID` is not specified, we - /// assume default 'draft' environment. If `User ID` is not specified, we - /// assume default '-' user. + /// ID>/sessions/<Session ID>/contexts/<Context ID>`. + /// + /// The `Context ID` is always converted to lowercase, may only contain + /// characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + /// + /// If `Environment ID` is not specified, we assume default 'draft' + /// environment. If `User ID` is not specified, we assume default '-' user. /// Value must have pattern /// "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$". /// @@ -3181,6 +3379,9 @@ /// Creates a session entity type. /// + /// If the specified session entity type already exists, overrides the + /// session entity type. + /// /// [request] - The metadata request object. /// /// Request parameters: @@ -3428,6 +3629,10 @@ /// ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. /// If `Environment ID` is not specified, we assume default 'draft' /// environment. If `User ID` is not specified, we assume default '-' user. + /// + /// `<Entity Type Display Name>` must be the display name of an existing + /// entity + /// type in the same agent that will be overridden or supplemented. /// Value must have pattern /// "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$". /// @@ -3704,6 +3909,66 @@ new GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse.fromJson( data)); } + + /// Updates the specified knowledge base. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The knowledge base resource name. + /// The name must be empty when creating a knowledge base. + /// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. + /// Value must have pattern "^projects/[^/]+/knowledgeBases/[^/]+$". + /// + /// [updateMask] - Optional. Not specified means `update all`. + /// Currently, only `display_name` can be updated, an InvalidArgument will be + /// returned for attempting to update other fields. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [GoogleCloudDialogflowV2beta1KnowledgeBase]. + /// + /// 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<GoogleCloudDialogflowV2beta1KnowledgeBase> patch( + GoogleCloudDialogflowV2beta1KnowledgeBase request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then( + (data) => new GoogleCloudDialogflowV2beta1KnowledgeBase.fromJson(data)); + } } class ProjectsKnowledgeBasesDocumentsResourceApi { @@ -3876,13 +4141,13 @@ /// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. /// Value must have pattern "^projects/[^/]+/knowledgeBases/[^/]+$". /// - /// [pageToken] - Optional. The next_page_token value returned from a previous - /// list request. - /// /// [pageSize] - Optional. The maximum number of items to return in a single /// page. By /// default 10 and at most 100. /// + /// [pageToken] - Optional. The next_page_token value returned from a previous + /// list request. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -3895,8 +4160,8 @@ /// this method will complete with the same error. async.Future<GoogleCloudDialogflowV2beta1ListDocumentsResponse> list( core.String parent, - {core.String pageToken, - core.int pageSize, + {core.int pageSize, + core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -3908,12 +4173,12 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -3931,6 +4196,131 @@ return _response.then((data) => new GoogleCloudDialogflowV2beta1ListDocumentsResponse.fromJson(data)); } + + /// Updates the specified document. + /// Operation <response: Document, + /// metadata: KnowledgeOperationMetadata> + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The document resource name. + /// The name must be empty when creating a document. + /// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base + /// ID>/documents/<Document ID>`. + /// Value must have pattern + /// "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$". + /// + /// [updateMask] - Optional. Not specified means `update all`. + /// Currently, only `display_name` can be updated, an InvalidArgument will be + /// returned for attempting to update other fields. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [GoogleLongrunningOperation]. + /// + /// 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<GoogleLongrunningOperation> patch( + GoogleCloudDialogflowV2beta1Document request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new GoogleLongrunningOperation.fromJson(data)); + } + + /// Reloads the specified document from its specified source, content_uri or + /// content. The previously loaded content of the document will be deleted. + /// Note: Even when the content of the document has not changed, there still + /// may be side effects because of internal implementation changes. + /// Operation <response: Document, + /// metadata: KnowledgeOperationMetadata> + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The name of the document to reload. + /// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base + /// ID>/documents/<Document ID>` + /// Value must have pattern + /// "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [GoogleLongrunningOperation]. + /// + /// 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<GoogleLongrunningOperation> reload( + GoogleCloudDialogflowV2beta1ReloadDocumentRequest request, + core.String name, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = + 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':reload'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new GoogleLongrunningOperation.fromJson(data)); + } } class ProjectsOperationsResourceApi { @@ -4045,12 +4435,15 @@ class GoogleCloudDialogflowV2Context { /// Optional. The number of conversational query requests after which the /// context expires. If set to `0` (the default) the context expires - /// immediately. Contexts expire automatically after 10 minutes even if there + /// immediately. Contexts expire automatically after 20 minutes even if there /// are no matching queries. core.int lifespanCount; /// Required. The unique identifier of the context. Format: /// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`. + /// + /// The `Context ID` is always converted to lowercase, may only contain + /// characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. core.String name; /// Optional. The collection of parameters associated with this context. @@ -4107,7 +4500,7 @@ /// listed in the entity. core.String autoExpansionMode; - /// Required. The name of the entity. + /// Required. The name of the entity type. core.String displayName; /// Optional. The collection of entities associated with the entity type. @@ -4125,10 +4518,10 @@ /// types (with or without aliases). core.String kind; - /// Required for all methods except `create` (`create` populates the name - /// automatically. - /// The unique identifier of the entity type. Format: - /// `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. + /// The unique identifier of the entity type. + /// Required for EntityTypes.UpdateEntityType and + /// EntityTypes.BatchUpdateEntityTypes methods. + /// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. core.String name; GoogleCloudDialogflowV2EntityType(); @@ -4340,8 +4733,8 @@ /// be present in the active user session for an event to trigger this intent. core.List<core.String> events; - /// Optional. Collection of information about all followup intents that have - /// name of this intent as a root_name. + /// Read-only. Information about all followup intents that have this intent as + /// a direct or indirect parent. We populate this field only in the output. core.List<GoogleCloudDialogflowV2IntentFollowupIntentInfo> followupIntentInfo; /// Optional. The list of context names required for this intent to be @@ -4362,9 +4755,9 @@ /// auto-markup in the UI is turned off. core.bool mlDisabled; - /// Required for all methods except `create` (`create` populates the name - /// automatically. /// The unique identifier of this intent. + /// Required for Intents.UpdateIntent and Intents.BatchUpdateIntents + /// methods. /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String name; @@ -4378,26 +4771,35 @@ /// Optional. The collection of parameters associated with the intent. core.List<GoogleCloudDialogflowV2IntentParameter> parameters; - /// The unique identifier of the parent intent in the chain of followup - /// intents. + /// Read-only after creation. The unique identifier of the parent intent in + /// the + /// chain of followup intents. You can set this field when creating an intent, + /// for example with CreateIntent or BatchUpdateIntents, in order to + /// make this intent a followup intent. + /// /// It identifies the parent followup intent. /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String parentFollowupIntentName; /// Optional. The priority of this intent. Higher numbers represent higher - /// priorities. Zero or negative numbers mean that the intent is disabled. + /// priorities. If this is zero or unspecified, we use the default + /// priority 500000. + /// + /// Negative numbers mean that the intent is disabled. core.int priority; /// Optional. Indicates whether to delete all contexts in the current /// session when this intent is matched. core.bool resetContexts; - /// The unique identifier of the root intent in the chain of followup intents. - /// It identifies the correct followup intents chain for this intent. + /// Read-only. The unique identifier of the root intent in the chain of + /// followup intents. It identifies the correct followup intents chain for + /// this intent. We populate this field only in the output. + /// /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String rootFollowupIntentName; - /// Optional. The collection of examples/templates that the agent is + /// Optional. The collection of examples that the agent is /// trained on. core.List<GoogleCloudDialogflowV2IntentTrainingPhrase> trainingPhrases; @@ -4560,7 +4962,7 @@ /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String followupIntentName; - /// The unique identifier of the followup intent parent. + /// The unique identifier of the followup intent's parent. /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String parentFollowupIntentName; @@ -5563,7 +5965,7 @@ } } -/// Represents an example or template that the agent is trained on. +/// Represents an example that the agent is trained on. class GoogleCloudDialogflowV2IntentTrainingPhrase { /// Output only. The unique identifier of this training phrase. core.String name; @@ -5573,7 +5975,7 @@ /// only for the annotated parts of the training phrase. core.List<GoogleCloudDialogflowV2IntentTrainingPhrasePart> parts; - /// Optional. Indicates how many times this example or template was added to + /// Optional. Indicates how many times this example was added to /// the intent. Each time a developer adds an existing sample by editing an /// intent or training, this counter is increased. core.int timesAddedCount; @@ -5587,6 +5989,10 @@ /// - "TEMPLATE" : Templates are not annotated with entity types, but they can /// contain /// @-prefixed entity type names as substrings. + /// Template mode has been deprecated. Example mode is the only supported + /// way to create new training phrases. If you have existing training + /// phrases that you've created in template mode, those will continue to + /// work. core.String type; GoogleCloudDialogflowV2IntentTrainingPhrase(); @@ -5640,7 +6046,7 @@ /// examples. core.String entityType; - /// Required. The text corresponding to the example or template, + /// Required. The text corresponding to the example, /// if there are no annotations. For /// annotated examples, it is the text for one of the example's parts. core.String text; @@ -5757,8 +6163,10 @@ /// matched intent doesn't contain any required parameters. core.bool allRequiredParamsPresent; - /// The free-form diagnostic info. For example, this field - /// could contain webhook call latency. + /// The free-form diagnostic info. For example, this field could contain + /// webhook call latency. The string keys of the Struct's fields map can + /// change + /// without notice. /// /// The values for Object must be JSON objects. It can consist of `num`, /// `String`, `bool` and `null` as well as `Map` and `List` values. @@ -5768,6 +6176,7 @@ core.List<GoogleCloudDialogflowV2IntentMessage> fulfillmentMessages; /// The text to be pronounced to the user or shown on the screen. + /// Note: This is a legacy field, `fulfillment_messages` should be preferred. core.String fulfillmentText; /// The intent that matched the conversational query. Some, not @@ -5954,7 +6363,9 @@ /// The unique identifier of detectIntent request session. /// Can be used to identify end-user inside webhook implementation. - /// Format: `projects/<Project ID>/agent/sessions/<Session ID>`. + /// Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or + /// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User + /// ID>/sessions/<Session ID>`. core.String session; GoogleCloudDialogflowV2WebhookRequest(); @@ -6240,7 +6651,7 @@ /// The request message for EntityTypes.BatchCreateEntities. class GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest { - /// Required. The collection of entities to create. + /// Required. The entities to create. core.List<GoogleCloudDialogflowV2beta1EntityTypeEntity> entities; /// Optional. The language of entity synonyms defined in `entities`. If not @@ -6371,9 +6782,9 @@ } } -/// The response message for EntityTypes.BatchCreateEntities. +/// The request message for EntityTypes.BatchUpdateEntities. class GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest { - /// Required. The collection of new entities to replace the existing entities. + /// Required. The entities to update or create. core.List<GoogleCloudDialogflowV2beta1EntityTypeEntity> entities; /// Optional. The language of entity synonyms defined in `entities`. If not @@ -6422,7 +6833,7 @@ /// The request message for EntityTypes.BatchUpdateEntityTypes. class GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest { - /// The collection of entity type to update or create. + /// The collection of entity types to update or create. GoogleCloudDialogflowV2beta1EntityTypeBatch entityTypeBatchInline; /// The URI to a Google Cloud Storage file containing entity types to update @@ -6618,10 +7029,13 @@ /// Required. The unique identifier of the context. Format: /// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, /// or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User - /// ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is - /// always converted to lowercase. If `Environment ID` is not specified, we - /// assume default 'draft' environment. If `User ID` is not specified, we - /// assume default '-' user. + /// ID>/sessions/<Session ID>/contexts/<Context ID>`. + /// + /// The `Context ID` is always converted to lowercase, may only contain + /// characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + /// + /// If `Environment ID` is not specified, we assume default 'draft' + /// environment. If `User ID` is not specified, we assume default '-' user. core.String name; /// Optional. The collection of parameters associated with this context. @@ -6750,6 +7164,12 @@ core.List<GoogleCloudDialogflowV2beta1QueryResult> alternativeQueryResults; /// The audio data bytes encoded as specified in the request. + /// Note: The output audio is generated based on the values of default + /// platform + /// text responses found in the `query_result.fulfillment_messages` field. If + /// multiple default text responses exist, they will be concatenated when + /// generating audio. If no default platform text responses exist, the + /// generated audio content will be empty. core.String outputAudio; core.List<core.int> get outputAudioAsBytes { return convert.base64.decode(outputAudio); @@ -6773,8 +7193,7 @@ /// locate a response in the training example set or for reporting issues. core.String responseId; - /// Specifies the status of the webhook request. `webhook_status` - /// is never populated in webhook requests. + /// Specifies the status of the webhook request. GoogleRpcStatus webhookStatus; GoogleCloudDialogflowV2beta1DetectIntentResponse(); @@ -6833,6 +7252,9 @@ } /// A document resource. +/// +/// Note: resource `projects.agent.knowledgeBases.documents` is deprecated, +/// please use `projects.knowledgeBases.documents` instead. class GoogleCloudDialogflowV2beta1Document { /// The raw content of the document. This field is only permitted for /// EXTRACTIVE_QA and FAQ knowledge types. @@ -6948,7 +7370,7 @@ /// listed in the entity. core.String autoExpansionMode; - /// Required. The name of the entity. + /// Required. The name of the entity type. core.String displayName; /// Optional. The collection of entities associated with the entity type. @@ -6966,10 +7388,10 @@ /// types (with or without aliases). core.String kind; - /// Required for all methods except `create` (`create` populates the name - /// automatically. - /// The unique identifier of the entity type. Format: - /// `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. + /// The unique identifier of the entity type. + /// Required for EntityTypes.UpdateEntityType and + /// EntityTypes.BatchUpdateEntityTypes methods. + /// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. core.String name; GoogleCloudDialogflowV2beta1EntityType(); @@ -7410,8 +7832,8 @@ /// be present in the active user session for an event to trigger this intent. core.List<core.String> events; - /// Optional. Collection of information about all followup intents that have - /// name of this intent as a root_name. + /// Read-only. Information about all followup intents that have this intent as + /// a direct or indirect parent. We populate this field only in the output. core.List<GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo> followupIntentInfo; @@ -7446,9 +7868,9 @@ /// ml_enabled = true / ml_disabled = false. core.bool mlEnabled; - /// Required for all methods except `create` (`create` populates the name - /// automatically. /// The unique identifier of this intent. + /// Required for Intents.UpdateIntent and Intents.BatchUpdateIntents + /// methods. /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String name; @@ -7462,26 +7884,35 @@ /// Optional. The collection of parameters associated with the intent. core.List<GoogleCloudDialogflowV2beta1IntentParameter> parameters; - /// The unique identifier of the parent intent in the chain of followup - /// intents. + /// Read-only after creation. The unique identifier of the parent intent in + /// the + /// chain of followup intents. You can set this field when creating an intent, + /// for example with CreateIntent or BatchUpdateIntents, in order to + /// make this intent a followup intent. + /// /// It identifies the parent followup intent. /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String parentFollowupIntentName; /// Optional. The priority of this intent. Higher numbers represent higher - /// priorities. Zero or negative numbers mean that the intent is disabled. + /// priorities. If this is zero or unspecified, we use the default + /// priority 500000. + /// + /// Negative numbers mean that the intent is disabled. core.int priority; /// Optional. Indicates whether to delete all contexts in the current /// session when this intent is matched. core.bool resetContexts; - /// The unique identifier of the root intent in the chain of followup intents. - /// It identifies the correct followup intents chain for this intent. + /// Read-only. The unique identifier of the root intent in the chain of + /// followup intents. It identifies the correct followup intents chain for + /// this intent. We populate this field only in the output. + /// /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String rootFollowupIntentName; - /// Optional. The collection of examples/templates that the agent is + /// Optional. The collection of examples that the agent is /// trained on. core.List<GoogleCloudDialogflowV2beta1IntentTrainingPhrase> trainingPhrases; @@ -7683,7 +8114,7 @@ /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String followupIntentName; - /// The unique identifier of the followup intent parent. + /// The unique identifier of the followup intent's parent. /// Format: `projects/<Project ID>/agent/intents/<Intent ID>`. core.String parentFollowupIntentName; @@ -8842,7 +9273,7 @@ } } -/// Represents an example or template that the agent is trained on. +/// Represents an example that the agent is trained on. class GoogleCloudDialogflowV2beta1IntentTrainingPhrase { /// Output only. The unique identifier of this training phrase. core.String name; @@ -8852,7 +9283,7 @@ /// only for the annotated parts of the training phrase. core.List<GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart> parts; - /// Optional. Indicates how many times this example or template was added to + /// Optional. Indicates how many times this example was added to /// the intent. Each time a developer adds an existing sample by editing an /// intent or training, this counter is increased. core.int timesAddedCount; @@ -8866,6 +9297,10 @@ /// - "TEMPLATE" : Templates are not annotated with entity types, but they can /// contain /// @-prefixed entity type names as substrings. + /// Template mode has been deprecated. Example mode is the only supported + /// way to create new training phrases. If you have existing training + /// phrases that you've created in template mode, those will continue to + /// work. core.String type; GoogleCloudDialogflowV2beta1IntentTrainingPhrase(); @@ -8919,7 +9354,7 @@ /// examples. core.String entityType; - /// Required. The text corresponding to the example or template, + /// Required. The text corresponding to the example, /// if there are no annotations. For /// annotated examples, it is the text for one of the example's parts. core.String text; @@ -9003,11 +9438,11 @@ core.String faqQuestion; /// The system's confidence score that this Knowledge answer is a good match - /// for this converstational query, range from 0.0 (completely uncertain) - /// to 1.0 (completely certain). + /// for this conversational query. + /// The range is from 0.0 (completely uncertain) to 1.0 (completely certain). /// Note: The confidence score is likely to vary somewhat (possibly even for /// identical requests), as the underlying model is under constant - /// improvement, we may deprecate it in the future. We recommend using + /// improvement. It may be deprecated in the future. We recommend using /// `match_confidence_level` which should be generally more stable. core.double matchConfidence; @@ -9073,6 +9508,9 @@ } /// Represents knowledge base resource. +/// +/// Note: resource `projects.agent.knowledgeBases` is deprecated, please use +/// `projects.knowledgeBases` instead. class GoogleCloudDialogflowV2beta1KnowledgeBase { /// Required. The display name of the knowledge base. The name must be 1024 /// bytes or less; otherwise, the creation request fails. @@ -9542,10 +9980,6 @@ /// Optional. KnowledgeBases to get alternative results from. If not set, the /// KnowledgeBases enabled in the agent (through UI) will be used. /// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. - /// - /// Note: This field is `repeated` for forward compatibility, currently only - /// the first one is supported, we may return an error if multiple - /// KnowledgeBases are specified. core.List<core.String> knowledgeBaseNames; /// Optional. This field can be used to pass custom data into the webhook @@ -9567,9 +10001,9 @@ GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig sentimentAnalysisRequestConfig; - /// Optional. The collection of session entity types to replace or extend - /// developer entities with for this query only. The entity synonyms apply - /// to all languages. + /// Optional. Additional session entity types to replace or extend developer + /// entity types with. The entity synonyms apply to all languages and persist + /// for the session of this query. core.List<GoogleCloudDialogflowV2beta1SessionEntityType> sessionEntityTypes; /// Optional. The time zone of this conversational query from the @@ -9662,8 +10096,10 @@ /// matched intent doesn't contain any required parameters. core.bool allRequiredParamsPresent; - /// The free-form diagnostic info. For example, this field - /// could contain webhook call latency. + /// The free-form diagnostic info. For example, this field could contain + /// webhook call latency. The string keys of the Struct's fields map can + /// change + /// without notice. /// /// The values for Object must be JSON objects. It can consist of `num`, /// `String`, `bool` and `null` as well as `Map` and `List` values. @@ -9673,6 +10109,7 @@ core.List<GoogleCloudDialogflowV2beta1IntentMessage> fulfillmentMessages; /// The text to be pronounced to the user or shown on the screen. + /// Note: This is a legacy field, `fulfillment_messages` should be preferred. core.String fulfillmentText; /// The intent that matched the conversational query. Some, not @@ -9866,6 +10303,19 @@ } } +/// Request message for Documents.ReloadDocument. +class GoogleCloudDialogflowV2beta1ReloadDocumentRequest { + GoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + + GoogleCloudDialogflowV2beta1ReloadDocumentRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + /// The request message for Agents.RestoreAgent. class GoogleCloudDialogflowV2beta1RestoreAgentRequest { /// The agent to restore. @@ -10067,10 +10517,13 @@ /// - "ENTITY_OVERRIDE_MODE_SUPPLEMENT" : The collection of session entities /// extends the collection of entities in /// the corresponding developer entity type. - /// Calls to `ListSessionEntityTypes`, `GetSessionEntityType`, - /// `CreateSessionEntityType` and `UpdateSessionEntityType` return the full - /// collection of entities from the developer entity type in the agent's - /// default language and the session entity type. + /// + /// Note: Even in this override mode calls to `ListSessionEntityTypes`, + /// `GetSessionEntityType`, `CreateSessionEntityType` and + /// `UpdateSessionEntityType` only return the additional entities added in + /// this session entity type. If you want to get the supplemented list, + /// please call EntityTypes.GetEntityType on the developer entity type + /// and merge. core.String entityOverrideMode; /// Required. The unique identifier of this session entity type. Format: @@ -10081,6 +10534,10 @@ /// ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. /// If `Environment ID` is not specified, we assume default 'draft' /// environment. If `User ID` is not specified, we assume default '-' user. + /// + /// `<Entity Type Display Name>` must be the display name of an existing + /// entity + /// type in the same agent that will be overridden or supplemented. core.String name; GoogleCloudDialogflowV2beta1SessionEntityType(); @@ -10204,7 +10661,7 @@ core.String languageCode; /// Required. The UTF-8 encoded natural language text to be processed. - /// Text length must not exceed 256 bytes. + /// Text length must not exceed 256 characters. core.String text; GoogleCloudDialogflowV2beta1TextInput(); @@ -10309,7 +10766,9 @@ /// The unique identifier of detectIntent request session. /// Can be used to identify end-user inside webhook implementation. - /// Format: `projects/<Project ID>/agent/sessions/<Session ID>`. + /// Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or + /// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User + /// ID>/sessions/<Session ID>`. core.String session; GoogleCloudDialogflowV2beta1WebhookRequest();
diff --git a/generated/googleapis_beta/lib/dns/v2beta1.dart b/generated/googleapis_beta/lib/dns/v2beta1.dart index 3ec1b46..b35ad2d 100644 --- a/generated/googleapis_beta/lib/dns/v2beta1.dart +++ b/generated/googleapis_beta/lib/dns/v2beta1.dart
@@ -1091,7 +1091,13 @@ } } -/// An atomic update to a collection of ResourceRecordSets. +/// A Change represents a set of ResourceRecordSet additions and deletions +/// applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone +/// are modified by creating a new Change element in the Changes collection. In +/// turn the Changes collection also records the past modifications to the +/// ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is +/// the sum effect of applying all Change elements in the Changes collection in +/// sequence. class Change { /// Which ResourceRecordSets to add? core.List<ResourceRecordSet> additions; @@ -1113,7 +1119,9 @@ /// is in RFC3339 text format. core.String startTime; - /// Status of the operation (output only). + /// Status of the operation (output only). A status of "done" means that the + /// request to update the authoritative servers has been sent, but the servers + /// might not be updated yet. /// Possible string values are: /// - "DONE" /// - "PENDING" @@ -1431,11 +1439,11 @@ /// Length of the keys in bits. core.int keyLength; - /// One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type KEY_SIGNING have the - /// Secure Entry Point flag set and, when active, will be used to sign only - /// resource record sets of type DNSKEY. Otherwise, the Secure Entry Point - /// flag will be cleared and this key will be used to sign only resource - /// record sets of other types. + /// Specifies whether this is a key signing key (KSK) or a zone signing key + /// (ZSK). Key signing keys have the Secure Entry Point flag set and, when + /// active, will only be used to sign resource record sets of type DNSKEY. + /// Zone signing keys do not have the Secure Entry Point flag set and will be + /// used to sign all other types of resource record sets. /// Possible string values are: /// - "KEY_SIGNING" /// - "ZONE_SIGNING" @@ -1860,7 +1868,9 @@ core.String startTime; /// Status of the operation. Can be one of the following: "PENDING" or "DONE" - /// (output only). + /// (output only). A status of "DONE" means that the request to update the + /// authoritative servers has been sent, but the servers might not be updated + /// yet. /// Possible string values are: /// - "DONE" /// - "PENDING" @@ -2176,8 +2186,8 @@ /// Number of seconds that this ResourceRecordSet can be cached by resolvers. core.int ttl; - /// The identifier of a supported record type, for example, A, AAAA, MX, TXT, - /// and so on. + /// The identifier of a supported record type. See the list of Supported DNS + /// record types. core.String type; ResourceRecordSet();
diff --git a/generated/googleapis_beta/lib/redis/v1beta1.dart b/generated/googleapis_beta/lib/file/v1beta1.dart similarity index 72% rename from generated/googleapis_beta/lib/redis/v1beta1.dart rename to generated/googleapis_beta/lib/file/v1beta1.dart index ab367cc..4f41b6c 100644 --- a/generated/googleapis_beta/lib/redis/v1beta1.dart +++ b/generated/googleapis_beta/lib/file/v1beta1.dart
@@ -2,7 +2,7 @@ // ignore_for_file: unnecessary_cast -library googleapis_beta.redis.v1beta1; +library googleapis_beta.file.v1beta1; import 'dart:core' as core; import 'dart:async' as async; @@ -14,11 +14,11 @@ export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show ApiRequestError, DetailedApiRequestError; -const core.String USER_AGENT = 'dart-api-client redis/v1beta1'; +const core.String USER_AGENT = 'dart-api-client file/v1beta1'; -/// The Google Cloud Memorystore for Redis API is used for creating and managing -/// Redis instances on the Google Cloud Platform. -class RedisApi { +/// The Cloud Filestore API is used for creating and managing cloud file +/// servers. +class FileApi { /// View and manage your data across Google Cloud Platform services static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"; @@ -27,8 +27,8 @@ ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); - RedisApi(http.Client client, - {core.String rootUrl: "https://redis.googleapis.com/", + FileApi(http.Client client, + {core.String rootUrl: "https://file.googleapis.com/", core.String servicePath: ""}) : _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); @@ -104,12 +104,12 @@ /// [name] - The resource that owns the locations collection, if applicable. /// Value must have pattern "^projects/[^/]+$". /// + /// [pageToken] - The standard list page token. + /// /// [pageSize] - The standard list page size. /// /// [filter] - The standard list filter. /// - /// [pageToken] - The standard list page token. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -121,9 +121,9 @@ /// 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.int pageSize, + {core.String pageToken, + core.int pageSize, core.String filter, - core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -135,15 +135,15 @@ if (name == null) { throw new core.ArgumentError("Parameter name is required."); } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } if (filter != null) { _queryParams["filter"] = [filter]; } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -168,39 +168,19 @@ ProjectsLocationsInstancesResourceApi(commons.ApiRequester client) : _requester = client; - /// Creates a Redis instance based on the specified tier and memory size. - /// - /// By default, the instance is accessible from the project's - /// [default network](/compute/docs/networks-and-firewalls#networks). - /// - /// The creation is executed asynchronously and callers may check the returned - /// operation to track its progress. Once the operation is completed the Redis - /// instance will be fully functional. Completed longrunning.Operation will - /// contain the new instance object in the response field. - /// - /// The returned operation is automatically deleted after a few hours, so - /// there - /// is no need to call DeleteOperation. + /// Creates an instance. /// /// [request] - The metadata request object. /// /// Request parameters: /// - /// [parent] - Required. The resource name of the instance location using the - /// form: - /// `projects/{project_id}/locations/{location_id}` - /// where `location_id` refers to a GCP region + /// [parent] - The instance's project and location, in the format + /// projects/{project_id}/locations/{location}. In Cloud Filestore, + /// locations map to GCP zones, for example **us-west1-b**. /// Value must have pattern "^projects/[^/]+/locations/[^/]+$". /// - /// [instanceId] - Required. The logical name of the Redis instance in the - /// customer project - /// with the following restrictions: - /// - /// * Must contain only lowercase letters, numbers, and hyphens. - /// * Must start with a letter. - /// * Must be between 1-40 characters. - /// * Must end with a number or a letter. - /// * Must be unique within the customer project / location + /// [instanceId] - The name of the instance to create. + /// The name must be unique for the specified project and location. /// /// [$fields] - Selector specifying which fields to include in a partial /// response. @@ -247,14 +227,12 @@ return _response.then((data) => new Operation.fromJson(data)); } - /// Deletes a specific Redis instance. Instance stops serving and data is - /// deleted. + /// Deletes an instance. /// /// Request parameters: /// - /// [name] - Required. Redis instance resource name using the form: - /// `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - /// where `location_id` refers to a GCP region + /// [name] - The instance resource name, in the format + /// projects/{project_id}/locations/{location}/instances/{instance_id} /// Value must have pattern /// "^projects/[^/]+/locations/[^/]+/instances/[^/]+$". /// @@ -294,13 +272,12 @@ return _response.then((data) => new Operation.fromJson(data)); } - /// Gets the details of a specific Redis instance. + /// Gets the details of a specific instance. /// /// Request parameters: /// - /// [name] - Required. Redis instance resource name using the form: - /// `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - /// where `location_id` refers to a GCP region + /// [name] - The instance resource name, in the format + /// projects/{project_id}/locations/{location}/instances/{instance_id}. /// Value must have pattern /// "^projects/[^/]+/locations/[^/]+/instances/[^/]+$". /// @@ -340,35 +317,30 @@ return _response.then((data) => new Instance.fromJson(data)); } - /// Lists all Redis instances owned by a project in either the specified - /// location (region) or all locations. - /// - /// The location should have the following format: - /// * `projects/{project_id}/locations/{location_id}` - /// - /// If `location_id` is specified as `-` (wildcard), then all regions - /// available to the project are queried, and the results are aggregated. + /// Lists all instances in a project for either a specified location + /// or for all locations. /// /// Request parameters: /// - /// [parent] - Required. The resource name of the instance location using the - /// form: - /// `projects/{project_id}/locations/{location_id}` - /// where `location_id` refers to a GCP region + /// [parent] - The project and location for which to retrieve instance + /// information, + /// in the format projects/{project_id}/locations/{location}. In Cloud + /// Filestore, locations map to GCP zones, for example **us-west1-b**. To + /// retrieve instance information for all locations, use "-" for the + /// {location} + /// value. /// Value must have pattern "^projects/[^/]+/locations/[^/]+$". /// - /// [pageToken] - The next_page_token value returned from a previous List - /// request, - /// if any. + /// [filter] - List filter. + /// + /// [pageToken] - The next_page_token value to use if there are additional + /// results to retrieve for this list request. + /// + /// [orderBy] - Sort results. Supported values are "name", "name desc" or "" + /// (unsorted). /// /// [pageSize] - The maximum number of items to return. /// - /// If not specified, a default value of 1000 will be used by the service. - /// Regardless of the page_size value, the response may include a partial list - /// and a caller should only rely on response's - /// next_page_token - /// to determine if there are more instances left to be queried. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -380,7 +352,11 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListInstancesResponse> list(core.String parent, - {core.String pageToken, core.int pageSize, core.String $fields}) { + {core.String filter, + core.String pageToken, + core.String orderBy, + core.int pageSize, + core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -391,9 +367,15 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } + if (filter != null) { + _queryParams["filter"] = [filter]; + } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (orderBy != null) { + _queryParams["orderBy"] = [orderBy]; + } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } @@ -414,40 +396,23 @@ return _response.then((data) => new ListInstancesResponse.fromJson(data)); } - /// Updates the metadata and configuration of a specific Redis instance. - /// - /// Completed longrunning.Operation will contain the new instance object - /// in the response field. The returned operation is automatically deleted - /// after a few hours, so there is no need to call DeleteOperation. + /// Updates the settings of a specific instance. /// /// [request] - The metadata request object. /// /// Request parameters: /// - /// [name] - Required. Unique name of the resource in this scope including - /// project and - /// location using the form: - /// `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - /// - /// Note: Redis instances are managed and addressed at regional level so - /// location_id here refers to a GCP region; however, users may choose which - /// specific zone (or collection of zones for cross-zone instances) an - /// instance - /// should be provisioned in. Refer to [location_id] and - /// [alternative_location_id] fields for more details. + /// [name] - Output only. + /// The resource name of the instance, in the format + /// projects/{project_id}/locations/{location_id}/instances/{instance_id}. /// Value must have pattern /// "^projects/[^/]+/locations/[^/]+/instances/[^/]+$". /// - /// [updateMask] - Required. Mask of fields to update. At least one path must - /// be supplied in - /// this field. The elements of the repeated paths field may only include - /// these - /// fields from Instance: - /// - /// * `displayName` - /// * `labels` - /// * `memorySizeGb` - /// * `redisConfig` + /// [updateMask] - Mask of fields to update. At least one path must be + /// supplied in this + /// field. The elements of the repeated paths field may only include these + /// fields: + /// "description" /// /// [$fields] - Selector specifying which fields to include in a partial /// response. @@ -510,6 +475,8 @@ /// 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. @@ -526,7 +493,8 @@ /// /// 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(core.String name, {core.String $fields}) { + async.Future<Empty> cancel(CancelOperationRequest request, core.String name, + {core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -534,6 +502,9 @@ var _downloadOptions = commons.DownloadOptions.Metadata; var _body = null; + if (request != null) { + _body = convert.json.encode((request).toJson()); + } if (name == null) { throw new core.ArgumentError("Parameter name is required."); } @@ -721,6 +692,19 @@ } } +/// The request message for Operations.CancelOperation. +class CancelOperationRequest { + CancelOperationRequest(); + + CancelOperationRequest.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + /// 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: @@ -742,294 +726,122 @@ } } -/// Represents the metadata of the long-running operation. -class GoogleCloudCommonOperationMetadata { - /// [Output only] API version used to start the operation. - core.String apiVersion; +/// File share configuration for the instance. +class FileShareConfig { + /// File share capacity in gigabytes (GB). + /// Cloud Filestore defines 1 GB as 1024^3 bytes. + core.String capacityGb; - /// [Output only] Identifies whether the user has requested cancellation - /// of the operation. Operations that have successfully been cancelled - /// have Operation.error value with a google.rpc.Status.code of 1, - /// corresponding to `Code.CANCELLED`. - core.bool cancelRequested; - - /// [Output only] The time the operation was created. - core.String createTime; - - /// [Output only] The time the operation finished running. - core.String endTime; - - /// [Output only] Human-readable status of the operation, if any. - core.String statusDetail; - - /// [Output only] Server-defined resource path for the target of the - /// operation. - core.String target; - - /// [Output only] Name of the verb executed by the operation. - core.String verb; - - GoogleCloudCommonOperationMetadata(); - - GoogleCloudCommonOperationMetadata.fromJson(core.Map _json) { - if (_json.containsKey("apiVersion")) { - apiVersion = _json["apiVersion"]; - } - if (_json.containsKey("cancelRequested")) { - cancelRequested = _json["cancelRequested"]; - } - if (_json.containsKey("createTime")) { - createTime = _json["createTime"]; - } - if (_json.containsKey("endTime")) { - endTime = _json["endTime"]; - } - if (_json.containsKey("statusDetail")) { - statusDetail = _json["statusDetail"]; - } - if (_json.containsKey("target")) { - target = _json["target"]; - } - if (_json.containsKey("verb")) { - verb = _json["verb"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (apiVersion != null) { - _json["apiVersion"] = apiVersion; - } - if (cancelRequested != null) { - _json["cancelRequested"] = cancelRequested; - } - if (createTime != null) { - _json["createTime"] = createTime; - } - if (endTime != null) { - _json["endTime"] = endTime; - } - if (statusDetail != null) { - _json["statusDetail"] = statusDetail; - } - if (target != null) { - _json["target"] = target; - } - if (verb != null) { - _json["verb"] = verb; - } - return _json; - } -} - -/// This location metadata represents additional configuration options for a -/// given location where a Redis instance may be created. All fields are output -/// only. It is returned as content of the -/// `google.cloud.location.Location.metadata` field. -class GoogleCloudRedisV1beta1LocationMetadata { - /// Output only. The set of available zones in the location. The map is keyed - /// by the lowercase ID of each zone, as defined by GCE. These keys can be - /// specified in `location_id` or `alternative_location_id` fields when - /// creating a Redis instance. - core.Map<core.String, GoogleCloudRedisV1beta1ZoneMetadata> availableZones; - - GoogleCloudRedisV1beta1LocationMetadata(); - - GoogleCloudRedisV1beta1LocationMetadata.fromJson(core.Map _json) { - if (_json.containsKey("availableZones")) { - availableZones = - commons.mapMap<core.Map, GoogleCloudRedisV1beta1ZoneMetadata>( - _json["availableZones"].cast<core.String, core.Map>(), - (core.Map item) => - new GoogleCloudRedisV1beta1ZoneMetadata.fromJson(item)); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (availableZones != null) { - _json["availableZones"] = commons.mapMap< - GoogleCloudRedisV1beta1ZoneMetadata, - core.Map<core.String, core.Object>>(availableZones, - (GoogleCloudRedisV1beta1ZoneMetadata item) => (item).toJson()); - } - return _json; - } -} - -/// Defines specific information for a particular zone. Currently empty and -/// reserved for future use only. -class GoogleCloudRedisV1beta1ZoneMetadata { - GoogleCloudRedisV1beta1ZoneMetadata(); - - GoogleCloudRedisV1beta1ZoneMetadata.fromJson(core.Map _json) {} - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - return _json; - } -} - -/// A Google Cloud Redis instance. -class Instance { - /// Optional. Only applicable to STANDARD_HA tier which protects the instance - /// against zonal failures by provisioning it across two zones. If provided, - /// it - /// must be a different zone from the one provided in [location_id]. - core.String alternativeLocationId; - - /// Optional. The full name of the Google Compute Engine - /// [network](/compute/docs/networks-and-firewalls#networks) to which the - /// instance is connected. If left unspecified, the `default` network - /// will be used. - core.String authorizedNetwork; - - /// Output only. The time the instance was created. - core.String createTime; - - /// Output only. The current zone where the Redis endpoint is placed. For - /// Basic - /// Tier instances, this will always be the same as the [location_id] - /// provided by the user at creation time. For Standard Tier instances, - /// this can be either [location_id] or [alternative_location_id] and can - /// change after a failover event. - core.String currentLocationId; - - /// An arbitrary and optional user-provided name for the instance. - core.String displayName; - - /// Output only. Hostname or IP address of the exposed Redis endpoint used by - /// clients to connect to the service. - core.String host; - - /// Resource labels to represent user provided metadata - core.Map<core.String, core.String> labels; - - /// Optional. The zone where the instance will be provisioned. If not - /// provided, - /// the service will choose a zone for the instance. For STANDARD_HA tier, - /// instances will be created across two zones for protection against zonal - /// failures. If [alternative_location_id] is also provided, it must be - /// different from [location_id]. - core.String locationId; - - /// Required. Redis memory size in GiB. - core.int memorySizeGb; - - /// Required. Unique name of the resource in this scope including project and - /// location using the form: - /// `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - /// - /// Note: Redis instances are managed and addressed at regional level so - /// location_id here refers to a GCP region; however, users may choose which - /// specific zone (or collection of zones for cross-zone instances) an - /// instance - /// should be provisioned in. Refer to [location_id] and - /// [alternative_location_id] fields for more details. + /// The name of the file share (must be 16 characters or less). core.String name; - /// Output only. The port number of the exposed Redis endpoint. - core.int port; + FileShareConfig(); - /// Optional. Redis configuration parameters, according to - /// http://redis.io/topics/config. Currently, the only supported parameters - /// are: - /// - /// * maxmemory-policy - /// * notify-keyspace-events - core.Map<core.String, core.String> redisConfigs; + FileShareConfig.fromJson(core.Map _json) { + if (_json.containsKey("capacityGb")) { + capacityGb = _json["capacityGb"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + } - /// Optional. The version of Redis software. - /// If not provided, latest supported version will be used. Updating the - /// version will perform an upgrade/downgrade to the new version. Currently, - /// the supported values are `REDIS_3_2` for Redis 3.2. - core.String redisVersion; + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (capacityGb != null) { + _json["capacityGb"] = capacityGb; + } + if (name != null) { + _json["name"] = name; + } + return _json; + } +} - /// Optional. The CIDR range of internal addresses that are reserved for this - /// instance. If not provided, the service will choose an unused /29 block, - /// for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique - /// and non-overlapping with existing subnets in an authorized network. - core.String reservedIpRange; +/// A Cloud Filestore instance. +class Instance { + /// Output only. + /// The time when the instance was created. + core.String createTime; - /// Output only. The current state of this instance. + /// Optional. A description of the instance (2048 characters or less). + core.String description; + + /// Server-specified ETag for the instance resource to prevent simultaneous + /// updates from overwriting each other. + core.String etag; + + /// File system shares on the instance. + /// For this version, only a single file share is supported. + core.List<FileShareConfig> fileShares; + + /// Resource labels to represent user provided metadata. + core.Map<core.String, core.String> labels; + + /// Output only. + /// The resource name of the instance, in the format + /// projects/{project_id}/locations/{location_id}/instances/{instance_id}. + core.String name; + + /// VPC networks to which the instance is connected. + /// For this version, only a single network is supported. + core.List<NetworkConfig> networks; + + /// Output only. + /// The instance state. /// Possible string values are: - /// - "STATE_UNSPECIFIED" : Not set. - /// - "CREATING" : Redis instance is being created. - /// - "READY" : Redis instance has been created and is fully usable. - /// - "UPDATING" : Redis instance configuration is being updated. Certain - /// kinds of updates - /// may cause the instance to become unusable while the update is in - /// progress. - /// - "DELETING" : Redis instance is being deleted. - /// - "REPAIRING" : Redis instance is being repaired and may be unusable. - /// Details can be - /// found in the `status_message` field. - /// - "MAINTENANCE" : Maintenance is being performed on this Redis instance. - /// - "EXPORTING" : Redis instance is exporting data. - /// - "IMPORTING" : Redis instance is importing data (availability may be - /// affected). + /// - "STATE_UNSPECIFIED" : State not set. + /// - "CREATING" : The instance is being created. + /// - "READY" : The instance is available for use. + /// - "REPAIRING" : Work is being done on the instance. You can get further + /// details from the + /// `statusMessage` field of the `Instance` resource. + /// - "DELETING" : The instance is shutting down. + /// - "ERROR" : The instance is experiencing an issue and might be unusable. + /// You can get + /// further details from the `statusMessage` field of the `Instance` + /// resource. core.String state; - /// Output only. Additional information about the current status of this - /// instance, if available. + /// Output only. + /// Additional information about the instance state, if available. core.String statusMessage; - /// Required. The service tier of the instance. + /// The service tier of the instance. /// Possible string values are: /// - "TIER_UNSPECIFIED" : Not set. - /// - "BASIC" : BASIC tier: standalone instance - /// - "STANDARD_HA" : STANDARD_HA tier: highly available primary/replica - /// instances + /// - "STANDARD" : STANDARD tier. + /// - "PREMIUM" : PREMIUM tier. core.String tier; Instance(); Instance.fromJson(core.Map _json) { - if (_json.containsKey("alternativeLocationId")) { - alternativeLocationId = _json["alternativeLocationId"]; - } - if (_json.containsKey("authorizedNetwork")) { - authorizedNetwork = _json["authorizedNetwork"]; - } if (_json.containsKey("createTime")) { createTime = _json["createTime"]; } - if (_json.containsKey("currentLocationId")) { - currentLocationId = _json["currentLocationId"]; + if (_json.containsKey("description")) { + description = _json["description"]; } - if (_json.containsKey("displayName")) { - displayName = _json["displayName"]; + if (_json.containsKey("etag")) { + etag = _json["etag"]; } - if (_json.containsKey("host")) { - host = _json["host"]; + if (_json.containsKey("fileShares")) { + fileShares = (_json["fileShares"] as core.List) + .map<FileShareConfig>((value) => new FileShareConfig.fromJson(value)) + .toList(); } if (_json.containsKey("labels")) { labels = (_json["labels"] as core.Map).cast<core.String, core.String>(); } - if (_json.containsKey("locationId")) { - locationId = _json["locationId"]; - } - if (_json.containsKey("memorySizeGb")) { - memorySizeGb = _json["memorySizeGb"]; - } if (_json.containsKey("name")) { name = _json["name"]; } - if (_json.containsKey("port")) { - port = _json["port"]; - } - if (_json.containsKey("redisConfigs")) { - redisConfigs = - (_json["redisConfigs"] as core.Map).cast<core.String, core.String>(); - } - if (_json.containsKey("redisVersion")) { - redisVersion = _json["redisVersion"]; - } - if (_json.containsKey("reservedIpRange")) { - reservedIpRange = _json["reservedIpRange"]; + if (_json.containsKey("networks")) { + networks = (_json["networks"] as core.List) + .map<NetworkConfig>((value) => new NetworkConfig.fromJson(value)) + .toList(); } if (_json.containsKey("state")) { state = _json["state"]; @@ -1045,47 +857,27 @@ core.Map<core.String, core.Object> toJson() { final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>(); - if (alternativeLocationId != null) { - _json["alternativeLocationId"] = alternativeLocationId; - } - if (authorizedNetwork != null) { - _json["authorizedNetwork"] = authorizedNetwork; - } if (createTime != null) { _json["createTime"] = createTime; } - if (currentLocationId != null) { - _json["currentLocationId"] = currentLocationId; + if (description != null) { + _json["description"] = description; } - if (displayName != null) { - _json["displayName"] = displayName; + if (etag != null) { + _json["etag"] = etag; } - if (host != null) { - _json["host"] = host; + if (fileShares != null) { + _json["fileShares"] = + fileShares.map((value) => (value).toJson()).toList(); } if (labels != null) { _json["labels"] = labels; } - if (locationId != null) { - _json["locationId"] = locationId; - } - if (memorySizeGb != null) { - _json["memorySizeGb"] = memorySizeGb; - } if (name != null) { _json["name"] = name; } - if (port != null) { - _json["port"] = port; - } - if (redisConfigs != null) { - _json["redisConfigs"] = redisConfigs; - } - if (redisVersion != null) { - _json["redisVersion"] = redisVersion; - } - if (reservedIpRange != null) { - _json["reservedIpRange"] = reservedIpRange; + if (networks != null) { + _json["networks"] = networks.map((value) => (value).toJson()).toList(); } if (state != null) { _json["state"] = state; @@ -1100,26 +892,25 @@ } } -/// Response for ListInstances. +/// ListInstancesResponse is the result of ListInstancesRequest. class ListInstancesResponse { - /// A list of Redis instances in the project in the specified location, - /// or across all locations. + /// A list of instances in the project for the specified location. /// - /// If the `location_id` in the parent field of the request is "-", all - /// regions - /// available to the project are queried, and the results aggregated. - /// If in such an aggregated query a location is unavailable, a dummy Redis - /// entry is included in the response with the "name" field set to a value of - /// the form projects/{project_id}/locations/{location_id}/instances/- and the - /// "status" field set to ERROR and "status_message" field set to "location - /// not - /// available for ListInstances". + /// If the {location} value in the request is "-", the response contains a + /// list + /// of instances from all locations. If any location is unreachable, the + /// response will only return instances in reachable locations and the + /// "unreachable" field will be populated with a list of unreachable + /// locations. core.List<Instance> instances; - /// Token to retrieve the next page of results, or empty if there are no more - /// results in the list. + /// The token you can use to retrieve the next page of results. Not returned + /// if there are no more results in the list. core.String nextPageToken; + /// Locations that could not be reached. + core.List<core.String> unreachable; + ListInstancesResponse(); ListInstancesResponse.fromJson(core.Map _json) { @@ -1131,6 +922,9 @@ if (_json.containsKey("nextPageToken")) { nextPageToken = _json["nextPageToken"]; } + if (_json.containsKey("unreachable")) { + unreachable = (_json["unreachable"] as core.List).cast<core.String>(); + } } core.Map<core.String, core.Object> toJson() { @@ -1142,6 +936,9 @@ if (nextPageToken != null) { _json["nextPageToken"] = nextPageToken; } + if (unreachable != null) { + _json["unreachable"] = unreachable; + } return _json; } } @@ -1226,20 +1023,18 @@ /// {"cloud.googleapis.com/region": "us-east1"} core.Map<core.String, core.String> labels; - /// Resource ID for the region. For example: "us-east1". + /// The canonical id for this location. For example: `"us-east1"`. core.String locationId; - /// Output only. The set of available zones in the location. The map is keyed - /// by the lowercase ID of each zone, as defined by Compute Engine. These keys - /// can be specified in `location_id` or `alternative_location_id` fields when - /// creating a Redis instance. + /// Service-specific metadata. For example the available capacity at the given + /// location. /// /// 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; - /// Full resource name for the region. For example: - /// "projects/example-project/locations/us-east1". + /// Resource name for the location, which may vary between implementations. + /// For example: `"projects/example-project/locations/us-east1"` core.String name; Location(); @@ -1285,6 +1080,70 @@ } } +/// Network configuration for the instance. +class NetworkConfig { + /// Output only. + /// IPv4 addresses in the format + /// {octet 1}.{octet 2}.{octet 3}.{octet 4} or IPv6 addresses in the format + /// {block 1}:{block 2}:{block 3}:{block 4}:{block 5}:{block 6}:{block + /// 7}:{block 8}. + core.List<core.String> ipAddresses; + + /// Internet protocol versions for which the instance has IP addresses + /// assigned. For this version, only MODE_IPV4 is supported. + core.List<core.String> modes; + + /// The name of the Google Compute Engine + /// [VPC network](/compute/docs/networks-and-firewalls#networks) to which the + /// instance is connected. + core.String network; + + /// A /29 CIDR block in one of the + /// [internal IP address + /// ranges](https://www.arin.net/knowledge/address_filters.html) + /// that identifies the range of IP addresses reserved for this + /// instance. For example, 10.0.0.0/29 or 192.168.0.0/29. The range you + /// specify + /// can't overlap with either existing subnets or assigned IP address ranges + /// for other Cloud Filestore instances in the selected VPC network. + core.String reservedIpRange; + + NetworkConfig(); + + NetworkConfig.fromJson(core.Map _json) { + if (_json.containsKey("ipAddresses")) { + ipAddresses = (_json["ipAddresses"] as core.List).cast<core.String>(); + } + if (_json.containsKey("modes")) { + modes = (_json["modes"] as core.List).cast<core.String>(); + } + if (_json.containsKey("network")) { + network = _json["network"]; + } + if (_json.containsKey("reservedIpRange")) { + reservedIpRange = _json["reservedIpRange"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (ipAddresses != null) { + _json["ipAddresses"] = ipAddresses; + } + if (modes != null) { + _json["modes"] = modes; + } + if (network != null) { + _json["network"] = network; + } + if (reservedIpRange != null) { + _json["reservedIpRange"] = reservedIpRange; + } + return _json; + } +} + /// This resource represents a long-running operation that is the result of a /// network API call. class Operation { @@ -1296,26 +1155,10 @@ /// The error result of the operation in case of failure or cancellation. Status error; - /// { - /// - /// `createTime`: The time the operation was created. - /// - /// `endTime`: The time the operation finished running. - /// - /// `target`: Server-defined resource path for the target of the operation. - /// - /// `verb`: Name of the verb executed by the operation. - /// - /// `statusDetail`: Human-readable status of the operation, if any. - /// - /// `cancelRequested`: Identifies whether the user has requested cancellation - /// of the operation. Operations that have successfully been cancelled have - /// Operation.error value with a google.rpc.Status.code of 1, corresponding to - /// `Code.CANCELLED`. - /// - /// `apiVersion`: API version used to start the operation. - /// - /// } + /// 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. @@ -1384,6 +1227,87 @@ } } +/// Represents the metadata of the long-running operation. +class OperationMetadata { + /// [Output only] API version used to start the operation. + core.String apiVersion; + + /// [Output only] Identifies whether the user has requested cancellation + /// of the operation. Operations that have successfully been cancelled + /// have Operation.error value with a google.rpc.Status.code of 1, + /// corresponding to `Code.CANCELLED`. + core.bool cancelRequested; + + /// [Output only] The time the operation was created. + core.String createTime; + + /// [Output only] The time the operation finished running. + core.String endTime; + + /// [Output only] Human-readable status of the operation, if any. + core.String statusDetail; + + /// [Output only] Server-defined resource path for the target of the + /// operation. + core.String target; + + /// [Output only] Name of the verb executed by the operation. + core.String verb; + + OperationMetadata(); + + OperationMetadata.fromJson(core.Map _json) { + if (_json.containsKey("apiVersion")) { + apiVersion = _json["apiVersion"]; + } + if (_json.containsKey("cancelRequested")) { + cancelRequested = _json["cancelRequested"]; + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("endTime")) { + endTime = _json["endTime"]; + } + if (_json.containsKey("statusDetail")) { + statusDetail = _json["statusDetail"]; + } + if (_json.containsKey("target")) { + target = _json["target"]; + } + if (_json.containsKey("verb")) { + verb = _json["verb"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (apiVersion != null) { + _json["apiVersion"] = apiVersion; + } + if (cancelRequested != null) { + _json["cancelRequested"] = cancelRequested; + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (endTime != null) { + _json["endTime"] = endTime; + } + if (statusDetail != null) { + _json["statusDetail"] = statusDetail; + } + if (target != null) { + _json["target"] = target; + } + if (verb != null) { + _json["verb"] = verb; + } + return _json; + } +} + /// 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
diff --git a/generated/googleapis_beta/lib/firebasehosting/v1beta1.dart b/generated/googleapis_beta/lib/firebasehosting/v1beta1.dart new file mode 100644 index 0000000..e279386 --- /dev/null +++ b/generated/googleapis_beta/lib/firebasehosting/v1beta1.dart
@@ -0,0 +1,1955 @@ +// This is a generated file (see the discoveryapis_generator project). + +// ignore_for_file: unnecessary_cast + +library googleapis_beta.firebasehosting.v1beta1; + +import 'dart:core' as core; +import 'dart:async' as async; +import 'dart:convert' as convert; + +import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; +import 'package:http/http.dart' as http; + +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' + show ApiRequestError, DetailedApiRequestError; + +const core.String USER_AGENT = 'dart-api-client firebasehosting/v1beta1'; + +/// The Firebase Hosting REST API enables programmatic and customizable +/// deployments to your Firebase-hosted sites. Use this REST API to deploy new +/// or updated hosting configurations and content files. +class FirebasehostingApi { + /// View and manage your data across Google Cloud Platform services + static const CloudPlatformScope = + "https://www.googleapis.com/auth/cloud-platform"; + + /// View your data across Google Cloud Platform services + static const CloudPlatformReadOnlyScope = + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + /// View and administer all your Firebase data and settings + static const FirebaseScope = "https://www.googleapis.com/auth/firebase"; + + /// View all your Firebase data and settings + static const FirebaseReadonlyScope = + "https://www.googleapis.com/auth/firebase.readonly"; + + final commons.ApiRequester _requester; + + SitesResourceApi get sites => new SitesResourceApi(_requester); + + FirebasehostingApi(http.Client client, + {core.String rootUrl: "https://firebasehosting.googleapis.com/", + core.String servicePath: ""}) + : _requester = + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); +} + +class SitesResourceApi { + final commons.ApiRequester _requester; + + SitesDomainsResourceApi get domains => + new SitesDomainsResourceApi(_requester); + SitesReleasesResourceApi get releases => + new SitesReleasesResourceApi(_requester); + SitesVersionsResourceApi get versions => + new SitesVersionsResourceApi(_requester); + + SitesResourceApi(commons.ApiRequester client) : _requester = client; + + /// Gets the Hosting metadata for a specific site. + /// + /// Request parameters: + /// + /// [name] - Required. The site for which to get the SiteConfig, in the + /// format: + /// <code>sites/<var>site-name</var>/config</code> + /// Value must have pattern "^sites/[^/]+/config$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [SiteConfig]. + /// + /// 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<SiteConfig> getConfig(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new SiteConfig.fromJson(data)); + } + + /// Sets the Hosting metadata for a specific site. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - Required. The site for which to update the SiteConfig, in the + /// format: + /// <code>sites/<var>site-name</var>/config</code> + /// Value must have pattern "^sites/[^/]+/config$". + /// + /// [updateMask] - A set of field names from your [site + /// configuration](../sites.SiteConfig) + /// that you want to update. + /// <br>A field will be overwritten if, and only if, it's in the mask. + /// <br>If a mask is not provided then a default mask of only + /// [`max_versions`](../sites.SiteConfig.max_versions) will be used. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [SiteConfig]. + /// + /// 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<SiteConfig> updateConfig(SiteConfig request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new SiteConfig.fromJson(data)); + } +} + +class SitesDomainsResourceApi { + final commons.ApiRequester _requester; + + SitesDomainsResourceApi(commons.ApiRequester client) : _requester = client; + + /// Creates a domain mapping on the specified site. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. The parent to create the domain association for, in + /// the format: + /// <code>sites/<var>site-name</var></code> + /// Value must have pattern "^sites/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Domain]. + /// + /// 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<Domain> create(Domain request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/domains'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Domain.fromJson(data)); + } + + /// Deletes the existing domain mapping on the specified site. + /// + /// Request parameters: + /// + /// [name] - Required. The name of the domain association to delete. + /// Value must have pattern "^sites/[^/]+/domains/[^/]+$". + /// + /// [$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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Empty.fromJson(data)); + } + + /// Gets a domain mapping on the specified site. + /// + /// Request parameters: + /// + /// [name] - Required. The name of the domain configuration to get. + /// Value must have pattern "^sites/[^/]+/domains/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Domain]. + /// + /// 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<Domain> get(core.String name, {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Domain.fromJson(data)); + } + + /// Lists the domains for the specified site. + /// + /// Request parameters: + /// + /// [parent] - Required. The parent for which to list domains, in the format: + /// <code>sites/<var>site-name</var></code> + /// Value must have pattern "^sites/[^/]+$". + /// + /// [pageToken] - The next_page_token from a previous request, if provided. + /// + /// [pageSize] - The page size to return. Defaults to 50. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListDomainsResponse]. + /// + /// 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<ListDomainsResponse> list(core.String parent, + {core.String pageToken, core.int pageSize, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/domains'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListDomainsResponse.fromJson(data)); + } + + /// Updates the specified domain mapping, creating the mapping as if it does + /// not exist. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - Required. The name of the domain association to update or create, + /// if an + /// association doesn't already exist. + /// Value must have pattern "^sites/[^/]+/domains/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Domain]. + /// + /// 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<Domain> update(Domain request, core.String name, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PUT", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Domain.fromJson(data)); + } +} + +class SitesReleasesResourceApi { + final commons.ApiRequester _requester; + + SitesReleasesResourceApi(commons.ApiRequester client) : _requester = client; + + /// Creates a new release which makes the content of the specified version + /// actively display on the site. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - The site that the release belongs to, in the format: + /// <code>sites/<var>site-name</var></code> + /// Value must have pattern "^sites/[^/]+$". + /// + /// [versionName] - The unique identifier for a version, in the format: + /// <code>/sites/<var>site-name</var>/versions/<var>versionID</var></code> + /// The <var>site-name</var> in this version identifier must match the + /// <var>site-name</var> in the `parent` parameter. + /// <br> + /// <br>This query parameter must be empty if the `type` field in the + /// request body is `SITE_DISABLE`. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Release]. + /// + /// 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<Release> create(Release request, core.String parent, + {core.String versionName, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (versionName != null) { + _queryParams["versionName"] = [versionName]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/releases'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Release.fromJson(data)); + } + + /// Lists the releases that have been created on the specified site. + /// + /// Request parameters: + /// + /// [parent] - Required. The parent for which to list files, in the format: + /// <code>sites/<var>site-name</var></code> + /// Value must have pattern "^sites/[^/]+$". + /// + /// [pageToken] - The next_page_token from a previous request, if provided. + /// + /// [pageSize] - The page size to return. Defaults to 100. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListReleasesResponse]. + /// + /// 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<ListReleasesResponse> list(core.String parent, + {core.String pageToken, core.int pageSize, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/releases'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListReleasesResponse.fromJson(data)); + } +} + +class SitesVersionsResourceApi { + final commons.ApiRequester _requester; + + SitesVersionsFilesResourceApi get files => + new SitesVersionsFilesResourceApi(_requester); + + SitesVersionsResourceApi(commons.ApiRequester client) : _requester = client; + + /// Creates a new version for a site. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. The parent to create the version for, in the format: + /// <code>sites/<var>site-name</var></code> + /// Value must have pattern "^sites/[^/]+$". + /// + /// [sizeBytes] - The self-reported size of the version. This value is used + /// for a pre-emptive + /// quota check for legacy version uploads. + /// + /// [versionId] - A unique id for the new version. This is only specified for + /// legacy version + /// creations. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Version]. + /// + /// 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<Version> create(Version request, core.String parent, + {core.String sizeBytes, core.String versionId, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (sizeBytes != null) { + _queryParams["sizeBytes"] = [sizeBytes]; + } + if (versionId != null) { + _queryParams["versionId"] = [versionId]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/versions'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Version.fromJson(data)); + } + + /// Deletes the specified version. + /// + /// Request parameters: + /// + /// [name] - Required. The name of the version to be deleted, in the format: + /// <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> + /// Value must have pattern "^sites/[^/]+/versions/[^/]+$". + /// + /// [$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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "DELETE", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Empty.fromJson(data)); + } + + /// Updates the specified metadata for a version. Note that this method will + /// fail with `FAILED_PRECONDITION` in the event of an invalid state + /// transition. The only valid transition for a version is currently from a + /// `CREATED` status to a `FINALIZED` status. + /// Use [`DeleteVersion`](../sites.versions/delete) to set the status of a + /// version to `DELETED`. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The unique identifier for a version, in the format: + /// <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> + /// This name is provided in the response body when you call the + /// [`CreateVersion`](../sites.versions/create) endpoint. + /// Value must have pattern "^sites/[^/]+/versions/[^/]+$". + /// + /// [updateMask] - A set of field names from your [version](../sites.versions) + /// that you want + /// to update. + /// <br>A field will be overwritten if, and only if, it's in the mask. + /// <br>If a mask is not provided then a default mask of only + /// [`status`](../sites.versions#Version.FIELDS.status) will be used. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Version]. + /// + /// 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<Version> patch(Version request, core.String name, + {core.String updateMask, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Version.fromJson(data)); + } + + /// Adds content files to a version. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. The version to add files to, in the format: + /// <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> + /// Value must have pattern "^sites/[^/]+/versions/[^/]+$". + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [PopulateVersionFilesResponse]. + /// + /// 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<PopulateVersionFilesResponse> populateFiles( + PopulateVersionFilesRequest request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + ':populateFiles'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new PopulateVersionFilesResponse.fromJson(data)); + } +} + +class SitesVersionsFilesResourceApi { + final commons.ApiRequester _requester; + + SitesVersionsFilesResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Lists the remaining files to be uploaded for the specified version. + /// + /// Request parameters: + /// + /// [parent] - Required. The parent to list files for, in the format: + /// <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> + /// Value must have pattern "^sites/[^/]+/versions/[^/]+$". + /// + /// [status] - The type of files in the version that should be listed. + /// Possible string values are: + /// - "STATUS_UNSPECIFIED" : A STATUS_UNSPECIFIED. + /// - "EXPECTED" : A EXPECTED. + /// - "ACTIVE" : A ACTIVE. + /// + /// [pageToken] - The next_page_token from a previous request, if provided. + /// This will be the + /// encoded version of a firebase.hosting.proto.metadata.ListFilesPageToken. + /// + /// [pageSize] - The page size to return. Defaults to 1000. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListVersionFilesResponse]. + /// + /// 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<ListVersionFilesResponse> list(core.String parent, + {core.String status, + core.String pageToken, + core.int pageSize, + core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (status != null) { + _queryParams["status"] = [status]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta1/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/files'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response + .then((data) => new ListVersionFilesResponse.fromJson(data)); + } +} + +/// Contains metadata about the user who performed an action, such as creating +/// a release or finalizing a version. +class ActingUser { + /// The email address of the user when the user performed the action. + core.String email; + + /// A profile image URL for the user. May not be present if the user has + /// changed their email address or deleted their account. + core.String imageUrl; + + ActingUser(); + + ActingUser.fromJson(core.Map _json) { + if (_json.containsKey("email")) { + email = _json["email"]; + } + if (_json.containsKey("imageUrl")) { + imageUrl = _json["imageUrl"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (email != null) { + _json["email"] = email; + } + if (imageUrl != null) { + _json["imageUrl"] = imageUrl; + } + return _json; + } +} + +/// Represents a DNS certificate challenge. +class CertDnsChallenge { + /// The domain name upon which the DNS challenge must be satisfied. + core.String domainName; + + /// The value that must be present as a TXT record on the domain name to + /// satisfy the challenge. + core.String token; + + CertDnsChallenge(); + + CertDnsChallenge.fromJson(core.Map _json) { + if (_json.containsKey("domainName")) { + domainName = _json["domainName"]; + } + if (_json.containsKey("token")) { + token = _json["token"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (domainName != null) { + _json["domainName"] = domainName; + } + if (token != null) { + _json["token"] = token; + } + return _json; + } +} + +/// Represents an HTTP certificate challenge. +class CertHttpChallenge { + /// The URL path on which to serve the specified token to satisfy the + /// certificate challenge. + core.String path; + + /// The token to serve at the specified URL path to satisfy the certificate + /// challenge. + core.String token; + + CertHttpChallenge(); + + CertHttpChallenge.fromJson(core.Map _json) { + if (_json.containsKey("path")) { + path = _json["path"]; + } + if (_json.containsKey("token")) { + token = _json["token"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (path != null) { + _json["path"] = path; + } + if (token != null) { + _json["token"] = token; + } + return _json; + } +} + +/// The intended behavior and status information of a domain. +class Domain { + /// Required. The domain name of the association. + core.String domainName; + + /// If set, the domain should redirect with the provided parameters. + DomainRedirect domainRedirect; + + /// Output only. Information about the provisioning of certificates and the + /// health of the DNS resolution for the domain. + DomainProvisioning provisioning; + + /// Required. The site name of the association. + core.String site; + + /// Output only. Additional status of the domain association. + /// Possible string values are: + /// - "DOMAIN_STATUS_UNSPECIFIED" : Unspecified domain association status. + /// - "DOMAIN_CHANGE_PENDING" : An operation is in progress on the domain + /// association and no further + /// operations can be performed until it is complete. + /// - "DOMAIN_ACTIVE" : The domain association is active and no additional + /// action is required. + /// - "DOMAIN_VERIFICATION_REQUIRED" : The domain was previously verified in + /// the legacy system. User must + /// reverify the domain through the ownership service. + /// - "DOMAIN_VERIFICATION_LOST" : The domain verification has been lost and + /// the domain is in the grace period + /// before being removed from the Firebase Hosting site. + core.String status; + + /// Output only. The time at which the domain was last updated. + core.String updateTime; + + Domain(); + + Domain.fromJson(core.Map _json) { + if (_json.containsKey("domainName")) { + domainName = _json["domainName"]; + } + if (_json.containsKey("domainRedirect")) { + domainRedirect = new DomainRedirect.fromJson(_json["domainRedirect"]); + } + if (_json.containsKey("provisioning")) { + provisioning = new DomainProvisioning.fromJson(_json["provisioning"]); + } + if (_json.containsKey("site")) { + site = _json["site"]; + } + if (_json.containsKey("status")) { + status = _json["status"]; + } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (domainName != null) { + _json["domainName"] = domainName; + } + if (domainRedirect != null) { + _json["domainRedirect"] = (domainRedirect).toJson(); + } + if (provisioning != null) { + _json["provisioning"] = (provisioning).toJson(); + } + if (site != null) { + _json["site"] = site; + } + if (status != null) { + _json["status"] = status; + } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } + return _json; + } +} + +/// The current certificate provisioning status information for a domain. +class DomainProvisioning { + /// The TXT records (for the certificate challenge) that were found at the + /// last + /// DNS fetch. + core.List<core.String> certChallengeDiscoveredTxt; + + /// The DNS challenge for generating a certificate. + CertDnsChallenge certChallengeDns; + + /// The HTTP challenge for generating a certificate. + CertHttpChallenge certChallengeHttp; + + /// The certificate provisioning status; updated when Firebase Hosting + /// provisions an SSL certificate for the domain. + /// Possible string values are: + /// - "CERT_STATUS_UNSPECIFIED" : Unspecified certificate provisioning status. + /// - "CERT_PENDING" : Waiting for certificate challenge to be created. + /// - "CERT_MISSING" : Waiting for certificate challenge to be met. + /// - "CERT_PROCESSING" : Certificate challenge met; attempting to + /// acquire/propagate certificate. + /// - "CERT_PROPAGATING" : Certificate obtained; propagating to the CDN. + /// - "CERT_ACTIVE" : Certificate provisioned and deployed across the CDN. + /// - "CERT_ERROR" : Certificate provisioning failed in a non-recoverable + /// manner. + core.String certStatus; + + /// The IPs found at the last DNS fetch. + core.List<core.String> discoveredIps; + + /// The time at which the last DNS fetch occurred. + core.String dnsFetchTime; + + /// The DNS record match status as of the last DNS fetch. + /// Possible string values are: + /// - "DNS_STATUS_UNSPECIFIED" : Unspecified DNS status. + /// - "DNS_PENDING" : No DNS records have been specified for this domain yet. + /// - "DNS_MISSING" : None of the required DNS records have been detected on + /// the domain. + /// - "DNS_PARTIAL_MATCH" : Some of the required DNS records were detected, + /// but not all of them. No + /// extra (non-required) DNS records were detected. + /// - "DNS_MATCH" : All required DNS records were detected. No extra + /// (non-required) DNS records + /// were detected. + /// - "DNS_EXTRANEOUS_MATCH" : The domain has at least one of the required DNS + /// records, and it has at + /// least one extra (non-required) DNS record. + core.String dnsStatus; + + /// The list of IPs to which the domain is expected to resolve. + core.List<core.String> expectedIps; + + DomainProvisioning(); + + DomainProvisioning.fromJson(core.Map _json) { + if (_json.containsKey("certChallengeDiscoveredTxt")) { + certChallengeDiscoveredTxt = + (_json["certChallengeDiscoveredTxt"] as core.List) + .cast<core.String>(); + } + if (_json.containsKey("certChallengeDns")) { + certChallengeDns = + new CertDnsChallenge.fromJson(_json["certChallengeDns"]); + } + if (_json.containsKey("certChallengeHttp")) { + certChallengeHttp = + new CertHttpChallenge.fromJson(_json["certChallengeHttp"]); + } + if (_json.containsKey("certStatus")) { + certStatus = _json["certStatus"]; + } + if (_json.containsKey("discoveredIps")) { + discoveredIps = (_json["discoveredIps"] as core.List).cast<core.String>(); + } + if (_json.containsKey("dnsFetchTime")) { + dnsFetchTime = _json["dnsFetchTime"]; + } + if (_json.containsKey("dnsStatus")) { + dnsStatus = _json["dnsStatus"]; + } + if (_json.containsKey("expectedIps")) { + expectedIps = (_json["expectedIps"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (certChallengeDiscoveredTxt != null) { + _json["certChallengeDiscoveredTxt"] = certChallengeDiscoveredTxt; + } + if (certChallengeDns != null) { + _json["certChallengeDns"] = (certChallengeDns).toJson(); + } + if (certChallengeHttp != null) { + _json["certChallengeHttp"] = (certChallengeHttp).toJson(); + } + if (certStatus != null) { + _json["certStatus"] = certStatus; + } + if (discoveredIps != null) { + _json["discoveredIps"] = discoveredIps; + } + if (dnsFetchTime != null) { + _json["dnsFetchTime"] = dnsFetchTime; + } + if (dnsStatus != null) { + _json["dnsStatus"] = dnsStatus; + } + if (expectedIps != null) { + _json["expectedIps"] = expectedIps; + } + return _json; + } +} + +/// Defines the behavior of a domain-level redirect. Domain redirects preserve +/// the path of the redirect but replace the requested domain with the one +/// specified in the redirect configuration. +class DomainRedirect { + /// Required. The domain name to redirect to. + core.String domainName; + + /// Required. The redirect status code. + /// Possible string values are: + /// - "REDIRECT_TYPE_UNSPECIFIED" : The default redirect type; should not be + /// intentionlly used. + /// - "MOVED_PERMANENTLY" : The redirect will respond with an HTTP status code + /// of + /// `301 Moved Permanently`. + core.String type; + + DomainRedirect(); + + DomainRedirect.fromJson(core.Map _json) { + if (_json.containsKey("domainName")) { + domainName = _json["domainName"]; + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (domainName != null) { + _json["domainName"] = domainName; + } + if (type != null) { + _json["type"] = type; + } + return _json; + } +} + +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. +class Empty { + Empty(); + + Empty.fromJson(core.Map _json) {} + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + return _json; + } +} + +/// A [`header`](/docs/hosting/full-config#headers) defines custom headers to +/// add to a response should the request URL path match the pattern. +class Header { + /// Required. The user-supplied + /// [glob pattern](/docs/hosting/full-config#glob_pattern_matching) to match + /// against the request URL path. + core.String glob; + + /// Required. The additional headers to add to the response. + core.Map<core.String, core.String> headers; + + Header(); + + Header.fromJson(core.Map _json) { + if (_json.containsKey("glob")) { + glob = _json["glob"]; + } + if (_json.containsKey("headers")) { + headers = (_json["headers"] as core.Map).cast<core.String, core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (glob != null) { + _json["glob"] = glob; + } + if (headers != null) { + _json["headers"] = headers; + } + return _json; + } +} + +class ListDomainsResponse { + /// The list of domains, if any exist. + core.List<Domain> domains; + + /// The pagination token, if more results exist. + core.String nextPageToken; + + ListDomainsResponse(); + + ListDomainsResponse.fromJson(core.Map _json) { + if (_json.containsKey("domains")) { + domains = (_json["domains"] as core.List) + .map<Domain>((value) => new Domain.fromJson(value)) + .toList(); + } + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (domains != null) { + _json["domains"] = domains.map((value) => (value).toJson()).toList(); + } + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + return _json; + } +} + +class ListReleasesResponse { + /// If there are additional releases remaining beyond the ones in this + /// response, then supply this token in the next + /// [`list`](../sites.versions.files/list) call to continue with the next set + /// of releases. + core.String nextPageToken; + + /// The list of hashes of files that still need to be uploaded, if any exist. + core.List<Release> releases; + + ListReleasesResponse(); + + ListReleasesResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("releases")) { + releases = (_json["releases"] as core.List) + .map<Release>((value) => new Release.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (releases != null) { + _json["releases"] = releases.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +class ListVersionFilesResponse { + /// The list path/hashes in the specified version. + core.List<VersionFile> files; + + /// The pagination token, if more results exist. + core.String nextPageToken; + + ListVersionFilesResponse(); + + ListVersionFilesResponse.fromJson(core.Map _json) { + if (_json.containsKey("files")) { + files = (_json["files"] as core.List) + .map<VersionFile>((value) => new VersionFile.fromJson(value)) + .toList(); + } + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (files != null) { + _json["files"] = files.map((value) => (value).toJson()).toList(); + } + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + return _json; + } +} + +class PopulateVersionFilesRequest { + /// A set of file paths to the hashes corresponding to assets that should be + /// added to the version. Note that a file path to an empty hash will remove + /// the path from the version. Calculate a hash by Gzipping the file then + /// taking the SHA256 hash of the newly compressed file. + core.Map<core.String, core.String> files; + + PopulateVersionFilesRequest(); + + PopulateVersionFilesRequest.fromJson(core.Map _json) { + if (_json.containsKey("files")) { + files = (_json["files"] as core.Map).cast<core.String, core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (files != null) { + _json["files"] = files; + } + return _json; + } +} + +class PopulateVersionFilesResponse { + /// The content hashes of the specified files that need to be uploaded to the + /// specified endpoint. + core.List<core.String> uploadRequiredHashes; + + /// The URL to which the files should be uploaded, in the format: + /// <br>"https://upload-firebasehosting.googleapis.com/upload/sites/<var>site-name</var>/versions/<var>versionID</var>/files". + /// <br>Perform a multipart `POST` of the Gzipped file contents to the URL + /// using a forward slash and the hash of the file appended to the end. + core.String uploadUrl; + + PopulateVersionFilesResponse(); + + PopulateVersionFilesResponse.fromJson(core.Map _json) { + if (_json.containsKey("uploadRequiredHashes")) { + uploadRequiredHashes = + (_json["uploadRequiredHashes"] as core.List).cast<core.String>(); + } + if (_json.containsKey("uploadUrl")) { + uploadUrl = _json["uploadUrl"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (uploadRequiredHashes != null) { + _json["uploadRequiredHashes"] = uploadRequiredHashes; + } + if (uploadUrl != null) { + _json["uploadUrl"] = uploadUrl; + } + return _json; + } +} + +/// A [`redirect`](/docs/hosting/full-config#redirects) represents the +/// configuration for returning an HTTP redirect response given a matching +/// request URL path. +class Redirect { + /// Required. The user-supplied + /// [glob pattern](/docs/hosting/full-config#glob_pattern_matching) to match + /// against the request URL path. + core.String glob; + + /// Required. The value to put in the HTTP location header of the response. + /// <br>The location can contain capture group values from the pattern using + /// a `:` prefix to identify the segment and an optional `*` to capture the + /// rest of the URL. + /// For example: + /// <code>"glob": "/:capture*", + /// <br>"statusCode": 301, + /// <br>"location": "https://example.com/foo/:capture"</code> + core.String location; + + /// Required. The status HTTP code to return in the response. It must be a + /// valid 3xx status code. + core.int statusCode; + + Redirect(); + + Redirect.fromJson(core.Map _json) { + if (_json.containsKey("glob")) { + glob = _json["glob"]; + } + if (_json.containsKey("location")) { + location = _json["location"]; + } + if (_json.containsKey("statusCode")) { + statusCode = _json["statusCode"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (glob != null) { + _json["glob"] = glob; + } + if (location != null) { + _json["location"] = location; + } + if (statusCode != null) { + _json["statusCode"] = statusCode; + } + return _json; + } +} + +/// A `Release` is a particular +/// [collection of configurations and files](sites.versions) +/// that is set to be public at a particular time. +class Release { + /// The deploy description when the release was created. The value can be up + /// to + /// 512 characters. + core.String message; + + /// Output only. The unique identifier for the release, in the format: + /// <code>sites/<var>site-name</var>/releases/<var>releaseID</var></code> + /// This name is provided in the response body when you call the + /// [`CreateRelease`](sites.releases/create) endpoint. + core.String name; + + /// Output only. The time at which the version is set to be public. + core.String releaseTime; + + /// Output only. Identifies the user who created the release. + ActingUser releaseUser; + + /// Explains the reason for the release. + /// <br>Specify a value for this field only when creating a `SITE_DISABLE` + /// type release. + /// Possible string values are: + /// - "TYPE_UNSPECIFIED" : An unspecified type. Indicates that a version was + /// released. + /// <br>This is the default value when no other `type` is explicitly + /// specified. + /// - "DEPLOY" : A version was uploaded to Firebase Hosting and released. + /// - "ROLLBACK" : The release points back to a previously deployed version. + /// - "SITE_DISABLE" : The release prevents the site from serving content. + /// Firebase Hosting acts + /// as if the site never existed. + core.String type; + + /// Output only. The configuration and content that was released. + Version version; + + Release(); + + Release.fromJson(core.Map _json) { + if (_json.containsKey("message")) { + message = _json["message"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("releaseTime")) { + releaseTime = _json["releaseTime"]; + } + if (_json.containsKey("releaseUser")) { + releaseUser = new ActingUser.fromJson(_json["releaseUser"]); + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + if (_json.containsKey("version")) { + version = new Version.fromJson(_json["version"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (message != null) { + _json["message"] = message; + } + if (name != null) { + _json["name"] = name; + } + if (releaseTime != null) { + _json["releaseTime"] = releaseTime; + } + if (releaseUser != null) { + _json["releaseUser"] = (releaseUser).toJson(); + } + if (type != null) { + _json["type"] = type; + } + if (version != null) { + _json["version"] = (version).toJson(); + } + return _json; + } +} + +/// A [`rewrite`](/docs/hosting/full-config#rewrites) represents an internal +/// content rewrite on the version. If the pattern matches, the request will be +/// handled as if it were to the destination path specified in the +/// configuration. +class Rewrite { + /// The request will be forwarded to Firebase Dynamic Links. + core.bool dynamicLinks; + + /// The function to proxy requests to. Must match the exported function + /// name exactly. + core.String function; + + /// Required. The user-supplied + /// [glob pattern](/docs/hosting/full-config#glob_pattern_matching) to match + /// against the request URL path. + core.String glob; + + /// The URL path to rewrite the request to. + core.String path; + + Rewrite(); + + Rewrite.fromJson(core.Map _json) { + if (_json.containsKey("dynamicLinks")) { + dynamicLinks = _json["dynamicLinks"]; + } + if (_json.containsKey("function")) { + function = _json["function"]; + } + if (_json.containsKey("glob")) { + glob = _json["glob"]; + } + if (_json.containsKey("path")) { + path = _json["path"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (dynamicLinks != null) { + _json["dynamicLinks"] = dynamicLinks; + } + if (function != null) { + _json["function"] = function; + } + if (glob != null) { + _json["glob"] = glob; + } + if (path != null) { + _json["path"] = path; + } + return _json; + } +} + +/// The configuration for how incoming requests to a site should be routed and +/// processed before serving content. The patterns are matched and applied +/// according to a specific +/// [priority order](/docs/hosting/full-config#hosting_priority_order). +class ServingConfig { + /// How to handle well known App Association files. + /// Possible string values are: + /// - "AUTO" : The app association files will be automattically created from + /// the apps + /// that exist in the Firebase project. + /// - "NONE" : No special handling of the app association files will occur, + /// these paths + /// will result in a 404 unless caught with a Rewrite. + core.String appAssociation; + + /// Defines whether to drop the file extension from uploaded files. + core.bool cleanUrls; + + /// A list of custom response headers that are added to the content if the + /// request URL path matches the glob. + core.List<Header> headers; + + /// A list of globs that will cause the response to redirect to another + /// location. + core.List<Redirect> redirects; + + /// A list of rewrites that will act as if the service were given the + /// destination URL. + core.List<Rewrite> rewrites; + + /// Defines how to handle a trailing slash in the URL path. + /// Possible string values are: + /// - "TRAILING_SLASH_BEHAVIOR_UNSPECIFIED" : No behavior is specified. + /// <br>Files are served at their exact location only, and trailing slashes + /// are only added to directory indexes. + /// - "ADD" : Trailing slashes are _added_ to directory indexes as well as to + /// any URL + /// path not ending in a file extension. + /// - "REMOVE" : Trailing slashes are _removed_ from directory indexes as well + /// as from any + /// URL path not ending in a file extension. + core.String trailingSlashBehavior; + + ServingConfig(); + + ServingConfig.fromJson(core.Map _json) { + if (_json.containsKey("appAssociation")) { + appAssociation = _json["appAssociation"]; + } + if (_json.containsKey("cleanUrls")) { + cleanUrls = _json["cleanUrls"]; + } + if (_json.containsKey("headers")) { + headers = (_json["headers"] as core.List) + .map<Header>((value) => new Header.fromJson(value)) + .toList(); + } + if (_json.containsKey("redirects")) { + redirects = (_json["redirects"] as core.List) + .map<Redirect>((value) => new Redirect.fromJson(value)) + .toList(); + } + if (_json.containsKey("rewrites")) { + rewrites = (_json["rewrites"] as core.List) + .map<Rewrite>((value) => new Rewrite.fromJson(value)) + .toList(); + } + if (_json.containsKey("trailingSlashBehavior")) { + trailingSlashBehavior = _json["trailingSlashBehavior"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (appAssociation != null) { + _json["appAssociation"] = appAssociation; + } + if (cleanUrls != null) { + _json["cleanUrls"] = cleanUrls; + } + if (headers != null) { + _json["headers"] = headers.map((value) => (value).toJson()).toList(); + } + if (redirects != null) { + _json["redirects"] = redirects.map((value) => (value).toJson()).toList(); + } + if (rewrites != null) { + _json["rewrites"] = rewrites.map((value) => (value).toJson()).toList(); + } + if (trailingSlashBehavior != null) { + _json["trailingSlashBehavior"] = trailingSlashBehavior; + } + return _json; + } +} + +/// A `SiteConfig` contains metadata associated with a specific site that +/// controls Firebase Hosting serving behavior +class SiteConfig { + /// The number of FINALIZED versions that will be held for a site before + /// automatic deletion. When a new version is deployed, content for versions + /// in storage in excess of this number will be deleted, and will no longer be + /// billed for storage usage. Oldest versions will be deleted first; sites are + /// created with an unlimited number of max_versions by default. + core.String maxVersions; + + SiteConfig(); + + SiteConfig.fromJson(core.Map _json) { + if (_json.containsKey("maxVersions")) { + maxVersions = _json["maxVersions"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (maxVersions != null) { + _json["maxVersions"] = maxVersions; + } + return _json; + } +} + +/// A `Version` is the collection of configuration and +/// [static files](sites.versions.files) that determine how a site is displayed. +class Version { + /// The configuration for the behavior of the site. This configuration exists + /// in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. + ServingConfig config; + + /// Output only. The time at which the version was created. + core.String createTime; + + /// Output only. Identifies the user who created the version. + ActingUser createUser; + + /// Output only. The time at which the version was `DELETED`. + core.String deleteTime; + + /// Output only. Identifies the user who `DELETED` the version. + ActingUser deleteUser; + + /// Output only. The total number of files associated with the version. + /// <br>This value is calculated after a version is `FINALIZED`. + core.String fileCount; + + /// Output only. The time at which the version was `FINALIZED`. + core.String finalizeTime; + + /// Output only. Identifies the user who `FINALIZED` the version. + ActingUser finalizeUser; + + /// The labels used for extra metadata and/or filtering. + core.Map<core.String, core.String> labels; + + /// The unique identifier for a version, in the format: + /// <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> + /// This name is provided in the response body when you call the + /// [`CreateVersion`](../sites.versions/create) endpoint. + core.String name; + + /// The deploy status of a version. + /// <br> + /// <br>For a successful deploy, call the + /// [`CreateVersion`](sites.versions/create) endpoint to make a new version + /// (`CREATED` status), + /// [upload all desired files](sites.versions/populateFiles) to the version, + /// then [update](sites.versions/patch) the version to the `FINALIZED` status. + /// <br> + /// <br>Note that if you leave the version in the `CREATED` state for more + /// than 12 hours, the system will automatically mark the version as + /// `ABANDONED`. + /// <br> + /// <br>You can also change the status of a version to `DELETED` by calling + /// the + /// [`DeleteVersion`](sites.versions/delete) endpoint. + /// Possible string values are: + /// - "VERSION_STATUS_UNSPECIFIED" : The default status; should not be + /// intentionally used. + /// - "CREATED" : The version has been created, and content is currently being + /// added to the + /// version. + /// - "FINALIZED" : All content has been added to the version, and the version + /// can no longer be + /// changed. + /// - "DELETED" : The version has been deleted. + /// - "ABANDONED" : The version was not updated to `FINALIZED` within + /// 12 hours and was + /// automatically deleted. + /// - "EXPIRED" : The version has fallen out of the site-configured retention + /// window and its + /// associated files in GCS have been/been scheduled for deletion. + core.String status; + + /// Output only. The total stored bytesize of the version. + /// <br>This value is calculated after a version is `FINALIZED`. + core.String versionBytes; + + Version(); + + Version.fromJson(core.Map _json) { + if (_json.containsKey("config")) { + config = new ServingConfig.fromJson(_json["config"]); + } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } + if (_json.containsKey("createUser")) { + createUser = new ActingUser.fromJson(_json["createUser"]); + } + if (_json.containsKey("deleteTime")) { + deleteTime = _json["deleteTime"]; + } + if (_json.containsKey("deleteUser")) { + deleteUser = new ActingUser.fromJson(_json["deleteUser"]); + } + if (_json.containsKey("fileCount")) { + fileCount = _json["fileCount"]; + } + if (_json.containsKey("finalizeTime")) { + finalizeTime = _json["finalizeTime"]; + } + if (_json.containsKey("finalizeUser")) { + finalizeUser = new ActingUser.fromJson(_json["finalizeUser"]); + } + if (_json.containsKey("labels")) { + labels = (_json["labels"] as core.Map).cast<core.String, core.String>(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("status")) { + status = _json["status"]; + } + if (_json.containsKey("versionBytes")) { + versionBytes = _json["versionBytes"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (config != null) { + _json["config"] = (config).toJson(); + } + if (createTime != null) { + _json["createTime"] = createTime; + } + if (createUser != null) { + _json["createUser"] = (createUser).toJson(); + } + if (deleteTime != null) { + _json["deleteTime"] = deleteTime; + } + if (deleteUser != null) { + _json["deleteUser"] = (deleteUser).toJson(); + } + if (fileCount != null) { + _json["fileCount"] = fileCount; + } + if (finalizeTime != null) { + _json["finalizeTime"] = finalizeTime; + } + if (finalizeUser != null) { + _json["finalizeUser"] = (finalizeUser).toJson(); + } + if (labels != null) { + _json["labels"] = labels; + } + if (name != null) { + _json["name"] = name; + } + if (status != null) { + _json["status"] = status; + } + if (versionBytes != null) { + _json["versionBytes"] = versionBytes; + } + return _json; + } +} + +/// A static content file that is part of a version. +class VersionFile { + /// The SHA256 content hash of the file. + core.String hash; + + /// The URI at which the file's content should display. + core.String path; + + /// Output only. The current status of a particular file in the specified + /// version. + /// <br>The value will be either `pending upload` or `uploaded`. + /// Possible string values are: + /// - "STATUS_UNSPECIFIED" : The default status; should not be intentionally + /// used. + /// - "EXPECTED" : The file has been included in the version and is expected + /// to be uploaded + /// in the near future. + /// - "ACTIVE" : The file has already been uploaded to Firebase Hosting. + core.String status; + + VersionFile(); + + VersionFile.fromJson(core.Map _json) { + if (_json.containsKey("hash")) { + hash = _json["hash"]; + } + if (_json.containsKey("path")) { + path = _json["path"]; + } + if (_json.containsKey("status")) { + status = _json["status"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (hash != null) { + _json["hash"] = hash; + } + if (path != null) { + _json["path"] = path; + } + if (status != null) { + _json["status"] = status; + } + return _json; + } +}
diff --git a/generated/googleapis_beta/lib/iap/v1beta1.dart b/generated/googleapis_beta/lib/iap/v1beta1.dart deleted file mode 100644 index 81aa8c5..0000000 --- a/generated/googleapis_beta/lib/iap/v1beta1.dart +++ /dev/null
@@ -1,1093 +0,0 @@ -// This is a generated file (see the discoveryapis_generator project). - -// ignore_for_file: unnecessary_cast - -library googleapis_beta.iap.v1beta1; - -import 'dart:core' as core; -import 'dart:async' as async; -import 'dart:convert' as convert; - -import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; -import 'package:http/http.dart' as http; - -export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' - show ApiRequestError, DetailedApiRequestError; - -const core.String USER_AGENT = 'dart-api-client iap/v1beta1'; - -/// Controls access to cloud applications running on Google Cloud Platform. -class IapApi { - /// View and manage your data across Google Cloud Platform services - static const CloudPlatformScope = - "https://www.googleapis.com/auth/cloud-platform"; - - final commons.ApiRequester _requester; - - ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); - - IapApi(http.Client client, - {core.String rootUrl: "https://iap.googleapis.com/", - core.String servicePath: ""}) - : _requester = - new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); -} - -class ProjectsResourceApi { - final commons.ApiRequester _requester; - - ProjectsIapWebResourceApi get iapWeb => - new ProjectsIapWebResourceApi(_requester); - - ProjectsResourceApi(commons.ApiRequester client) : _requester = client; -} - -class ProjectsIapWebResourceApi { - final commons.ApiRequester _requester; - - ProjectsIapWebServicesResourceApi get services => - new ProjectsIapWebServicesResourceApi(_requester); - - ProjectsIapWebResourceApi(commons.ApiRequester client) : _requester = client; - - /// Gets the access control policy for an Identity-Aware Proxy protected - /// resource. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy is being - /// requested. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern "^projects/[^/]+/iap_web/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [Policy]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<Policy> getIamPolicy( - GetIamPolicyRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':getIamPolicy'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Policy.fromJson(data)); - } - - /// Sets the access control policy for an Identity-Aware Proxy protected - /// resource. Replaces any existing policy. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy is being - /// specified. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern "^projects/[^/]+/iap_web/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [Policy]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<Policy> setIamPolicy( - SetIamPolicyRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':setIamPolicy'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Policy.fromJson(data)); - } - - /// Returns permissions that a caller has on the Identity-Aware Proxy - /// protected - /// resource. If the resource does not exist or the caller does not have - /// Identity-Aware Proxy permissions a [google.rpc.Code.PERMISSION_DENIED] - /// will be returned. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy detail is being - /// requested. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern "^projects/[^/]+/iap_web/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [TestIamPermissionsResponse]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<TestIamPermissionsResponse> testIamPermissions( - TestIamPermissionsRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':testIamPermissions'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response - .then((data) => new TestIamPermissionsResponse.fromJson(data)); - } -} - -class ProjectsIapWebServicesResourceApi { - final commons.ApiRequester _requester; - - ProjectsIapWebServicesVersionsResourceApi get versions => - new ProjectsIapWebServicesVersionsResourceApi(_requester); - - ProjectsIapWebServicesResourceApi(commons.ApiRequester client) - : _requester = client; - - /// Gets the access control policy for an Identity-Aware Proxy protected - /// resource. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy is being - /// requested. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [Policy]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<Policy> getIamPolicy( - GetIamPolicyRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':getIamPolicy'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Policy.fromJson(data)); - } - - /// Sets the access control policy for an Identity-Aware Proxy protected - /// resource. Replaces any existing policy. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy is being - /// specified. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [Policy]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<Policy> setIamPolicy( - SetIamPolicyRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':setIamPolicy'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Policy.fromJson(data)); - } - - /// Returns permissions that a caller has on the Identity-Aware Proxy - /// protected - /// resource. If the resource does not exist or the caller does not have - /// Identity-Aware Proxy permissions a [google.rpc.Code.PERMISSION_DENIED] - /// will be returned. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy detail is being - /// requested. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [TestIamPermissionsResponse]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<TestIamPermissionsResponse> testIamPermissions( - TestIamPermissionsRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':testIamPermissions'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response - .then((data) => new TestIamPermissionsResponse.fromJson(data)); - } -} - -class ProjectsIapWebServicesVersionsResourceApi { - final commons.ApiRequester _requester; - - ProjectsIapWebServicesVersionsResourceApi(commons.ApiRequester client) - : _requester = client; - - /// Gets the access control policy for an Identity-Aware Proxy protected - /// resource. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy is being - /// requested. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern - /// "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [Policy]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<Policy> getIamPolicy( - GetIamPolicyRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':getIamPolicy'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Policy.fromJson(data)); - } - - /// Sets the access control policy for an Identity-Aware Proxy protected - /// resource. Replaces any existing policy. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy is being - /// specified. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern - /// "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [Policy]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<Policy> setIamPolicy( - SetIamPolicyRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':setIamPolicy'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Policy.fromJson(data)); - } - - /// Returns permissions that a caller has on the Identity-Aware Proxy - /// protected - /// resource. If the resource does not exist or the caller does not have - /// Identity-Aware Proxy permissions a [google.rpc.Code.PERMISSION_DENIED] - /// will be returned. - /// More information about managing access via IAP can be found at: - /// https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [resource] - REQUIRED: The resource for which the policy detail is being - /// requested. - /// See the operation documentation for the appropriate value for this field. - /// Value must have pattern - /// "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$". - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [TestIamPermissionsResponse]. - /// - /// Completes with a [commons.ApiRequestError] if the API endpoint returned an - /// error. - /// - /// If the used [http.Client] completes with an error when making a REST call, - /// this method will complete with the same error. - async.Future<TestIamPermissionsResponse> testIamPermissions( - TestIamPermissionsRequest request, core.String resource, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (resource == null) { - throw new core.ArgumentError("Parameter resource is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/' + - commons.Escaper.ecapeVariableReserved('$resource') + - ':testIamPermissions'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response - .then((data) => new TestIamPermissionsResponse.fromJson(data)); - } -} - -/// 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:foo@gmail.com" -/// ] -/// }, -/// { -/// "log_type": "DATA_WRITE", -/// }, -/// { -/// "log_type": "ADMIN_READ", -/// } -/// ] -/// }, -/// { -/// "service": "fooservice.googleapis.com" -/// "audit_log_configs": [ -/// { -/// "log_type": "DATA_READ", -/// }, -/// { -/// "log_type": "DATA_WRITE", -/// "exempted_members": [ -/// "user:bar@gmail.com" -/// ] -/// } -/// ] -/// } -/// ] -/// } -/// -/// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ -/// logging. It also exempts foo@gmail.com from DATA_READ logging, and -/// bar@gmail.com from DATA_WRITE logging. -class AuditConfig { - /// The configuration for logging of each type of permission. - core.List<AuditLogConfig> auditLogConfigs; - - /// Specifies a service that will be enabled for audit logging. - /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - /// `allServices` is a special value that covers all services. - core.String service; - - AuditConfig(); - - AuditConfig.fromJson(core.Map _json) { - if (_json.containsKey("auditLogConfigs")) { - auditLogConfigs = (_json["auditLogConfigs"] as core.List) - .map<AuditLogConfig>((value) => new AuditLogConfig.fromJson(value)) - .toList(); - } - if (_json.containsKey("service")) { - service = _json["service"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (auditLogConfigs != null) { - _json["auditLogConfigs"] = - auditLogConfigs.map((value) => (value).toJson()).toList(); - } - if (service != null) { - _json["service"] = service; - } - return _json; - } -} - -/// Provides the configuration for logging a type of permissions. -/// Example: -/// -/// { -/// "audit_log_configs": [ -/// { -/// "log_type": "DATA_READ", -/// "exempted_members": [ -/// "user:foo@gmail.com" -/// ] -/// }, -/// { -/// "log_type": "DATA_WRITE", -/// } -/// ] -/// } -/// -/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting -/// foo@gmail.com from DATA_READ logging. -class AuditLogConfig { - /// Specifies the identities that do not cause logging for this type of - /// permission. - /// Follows the same format of Binding.members. - core.List<core.String> exemptedMembers; - - /// The log type that this config enables. - /// Possible string values are: - /// - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. - /// - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy - /// - "DATA_WRITE" : Data writes. Example: CloudSQL Users create - /// - "DATA_READ" : Data reads. Example: CloudSQL Users list - core.String logType; - - AuditLogConfig(); - - AuditLogConfig.fromJson(core.Map _json) { - if (_json.containsKey("exemptedMembers")) { - exemptedMembers = - (_json["exemptedMembers"] as core.List).cast<core.String>(); - } - if (_json.containsKey("logType")) { - logType = _json["logType"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (exemptedMembers != null) { - _json["exemptedMembers"] = exemptedMembers; - } - if (logType != null) { - _json["logType"] = logType; - } - return _json; - } -} - -/// Associates `members` with a `role`. -class Binding { - /// Unimplemented. The condition that is associated with this binding. - /// NOTE: an unsatisfied condition will not allow user access via current - /// binding. Different bindings, including their conditions, are examined - /// independently. - Expr condition; - - /// Specifies the identities requesting access for a Cloud Platform resource. - /// `members` can have the following values: - /// - /// * `allUsers`: A special identifier that represents anyone who is - /// on the internet; with or without a Google account. - /// - /// * `allAuthenticatedUsers`: A special identifier that represents anyone - /// who is authenticated with a Google account or a service account. - /// - /// * `user:{emailid}`: An email address that represents a specific Google - /// account. For example, `alice@gmail.com` . - /// - /// - /// * `serviceAccount:{emailid}`: An email address that represents a service - /// account. For example, `my-other-app@appspot.gserviceaccount.com`. - /// - /// * `group:{emailid}`: An email address that represents a Google group. - /// For example, `admins@example.com`. - /// - /// - /// * `domain:{domain}`: A Google Apps domain name 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 `members`. - /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - core.String role; - - Binding(); - - Binding.fromJson(core.Map _json) { - if (_json.containsKey("condition")) { - condition = new Expr.fromJson(_json["condition"]); - } - if (_json.containsKey("members")) { - members = (_json["members"] as core.List).cast<core.String>(); - } - if (_json.containsKey("role")) { - role = _json["role"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (condition != null) { - _json["condition"] = (condition).toJson(); - } - if (members != null) { - _json["members"] = members; - } - if (role != null) { - _json["role"] = role; - } - return _json; - } -} - -/// Represents an expression text. Example: -/// -/// title: "User account presence" -/// description: "Determines whether the request has a user account" -/// expression: "size(request.user) > 0" -class Expr { - /// An optional description of the expression. This is a longer text which - /// describes the expression, e.g. when hovered over it in a UI. - core.String description; - - /// Textual representation of an expression in - /// Common Expression Language syntax. - /// - /// The application context of the containing message determines which - /// well-known feature set of CEL is supported. - core.String expression; - - /// An optional string indicating the location of the expression for error - /// reporting, e.g. a file name and a position in the file. - core.String location; - - /// An optional title for the expression, i.e. a short string describing - /// its purpose. This can be used e.g. in UIs which allow to enter the - /// expression. - core.String title; - - Expr(); - - Expr.fromJson(core.Map _json) { - if (_json.containsKey("description")) { - description = _json["description"]; - } - if (_json.containsKey("expression")) { - expression = _json["expression"]; - } - if (_json.containsKey("location")) { - location = _json["location"]; - } - if (_json.containsKey("title")) { - title = _json["title"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (description != null) { - _json["description"] = description; - } - if (expression != null) { - _json["expression"] = expression; - } - if (location != null) { - _json["location"] = location; - } - if (title != null) { - _json["title"] = title; - } - return _json; - } -} - -/// Request message for `GetIamPolicy` method. -class GetIamPolicyRequest { - GetIamPolicyRequest(); - - GetIamPolicyRequest.fromJson(core.Map _json) {} - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - return _json; - } -} - -/// Defines an Identity and Access Management (IAM) policy. It is used to -/// specify access control policies for Cloud Platform resources. -/// -/// -/// A `Policy` consists of a list of `bindings`. A `binding` binds a list of -/// `members` to a `role`, where the members can be user accounts, Google -/// groups, -/// Google domains, and service accounts. A `role` is a named list of -/// permissions -/// defined by IAM. -/// -/// **JSON Example** -/// -/// { -/// "bindings": [ -/// { -/// "role": "roles/owner", -/// "members": [ -/// "user:mike@example.com", -/// "group:admins@example.com", -/// "domain:google.com", -/// "serviceAccount:my-other-app@appspot.gserviceaccount.com" -/// ] -/// }, -/// { -/// "role": "roles/viewer", -/// "members": ["user:sean@example.com"] -/// } -/// ] -/// } -/// -/// **YAML Example** -/// -/// bindings: -/// - members: -/// - user:mike@example.com -/// - group:admins@example.com -/// - domain:google.com -/// - serviceAccount:my-other-app@appspot.gserviceaccount.com -/// role: roles/owner -/// - members: -/// - user:sean@example.com -/// role: roles/viewer -/// -/// -/// For a description of IAM and its features, see the -/// [IAM developer's guide](https://cloud.google.com/iam/docs). -class Policy { - /// Specifies cloud audit logging configuration for this policy. - core.List<AuditConfig> auditConfigs; - - /// Associates a list of `members` to a `role`. - /// `bindings` with no members will result in an error. - core.List<Binding> bindings; - - /// `etag` is used for optimistic concurrency control as a way to help - /// prevent simultaneous updates of a policy from overwriting each other. - /// It is strongly suggested that systems make use of the `etag` in the - /// read-modify-write cycle to perform policy updates in order to avoid race - /// conditions: An `etag` is returned in the response to `getIamPolicy`, and - /// systems are expected to put that etag in the request to `setIamPolicy` to - /// ensure that their change will be applied to the same version of the - /// policy. - /// - /// If no `etag` is provided in the call to `setIamPolicy`, then the existing - /// policy is overwritten blindly. - core.String etag; - core.List<core.int> get etagAsBytes { - return convert.base64.decode(etag); - } - - void set etagAsBytes(core.List<core.int> _bytes) { - etag = - convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); - } - - /// Deprecated. - core.int version; - - Policy(); - - Policy.fromJson(core.Map _json) { - if (_json.containsKey("auditConfigs")) { - auditConfigs = (_json["auditConfigs"] as core.List) - .map<AuditConfig>((value) => new AuditConfig.fromJson(value)) - .toList(); - } - if (_json.containsKey("bindings")) { - bindings = (_json["bindings"] as core.List) - .map<Binding>((value) => new Binding.fromJson(value)) - .toList(); - } - if (_json.containsKey("etag")) { - etag = _json["etag"]; - } - if (_json.containsKey("version")) { - version = _json["version"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (auditConfigs != null) { - _json["auditConfigs"] = - auditConfigs.map((value) => (value).toJson()).toList(); - } - if (bindings != null) { - _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); - } - if (etag != null) { - _json["etag"] = etag; - } - if (version != null) { - _json["version"] = version; - } - return _json; - } -} - -/// Request message for `SetIamPolicy` method. -class SetIamPolicyRequest { - /// REQUIRED: The complete policy to be applied to the `resource`. The size of - /// the policy is limited to a few 10s of KB. An empty policy is a - /// valid policy but certain Cloud Platform services (such as Projects) - /// might reject them. - Policy policy; - - /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. - /// Only - /// the fields in the mask will be modified. If no mask is provided, the - /// following default mask is used: - /// paths: "bindings, etag" - /// This field is only used by Cloud IAM. - core.String updateMask; - - SetIamPolicyRequest(); - - SetIamPolicyRequest.fromJson(core.Map _json) { - if (_json.containsKey("policy")) { - policy = new Policy.fromJson(_json["policy"]); - } - if (_json.containsKey("updateMask")) { - updateMask = _json["updateMask"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (policy != null) { - _json["policy"] = (policy).toJson(); - } - if (updateMask != null) { - _json["updateMask"] = updateMask; - } - return _json; - } -} - -/// Request message for `TestIamPermissions` method. -class TestIamPermissionsRequest { - /// The set of permissions to check for the `resource`. Permissions with - /// wildcards (such as '*' or 'storage.*') are not allowed. For more - /// information see - /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - core.List<core.String> permissions; - - TestIamPermissionsRequest(); - - TestIamPermissionsRequest.fromJson(core.Map _json) { - if (_json.containsKey("permissions")) { - permissions = (_json["permissions"] as core.List).cast<core.String>(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (permissions != null) { - _json["permissions"] = permissions; - } - return _json; - } -} - -/// Response message for `TestIamPermissions` method. -class TestIamPermissionsResponse { - /// A subset of `TestPermissionsRequest.permissions` that the caller is - /// allowed. - core.List<core.String> permissions; - - TestIamPermissionsResponse(); - - TestIamPermissionsResponse.fromJson(core.Map _json) { - if (_json.containsKey("permissions")) { - permissions = (_json["permissions"] as core.List).cast<core.String>(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (permissions != null) { - _json["permissions"] = permissions; - } - return _json; - } -}
diff --git a/generated/googleapis_beta/lib/language/v1beta1.dart b/generated/googleapis_beta/lib/language/v1beta1.dart index 6738bd8..1f3f673 100644 --- a/generated/googleapis_beta/lib/language/v1beta1.dart +++ b/generated/googleapis_beta/lib/language/v1beta1.dart
@@ -16,9 +16,9 @@ const core.String USER_AGENT = 'dart-api-client language/v1beta1'; -/// Provides natural language understanding technologies to developers. Examples -/// include sentiment analysis, entity recognition, entity sentiment analysis, -/// and text annotations. +/// Provides natural language understanding technologies, such as sentiment +/// analysis, entity recognition, entity sentiment analysis, and other text +/// annotations, to developers. class LanguageApi { /// Apply machine learning models to reveal the structure and meaning of text static const CloudLanguageScope =
diff --git a/generated/googleapis_beta/lib/language/v1beta2.dart b/generated/googleapis_beta/lib/language/v1beta2.dart index 721cc17..8541ba1 100644 --- a/generated/googleapis_beta/lib/language/v1beta2.dart +++ b/generated/googleapis_beta/lib/language/v1beta2.dart
@@ -16,9 +16,9 @@ const core.String USER_AGENT = 'dart-api-client language/v1beta2'; -/// Provides natural language understanding technologies to developers. Examples -/// include sentiment analysis, entity recognition, entity sentiment analysis, -/// and text annotations. +/// Provides natural language understanding technologies, such as sentiment +/// analysis, entity recognition, entity sentiment analysis, and other text +/// annotations, to developers. class LanguageApi { /// Apply machine learning models to reveal the structure and meaning of text static const CloudLanguageScope = @@ -1235,6 +1235,7 @@ /// All available features for sentiment, syntax, and semantic analysis. /// Setting each one to true will enable that specific analysis for the input. +/// Next ID: 10 class Features { /// Classify the full document into categories. If this is true, /// the API will use the default model which classifies into a @@ -1559,6 +1560,7 @@ /// Represents the feeling associated with the entire text or entities in /// the text. +/// Next ID: 6 class Sentiment { /// A non-negative number in the [0, +inf) range, which represents /// the absolute magnitude of sentiment regardless of score (positive or
diff --git a/generated/googleapis_beta/lib/logging/v2beta1.dart b/generated/googleapis_beta/lib/logging/v2beta1.dart index 3c83f20..bfd06f0 100644 --- a/generated/googleapis_beta/lib/logging/v2beta1.dart +++ b/generated/googleapis_beta/lib/logging/v2beta1.dart
@@ -40,13 +40,9 @@ final commons.ApiRequester _requester; - BillingAccountsResourceApi get billingAccounts => - new BillingAccountsResourceApi(_requester); EntriesResourceApi get entries => new EntriesResourceApi(_requester); MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors => new MonitoredResourceDescriptorsResourceApi(_requester); - OrganizationsResourceApi get organizations => - new OrganizationsResourceApi(_requester); ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); LoggingApi(http.Client client, @@ -56,148 +52,14 @@ new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); } -class BillingAccountsResourceApi { - final commons.ApiRequester _requester; - - BillingAccountsLogsResourceApi get logs => - new BillingAccountsLogsResourceApi(_requester); - - BillingAccountsResourceApi(commons.ApiRequester client) : _requester = client; -} - -class BillingAccountsLogsResourceApi { - final commons.ApiRequester _requester; - - BillingAccountsLogsResourceApi(commons.ApiRequester client) - : _requester = client; - - /// Deletes all the log entries in a log. The log reappears if it receives new - /// entries. Log entries written shortly before the delete operation might not - /// be deleted. - /// - /// Request parameters: - /// - /// [logName] - Required. The resource name of the log to delete: - /// "projects/[PROJECT_ID]/logs/[LOG_ID]" - /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - /// "folders/[FOLDER_ID]/logs/[LOG_ID]" - /// [LOG_ID] must be URL-encoded. For example, - /// "projects/my-project-id/logs/syslog", - /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". - /// For more information about log names, see LogEntry. - /// Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$". - /// - /// [$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 logName, {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (logName == null) { - throw new core.ArgumentError("Parameter logName is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName'); - - var _response = _requester.request(_url, "DELETE", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Empty.fromJson(data)); - } - - /// Lists the logs in projects, organizations, folders, or billing accounts. - /// Only logs that have entries are listed. - /// - /// Request parameters: - /// - /// [parent] - Required. The resource name that owns the logs: - /// "projects/[PROJECT_ID]" - /// "organizations/[ORGANIZATION_ID]" - /// "billingAccounts/[BILLING_ACCOUNT_ID]" - /// "folders/[FOLDER_ID]" - /// - /// Value must have pattern "^billingAccounts/[^/]+$". - /// - /// [pageToken] - Optional. If present, then retrieve the next batch of - /// results from the preceding call to this method. pageToken must be the - /// value of nextPageToken from the previous response. The values of other - /// method parameters should be identical to those in the previous call. - /// - /// [pageSize] - Optional. The maximum number of results to return from this - /// request. Non-positive values are ignored. The presence of nextPageToken in - /// the response indicates that more results might be available. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [ListLogsResponse]. - /// - /// 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<ListLogsResponse> list(core.String parent, - {core.String pageToken, core.int pageSize, core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (parent == null) { - throw new core.ArgumentError("Parameter parent is required."); - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = - 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new ListLogsResponse.fromJson(data)); - } -} - class EntriesResourceApi { final commons.ApiRequester _requester; EntriesResourceApi(commons.ApiRequester client) : _requester = client; - /// Lists log entries. Use this method to retrieve log entries from Logging. - /// For ways to export log entries, see Exporting Logs. + /// Lists log entries. Use this method to retrieve log entries that originated + /// from a project/folder/organization/billing account. For ways to export log + /// entries, see Exporting Logs. /// /// [request] - The metadata request object. /// @@ -298,15 +160,15 @@ /// /// Request parameters: /// - /// [pageSize] - Optional. The maximum number of results to return from this - /// request. Non-positive values are ignored. The presence of nextPageToken in - /// the response indicates that more results might be available. - /// /// [pageToken] - Optional. If present, then retrieve the next batch of /// results from the preceding call to this method. pageToken must be the /// value of nextPageToken from the previous response. The values of other /// method parameters should be identical to those in the previous call. /// + /// [pageSize] - Optional. The maximum number of results to return from this + /// request. Non-positive values are ignored. The presence of nextPageToken in + /// the response indicates that more results might be available. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -318,7 +180,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListMonitoredResourceDescriptorsResponse> list( - {core.int pageSize, core.String pageToken, core.String $fields}) { + {core.String pageToken, core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -326,12 +188,12 @@ var _downloadOptions = commons.DownloadOptions.Metadata; var _body = null; - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -349,145 +211,9 @@ } } -class OrganizationsResourceApi { - final commons.ApiRequester _requester; - - OrganizationsLogsResourceApi get logs => - new OrganizationsLogsResourceApi(_requester); - - OrganizationsResourceApi(commons.ApiRequester client) : _requester = client; -} - -class OrganizationsLogsResourceApi { - final commons.ApiRequester _requester; - - OrganizationsLogsResourceApi(commons.ApiRequester client) - : _requester = client; - - /// Deletes all the log entries in a log. The log reappears if it receives new - /// entries. Log entries written shortly before the delete operation might not - /// be deleted. - /// - /// Request parameters: - /// - /// [logName] - Required. The resource name of the log to delete: - /// "projects/[PROJECT_ID]/logs/[LOG_ID]" - /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - /// "folders/[FOLDER_ID]/logs/[LOG_ID]" - /// [LOG_ID] must be URL-encoded. For example, - /// "projects/my-project-id/logs/syslog", - /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". - /// For more information about log names, see LogEntry. - /// Value must have pattern "^organizations/[^/]+/logs/[^/]+$". - /// - /// [$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 logName, {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (logName == null) { - throw new core.ArgumentError("Parameter logName is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName'); - - var _response = _requester.request(_url, "DELETE", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Empty.fromJson(data)); - } - - /// Lists the logs in projects, organizations, folders, or billing accounts. - /// Only logs that have entries are listed. - /// - /// Request parameters: - /// - /// [parent] - Required. The resource name that owns the logs: - /// "projects/[PROJECT_ID]" - /// "organizations/[ORGANIZATION_ID]" - /// "billingAccounts/[BILLING_ACCOUNT_ID]" - /// "folders/[FOLDER_ID]" - /// - /// Value must have pattern "^organizations/[^/]+$". - /// - /// [pageToken] - Optional. If present, then retrieve the next batch of - /// results from the preceding call to this method. pageToken must be the - /// value of nextPageToken from the previous response. The values of other - /// method parameters should be identical to those in the previous call. - /// - /// [pageSize] - Optional. The maximum number of results to return from this - /// request. Non-positive values are ignored. The presence of nextPageToken in - /// the response indicates that more results might be available. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [ListLogsResponse]. - /// - /// 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<ListLogsResponse> list(core.String parent, - {core.String pageToken, core.int pageSize, core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (parent == null) { - throw new core.ArgumentError("Parameter parent is required."); - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = - 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new ListLogsResponse.fromJson(data)); - } -} - class ProjectsResourceApi { final commons.ApiRequester _requester; - ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); ProjectsMetricsResourceApi get metrics => new ProjectsMetricsResourceApi(_requester); ProjectsSinksResourceApi get sinks => @@ -496,131 +222,6 @@ ProjectsResourceApi(commons.ApiRequester client) : _requester = client; } -class ProjectsLogsResourceApi { - final commons.ApiRequester _requester; - - ProjectsLogsResourceApi(commons.ApiRequester client) : _requester = client; - - /// Deletes all the log entries in a log. The log reappears if it receives new - /// entries. Log entries written shortly before the delete operation might not - /// be deleted. - /// - /// Request parameters: - /// - /// [logName] - Required. The resource name of the log to delete: - /// "projects/[PROJECT_ID]/logs/[LOG_ID]" - /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - /// "folders/[FOLDER_ID]/logs/[LOG_ID]" - /// [LOG_ID] must be URL-encoded. For example, - /// "projects/my-project-id/logs/syslog", - /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". - /// For more information about log names, see LogEntry. - /// Value must have pattern "^projects/[^/]+/logs/[^/]+$". - /// - /// [$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 logName, {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (logName == null) { - throw new core.ArgumentError("Parameter logName is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName'); - - var _response = _requester.request(_url, "DELETE", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Empty.fromJson(data)); - } - - /// Lists the logs in projects, organizations, folders, or billing accounts. - /// Only logs that have entries are listed. - /// - /// Request parameters: - /// - /// [parent] - Required. The resource name that owns the logs: - /// "projects/[PROJECT_ID]" - /// "organizations/[ORGANIZATION_ID]" - /// "billingAccounts/[BILLING_ACCOUNT_ID]" - /// "folders/[FOLDER_ID]" - /// - /// Value must have pattern "^projects/[^/]+$". - /// - /// [pageToken] - Optional. If present, then retrieve the next batch of - /// results from the preceding call to this method. pageToken must be the - /// value of nextPageToken from the previous response. The values of other - /// method parameters should be identical to those in the previous call. - /// - /// [pageSize] - Optional. The maximum number of results to return from this - /// request. Non-positive values are ignored. The presence of nextPageToken in - /// the response indicates that more results might be available. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [ListLogsResponse]. - /// - /// 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<ListLogsResponse> list(core.String parent, - {core.String pageToken, core.int pageSize, core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (parent == null) { - throw new core.ArgumentError("Parameter parent is required."); - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = - 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new ListLogsResponse.fromJson(data)); - } -} - class ProjectsMetricsResourceApi { final commons.ApiRequester _requester; @@ -778,15 +379,15 @@ /// /// Value must have pattern "^projects/[^/]+$". /// + /// [pageSize] - Optional. The maximum number of results to return from this + /// request. Non-positive values are ignored. The presence of nextPageToken in + /// the response indicates that more results might be available. + /// /// [pageToken] - Optional. If present, then retrieve the next batch of /// results from the preceding call to this method. pageToken must be the /// value of nextPageToken from the previous response. The values of other /// method parameters should be identical to those in the previous call. /// - /// [pageSize] - Optional. The maximum number of results to return from this - /// request. Non-positive values are ignored. The presence of nextPageToken in - /// the response indicates that more results might be available. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -798,7 +399,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListLogMetricsResponse> list(core.String parent, - {core.String pageToken, core.int pageSize, core.String $fields}) { + {core.int pageSize, core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -809,12 +410,12 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1129,7 +730,7 @@ } /// Updates a sink. This method replaces the following fields in the existing - /// sink with values from the new sink: destination, and filter. The updated + /// sink with values from the new sink: destination, and filter.The updated /// sink might also have a new writer_identity; see the unique_writer_identity /// field. /// @@ -1164,7 +765,7 @@ /// backwards compatibility purposes: destination,filter,includeChildren At /// some point in the future, behavior will be removed and specifying an empty /// updateMask will be an error.For a detailed FieldMask definition, see - /// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + /// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: /// updateMask=filter. /// /// [$fields] - Selector specifying which fields to include in a partial @@ -1792,41 +1393,6 @@ } } -/// Result returned from ListLogs. -class ListLogsResponse { - /// A list of log names. For example, "projects/my-project/syslog" or - /// "organizations/123/cloudresourcemanager.googleapis.com%2Factivity". - core.List<core.String> logNames; - - /// If there might be more results than those appearing in this response, then - /// nextPageToken is included. To get the next set of results, call this - /// method again using the value of nextPageToken as pageToken. - core.String nextPageToken; - - ListLogsResponse(); - - ListLogsResponse.fromJson(core.Map _json) { - if (_json.containsKey("logNames")) { - logNames = (_json["logNames"] as core.List).cast<core.String>(); - } - if (_json.containsKey("nextPageToken")) { - nextPageToken = _json["nextPageToken"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (logNames != null) { - _json["logNames"] = logNames; - } - if (nextPageToken != null) { - _json["nextPageToken"] = nextPageToken; - } - return _json; - } -} - /// Result returned from ListMonitoredResourceDescriptors. class ListMonitoredResourceDescriptorsResponse { /// If there might be more results than those appearing in this response, then @@ -1945,7 +1511,7 @@ /// with a leading slash will never return any results. core.String logName; - /// Output only. Additional metadata about the monitored resource. Only + /// Output only. Additional metadata about the monitored resource.Only /// k8s_container, k8s_pod, and k8s_node MonitoredResources have this field /// populated. MonitoredResourceMetadata metadata; @@ -1964,10 +1530,10 @@ /// Output only. The time the log entry was received by Logging. core.String receiveTimestamp; - /// Required. The primary monitored resource associated with this log entry. - /// Example: a log entry that reports a database error would be associated - /// with the monitored resource designating the particular database that - /// reported the error. + /// Required. The primary monitored resource associated with this log + /// entry.Example: a log entry that reports a database error would be + /// associated with the monitored resource designating the particular database + /// that reported the error. MonitoredResource resource; /// Optional. The severity of the log entry. The default value is @@ -1991,7 +1557,7 @@ /// if any. LogEntrySourceLocation sourceLocation; - /// Optional. The span ID within the trace associated with the log entry. For + /// Optional. The span ID within the trace associated with the log entry.For /// Trace spans, this is the same format that the Trace API v2 uses: a /// 16-character hexadecimal encoding of an 8-byte array, such as /// <code>"000000000000004a"</code>. @@ -2018,6 +1584,14 @@ /// projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 core.String trace; + /// Optional. The sampling decision of the trace associated with the log + /// entry.True means that the trace resource name in the trace field was + /// sampled for storage in a trace backend. False means that the trace was not + /// sampled for storage when this log entry was written, or the sampling + /// decision was unknown at the time. A non-sampled trace value is still + /// useful as a request correlation identifier. The default is False. + core.bool traceSampled; + LogEntry(); LogEntry.fromJson(core.Map _json) { @@ -2072,6 +1646,9 @@ if (_json.containsKey("trace")) { trace = _json["trace"]; } + if (_json.containsKey("traceSampled")) { + traceSampled = _json["traceSampled"]; + } } core.Map<core.String, core.Object> toJson() { @@ -2125,6 +1702,9 @@ if (trace != null) { _json["trace"] = trace; } + if (traceSampled != null) { + _json["traceSampled"] = traceSampled; + } return _json; } } @@ -2307,7 +1887,12 @@ /// used to create a histogram of the extracted values. BucketOptions bucketOptions; + /// Output only. The creation timestamp of the metric.This field may not be + /// present for older metrics. + core.String createTime; + /// Optional. A description of this metric, which is used in documentation. + /// The maximum length of the description is 8000 characters. core.String description; /// Required. An advanced logs filter which is used to match log entries. @@ -2357,6 +1942,10 @@ /// "projects/my-project/metrics/nginx%2Frequests". core.String name; + /// Output only. The last update timestamp of the metric.This field may not be + /// present for older metrics. + core.String updateTime; + /// Optional. A value_extractor is required when using a distribution /// logs-based metric to extract the values to record from a log entry. Two /// functions are supported for value extraction: EXTRACT(field) or @@ -2387,6 +1976,9 @@ if (_json.containsKey("bucketOptions")) { bucketOptions = new BucketOptions.fromJson(_json["bucketOptions"]); } + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } if (_json.containsKey("description")) { description = _json["description"]; } @@ -2404,6 +1996,9 @@ if (_json.containsKey("name")) { name = _json["name"]; } + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; + } if (_json.containsKey("valueExtractor")) { valueExtractor = _json["valueExtractor"]; } @@ -2418,6 +2013,9 @@ if (bucketOptions != null) { _json["bucketOptions"] = (bucketOptions).toJson(); } + if (createTime != null) { + _json["createTime"] = createTime; + } if (description != null) { _json["description"] = description; } @@ -2433,6 +2031,9 @@ if (name != null) { _json["name"] = name; } + if (updateTime != null) { + _json["updateTime"] = updateTime; + } if (valueExtractor != null) { _json["valueExtractor"] = valueExtractor; } @@ -2449,18 +2050,19 @@ /// exported. The sink must be created within a project, organization, billing /// account, or folder. class LogSink { + /// Output only. The creation timestamp of the sink.This field may not be + /// present for older sinks. + core.String createTime; + /// Required. The export destination: /// "storage.googleapis.com/[GCS_BUCKET]" /// "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" /// "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" /// The sink's writer_identity, set when the sink is created, must have /// permission to write to the destination or else the log entries are not - /// exported. For more information, see Exporting Logs With Sinks. + /// exported. For more information, see Exporting Logs with Sinks. core.String destination; - /// Deprecated. This field is ignored when creating or updating sinks. - core.String endTime; - /// Optional. An advanced logs filter. The only exported log entries are those /// that are in the resource owning the sink and that match the filter. For /// example: @@ -2496,15 +2098,16 @@ /// - "V1" : LogEntry version 1 format. core.String outputVersionFormat; - /// Deprecated. This field is ignored when creating or updating sinks. - core.String startTime; + /// Output only. The last update timestamp of the sink.This field may not be + /// present for older sinks. + core.String updateTime; /// Output only. An IAM identity—a service account or group—under /// which Logging writes the exported log entries to the sink's destination. - /// This field is set by sinks.create and sinks.update, based on the setting - /// of unique_writer_identity in those methods.Until you grant this identity + /// This field is set by sinks.create and sinks.update based on the value of + /// unique_writer_identity in those methods.Until you grant this identity /// write-access to the destination, log entry exports from this sink will - /// fail. For more information, see Granting access for a resource. Consult + /// fail. For more information, see Granting Access for a Resource. Consult /// the destination service's documentation to determine the appropriate IAM /// roles to assign to the identity. core.String writerIdentity; @@ -2512,12 +2115,12 @@ LogSink(); LogSink.fromJson(core.Map _json) { + if (_json.containsKey("createTime")) { + createTime = _json["createTime"]; + } if (_json.containsKey("destination")) { destination = _json["destination"]; } - if (_json.containsKey("endTime")) { - endTime = _json["endTime"]; - } if (_json.containsKey("filter")) { filter = _json["filter"]; } @@ -2530,8 +2133,8 @@ if (_json.containsKey("outputVersionFormat")) { outputVersionFormat = _json["outputVersionFormat"]; } - if (_json.containsKey("startTime")) { - startTime = _json["startTime"]; + if (_json.containsKey("updateTime")) { + updateTime = _json["updateTime"]; } if (_json.containsKey("writerIdentity")) { writerIdentity = _json["writerIdentity"]; @@ -2541,12 +2144,12 @@ core.Map<core.String, core.Object> toJson() { final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>(); + if (createTime != null) { + _json["createTime"] = createTime; + } if (destination != null) { _json["destination"] = destination; } - if (endTime != null) { - _json["endTime"] = endTime; - } if (filter != null) { _json["filter"] = filter; } @@ -2559,8 +2162,8 @@ if (outputVersionFormat != null) { _json["outputVersionFormat"] = outputVersionFormat; } - if (startTime != null) { - _json["startTime"] = startTime; + if (updateTime != null) { + _json["updateTime"] = updateTime; } if (writerIdentity != null) { _json["writerIdentity"] = writerIdentity; @@ -3450,10 +3053,13 @@ /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" /// "folders/[FOLDER_ID]/logs/[LOG_ID]" - /// [LOG_ID] must be URL-encoded. For example, - /// "projects/my-project-id/logs/syslog" or - /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". - /// For more information about log names, see LogEntry. + /// [LOG_ID] must be URL-encoded. For example: + /// "projects/my-project-id/logs/syslog" + /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + /// The permission <code>logging.logEntries.create</code> is needed on each + /// project, organization, billing account, or folder that is receiving new + /// log entries, whether the resource is specified in <code>logName</code> or + /// in an individual log entry. core.String logName; /// Optional. Whether valid entries should be written even if some other
diff --git a/generated/googleapis_beta/lib/oslogin/v1alpha.dart b/generated/googleapis_beta/lib/oslogin/v1alpha.dart index ebaec22..2c67458 100644 --- a/generated/googleapis_beta/lib/oslogin/v1alpha.dart +++ b/generated/googleapis_beta/lib/oslogin/v1alpha.dart
@@ -62,6 +62,18 @@ /// [name] - The unique ID for the user in format `users/{user}`. /// Value must have pattern "^users/[^/]+$". /// + /// [operatingSystemType] - The type of operating system associated with the + /// account. + /// Possible string values are: + /// - "OPERATING_SYSTEM_TYPE_UNSPECIFIED" : A + /// OPERATING_SYSTEM_TYPE_UNSPECIFIED. + /// - "LINUX" : A LINUX. + /// - "WINDOWS" : A WINDOWS. + /// + /// [projectId] - The project ID of the Google Cloud Platform project. + /// + /// [systemId] - A system ID for filtering the results of the request. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -73,7 +85,10 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<LoginProfile> getLoginProfile(core.String name, - {core.String $fields}) { + {core.String operatingSystemType, + core.String projectId, + core.String systemId, + core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -84,6 +99,15 @@ if (name == null) { throw new core.ArgumentError("Parameter name is required."); } + if (operatingSystemType != null) { + _queryParams["operatingSystemType"] = [operatingSystemType]; + } + if (projectId != null) { + _queryParams["projectId"] = [projectId]; + } + if (systemId != null) { + _queryParams["systemId"] = [systemId]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; }
diff --git a/generated/googleapis_beta/lib/oslogin/v1beta.dart b/generated/googleapis_beta/lib/oslogin/v1beta.dart index 26446f7..6758131 100644 --- a/generated/googleapis_beta/lib/oslogin/v1beta.dart +++ b/generated/googleapis_beta/lib/oslogin/v1beta.dart
@@ -62,6 +62,10 @@ /// [name] - The unique ID for the user in format `users/{user}`. /// Value must have pattern "^users/[^/]+$". /// + /// [projectId] - The project ID of the Google Cloud Platform project. + /// + /// [systemId] - A system ID for filtering the results of the request. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -73,7 +77,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<LoginProfile> getLoginProfile(core.String name, - {core.String $fields}) { + {core.String projectId, core.String systemId, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -84,6 +88,12 @@ if (name == null) { throw new core.ArgumentError("Parameter name is required."); } + if (projectId != null) { + _queryParams["projectId"] = [projectId]; + } + if (systemId != null) { + _queryParams["systemId"] = [systemId]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; }
diff --git a/generated/googleapis_beta/lib/proximitybeacon/v1beta1.dart b/generated/googleapis_beta/lib/proximitybeacon/v1beta1.dart index e8fdda4..38e08b3 100644 --- a/generated/googleapis_beta/lib/proximitybeacon/v1beta1.dart +++ b/generated/googleapis_beta/lib/proximitybeacon/v1beta1.dart
@@ -457,9 +457,6 @@ /// /// Request parameters: /// - /// [pageToken] - A pagination token obtained from a previous request to list - /// beacons. - /// /// [q] - Filter query string that supports the following field filters: /// /// * **description:`"<string>"`** @@ -538,6 +535,9 @@ /// credential that made the request is used as the project. /// Optional. /// + /// [pageToken] - A pagination token obtained from a previous request to list + /// beacons. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -549,10 +549,10 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListBeaconsResponse> list( - {core.String pageToken, - core.String q, + {core.String q, core.int pageSize, core.String projectId, + core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -561,9 +561,6 @@ var _downloadOptions = commons.DownloadOptions.Metadata; var _body = null; - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (q != null) { _queryParams["q"] = [q]; } @@ -573,6 +570,9 @@ if (projectId != null) { _queryParams["projectId"] = [projectId]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -754,6 +754,12 @@ /// Required. /// Value must have pattern "^beacons/[^/]+$". /// + /// [namespacedType] - Specifies the namespace and type of attachments to + /// delete in + /// `namespace/type` format. Accepts `* / * ` to specify + /// "all types in all namespaces". + /// Optional. + /// /// [projectId] - The project id to delete beacon attachments under. This /// field can be /// used when "*" is specified to mean all attachment namespaces. Projects @@ -762,12 +768,6 @@ /// making the request is used. /// Optional. /// - /// [namespacedType] - Specifies the namespace and type of attachments to - /// delete in - /// `namespace/type` format. Accepts `* / * ` to specify - /// "all types in all namespaces". - /// Optional. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -779,8 +779,8 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<DeleteAttachmentsResponse> batchDelete(core.String beaconName, - {core.String projectId, - core.String namespacedType, + {core.String namespacedType, + core.String projectId, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -792,12 +792,12 @@ if (beaconName == null) { throw new core.ArgumentError("Parameter beaconName is required."); } - if (projectId != null) { - _queryParams["projectId"] = [projectId]; - } if (namespacedType != null) { _queryParams["namespacedType"] = [namespacedType]; } + if (projectId != null) { + _queryParams["projectId"] = [projectId]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -992,11 +992,6 @@ /// Required. /// Value must have pattern "^beacons/[^/]+$". /// - /// [namespacedType] - Specifies the namespace and type of attachment to - /// include in response in - /// <var>namespace/type</var> format. Accepts `* / * ` to specify - /// "all types in all namespaces". - /// /// [projectId] - The project id to list beacon attachments under. This field /// can be /// used when "*" is specified to mean all attachment namespaces. Projects @@ -1005,6 +1000,11 @@ /// making the request is used. /// Optional. /// + /// [namespacedType] - Specifies the namespace and type of attachment to + /// include in response in + /// <var>namespace/type</var> format. Accepts `* / * ` to specify + /// "all types in all namespaces". + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1016,8 +1016,8 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListBeaconAttachmentsResponse> list(core.String beaconName, - {core.String namespacedType, - core.String projectId, + {core.String projectId, + core.String namespacedType, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -1029,12 +1029,12 @@ if (beaconName == null) { throw new core.ArgumentError("Parameter beaconName is required."); } - if (namespacedType != null) { - _queryParams["namespacedType"] = [namespacedType]; - } if (projectId != null) { _queryParams["projectId"] = [projectId]; } + if (namespacedType != null) { + _queryParams["namespacedType"] = [namespacedType]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1760,21 +1760,27 @@ } } -/// Represents a whole calendar date, e.g. date of birth. The time of day and -/// time zone are either specified elsewhere or are not significant. The date -/// is relative to the Proleptic Gregorian Calendar. The day may be 0 to -/// represent a year and month where the day is not significant, e.g. credit -/// card -/// expiration date. The year may be 0 to represent a month and day independent -/// of year, e.g. anniversary date. Related types are google.type.TimeOfDay -/// and `google.protobuf.Timestamp`. +/// Represents a whole or partial calendar date, e.g. a birthday. The time of +/// day +/// and time zone are either specified elsewhere or are not significant. The +/// date +/// is relative to the Proleptic Gregorian Calendar. This can represent: +/// +/// * A full date, with non-zero year, month and day values +/// * A month and day value, with a zero year, e.g. an anniversary +/// * A year on its own, with zero month and day values +/// * A year and month value, with a zero day, e.g. a credit card expiration +/// date +/// +/// Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. class Date { /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - /// if specifying a year/month where the day is not significant. + /// if specifying a year by itself or a year and month where the day is not + /// significant. core.int day; - /// Month of year. Must be from 1 to 12, or 0 if specifying a date without a - /// month. + /// Month of year. Must be from 1 to 12, or 0 if specifying a year without a + /// month and day. core.int month; /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without
diff --git a/generated/googleapis_beta/lib/pubsub/v1beta2.dart b/generated/googleapis_beta/lib/pubsub/v1beta2.dart index c0c3613..c44c5d1 100644 --- a/generated/googleapis_beta/lib/pubsub/v1beta2.dart +++ b/generated/googleapis_beta/lib/pubsub/v1beta2.dart
@@ -322,13 +322,13 @@ /// [project] - The name of the cloud project that subscriptions belong to. /// Value must have pattern "^projects/[^/]+$". /// + /// [pageSize] - Maximum number of subscriptions to return. + /// /// [pageToken] - The value returned by the last `ListSubscriptionsResponse`; /// indicates that /// this is a continuation of a prior `ListSubscriptions` call, and that the /// system should return the next page of data. /// - /// [pageSize] - Maximum number of subscriptions to return. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -340,7 +340,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListSubscriptionsResponse> list(core.String project, - {core.String pageToken, core.int pageSize, core.String $fields}) { + {core.int pageSize, core.String pageToken, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -351,12 +351,12 @@ if (project == null) { throw new core.ArgumentError("Parameter project is required."); } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1104,13 +1104,13 @@ /// [topic] - The name of the topic that subscriptions are attached to. /// Value must have pattern "^projects/[^/]+/topics/[^/]+$". /// - /// [pageSize] - Maximum number of subscription names to return. - /// /// [pageToken] - The value returned by the last /// `ListTopicSubscriptionsResponse`; indicates /// that this is a continuation of a prior `ListTopicSubscriptions` call, and /// that the system should return the next page of data. /// + /// [pageSize] - Maximum number of subscription names to return. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -1122,7 +1122,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListTopicSubscriptionsResponse> list(core.String topic, - {core.int pageSize, core.String pageToken, core.String $fields}) { + {core.String pageToken, core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -1133,12 +1133,12 @@ if (topic == null) { throw new core.ArgumentError("Parameter topic is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; }
diff --git a/generated/googleapis_beta/lib/replicapool/v1beta1.dart b/generated/googleapis_beta/lib/replicapool/v1beta1.dart new file mode 100644 index 0000000..daa3c0a --- /dev/null +++ b/generated/googleapis_beta/lib/replicapool/v1beta1.dart
@@ -0,0 +1,1924 @@ +// This is a generated file (see the discoveryapis_generator project). + +// ignore_for_file: unnecessary_cast + +library googleapis_beta.replicapool.v1beta1; + +import 'dart:core' as core; +import 'dart:async' as async; +import 'dart:convert' as convert; + +import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; +import 'package:http/http.dart' as http; + +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' + show ApiRequestError, DetailedApiRequestError; + +const core.String USER_AGENT = 'dart-api-client replicapool/v1beta1'; + +/// The Replica Pool API allows users to declaratively provision and manage +/// groups of Google Compute Engine instances based on a common template. +class ReplicapoolApi { + /// View and manage your data across Google Cloud Platform services + static const CloudPlatformScope = + "https://www.googleapis.com/auth/cloud-platform"; + + /// View your data across Google Cloud Platform services + static const CloudPlatformReadOnlyScope = + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + /// View and manage your Google Cloud Platform management resources and + /// deployment status information + static const NdevCloudmanScope = + "https://www.googleapis.com/auth/ndev.cloudman"; + + /// View your Google Cloud Platform management resources and deployment status + /// information + static const NdevCloudmanReadonlyScope = + "https://www.googleapis.com/auth/ndev.cloudman.readonly"; + + /// View and manage replica pools + static const ReplicapoolScope = "https://www.googleapis.com/auth/replicapool"; + + /// View replica pools + static const ReplicapoolReadonlyScope = + "https://www.googleapis.com/auth/replicapool.readonly"; + + final commons.ApiRequester _requester; + + PoolsResourceApi get pools => new PoolsResourceApi(_requester); + ReplicasResourceApi get replicas => new ReplicasResourceApi(_requester); + + ReplicapoolApi(http.Client client, + {core.String rootUrl: "https://www.googleapis.com/", + core.String servicePath: "replicapool/v1beta1/projects/"}) + : _requester = + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); +} + +class PoolsResourceApi { + final commons.ApiRequester _requester; + + PoolsResourceApi(commons.ApiRequester client) : _requester = client; + + /// Deletes a replica pool. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this replica pool. + /// + /// [zone] - The zone for this replica pool. + /// + /// [poolName] - The name of the replica pool for this request. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// 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 delete(PoolsDeleteRequest request, core.String projectName, + core.String zone, core.String poolName, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (poolName == null) { + throw new core.ArgumentError("Parameter poolName is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _downloadOptions = null; + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools/' + + commons.Escaper.ecapeVariable('$poolName'); + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => null); + } + + /// Gets information about a single replica pool. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this replica pool. + /// + /// [zone] - The zone for this replica pool. + /// + /// [poolName] - The name of the replica pool for this request. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Pool]. + /// + /// 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<Pool> get( + core.String projectName, core.String zone, core.String poolName, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (poolName == null) { + throw new core.ArgumentError("Parameter poolName is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools/' + + commons.Escaper.ecapeVariable('$poolName'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Pool.fromJson(data)); + } + + /// Inserts a new replica pool. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this replica pool. + /// + /// [zone] - The zone for this replica pool. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Pool]. + /// + /// 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<Pool> insert( + Pool request, core.String projectName, core.String zone, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Pool.fromJson(data)); + } + + /// List all replica pools. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this request. + /// + /// [zone] - The zone for this replica pool. + /// + /// [maxResults] - Maximum count of results to be returned. Acceptable values + /// are 0 to 100, inclusive. (Default: 50) + /// Value must be between "0" and "1000". + /// + /// [pageToken] - Set this to the nextPageToken value returned by a previous + /// list request to obtain the next page of results from the previous list + /// request. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [PoolsListResponse]. + /// + /// 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<PoolsListResponse> list( + core.String projectName, core.String zone, + {core.int maxResults, core.String pageToken, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (maxResults != null) { + _queryParams["maxResults"] = ["${maxResults}"]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new PoolsListResponse.fromJson(data)); + } + + /// Resize a pool. This is an asynchronous operation, and multiple overlapping + /// resize requests can be made. Replica Pools will use the information from + /// the last resize request. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this replica pool. + /// + /// [zone] - The zone for this replica pool. + /// + /// [poolName] - The name of the replica pool for this request. + /// + /// [numReplicas] - The desired number of replicas to resize to. If this + /// number is larger than the existing number of replicas, new replicas will + /// be added. If the number is smaller, then existing replicas will be + /// deleted. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Pool]. + /// + /// 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<Pool> resize( + core.String projectName, core.String zone, core.String poolName, + {core.int numReplicas, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (poolName == null) { + throw new core.ArgumentError("Parameter poolName is required."); + } + if (numReplicas != null) { + _queryParams["numReplicas"] = ["${numReplicas}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools/' + + commons.Escaper.ecapeVariable('$poolName') + + '/resize'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Pool.fromJson(data)); + } + + /// Update the template used by the pool. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this replica pool. + /// + /// [zone] - The zone for this replica pool. + /// + /// [poolName] - The name of the replica pool for this request. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// 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 updatetemplate(Template request, core.String projectName, + core.String zone, core.String poolName, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (poolName == null) { + throw new core.ArgumentError("Parameter poolName is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _downloadOptions = null; + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools/' + + commons.Escaper.ecapeVariable('$poolName') + + '/updateTemplate'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => null); + } +} + +class ReplicasResourceApi { + final commons.ApiRequester _requester; + + ReplicasResourceApi(commons.ApiRequester client) : _requester = client; + + /// Deletes a replica from the pool. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this request. + /// + /// [zone] - The zone where the replica lives. + /// + /// [poolName] - The replica pool name for this request. + /// + /// [replicaName] - The name of the replica for this request. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Replica]. + /// + /// 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<Replica> delete( + ReplicasDeleteRequest request, + core.String projectName, + core.String zone, + core.String poolName, + core.String replicaName, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (poolName == null) { + throw new core.ArgumentError("Parameter poolName is required."); + } + if (replicaName == null) { + throw new core.ArgumentError("Parameter replicaName is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools/' + + commons.Escaper.ecapeVariable('$poolName') + + '/replicas/' + + commons.Escaper.ecapeVariable('$replicaName'); + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Replica.fromJson(data)); + } + + /// Gets information about a specific replica. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this request. + /// + /// [zone] - The zone where the replica lives. + /// + /// [poolName] - The replica pool name for this request. + /// + /// [replicaName] - The name of the replica for this request. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Replica]. + /// + /// 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<Replica> get(core.String projectName, core.String zone, + core.String poolName, core.String replicaName, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (poolName == null) { + throw new core.ArgumentError("Parameter poolName is required."); + } + if (replicaName == null) { + throw new core.ArgumentError("Parameter replicaName is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools/' + + commons.Escaper.ecapeVariable('$poolName') + + '/replicas/' + + commons.Escaper.ecapeVariable('$replicaName'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Replica.fromJson(data)); + } + + /// Lists all replicas in a pool. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this request. + /// + /// [zone] - The zone where the replica pool lives. + /// + /// [poolName] - The replica pool name for this request. + /// + /// [maxResults] - Maximum count of results to be returned. Acceptable values + /// are 0 to 100, inclusive. (Default: 50) + /// Value must be between "0" and "1000". + /// + /// [pageToken] - Set this to the nextPageToken value returned by a previous + /// list request to obtain the next page of results from the previous list + /// request. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ReplicasListResponse]. + /// + /// 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<ReplicasListResponse> list( + core.String projectName, core.String zone, core.String poolName, + {core.int maxResults, core.String pageToken, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (poolName == null) { + throw new core.ArgumentError("Parameter poolName is required."); + } + if (maxResults != null) { + _queryParams["maxResults"] = ["${maxResults}"]; + } + if (pageToken != null) { + _queryParams["pageToken"] = [pageToken]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools/' + + commons.Escaper.ecapeVariable('$poolName') + + '/replicas'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ReplicasListResponse.fromJson(data)); + } + + /// Restarts a replica in a pool. + /// + /// Request parameters: + /// + /// [projectName] - The project ID for this request. + /// + /// [zone] - The zone where the replica lives. + /// + /// [poolName] - The replica pool name for this request. + /// + /// [replicaName] - The name of the replica for this request. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [Replica]. + /// + /// 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<Replica> restart(core.String projectName, core.String zone, + core.String poolName, core.String replicaName, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (projectName == null) { + throw new core.ArgumentError("Parameter projectName is required."); + } + if (zone == null) { + throw new core.ArgumentError("Parameter zone is required."); + } + if (poolName == null) { + throw new core.ArgumentError("Parameter poolName is required."); + } + if (replicaName == null) { + throw new core.ArgumentError("Parameter replicaName is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = commons.Escaper.ecapeVariable('$projectName') + + '/zones/' + + commons.Escaper.ecapeVariable('$zone') + + '/pools/' + + commons.Escaper.ecapeVariable('$poolName') + + '/replicas/' + + commons.Escaper.ecapeVariable('$replicaName') + + '/restart'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Replica.fromJson(data)); + } +} + +/// A Compute Engine network accessConfig. Identical to the accessConfig on +/// corresponding Compute Engine resource. +class AccessConfig { + /// Name of this access configuration. + core.String name; + + /// An external IP address associated with this instance. + core.String natIp; + + /// Type of this access configuration file. Currently only ONE_TO_ONE_NAT is + /// supported. + core.String type; + + AccessConfig(); + + AccessConfig.fromJson(core.Map _json) { + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("natIp")) { + natIp = _json["natIp"]; + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (name != null) { + _json["name"] = name; + } + if (natIp != null) { + _json["natIp"] = natIp; + } + if (type != null) { + _json["type"] = type; + } + return _json; + } +} + +/// An action that gets executed during initialization of the replicas. +class Action { + /// A list of commands to run, one per line. If any command fails, the whole + /// action is considered a failure and no further actions are run. This also + /// marks the virtual machine or replica as a failure. + core.List<core.String> commands; + + /// A list of environment variables to use for the commands in this action. + core.List<EnvVariable> envVariables; + + /// If an action's commands on a particular replica do not finish in the + /// specified timeoutMilliSeconds, the replica is considered to be in a + /// FAILING state. No efforts are made to stop any processes that were spawned + /// or created as the result of running the action's commands. The default is + /// the max allowed value, 1 hour (i.e. 3600000 milliseconds). + core.int timeoutMilliSeconds; + + Action(); + + Action.fromJson(core.Map _json) { + if (_json.containsKey("commands")) { + commands = (_json["commands"] as core.List).cast<core.String>(); + } + if (_json.containsKey("envVariables")) { + envVariables = (_json["envVariables"] as core.List) + .map<EnvVariable>((value) => new EnvVariable.fromJson(value)) + .toList(); + } + if (_json.containsKey("timeoutMilliSeconds")) { + timeoutMilliSeconds = _json["timeoutMilliSeconds"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (commands != null) { + _json["commands"] = commands; + } + if (envVariables != null) { + _json["envVariables"] = + envVariables.map((value) => (value).toJson()).toList(); + } + if (timeoutMilliSeconds != null) { + _json["timeoutMilliSeconds"] = timeoutMilliSeconds; + } + return _json; + } +} + +/// Specifies how to attach a disk to a Replica. +class DiskAttachment { + /// The device name of this disk. + core.String deviceName; + + /// A zero-based index to assign to this disk, where 0 is reserved for the + /// boot disk. If not specified, this is assigned by the server. + core.int index; + + DiskAttachment(); + + DiskAttachment.fromJson(core.Map _json) { + if (_json.containsKey("deviceName")) { + deviceName = _json["deviceName"]; + } + if (_json.containsKey("index")) { + index = _json["index"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (deviceName != null) { + _json["deviceName"] = deviceName; + } + if (index != null) { + _json["index"] = index; + } + return _json; + } +} + +/// An environment variable to set for an action. +class EnvVariable { + /// Deprecated, do not use. + core.bool hidden; + + /// The name of the environment variable. + core.String name; + + /// The value of the variable. + core.String value; + + EnvVariable(); + + EnvVariable.fromJson(core.Map _json) { + if (_json.containsKey("hidden")) { + hidden = _json["hidden"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("value")) { + value = _json["value"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (hidden != null) { + _json["hidden"] = hidden; + } + if (name != null) { + _json["name"] = name; + } + if (value != null) { + _json["value"] = value; + } + return _json; + } +} + +/// A pre-existing persistent disk that will be attached to every Replica in the +/// Pool in READ_ONLY mode. +class ExistingDisk { + /// How the disk will be attached to the Replica. + DiskAttachment attachment; + + /// The name of the Persistent Disk resource. The Persistent Disk resource + /// must be in the same zone as the Pool. + core.String source; + + ExistingDisk(); + + ExistingDisk.fromJson(core.Map _json) { + if (_json.containsKey("attachment")) { + attachment = new DiskAttachment.fromJson(_json["attachment"]); + } + if (_json.containsKey("source")) { + source = _json["source"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (attachment != null) { + _json["attachment"] = (attachment).toJson(); + } + if (source != null) { + _json["source"] = source; + } + return _json; + } +} + +class HealthCheck { + /// How often (in seconds) to make HTTP requests for this healthcheck. The + /// default value is 5 seconds. + core.int checkIntervalSec; + + /// The description for this health check. + core.String description; + + /// The number of consecutive health check requests that need to succeed + /// before the replica is considered healthy again. The default value is 2. + core.int healthyThreshold; + + /// The value of the host header in the HTTP health check request. If left + /// empty (default value), the localhost IP 127.0.0.1 will be used. + core.String host; + + /// The name of this health check. + core.String name; + + /// The localhost request path to send this health check, in the format + /// /path/to/use. For example, /healthcheck. + core.String path; + + /// The TCP port for the health check requests. + core.int port; + + /// How long (in seconds) to wait before a timeout failure for this + /// healthcheck. The default value is 5 seconds. + core.int timeoutSec; + + /// The number of consecutive health check requests that need to fail in order + /// to consider the replica unhealthy. The default value is 2. + core.int unhealthyThreshold; + + HealthCheck(); + + HealthCheck.fromJson(core.Map _json) { + if (_json.containsKey("checkIntervalSec")) { + checkIntervalSec = _json["checkIntervalSec"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("healthyThreshold")) { + healthyThreshold = _json["healthyThreshold"]; + } + if (_json.containsKey("host")) { + host = _json["host"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("path")) { + path = _json["path"]; + } + if (_json.containsKey("port")) { + port = _json["port"]; + } + if (_json.containsKey("timeoutSec")) { + timeoutSec = _json["timeoutSec"]; + } + if (_json.containsKey("unhealthyThreshold")) { + unhealthyThreshold = _json["unhealthyThreshold"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (checkIntervalSec != null) { + _json["checkIntervalSec"] = checkIntervalSec; + } + if (description != null) { + _json["description"] = description; + } + if (healthyThreshold != null) { + _json["healthyThreshold"] = healthyThreshold; + } + if (host != null) { + _json["host"] = host; + } + if (name != null) { + _json["name"] = name; + } + if (path != null) { + _json["path"] = path; + } + if (port != null) { + _json["port"] = port; + } + if (timeoutSec != null) { + _json["timeoutSec"] = timeoutSec; + } + if (unhealthyThreshold != null) { + _json["unhealthyThreshold"] = unhealthyThreshold; + } + return _json; + } +} + +/// A label to apply to this replica pool. +class Label { + /// The key for this label. + core.String key; + + /// The value of this label. + core.String value; + + Label(); + + Label.fromJson(core.Map _json) { + if (_json.containsKey("key")) { + key = _json["key"]; + } + if (_json.containsKey("value")) { + value = _json["value"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (key != null) { + _json["key"] = key; + } + if (value != null) { + _json["value"] = value; + } + return _json; + } +} + +/// A Compute Engine metadata entry. Identical to the metadata on the +/// corresponding Compute Engine resource. +class Metadata { + /// The fingerprint of the metadata. Required for updating the metadata + /// entries for this instance. + core.String fingerPrint; + + /// A list of metadata items. + core.List<MetadataItem> items; + + Metadata(); + + Metadata.fromJson(core.Map _json) { + if (_json.containsKey("fingerPrint")) { + fingerPrint = _json["fingerPrint"]; + } + if (_json.containsKey("items")) { + items = (_json["items"] as core.List) + .map<MetadataItem>((value) => new MetadataItem.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fingerPrint != null) { + _json["fingerPrint"] = fingerPrint; + } + if (items != null) { + _json["items"] = items.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A Compute Engine metadata item, defined as a key:value pair. Identical to +/// the metadata on the corresponding Compute Engine resource. +class MetadataItem { + /// A metadata key. + core.String key; + + /// A metadata value. + core.String value; + + MetadataItem(); + + MetadataItem.fromJson(core.Map _json) { + if (_json.containsKey("key")) { + key = _json["key"]; + } + if (_json.containsKey("value")) { + value = _json["value"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (key != null) { + _json["key"] = key; + } + if (value != null) { + _json["value"] = value; + } + return _json; + } +} + +/// A Compute Engine NetworkInterface resource. Identical to the +/// NetworkInterface on the corresponding Compute Engine resource. +class NetworkInterface { + /// An array of configurations for this interface. This specifies how this + /// interface is configured to interact with other network services. + core.List<AccessConfig> accessConfigs; + + /// Name the Network resource to which this interface applies. + core.String network; + + /// An optional IPV4 internal network address to assign to the instance for + /// this network interface. + core.String networkIp; + + NetworkInterface(); + + NetworkInterface.fromJson(core.Map _json) { + if (_json.containsKey("accessConfigs")) { + accessConfigs = (_json["accessConfigs"] as core.List) + .map<AccessConfig>((value) => new AccessConfig.fromJson(value)) + .toList(); + } + if (_json.containsKey("network")) { + network = _json["network"]; + } + if (_json.containsKey("networkIp")) { + networkIp = _json["networkIp"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (accessConfigs != null) { + _json["accessConfigs"] = + accessConfigs.map((value) => (value).toJson()).toList(); + } + if (network != null) { + _json["network"] = network; + } + if (networkIp != null) { + _json["networkIp"] = networkIp; + } + return _json; + } +} + +/// A Persistent Disk resource that will be created and attached to each Replica +/// in the Pool. Each Replica will have a unique persistent disk that is created +/// and attached to that Replica in READ_WRITE mode. +class NewDisk { + /// How the disk will be attached to the Replica. + DiskAttachment attachment; + + /// If true, then this disk will be deleted when the instance is deleted. The + /// default value is true. + core.bool autoDelete; + + /// If true, indicates that this is the root persistent disk. + core.bool boot; + + /// Create the new disk using these parameters. The name of the disk will be + /// <instance_name>-<four_random_charactersgt;. + NewDiskInitializeParams initializeParams; + + NewDisk(); + + NewDisk.fromJson(core.Map _json) { + if (_json.containsKey("attachment")) { + attachment = new DiskAttachment.fromJson(_json["attachment"]); + } + if (_json.containsKey("autoDelete")) { + autoDelete = _json["autoDelete"]; + } + if (_json.containsKey("boot")) { + boot = _json["boot"]; + } + if (_json.containsKey("initializeParams")) { + initializeParams = + new NewDiskInitializeParams.fromJson(_json["initializeParams"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (attachment != null) { + _json["attachment"] = (attachment).toJson(); + } + if (autoDelete != null) { + _json["autoDelete"] = autoDelete; + } + if (boot != null) { + _json["boot"] = boot; + } + if (initializeParams != null) { + _json["initializeParams"] = (initializeParams).toJson(); + } + return _json; + } +} + +/// Initialization parameters for creating a new disk. +class NewDiskInitializeParams { + /// The size of the created disk in gigabytes. + core.String diskSizeGb; + + /// Name of the disk type resource describing which disk type to use to create + /// the disk. For example 'pd-ssd' or 'pd-standard'. Default is 'pd-standard' + core.String diskType; + + /// The name or fully-qualified URL of a source image to use to create this + /// disk. If you provide a name of the source image, Replica Pool will look + /// for an image with that name in your project. If you are specifying an + /// image provided by Compute Engine, you will need to provide the full URL + /// with the correct project, such as: + /// http://www.googleapis.com/compute/v1/projects/debian-cloud/ + /// global/images/debian-wheezy-7-vYYYYMMDD + core.String sourceImage; + + NewDiskInitializeParams(); + + NewDiskInitializeParams.fromJson(core.Map _json) { + if (_json.containsKey("diskSizeGb")) { + diskSizeGb = _json["diskSizeGb"]; + } + if (_json.containsKey("diskType")) { + diskType = _json["diskType"]; + } + if (_json.containsKey("sourceImage")) { + sourceImage = _json["sourceImage"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (diskSizeGb != null) { + _json["diskSizeGb"] = diskSizeGb; + } + if (diskType != null) { + _json["diskType"] = diskType; + } + if (sourceImage != null) { + _json["sourceImage"] = sourceImage; + } + return _json; + } +} + +class Pool { + /// Whether replicas in this pool should be restarted if they experience a + /// failure. The default value is true. + core.bool autoRestart; + + /// The base instance name to use for the replicas in this pool. This must + /// match the regex [a-z]([-a-z0-9]*[a-z0-9])?. If specified, the instances in + /// this replica pool will be named in the format <base-instance-name>-<ID>. + /// The <ID> postfix will be a four character alphanumeric identifier + /// generated by the service. + /// + /// If this is not specified by the user, a random base instance name is + /// generated by the service. + core.String baseInstanceName; + + /// [Output Only] The current number of replicas in the pool. + core.int currentNumReplicas; + + /// An optional description of the replica pool. + core.String description; + + /// Deprecated. Please use template[].healthChecks instead. + core.List<HealthCheck> healthChecks; + + /// The initial number of replicas this pool should have. You must provide a + /// value greater than or equal to 0. + core.int initialNumReplicas; + + /// A list of labels to attach to this replica pool and all created virtual + /// machines in this replica pool. + core.List<Label> labels; + + /// The name of the replica pool. Must follow the regex + /// [a-z]([-a-z0-9]*[a-z0-9])? and be 1-28 characters long. + core.String name; + + /// Deprecated! Use initial_num_replicas instead. + core.int numReplicas; + + /// The list of resource views that should be updated with all the replicas + /// that are managed by this pool. + core.List<core.String> resourceViews; + + /// [Output Only] A self-link to the replica pool. + core.String selfLink; + + /// Deprecated, please use target_pools instead. + core.String targetPool; + + /// A list of target pools to update with the replicas that are managed by + /// this pool. If specified, the replicas in this replica pool will be added + /// to the specified target pools for load balancing purposes. The replica + /// pool must live in the same region as the specified target pools. These + /// values must be the target pool resource names, and not fully qualified + /// URLs. + core.List<core.String> targetPools; + + /// The template to use when creating replicas in this pool. This template is + /// used during initial instance creation of the pool, when growing the pool + /// in size, or when a replica restarts. + Template template; + + /// Deprecated! Do not set. + core.String type; + + Pool(); + + Pool.fromJson(core.Map _json) { + if (_json.containsKey("autoRestart")) { + autoRestart = _json["autoRestart"]; + } + if (_json.containsKey("baseInstanceName")) { + baseInstanceName = _json["baseInstanceName"]; + } + if (_json.containsKey("currentNumReplicas")) { + currentNumReplicas = _json["currentNumReplicas"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("healthChecks")) { + healthChecks = (_json["healthChecks"] as core.List) + .map<HealthCheck>((value) => new HealthCheck.fromJson(value)) + .toList(); + } + if (_json.containsKey("initialNumReplicas")) { + initialNumReplicas = _json["initialNumReplicas"]; + } + if (_json.containsKey("labels")) { + labels = (_json["labels"] as core.List) + .map<Label>((value) => new Label.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("numReplicas")) { + numReplicas = _json["numReplicas"]; + } + if (_json.containsKey("resourceViews")) { + resourceViews = (_json["resourceViews"] as core.List).cast<core.String>(); + } + if (_json.containsKey("selfLink")) { + selfLink = _json["selfLink"]; + } + if (_json.containsKey("targetPool")) { + targetPool = _json["targetPool"]; + } + if (_json.containsKey("targetPools")) { + targetPools = (_json["targetPools"] as core.List).cast<core.String>(); + } + if (_json.containsKey("template")) { + template = new Template.fromJson(_json["template"]); + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (autoRestart != null) { + _json["autoRestart"] = autoRestart; + } + if (baseInstanceName != null) { + _json["baseInstanceName"] = baseInstanceName; + } + if (currentNumReplicas != null) { + _json["currentNumReplicas"] = currentNumReplicas; + } + if (description != null) { + _json["description"] = description; + } + if (healthChecks != null) { + _json["healthChecks"] = + healthChecks.map((value) => (value).toJson()).toList(); + } + if (initialNumReplicas != null) { + _json["initialNumReplicas"] = initialNumReplicas; + } + if (labels != null) { + _json["labels"] = labels.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + if (numReplicas != null) { + _json["numReplicas"] = numReplicas; + } + if (resourceViews != null) { + _json["resourceViews"] = resourceViews; + } + if (selfLink != null) { + _json["selfLink"] = selfLink; + } + if (targetPool != null) { + _json["targetPool"] = targetPool; + } + if (targetPools != null) { + _json["targetPools"] = targetPools; + } + if (template != null) { + _json["template"] = (template).toJson(); + } + if (type != null) { + _json["type"] = type; + } + return _json; + } +} + +class PoolsDeleteRequest { + /// If there are instances you would like to keep, you can specify them here. + /// These instances won't be deleted, but the associated replica objects will + /// be removed. + core.List<core.String> abandonInstances; + + PoolsDeleteRequest(); + + PoolsDeleteRequest.fromJson(core.Map _json) { + if (_json.containsKey("abandonInstances")) { + abandonInstances = + (_json["abandonInstances"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (abandonInstances != null) { + _json["abandonInstances"] = abandonInstances; + } + return _json; + } +} + +class PoolsListResponse { + core.String nextPageToken; + core.List<Pool> resources; + + PoolsListResponse(); + + PoolsListResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("resources")) { + resources = (_json["resources"] as core.List) + .map<Pool>((value) => new Pool.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (resources != null) { + _json["resources"] = resources.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// An individual Replica within a Pool. Replicas are automatically created by +/// the replica pool, using the template provided by the user. You cannot +/// directly create replicas. +class Replica { + /// [Output Only] The name of the Replica object. + core.String name; + + /// [Output Only] The self-link of the Replica. + core.String selfLink; + + /// [Output Only] Last known status of the Replica. + ReplicaStatus status; + + Replica(); + + Replica.fromJson(core.Map _json) { + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("selfLink")) { + selfLink = _json["selfLink"]; + } + if (_json.containsKey("status")) { + status = new ReplicaStatus.fromJson(_json["status"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (name != null) { + _json["name"] = name; + } + if (selfLink != null) { + _json["selfLink"] = selfLink; + } + if (status != null) { + _json["status"] = (status).toJson(); + } + return _json; + } +} + +/// The current status of a Replica. +class ReplicaStatus { + /// [Output Only] Human-readable details about the current state of the + /// replica + core.String details; + + /// [Output Only] The state of the Replica. + core.String state; + + /// [Output Only] The template used to build the replica. + core.String templateVersion; + + /// [Output Only] Link to the virtual machine that this Replica represents. + core.String vmLink; + + /// [Output Only] The time that this Replica got to the RUNNING state, in RFC + /// 3339 format. If the start time is unknown, UNKNOWN is returned. + core.String vmStartTime; + + ReplicaStatus(); + + ReplicaStatus.fromJson(core.Map _json) { + if (_json.containsKey("details")) { + details = _json["details"]; + } + if (_json.containsKey("state")) { + state = _json["state"]; + } + if (_json.containsKey("templateVersion")) { + templateVersion = _json["templateVersion"]; + } + if (_json.containsKey("vmLink")) { + vmLink = _json["vmLink"]; + } + if (_json.containsKey("vmStartTime")) { + vmStartTime = _json["vmStartTime"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (details != null) { + _json["details"] = details; + } + if (state != null) { + _json["state"] = state; + } + if (templateVersion != null) { + _json["templateVersion"] = templateVersion; + } + if (vmLink != null) { + _json["vmLink"] = vmLink; + } + if (vmStartTime != null) { + _json["vmStartTime"] = vmStartTime; + } + return _json; + } +} + +class ReplicasDeleteRequest { + /// Whether the instance resource represented by this replica should be + /// deleted or abandoned. If abandoned, the replica will be deleted but the + /// virtual machine instance will remain. By default, this is set to false and + /// the instance will be deleted along with the replica. + core.bool abandonInstance; + + ReplicasDeleteRequest(); + + ReplicasDeleteRequest.fromJson(core.Map _json) { + if (_json.containsKey("abandonInstance")) { + abandonInstance = _json["abandonInstance"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (abandonInstance != null) { + _json["abandonInstance"] = abandonInstance; + } + return _json; + } +} + +class ReplicasListResponse { + core.String nextPageToken; + core.List<Replica> resources; + + ReplicasListResponse(); + + ReplicasListResponse.fromJson(core.Map _json) { + if (_json.containsKey("nextPageToken")) { + nextPageToken = _json["nextPageToken"]; + } + if (_json.containsKey("resources")) { + resources = (_json["resources"] as core.List) + .map<Replica>((value) => new Replica.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (nextPageToken != null) { + _json["nextPageToken"] = nextPageToken; + } + if (resources != null) { + _json["resources"] = resources.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A Compute Engine service account, identical to the Compute Engine resource. +class ServiceAccount { + /// The service account email address, for example: + /// 123845678986@project.gserviceaccount.com + core.String email; + + /// The list of OAuth2 scopes to obtain for the service account, for example: + /// https://www.googleapis.com/auth/devstorage.full_control + core.List<core.String> scopes; + + ServiceAccount(); + + ServiceAccount.fromJson(core.Map _json) { + if (_json.containsKey("email")) { + email = _json["email"]; + } + if (_json.containsKey("scopes")) { + scopes = (_json["scopes"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (email != null) { + _json["email"] = email; + } + if (scopes != null) { + _json["scopes"] = scopes; + } + return _json; + } +} + +/// A Compute Engine Instance tag, identical to the tags on the corresponding +/// Compute Engine Instance resource. +class Tag { + /// The fingerprint of the tag. Required for updating the list of tags. + core.String fingerPrint; + + /// Items contained in this tag. + core.List<core.String> items; + + Tag(); + + Tag.fromJson(core.Map _json) { + if (_json.containsKey("fingerPrint")) { + fingerPrint = _json["fingerPrint"]; + } + if (_json.containsKey("items")) { + items = (_json["items"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fingerPrint != null) { + _json["fingerPrint"] = fingerPrint; + } + if (items != null) { + _json["items"] = items; + } + return _json; + } +} + +/// The template used for creating replicas in the pool. +class Template { + /// An action to run during initialization of your replicas. An action is run + /// as shell commands which are executed one after the other in the same bash + /// shell, so any state established by one command is inherited by later + /// commands. + Action action; + + /// A list of HTTP Health Checks to configure for this replica pool and all + /// virtual machines in this replica pool. + core.List<HealthCheck> healthChecks; + + /// A free-form string describing the version of this template. You can + /// provide any versioning string you would like. For example, version1 or + /// template-v1. + core.String version; + + /// The virtual machine parameters to use for creating replicas. You can + /// define settings such as the machine type and the image of replicas in this + /// pool. This is required if replica type is SMART_VM. + VmParams vmParams; + + Template(); + + Template.fromJson(core.Map _json) { + if (_json.containsKey("action")) { + action = new Action.fromJson(_json["action"]); + } + if (_json.containsKey("healthChecks")) { + healthChecks = (_json["healthChecks"] as core.List) + .map<HealthCheck>((value) => new HealthCheck.fromJson(value)) + .toList(); + } + if (_json.containsKey("version")) { + version = _json["version"]; + } + if (_json.containsKey("vmParams")) { + vmParams = new VmParams.fromJson(_json["vmParams"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (action != null) { + _json["action"] = (action).toJson(); + } + if (healthChecks != null) { + _json["healthChecks"] = + healthChecks.map((value) => (value).toJson()).toList(); + } + if (version != null) { + _json["version"] = version; + } + if (vmParams != null) { + _json["vmParams"] = (vmParams).toJson(); + } + return _json; + } +} + +/// Parameters for creating a Compute Engine Instance resource. Most fields are +/// identical to the corresponding Compute Engine resource. +class VmParams { + /// Deprecated. Please use baseInstanceName instead. + core.String baseInstanceName; + + /// Enables IP Forwarding, which allows this instance to receive packets + /// destined for a different IP address, and send packets with a different + /// source IP. See IP Forwarding for more information. + core.bool canIpForward; + + /// An optional textual description of the instance. + core.String description; + + /// A list of existing Persistent Disk resources to attach to each replica in + /// the pool. Each disk will be attached in read-only mode to every replica. + core.List<ExistingDisk> disksToAttach; + + /// A list of Disk resources to create and attach to each Replica in the Pool. + /// Currently, you can only define one disk and it must be a root persistent + /// disk. Note that Replica Pool will create a root persistent disk for each + /// replica. + core.List<NewDisk> disksToCreate; + + /// The machine type for this instance. The resource name (e.g. + /// n1-standard-1). + core.String machineType; + + /// The metadata key/value pairs assigned to this instance. + Metadata metadata; + + /// A list of network interfaces for the instance. Currently only one + /// interface is supported by Google Compute Engine, ONE_TO_ONE_NAT. + core.List<NetworkInterface> networkInterfaces; + core.String onHostMaintenance; + + /// A list of Service Accounts to enable for this instance. + core.List<ServiceAccount> serviceAccounts; + + /// A list of tags to apply to the Google Compute Engine instance to identify + /// resources. + Tag tags; + + VmParams(); + + VmParams.fromJson(core.Map _json) { + if (_json.containsKey("baseInstanceName")) { + baseInstanceName = _json["baseInstanceName"]; + } + if (_json.containsKey("canIpForward")) { + canIpForward = _json["canIpForward"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("disksToAttach")) { + disksToAttach = (_json["disksToAttach"] as core.List) + .map<ExistingDisk>((value) => new ExistingDisk.fromJson(value)) + .toList(); + } + if (_json.containsKey("disksToCreate")) { + disksToCreate = (_json["disksToCreate"] as core.List) + .map<NewDisk>((value) => new NewDisk.fromJson(value)) + .toList(); + } + if (_json.containsKey("machineType")) { + machineType = _json["machineType"]; + } + if (_json.containsKey("metadata")) { + metadata = new Metadata.fromJson(_json["metadata"]); + } + if (_json.containsKey("networkInterfaces")) { + networkInterfaces = (_json["networkInterfaces"] as core.List) + .map<NetworkInterface>( + (value) => new NetworkInterface.fromJson(value)) + .toList(); + } + if (_json.containsKey("onHostMaintenance")) { + onHostMaintenance = _json["onHostMaintenance"]; + } + if (_json.containsKey("serviceAccounts")) { + serviceAccounts = (_json["serviceAccounts"] as core.List) + .map<ServiceAccount>((value) => new ServiceAccount.fromJson(value)) + .toList(); + } + if (_json.containsKey("tags")) { + tags = new Tag.fromJson(_json["tags"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (baseInstanceName != null) { + _json["baseInstanceName"] = baseInstanceName; + } + if (canIpForward != null) { + _json["canIpForward"] = canIpForward; + } + if (description != null) { + _json["description"] = description; + } + if (disksToAttach != null) { + _json["disksToAttach"] = + disksToAttach.map((value) => (value).toJson()).toList(); + } + if (disksToCreate != null) { + _json["disksToCreate"] = + disksToCreate.map((value) => (value).toJson()).toList(); + } + if (machineType != null) { + _json["machineType"] = machineType; + } + if (metadata != null) { + _json["metadata"] = (metadata).toJson(); + } + if (networkInterfaces != null) { + _json["networkInterfaces"] = + networkInterfaces.map((value) => (value).toJson()).toList(); + } + if (onHostMaintenance != null) { + _json["onHostMaintenance"] = onHostMaintenance; + } + if (serviceAccounts != null) { + _json["serviceAccounts"] = + serviceAccounts.map((value) => (value).toJson()).toList(); + } + if (tags != null) { + _json["tags"] = (tags).toJson(); + } + return _json; + } +}
diff --git a/generated/googleapis_beta/lib/replicapoolupdater/v1beta1.dart b/generated/googleapis_beta/lib/replicapoolupdater/v1beta1.dart deleted file mode 100644 index 60a388e..0000000 --- a/generated/googleapis_beta/lib/replicapoolupdater/v1beta1.dart +++ /dev/null
@@ -1,1678 +0,0 @@ -// This is a generated file (see the discoveryapis_generator project). - -// ignore_for_file: unnecessary_cast - -library googleapis_beta.replicapoolupdater.v1beta1; - -import 'dart:core' as core; -import 'dart:async' as async; -import 'dart:convert' as convert; - -import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; -import 'package:http/http.dart' as http; - -export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' - show ApiRequestError, DetailedApiRequestError; - -const core.String USER_AGENT = 'dart-api-client replicapoolupdater/v1beta1'; - -/// [Deprecated. Please use compute.instanceGroupManagers.update method. -/// replicapoolupdater API will be disabled after December 30th, 2016] Updates -/// groups of Compute Engine instances. -class ReplicapoolupdaterApi { - /// View and manage your data across Google Cloud Platform services - static const CloudPlatformScope = - "https://www.googleapis.com/auth/cloud-platform"; - - /// View your data across Google Cloud Platform services - static const CloudPlatformReadOnlyScope = - "https://www.googleapis.com/auth/cloud-platform.read-only"; - - /// View and manage replica pools - static const ReplicapoolScope = "https://www.googleapis.com/auth/replicapool"; - - /// View replica pools - static const ReplicapoolReadonlyScope = - "https://www.googleapis.com/auth/replicapool.readonly"; - - final commons.ApiRequester _requester; - - RollingUpdatesResourceApi get rollingUpdates => - new RollingUpdatesResourceApi(_requester); - ZoneOperationsResourceApi get zoneOperations => - new ZoneOperationsResourceApi(_requester); - - ReplicapoolupdaterApi(http.Client client, - {core.String rootUrl: "https://www.googleapis.com/", - core.String servicePath: "replicapoolupdater/v1beta1/projects/"}) - : _requester = - new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); -} - -class RollingUpdatesResourceApi { - final commons.ApiRequester _requester; - - RollingUpdatesResourceApi(commons.ApiRequester client) : _requester = client; - - /// Cancels an update. The update must be PAUSED before it can be cancelled. - /// This has no effect if the update is already CANCELLED. - /// - /// Request parameters: - /// - /// [project] - The Google Developers Console project name. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - The name of the zone in which the update's target resides. - /// - /// [rollingUpdate] - The name of the update. - /// - /// [$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> cancel( - core.String project, core.String zone, core.String rollingUpdate, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (rollingUpdate == null) { - throw new core.ArgumentError("Parameter rollingUpdate is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/rollingUpdates/' + - commons.Escaper.ecapeVariable('$rollingUpdate') + - '/cancel'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Operation.fromJson(data)); - } - - /// Returns information about an update. - /// - /// Request parameters: - /// - /// [project] - The Google Developers Console project name. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - The name of the zone in which the update's target resides. - /// - /// [rollingUpdate] - The name of the update. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [RollingUpdate]. - /// - /// 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<RollingUpdate> get( - core.String project, core.String zone, core.String rollingUpdate, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (rollingUpdate == null) { - throw new core.ArgumentError("Parameter rollingUpdate is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/rollingUpdates/' + - commons.Escaper.ecapeVariable('$rollingUpdate'); - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new RollingUpdate.fromJson(data)); - } - - /// Inserts and starts a new update. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - The Google Developers Console project name. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - The name of the zone in which the update's target resides. - /// - /// [$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> insert( - RollingUpdate request, core.String project, core.String zone, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/rollingUpdates'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Operation.fromJson(data)); - } - - /// Lists recent updates for a given managed instance group, in reverse - /// chronological order and paginated format. - /// - /// Request parameters: - /// - /// [project] - The Google Developers Console project name. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - The name of the zone in which the update's target resides. - /// - /// [filter] - Optional. Filter expression for filtering listed resources. - /// - /// [maxResults] - Optional. Maximum count of results to be returned. Maximum - /// value is 500 and default value is 500. - /// Value must be between "0" and "500". - /// - /// [pageToken] - Optional. Tag returned by a previous list request truncated - /// by maxResults. Used to continue a previous list request. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [RollingUpdateList]. - /// - /// 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<RollingUpdateList> list(core.String project, core.String zone, - {core.String filter, - core.int maxResults, - core.String pageToken, - core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (filter != null) { - _queryParams["filter"] = [filter]; - } - if (maxResults != null) { - _queryParams["maxResults"] = ["${maxResults}"]; - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/rollingUpdates'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new RollingUpdateList.fromJson(data)); - } - - /// Lists the current status for each instance within a given update. - /// - /// Request parameters: - /// - /// [project] - The Google Developers Console project name. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - The name of the zone in which the update's target resides. - /// - /// [rollingUpdate] - The name of the update. - /// - /// [filter] - Optional. Filter expression for filtering listed resources. - /// - /// [maxResults] - Optional. Maximum count of results to be returned. Maximum - /// value is 500 and default value is 500. - /// Value must be between "0" and "500". - /// - /// [pageToken] - Optional. Tag returned by a previous list request truncated - /// by maxResults. Used to continue a previous list request. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstanceUpdateList]. - /// - /// 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<InstanceUpdateList> listInstanceUpdates( - core.String project, core.String zone, core.String rollingUpdate, - {core.String filter, - core.int maxResults, - core.String pageToken, - core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (rollingUpdate == null) { - throw new core.ArgumentError("Parameter rollingUpdate is required."); - } - if (filter != null) { - _queryParams["filter"] = [filter]; - } - if (maxResults != null) { - _queryParams["maxResults"] = ["${maxResults}"]; - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/rollingUpdates/' + - commons.Escaper.ecapeVariable('$rollingUpdate') + - '/instanceUpdates'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstanceUpdateList.fromJson(data)); - } - - /// Pauses the update in state from ROLLING_FORWARD or ROLLING_BACK. Has no - /// effect if invoked when the state of the update is PAUSED. - /// - /// Request parameters: - /// - /// [project] - The Google Developers Console project name. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - The name of the zone in which the update's target resides. - /// - /// [rollingUpdate] - The name of the update. - /// - /// [$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> pause( - core.String project, core.String zone, core.String rollingUpdate, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (rollingUpdate == null) { - throw new core.ArgumentError("Parameter rollingUpdate is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/rollingUpdates/' + - commons.Escaper.ecapeVariable('$rollingUpdate') + - '/pause'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Operation.fromJson(data)); - } - - /// Continues an update in PAUSED state. Has no effect if invoked when the - /// state of the update is ROLLED_OUT. - /// - /// Request parameters: - /// - /// [project] - The Google Developers Console project name. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - The name of the zone in which the update's target resides. - /// - /// [rollingUpdate] - The name of the update. - /// - /// [$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> resume( - core.String project, core.String zone, core.String rollingUpdate, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (rollingUpdate == null) { - throw new core.ArgumentError("Parameter rollingUpdate is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/rollingUpdates/' + - commons.Escaper.ecapeVariable('$rollingUpdate') + - '/resume'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Operation.fromJson(data)); - } - - /// Rolls back the update in state from ROLLING_FORWARD or PAUSED. Has no - /// effect if invoked when the state of the update is ROLLED_BACK. - /// - /// Request parameters: - /// - /// [project] - The Google Developers Console project name. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - The name of the zone in which the update's target resides. - /// - /// [rollingUpdate] - The name of the update. - /// - /// [$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> rollback( - core.String project, core.String zone, core.String rollingUpdate, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (rollingUpdate == null) { - throw new core.ArgumentError("Parameter rollingUpdate is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/rollingUpdates/' + - commons.Escaper.ecapeVariable('$rollingUpdate') + - '/rollback'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Operation.fromJson(data)); - } -} - -class ZoneOperationsResourceApi { - final commons.ApiRequester _requester; - - ZoneOperationsResourceApi(commons.ApiRequester client) : _requester = client; - - /// Retrieves the specified zone-specific operation resource. - /// - /// Request parameters: - /// - /// [project] - Name of the project scoping this request. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - Name of the zone scoping this request. - /// - /// [operation] - Name of the operation resource to return. - /// - /// [$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 project, core.String zone, core.String operation, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (operation == null) { - throw new core.ArgumentError("Parameter operation is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/operations/' + - commons.Escaper.ecapeVariable('$operation'); - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Operation.fromJson(data)); - } - - /// Retrieves the list of Operation resources contained within the specified - /// zone. - /// - /// Request parameters: - /// - /// [project] - Name of the project scoping this request. - /// Value must have pattern - /// "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". - /// - /// [zone] - Name of the zone scoping this request. - /// - /// [filter] - Optional. Filter expression for filtering listed resources. - /// - /// [maxResults] - Optional. Maximum count of results to be returned. Maximum - /// value is 500 and default value is 500. - /// Value must be between "0" and "500". - /// - /// [pageToken] - Optional. Tag returned by a previous list request truncated - /// by maxResults. Used to continue a previous list request. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [OperationList]. - /// - /// 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<OperationList> list(core.String project, core.String zone, - {core.String filter, - core.int maxResults, - core.String pageToken, - core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (zone == null) { - throw new core.ArgumentError("Parameter zone is required."); - } - if (filter != null) { - _queryParams["filter"] = [filter]; - } - if (maxResults != null) { - _queryParams["maxResults"] = ["${maxResults}"]; - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = commons.Escaper.ecapeVariable('$project') + - '/zones/' + - commons.Escaper.ecapeVariable('$zone') + - '/operations'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new OperationList.fromJson(data)); - } -} - -class InstanceUpdateErrorErrors { - /// [Output Only] The error type identifier for this error. - core.String code; - - /// [Output Only] Indicates the field in the request that caused the error. - /// This property is optional. - core.String location; - - /// [Output Only] An optional, human-readable error message. - core.String message; - - InstanceUpdateErrorErrors(); - - InstanceUpdateErrorErrors.fromJson(core.Map _json) { - if (_json.containsKey("code")) { - code = _json["code"]; - } - if (_json.containsKey("location")) { - location = _json["location"]; - } - if (_json.containsKey("message")) { - message = _json["message"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (code != null) { - _json["code"] = code; - } - if (location != null) { - _json["location"] = location; - } - if (message != null) { - _json["message"] = message; - } - return _json; - } -} - -/// Errors that occurred during the instance update. -class InstanceUpdateError { - /// [Output Only] The array of errors encountered while processing this - /// operation. - core.List<InstanceUpdateErrorErrors> errors; - - InstanceUpdateError(); - - InstanceUpdateError.fromJson(core.Map _json) { - if (_json.containsKey("errors")) { - errors = (_json["errors"] as core.List) - .map<InstanceUpdateErrorErrors>( - (value) => new InstanceUpdateErrorErrors.fromJson(value)) - .toList(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (errors != null) { - _json["errors"] = errors.map((value) => (value).toJson()).toList(); - } - return _json; - } -} - -/// Update of a single instance. -class InstanceUpdate { - /// Errors that occurred during the instance update. - InstanceUpdateError error; - - /// Fully-qualified URL of the instance being updated. - core.String instance; - - /// Status of the instance update. Possible values are: - /// - "PENDING": The instance update is pending execution. - /// - "ROLLING_FORWARD": The instance update is going forward. - /// - "ROLLING_BACK": The instance update is being rolled back. - /// - "PAUSED": The instance update is temporarily paused (inactive). - /// - "ROLLED_OUT": The instance update is finished, the instance is running - /// the new template. - /// - "ROLLED_BACK": The instance update is finished, the instance has been - /// reverted to the previous template. - /// - "CANCELLED": The instance update is paused and no longer can be resumed, - /// undefined in which template the instance is running. - core.String status; - - InstanceUpdate(); - - InstanceUpdate.fromJson(core.Map _json) { - if (_json.containsKey("error")) { - error = new InstanceUpdateError.fromJson(_json["error"]); - } - if (_json.containsKey("instance")) { - instance = _json["instance"]; - } - if (_json.containsKey("status")) { - status = _json["status"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (error != null) { - _json["error"] = (error).toJson(); - } - if (instance != null) { - _json["instance"] = instance; - } - if (status != null) { - _json["status"] = status; - } - return _json; - } -} - -/// Response returned by ListInstanceUpdates method. -class InstanceUpdateList { - /// Collection of requested instance updates. - core.List<InstanceUpdate> items; - - /// [Output Only] Type of the resource. - core.String kind; - - /// A token used to continue a truncated list request. - core.String nextPageToken; - - /// [Output Only] The fully qualified URL for the resource. - core.String selfLink; - - InstanceUpdateList(); - - InstanceUpdateList.fromJson(core.Map _json) { - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<InstanceUpdate>((value) => new InstanceUpdate.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("nextPageToken")) { - nextPageToken = _json["nextPageToken"]; - } - if (_json.containsKey("selfLink")) { - selfLink = _json["selfLink"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - if (nextPageToken != null) { - _json["nextPageToken"] = nextPageToken; - } - if (selfLink != null) { - _json["selfLink"] = selfLink; - } - return _json; - } -} - -class OperationErrorErrors { - /// [Output Only] The error type identifier for this error. - core.String code; - - /// [Output Only] Indicates the field in the request that caused the error. - /// This property is optional. - core.String location; - - /// [Output Only] An optional, human-readable error message. - core.String message; - - OperationErrorErrors(); - - OperationErrorErrors.fromJson(core.Map _json) { - if (_json.containsKey("code")) { - code = _json["code"]; - } - if (_json.containsKey("location")) { - location = _json["location"]; - } - if (_json.containsKey("message")) { - message = _json["message"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (code != null) { - _json["code"] = code; - } - if (location != null) { - _json["location"] = location; - } - if (message != null) { - _json["message"] = message; - } - return _json; - } -} - -/// [Output Only] If errors occurred during processing of this operation, this -/// field will be populated. -class OperationError { - /// [Output Only] The array of errors encountered while processing this - /// operation. - core.List<OperationErrorErrors> errors; - - OperationError(); - - OperationError.fromJson(core.Map _json) { - if (_json.containsKey("errors")) { - errors = (_json["errors"] as core.List) - .map<OperationErrorErrors>( - (value) => new OperationErrorErrors.fromJson(value)) - .toList(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (errors != null) { - _json["errors"] = errors.map((value) => (value).toJson()).toList(); - } - return _json; - } -} - -class OperationWarningsData { - /// [Output Only] Metadata key for this warning. - core.String key; - - /// [Output Only] Metadata value for this warning. - core.String value; - - OperationWarningsData(); - - OperationWarningsData.fromJson(core.Map _json) { - if (_json.containsKey("key")) { - key = _json["key"]; - } - if (_json.containsKey("value")) { - value = _json["value"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (key != null) { - _json["key"] = key; - } - if (value != null) { - _json["value"] = value; - } - return _json; - } -} - -class OperationWarnings { - /// [Output only] The warning type identifier for this warning. - core.String code; - - /// [Output only] Metadata for this warning in key:value format. - core.List<OperationWarningsData> data; - - /// [Output only] Optional human-readable details for this warning. - core.String message; - - OperationWarnings(); - - OperationWarnings.fromJson(core.Map _json) { - if (_json.containsKey("code")) { - code = _json["code"]; - } - if (_json.containsKey("data")) { - data = (_json["data"] as core.List) - .map<OperationWarningsData>( - (value) => new OperationWarningsData.fromJson(value)) - .toList(); - } - if (_json.containsKey("message")) { - message = _json["message"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (code != null) { - _json["code"] = code; - } - if (data != null) { - _json["data"] = data.map((value) => (value).toJson()).toList(); - } - if (message != null) { - _json["message"] = message; - } - return _json; - } -} - -/// An operation resource, used to manage asynchronous API requests. -class Operation { - core.String clientOperationId; - - /// [Output Only] Creation timestamp in RFC3339 text format. - core.String creationTimestamp; - core.String endTime; - - /// [Output Only] If errors occurred during processing of this operation, this - /// field will be populated. - OperationError error; - core.String httpErrorMessage; - core.int httpErrorStatusCode; - - /// [Output Only] Unique identifier for the resource; defined by the server. - core.String id; - - /// [Output Only] The time that this operation was requested. This is in RFC - /// 3339 format. - core.String insertTime; - - /// [Output Only] Type of the resource. Always replicapoolupdater#operation - /// for Operation resources. - core.String kind; - - /// [Output Only] Name of the resource. - core.String name; - core.String operationType; - core.int progress; - - /// [Output Only] URL of the region where the operation resides. - core.String region; - - /// [Output Only] The fully qualified URL for the resource. - core.String selfLink; - - /// [Output Only] The time that this operation was started by the server. This - /// is in RFC 3339 format. - core.String startTime; - - /// [Output Only] Status of the operation. Can be one of the following: - /// "PENDING", "RUNNING", or "DONE". - core.String status; - - /// [Output Only] An optional textual description of the current status of the - /// operation. - core.String statusMessage; - - /// [Output Only] Unique target id which identifies a particular incarnation - /// of the target. - core.String targetId; - - /// [Output Only] URL of the resource the operation is mutating. - core.String targetLink; - core.String user; - core.List<OperationWarnings> warnings; - - /// [Output Only] URL of the zone where the operation resides. - core.String zone; - - Operation(); - - Operation.fromJson(core.Map _json) { - if (_json.containsKey("clientOperationId")) { - clientOperationId = _json["clientOperationId"]; - } - if (_json.containsKey("creationTimestamp")) { - creationTimestamp = _json["creationTimestamp"]; - } - if (_json.containsKey("endTime")) { - endTime = _json["endTime"]; - } - if (_json.containsKey("error")) { - error = new OperationError.fromJson(_json["error"]); - } - if (_json.containsKey("httpErrorMessage")) { - httpErrorMessage = _json["httpErrorMessage"]; - } - if (_json.containsKey("httpErrorStatusCode")) { - httpErrorStatusCode = _json["httpErrorStatusCode"]; - } - if (_json.containsKey("id")) { - id = _json["id"]; - } - if (_json.containsKey("insertTime")) { - insertTime = _json["insertTime"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("name")) { - name = _json["name"]; - } - if (_json.containsKey("operationType")) { - operationType = _json["operationType"]; - } - if (_json.containsKey("progress")) { - progress = _json["progress"]; - } - if (_json.containsKey("region")) { - region = _json["region"]; - } - if (_json.containsKey("selfLink")) { - selfLink = _json["selfLink"]; - } - if (_json.containsKey("startTime")) { - startTime = _json["startTime"]; - } - if (_json.containsKey("status")) { - status = _json["status"]; - } - if (_json.containsKey("statusMessage")) { - statusMessage = _json["statusMessage"]; - } - if (_json.containsKey("targetId")) { - targetId = _json["targetId"]; - } - if (_json.containsKey("targetLink")) { - targetLink = _json["targetLink"]; - } - if (_json.containsKey("user")) { - user = _json["user"]; - } - if (_json.containsKey("warnings")) { - warnings = (_json["warnings"] as core.List) - .map<OperationWarnings>( - (value) => new OperationWarnings.fromJson(value)) - .toList(); - } - if (_json.containsKey("zone")) { - zone = _json["zone"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (clientOperationId != null) { - _json["clientOperationId"] = clientOperationId; - } - if (creationTimestamp != null) { - _json["creationTimestamp"] = creationTimestamp; - } - if (endTime != null) { - _json["endTime"] = endTime; - } - if (error != null) { - _json["error"] = (error).toJson(); - } - if (httpErrorMessage != null) { - _json["httpErrorMessage"] = httpErrorMessage; - } - if (httpErrorStatusCode != null) { - _json["httpErrorStatusCode"] = httpErrorStatusCode; - } - if (id != null) { - _json["id"] = id; - } - if (insertTime != null) { - _json["insertTime"] = insertTime; - } - if (kind != null) { - _json["kind"] = kind; - } - if (name != null) { - _json["name"] = name; - } - if (operationType != null) { - _json["operationType"] = operationType; - } - if (progress != null) { - _json["progress"] = progress; - } - if (region != null) { - _json["region"] = region; - } - if (selfLink != null) { - _json["selfLink"] = selfLink; - } - if (startTime != null) { - _json["startTime"] = startTime; - } - if (status != null) { - _json["status"] = status; - } - if (statusMessage != null) { - _json["statusMessage"] = statusMessage; - } - if (targetId != null) { - _json["targetId"] = targetId; - } - if (targetLink != null) { - _json["targetLink"] = targetLink; - } - if (user != null) { - _json["user"] = user; - } - if (warnings != null) { - _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); - } - if (zone != null) { - _json["zone"] = zone; - } - return _json; - } -} - -/// Contains a list of Operation resources. -class OperationList { - /// [Output Only] Unique identifier for the resource; defined by the server. - core.String id; - - /// [Output Only] The Operation resources. - core.List<Operation> items; - - /// [Output Only] Type of resource. Always replicapoolupdater#operationList - /// for OperationList resources. - core.String kind; - - /// [Output Only] A token used to continue a truncate. - core.String nextPageToken; - - /// [Output Only] The fully qualified URL for the resource. - core.String selfLink; - - OperationList(); - - OperationList.fromJson(core.Map _json) { - if (_json.containsKey("id")) { - id = _json["id"]; - } - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<Operation>((value) => new Operation.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("nextPageToken")) { - nextPageToken = _json["nextPageToken"]; - } - if (_json.containsKey("selfLink")) { - selfLink = _json["selfLink"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (id != null) { - _json["id"] = id; - } - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - if (nextPageToken != null) { - _json["nextPageToken"] = nextPageToken; - } - if (selfLink != null) { - _json["selfLink"] = selfLink; - } - return _json; - } -} - -class RollingUpdateErrorErrors { - /// [Output Only] The error type identifier for this error. - core.String code; - - /// [Output Only] Indicates the field in the request that caused the error. - /// This property is optional. - core.String location; - - /// [Output Only] An optional, human-readable error message. - core.String message; - - RollingUpdateErrorErrors(); - - RollingUpdateErrorErrors.fromJson(core.Map _json) { - if (_json.containsKey("code")) { - code = _json["code"]; - } - if (_json.containsKey("location")) { - location = _json["location"]; - } - if (_json.containsKey("message")) { - message = _json["message"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (code != null) { - _json["code"] = code; - } - if (location != null) { - _json["location"] = location; - } - if (message != null) { - _json["message"] = message; - } - return _json; - } -} - -/// [Output Only] Errors that occurred during the rolling update. -class RollingUpdateError { - /// [Output Only] The array of errors encountered while processing this - /// operation. - core.List<RollingUpdateErrorErrors> errors; - - RollingUpdateError(); - - RollingUpdateError.fromJson(core.Map _json) { - if (_json.containsKey("errors")) { - errors = (_json["errors"] as core.List) - .map<RollingUpdateErrorErrors>( - (value) => new RollingUpdateErrorErrors.fromJson(value)) - .toList(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (errors != null) { - _json["errors"] = errors.map((value) => (value).toJson()).toList(); - } - return _json; - } -} - -/// Parameters of the update process. -class RollingUpdatePolicy { - /// Number of instances to update before the updater pauses the rolling - /// update. - core.int autoPauseAfterInstances; - - /// The maximum amount of time that the updater waits for a HEALTHY state - /// after all of the update steps are complete. If the HEALTHY state is not - /// received before the deadline, the instance update is considered a failure. - core.int instanceStartupTimeoutSec; - - /// The maximum number of instances that can be updated simultaneously. An - /// instance update is considered complete only after the instance is - /// restarted and initialized. - core.int maxNumConcurrentInstances; - - /// The maximum number of instance updates that can fail before the group - /// update is considered a failure. An instance update is considered failed if - /// any of its update actions (e.g. Stop call on Instance resource in Rolling - /// Reboot) failed with permanent failure, or if the instance is in an - /// UNHEALTHY state after it finishes all of the update actions. - core.int maxNumFailedInstances; - - /// The minimum amount of time that the updater spends to update each - /// instance. Update time is the time it takes to complete all update actions - /// (e.g. Stop call on Instance resource in Rolling Reboot), reboot, and - /// initialize. If the instance update finishes early, the updater pauses for - /// the remainder of the time before it starts the next instance update. - core.int minInstanceUpdateTimeSec; - - RollingUpdatePolicy(); - - RollingUpdatePolicy.fromJson(core.Map _json) { - if (_json.containsKey("autoPauseAfterInstances")) { - autoPauseAfterInstances = _json["autoPauseAfterInstances"]; - } - if (_json.containsKey("instanceStartupTimeoutSec")) { - instanceStartupTimeoutSec = _json["instanceStartupTimeoutSec"]; - } - if (_json.containsKey("maxNumConcurrentInstances")) { - maxNumConcurrentInstances = _json["maxNumConcurrentInstances"]; - } - if (_json.containsKey("maxNumFailedInstances")) { - maxNumFailedInstances = _json["maxNumFailedInstances"]; - } - if (_json.containsKey("minInstanceUpdateTimeSec")) { - minInstanceUpdateTimeSec = _json["minInstanceUpdateTimeSec"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (autoPauseAfterInstances != null) { - _json["autoPauseAfterInstances"] = autoPauseAfterInstances; - } - if (instanceStartupTimeoutSec != null) { - _json["instanceStartupTimeoutSec"] = instanceStartupTimeoutSec; - } - if (maxNumConcurrentInstances != null) { - _json["maxNumConcurrentInstances"] = maxNumConcurrentInstances; - } - if (maxNumFailedInstances != null) { - _json["maxNumFailedInstances"] = maxNumFailedInstances; - } - if (minInstanceUpdateTimeSec != null) { - _json["minInstanceUpdateTimeSec"] = minInstanceUpdateTimeSec; - } - return _json; - } -} - -/// The following represents a resource describing a single update (rollout) of -/// a group of instances to the given template. -class RollingUpdate { - /// Specifies the action to take for each instance within the instance group. - /// This can be RECREATE which will recreate each instance and is only - /// available for managed instance groups. It can also be REBOOT which - /// performs a soft reboot for each instance and is only available for regular - /// (non-managed) instance groups. - core.String actionType; - - /// [Output Only] Creation timestamp in RFC3339 text format. - core.String creationTimestamp; - - /// An optional textual description of the resource; provided by the client - /// when the resource is created. - core.String description; - - /// [Output Only] Errors that occurred during the rolling update. - RollingUpdateError error; - - /// [Output Only] Unique identifier for the resource; defined by the server. - core.String id; - - /// Fully-qualified URL of an instance group being updated. Exactly one of - /// instanceGroupManager and instanceGroup must be set. - core.String instanceGroup; - - /// Fully-qualified URL of an instance group manager being updated. Exactly - /// one of instanceGroupManager and instanceGroup must be set. - core.String instanceGroupManager; - - /// Fully-qualified URL of an instance template to apply. - core.String instanceTemplate; - - /// [Output Only] Type of the resource. - core.String kind; - - /// Fully-qualified URL of the instance template encountered while starting - /// the update. - core.String oldInstanceTemplate; - - /// Parameters of the update process. - RollingUpdatePolicy policy; - - /// [Output Only] An optional progress indicator that ranges from 0 to 100. - /// There is no requirement that this be linear or support any granularity of - /// operations. This should not be used to guess at when the update will be - /// complete. This number should be monotonically increasing as the update - /// progresses. - core.int progress; - - /// [Output Only] The fully qualified URL for the resource. - core.String selfLink; - - /// [Output Only] Status of the update. Possible values are: - /// - "ROLLING_FORWARD": The update is going forward. - /// - "ROLLING_BACK": The update is being rolled back. - /// - "PAUSED": The update is temporarily paused (inactive). - /// - "ROLLED_OUT": The update is finished, all instances have been updated - /// successfully. - /// - "ROLLED_BACK": The update is finished, all instances have been reverted - /// to the previous template. - /// - "CANCELLED": The update is paused and no longer can be resumed, - /// undefined how many instances are running in which template. - core.String status; - - /// [Output Only] An optional textual description of the current status of the - /// update. - core.String statusMessage; - - /// [Output Only] User who requested the update, for example: - /// user@example.com. - core.String user; - - RollingUpdate(); - - RollingUpdate.fromJson(core.Map _json) { - if (_json.containsKey("actionType")) { - actionType = _json["actionType"]; - } - if (_json.containsKey("creationTimestamp")) { - creationTimestamp = _json["creationTimestamp"]; - } - if (_json.containsKey("description")) { - description = _json["description"]; - } - if (_json.containsKey("error")) { - error = new RollingUpdateError.fromJson(_json["error"]); - } - if (_json.containsKey("id")) { - id = _json["id"]; - } - if (_json.containsKey("instanceGroup")) { - instanceGroup = _json["instanceGroup"]; - } - if (_json.containsKey("instanceGroupManager")) { - instanceGroupManager = _json["instanceGroupManager"]; - } - if (_json.containsKey("instanceTemplate")) { - instanceTemplate = _json["instanceTemplate"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("oldInstanceTemplate")) { - oldInstanceTemplate = _json["oldInstanceTemplate"]; - } - if (_json.containsKey("policy")) { - policy = new RollingUpdatePolicy.fromJson(_json["policy"]); - } - if (_json.containsKey("progress")) { - progress = _json["progress"]; - } - if (_json.containsKey("selfLink")) { - selfLink = _json["selfLink"]; - } - if (_json.containsKey("status")) { - status = _json["status"]; - } - if (_json.containsKey("statusMessage")) { - statusMessage = _json["statusMessage"]; - } - if (_json.containsKey("user")) { - user = _json["user"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (actionType != null) { - _json["actionType"] = actionType; - } - if (creationTimestamp != null) { - _json["creationTimestamp"] = creationTimestamp; - } - if (description != null) { - _json["description"] = description; - } - if (error != null) { - _json["error"] = (error).toJson(); - } - if (id != null) { - _json["id"] = id; - } - if (instanceGroup != null) { - _json["instanceGroup"] = instanceGroup; - } - if (instanceGroupManager != null) { - _json["instanceGroupManager"] = instanceGroupManager; - } - if (instanceTemplate != null) { - _json["instanceTemplate"] = instanceTemplate; - } - if (kind != null) { - _json["kind"] = kind; - } - if (oldInstanceTemplate != null) { - _json["oldInstanceTemplate"] = oldInstanceTemplate; - } - if (policy != null) { - _json["policy"] = (policy).toJson(); - } - if (progress != null) { - _json["progress"] = progress; - } - if (selfLink != null) { - _json["selfLink"] = selfLink; - } - if (status != null) { - _json["status"] = status; - } - if (statusMessage != null) { - _json["statusMessage"] = statusMessage; - } - if (user != null) { - _json["user"] = user; - } - return _json; - } -} - -/// Response returned by List method. -class RollingUpdateList { - /// Collection of requested updates. - core.List<RollingUpdate> items; - - /// [Output Only] Type of the resource. - core.String kind; - - /// A token used to continue a truncated list request. - core.String nextPageToken; - - /// [Output Only] The fully qualified URL for the resource. - core.String selfLink; - - RollingUpdateList(); - - RollingUpdateList.fromJson(core.Map _json) { - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<RollingUpdate>((value) => new RollingUpdate.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("nextPageToken")) { - nextPageToken = _json["nextPageToken"]; - } - if (_json.containsKey("selfLink")) { - selfLink = _json["selfLink"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - if (nextPageToken != null) { - _json["nextPageToken"] = nextPageToken; - } - if (selfLink != null) { - _json["selfLink"] = selfLink; - } - return _json; - } -}
diff --git a/generated/googleapis_beta/lib/runtimeconfig/v1beta1.dart b/generated/googleapis_beta/lib/runtimeconfig/v1beta1.dart index 6519e92..b16b90e 100644 --- a/generated/googleapis_beta/lib/runtimeconfig/v1beta1.dart +++ b/generated/googleapis_beta/lib/runtimeconfig/v1beta1.dart
@@ -816,11 +816,6 @@ /// `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` /// Value must have pattern "^projects/[^/]+/configs/[^/]+$". /// - /// [filter] - Filters variables by matching the specified filter. For - /// example: - /// - /// `projects/example-project/config/[CONFIG_NAME]/variables/example-variable`. - /// /// [pageToken] - Specifies a page token to use. Set `pageToken` to a /// `nextPageToken` /// returned by a previous list request to get the next page of results. @@ -835,6 +830,11 @@ /// are fewer /// elements than the specified number, returns all elements. /// + /// [filter] - Filters variables by matching the specified filter. For + /// example: + /// + /// `projects/example-project/config/[CONFIG_NAME]/variables/example-variable`. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -846,10 +846,10 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListVariablesResponse> list(core.String parent, - {core.String filter, - core.String pageToken, + {core.String pageToken, core.bool returnValues, core.int pageSize, + core.String filter, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -861,9 +861,6 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (filter != null) { - _queryParams["filter"] = [filter]; - } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } @@ -873,6 +870,9 @@ if (pageSize != null) { _queryParams["pageSize"] = ["${pageSize}"]; } + if (filter != null) { + _queryParams["filter"] = [filter]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1435,15 +1435,15 @@ /// A Cardinality condition for the Waiter resource. A cardinality condition is /// met when the number of variables under a specified path prefix reaches a /// predefined number. For example, if you set a Cardinality condition where -/// the `path` is set to `/foo` and the number of paths is set to 2, the +/// the `path` is set to `/foo` and the number of paths is set to `2`, the /// following variables would meet the condition in a RuntimeConfig resource: /// /// + `/foo/variable1 = "value1"` /// + `/foo/variable2 = "value2"` /// + `/bar/variable3 = "value3"` /// -/// It would not would not satisify the same condition with the `number` set to -/// 3, however, because there is only 2 paths that start with `/foo`. +/// It would not satisfy the same condition with the `number` set to +/// `3`, however, because there is only 2 paths that start with `/foo`. /// Cardinality conditions are recursive; all subtrees under the specific /// path prefix are counted. class Cardinality { @@ -2134,7 +2134,8 @@ /// projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME] /// /// The `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a - /// valid RuntimeConfig reource and `[VARIABLE_NAME]` follows Unix file system + /// valid RuntimeConfig resource and `[VARIABLE_NAME]` follows Unix file + /// system /// file path naming. /// /// The `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and @@ -2149,7 +2150,7 @@ /// Once you create a variable, you cannot change the variable name. core.String name; - /// [Ouput only] The current state of the variable. The variable state + /// Output only. The current state of the variable. The variable state /// indicates /// the outcome of the `variables().watch` call and is visible through the /// `get` and `list` calls. @@ -2167,11 +2168,14 @@ core.String text; /// Output only. The time of the last variable update. + /// Timestamp will be UTC timestamp. core.String updateTime; /// The binary value of the variable. The length of the value must be less /// than 4096 bytes. Empty values are also accepted. The value must be - /// base64 encoded. Only one of `value` or `text` can be set. + /// base64 encoded, and must comply with IETF RFC4648 + /// (https://www.ietf.org/rfc/rfc4648.txt). Only one of `value` or `text` + /// can be set. core.String value; core.List<core.int> get valueAsBytes { return convert.base64.decode(value);
diff --git a/generated/googleapis_beta/lib/servicenetworking/v1beta.dart b/generated/googleapis_beta/lib/servicenetworking/v1beta.dart new file mode 100644 index 0000000..8d9dcbf --- /dev/null +++ b/generated/googleapis_beta/lib/servicenetworking/v1beta.dart
@@ -0,0 +1,4987 @@ +// This is a generated file (see the discoveryapis_generator project). + +// ignore_for_file: unnecessary_cast + +library googleapis_beta.servicenetworking.v1beta; + +import 'dart:core' as core; +import 'dart:async' as async; +import 'dart:convert' as convert; + +import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; +import 'package:http/http.dart' as http_1; + +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' + show ApiRequestError, DetailedApiRequestError; + +const core.String USER_AGENT = 'dart-api-client servicenetworking/v1beta'; + +/// Provides automatic management of network configurations necessary for +/// certain services. +class ServicenetworkingApi { + /// View and manage your data across Google Cloud Platform services + static const CloudPlatformScope = + "https://www.googleapis.com/auth/cloud-platform"; + + /// Manage your Google API service configuration + static const ServiceManagementScope = + "https://www.googleapis.com/auth/service.management"; + + final commons.ApiRequester _requester; + + OperationsResourceApi get operations => new OperationsResourceApi(_requester); + ServicesResourceApi get services => new ServicesResourceApi(_requester); + + ServicenetworkingApi(http_1.Client client, + {core.String rootUrl: "https://servicenetworking.googleapis.com/", + core.String servicePath: ""}) + : _requester = + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); +} + +class OperationsResourceApi { + final commons.ApiRequester _requester; + + OperationsResourceApi(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 "^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_1.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}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +class ServicesResourceApi { + final commons.ApiRequester _requester; + + ServicesConnectionsResourceApi get connections => + new ServicesConnectionsResourceApi(_requester); + + ServicesResourceApi(commons.ApiRequester client) : _requester = client; + + /// For service producers, provisions a new subnet in a + /// peered service's shared VPC network in the requested region and with the + /// requested size that's expressed as a CIDR range (number of leading bits of + /// ipV4 network mask). The method checks against the assigned allocated + /// ranges + /// to find a non-conflicting IP address range. The method will reuse a subnet + /// if subsequent calls contain the same subnet name, region, and prefix + /// length. This method will make producer's tenant project to be a shared VPC + /// service project as needed. The response from the `get` operation will be + /// of + /// type `Subnetwork` if the operation successfully completes. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. A tenant project in the service producer + /// organization, in the + /// following format: services/{service}/{collection-id}/{resource-id}. + /// {collection-id} is the cloud resource collection type that represents the + /// tenant project. Only `projects` are supported. + /// {resource-id} is the tenant project numeric id, such as + /// `123456`. {service} the name of the peering service, such as + /// `service-peering.example.com`. This service must already be + /// enabled in the service consumer's project. + /// Value must have pattern "^services/[^/]+/[^/]+/[^/]+$". + /// + /// [$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_1.Client] completes with an error when making a REST + /// call, this method will complete with the same error. + async.Future<Operation> addSubnetwork( + AddSubnetworkRequest request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + + commons.Escaper.ecapeVariableReserved('$parent') + + ':addSubnetwork'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// Updates the allocated ranges that are assigned to a connection. + /// The response from the `get` operation will be of type `Connection` if the + /// operation successfully completes. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [name] - The service producer peering service that is managing peering + /// connectivity + /// for a service producer organization. + /// For Google services that support this functionality, this is + /// `services/servicenetworking.googleapis.com`. + /// Value must have pattern "^services/[^/]+$". + /// + /// [updateMask] - The update mask. If this is omitted, it defaults to "*". + /// You can only + /// update the listed peering ranges. + /// + /// [force] - If a previously defined allocated range is removed, force flag + /// must be + /// set to true. + /// + /// [$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_1.Client] completes with an error when making a REST + /// call, this method will complete with the same error. + async.Future<Operation> patch(Connection request, core.String name, + {core.String updateMask, core.bool force, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (name == null) { + throw new core.ArgumentError("Parameter name is required."); + } + if (updateMask != null) { + _queryParams["updateMask"] = [updateMask]; + } + if (force != null) { + _queryParams["force"] = ["${force}"]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + commons.Escaper.ecapeVariableReserved('$name'); + + var _response = _requester.request(_url, "PATCH", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// Service producers can use this method to find a currently unused range + /// within consumer allocated ranges. This returned range is not reserved, + /// and not guaranteed to remain unused. + /// It will validate previously provided allocated ranges, find + /// non-conflicting sub-range of requested size (expressed in + /// number of leading bits of ipv4 network mask, as in CIDR range + /// notation). + /// Operation<response: Range> + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - Required. This is in a form services/{service}. + /// {service} the name of the private access management service, for example + /// 'service-peering.example.com'. + /// Value must have pattern "^services/[^/]+$". + /// + /// [$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_1.Client] completes with an error when making a REST + /// call, this method will complete with the same error. + async.Future<Operation> searchRange( + SearchRangeRequest request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + + commons.Escaper.ecapeVariableReserved('$parent') + + ':searchRange'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } +} + +class ServicesConnectionsResourceApi { + final commons.ApiRequester _requester; + + ServicesConnectionsResourceApi(commons.ApiRequester client) + : _requester = client; + + /// Creates a private connection that establishes a VPC Network Peering + /// connection to a VPC network in the service producer's organization. + /// The administrator of the service consumer's VPC network invokes this + /// method. The administrator must assign one or more allocated IP ranges for + /// provisioning subnetworks in the service producer's VPC network. This + /// connection is used for all supported services in the service producer's + /// organization, so it only needs to be invoked once. The response from the + /// `get` operation will be of type `Connection` if the operation successfully + /// completes. + /// + /// [request] - The metadata request object. + /// + /// Request parameters: + /// + /// [parent] - The service that is managing peering connectivity for a service + /// producer's + /// organization. For Google services that support this functionality, this + /// value is `services/servicenetworking.googleapis.com`. + /// Value must have pattern "^services/[^/]+$". + /// + /// [$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_1.Client] completes with an error when making a REST + /// call, this method will complete with the same error. + async.Future<Operation> create(Connection request, core.String parent, + {core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (request != null) { + _body = convert.json.encode((request).toJson()); + } + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/connections'; + + var _response = _requester.request(_url, "POST", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new Operation.fromJson(data)); + } + + /// List the private connections that are configured in a service consumer's + /// VPC network. + /// + /// Request parameters: + /// + /// [parent] - The service that is managing peering connectivity for a service + /// producer's + /// organization. For Google services that support this functionality, this + /// value is `services/servicenetworking.googleapis.com`. + /// If you specify `-` as the parameter value, all configured public peering + /// services are listed. + /// Value must have pattern "^services/[^/]+$". + /// + /// [network] - The name of service consumer's VPC network that's connected + /// with service + /// producer network through a private connection. The network name must be in + /// the following format: + /// `projects/{project}/global/networks/{network}`. {project} is a + /// project number, such as in `12345` that includes the VPC service + /// consumer's VPC network. {network} is the name of the service consumer's + /// VPC + /// network. + /// + /// [$fields] - Selector specifying which fields to include in a partial + /// response. + /// + /// Completes with a [ListConnectionsResponse]. + /// + /// Completes with a [commons.ApiRequestError] if the API endpoint returned an + /// error. + /// + /// If the used [http_1.Client] completes with an error when making a REST + /// call, this method will complete with the same error. + async.Future<ListConnectionsResponse> list(core.String parent, + {core.String network, core.String $fields}) { + var _url = null; + var _queryParams = new core.Map<core.String, core.List<core.String>>(); + var _uploadMedia = null; + var _uploadOptions = null; + var _downloadOptions = commons.DownloadOptions.Metadata; + var _body = null; + + if (parent == null) { + throw new core.ArgumentError("Parameter parent is required."); + } + if (network != null) { + _queryParams["network"] = [network]; + } + if ($fields != null) { + _queryParams["fields"] = [$fields]; + } + + _url = 'v1beta/' + + commons.Escaper.ecapeVariableReserved('$parent') + + '/connections'; + + var _response = _requester.request(_url, "GET", + body: _body, + queryParams: _queryParams, + uploadOptions: _uploadOptions, + uploadMedia: _uploadMedia, + downloadOptions: _downloadOptions); + return _response.then((data) => new ListConnectionsResponse.fromJson(data)); + } +} + +/// Request to create a subnetwork in a previously peered service network. +class AddSubnetworkRequest { + /// Required. A resource that represents the service consumer, such as + /// `projects/123456`. The project number can be different from the + /// value in the consumer network parameter. For example, the network might be + /// part of a Shared VPC network. In those cases, Service Networking validates + /// that this resource belongs to that Shared VPC. + core.String consumer; + + /// Required. The name of the service consumer's VPC network. The network + /// must have an existing private connection that was provisioned through the + /// connections.create method. The name must be in the following format: + /// `projects/{project}/global/networks/{network}`, where {project} + /// is a project number, such as `12345`. {network} is the name of a + /// VPC network in the project. + core.String consumerNetwork; + + /// An optional description of the subnet. + core.String description; + + /// Required. The prefix length of the subnet's IP address range. Use CIDR + /// range notation, such as `30` to provision a subnet with an + /// `x.x.x.x/30` CIDR range. The IP address range is drawn from a + /// pool of available ranges in the service consumer's allocated range. + core.int ipPrefixLength; + + /// Required. The name of a [region](/compute/docs/regions-zones) + /// for the subnet, such `europe-west1`. + core.String region; + + /// Optional. The starting address of a range. The address must be a valid + /// IPv4 address in the x.x.x.x format. This value combined with the IP prefix + /// range is the CIDR range for the subnet. The range must be within the + /// allocated range that is assigned to the private connection. If the CIDR + /// range isn't available, the call fails. + core.String requestedAddress; + + /// Required. A name for the new subnet. For information about the naming + /// requirements, see + /// [subnetwork](/compute/docs/reference/rest/v1/subnetworks) + /// in the Compute API documentation. + core.String subnetwork; + + /// A list of members that are granted the `compute.networkUser` + /// role on the subnet. + core.List<core.String> subnetworkUsers; + + AddSubnetworkRequest(); + + AddSubnetworkRequest.fromJson(core.Map _json) { + if (_json.containsKey("consumer")) { + consumer = _json["consumer"]; + } + if (_json.containsKey("consumerNetwork")) { + consumerNetwork = _json["consumerNetwork"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("ipPrefixLength")) { + ipPrefixLength = _json["ipPrefixLength"]; + } + if (_json.containsKey("region")) { + region = _json["region"]; + } + if (_json.containsKey("requestedAddress")) { + requestedAddress = _json["requestedAddress"]; + } + if (_json.containsKey("subnetwork")) { + subnetwork = _json["subnetwork"]; + } + if (_json.containsKey("subnetworkUsers")) { + subnetworkUsers = + (_json["subnetworkUsers"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (consumer != null) { + _json["consumer"] = consumer; + } + if (consumerNetwork != null) { + _json["consumerNetwork"] = consumerNetwork; + } + if (description != null) { + _json["description"] = description; + } + if (ipPrefixLength != null) { + _json["ipPrefixLength"] = ipPrefixLength; + } + if (region != null) { + _json["region"] = region; + } + if (requestedAddress != null) { + _json["requestedAddress"] = requestedAddress; + } + if (subnetwork != null) { + _json["subnetwork"] = subnetwork; + } + if (subnetworkUsers != null) { + _json["subnetworkUsers"] = subnetworkUsers; + } + return _json; + } +} + +/// Api is a light-weight descriptor for an API Interface. +/// +/// Interfaces are also described as "protocol buffer services" in some +/// contexts, +/// such as by the "service" keyword in a .proto file, but they are different +/// from API Services, which represent a concrete implementation of an interface +/// as opposed to simply a description of methods and bindings. They are also +/// sometimes simply referred to as "APIs" in other contexts, such as the name +/// of +/// this message itself. See https://cloud.google.com/apis/design/glossary for +/// detailed terminology. +class Api { + /// The methods of this interface, in unspecified order. + core.List<Method> methods; + + /// Included interfaces. See Mixin. + core.List<Mixin> mixins; + + /// The fully qualified name of this interface, including package name + /// followed by the interface's simple name. + core.String name; + + /// Any metadata attached to the interface. + core.List<Option> options; + + /// Source context for the protocol buffer service represented by this + /// message. + SourceContext sourceContext; + + /// The source syntax of the service. + /// Possible string values are: + /// - "SYNTAX_PROTO2" : Syntax `proto2`. + /// - "SYNTAX_PROTO3" : Syntax `proto3`. + core.String syntax; + + /// A version string for this interface. If specified, must have the form + /// `major-version.minor-version`, as in `1.10`. If the minor version is + /// omitted, it defaults to zero. If the entire version field is empty, the + /// major version is derived from the package name, as outlined below. If the + /// field is not empty, the version in the package name will be verified to be + /// consistent with what is provided here. + /// + /// The versioning schema uses [semantic + /// versioning](http://semver.org) where the major version number + /// indicates a breaking change and the minor version an additive, + /// non-breaking change. Both version numbers are signals to users + /// what to expect from different versions, and should be carefully + /// chosen based on the product plan. + /// + /// The major version is also reflected in the package name of the + /// interface, which must end in `v<major-version>`, as in + /// `google.feature.v1`. For major versions 0 and 1, the suffix can + /// be omitted. Zero major versions must only be used for + /// experimental, non-GA interfaces. + core.String version; + + Api(); + + Api.fromJson(core.Map _json) { + if (_json.containsKey("methods")) { + methods = (_json["methods"] as core.List) + .map<Method>((value) => new Method.fromJson(value)) + .toList(); + } + if (_json.containsKey("mixins")) { + mixins = (_json["mixins"] as core.List) + .map<Mixin>((value) => new Mixin.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("options")) { + options = (_json["options"] as core.List) + .map<Option>((value) => new Option.fromJson(value)) + .toList(); + } + if (_json.containsKey("sourceContext")) { + sourceContext = new SourceContext.fromJson(_json["sourceContext"]); + } + if (_json.containsKey("syntax")) { + syntax = _json["syntax"]; + } + if (_json.containsKey("version")) { + version = _json["version"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (methods != null) { + _json["methods"] = methods.map((value) => (value).toJson()).toList(); + } + if (mixins != null) { + _json["mixins"] = mixins.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + if (options != null) { + _json["options"] = options.map((value) => (value).toJson()).toList(); + } + if (sourceContext != null) { + _json["sourceContext"] = (sourceContext).toJson(); + } + if (syntax != null) { + _json["syntax"] = syntax; + } + if (version != null) { + _json["version"] = version; + } + return _json; + } +} + +/// Configuration for an anthentication provider, including support for +/// [JSON Web Token +/// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +class AuthProvider { + /// The list of JWT + /// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + /// that are allowed to access. A JWT containing any of these audiences will + /// be accepted. When this setting is absent, only JWTs with audience + /// "https://Service_name/API_name" + /// will be accepted. For example, if no audiences are in the setting, + /// LibraryService API will only accept JWTs with the following audience + /// "https://library-example.googleapis.com/google.example.library.v1.LibraryService". + /// + /// Example: + /// + /// audiences: bookstore_android.apps.googleusercontent.com, + /// bookstore_web.apps.googleusercontent.com + core.String audiences; + + /// Redirect URL if JWT token is required but not present or is expired. + /// Implement authorizationUrl of securityDefinitions in OpenAPI spec. + core.String authorizationUrl; + + /// The unique identifier of the auth provider. It will be referred to by + /// `AuthRequirement.provider_id`. + /// + /// Example: "bookstore_auth". + core.String id; + + /// Identifies the principal that issued the JWT. See + /// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 + /// Usually a URL or an email address. + /// + /// Example: https://securetoken.google.com + /// Example: 1234567-compute@developer.gserviceaccount.com + core.String issuer; + + /// URL of the provider's public key set to validate signature of the JWT. See + /// [OpenID + /// Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). + /// Optional if the key set document: + /// - can be retrieved from + /// [OpenID + /// Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html + /// of the issuer. + /// - can be inferred from the email domain of the issuer (e.g. a Google + /// service account). + /// + /// Example: https://www.googleapis.com/oauth2/v1/certs + core.String jwksUri; + + AuthProvider(); + + AuthProvider.fromJson(core.Map _json) { + if (_json.containsKey("audiences")) { + audiences = _json["audiences"]; + } + if (_json.containsKey("authorizationUrl")) { + authorizationUrl = _json["authorizationUrl"]; + } + if (_json.containsKey("id")) { + id = _json["id"]; + } + if (_json.containsKey("issuer")) { + issuer = _json["issuer"]; + } + if (_json.containsKey("jwksUri")) { + jwksUri = _json["jwksUri"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (audiences != null) { + _json["audiences"] = audiences; + } + if (authorizationUrl != null) { + _json["authorizationUrl"] = authorizationUrl; + } + if (id != null) { + _json["id"] = id; + } + if (issuer != null) { + _json["issuer"] = issuer; + } + if (jwksUri != null) { + _json["jwksUri"] = jwksUri; + } + return _json; + } +} + +/// User-defined authentication requirements, including support for +/// [JSON Web Token +/// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +class AuthRequirement { + /// NOTE: This will be deprecated soon, once AuthProvider.audiences is + /// implemented and accepted in all the runtime components. + /// + /// The list of JWT + /// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + /// that are allowed to access. A JWT containing any of these audiences will + /// be accepted. When this setting is absent, only JWTs with audience + /// "https://Service_name/API_name" + /// will be accepted. For example, if no audiences are in the setting, + /// LibraryService API will only accept JWTs with the following audience + /// "https://library-example.googleapis.com/google.example.library.v1.LibraryService". + /// + /// Example: + /// + /// audiences: bookstore_android.apps.googleusercontent.com, + /// bookstore_web.apps.googleusercontent.com + core.String audiences; + + /// id from authentication provider. + /// + /// Example: + /// + /// provider_id: bookstore_auth + core.String providerId; + + AuthRequirement(); + + AuthRequirement.fromJson(core.Map _json) { + if (_json.containsKey("audiences")) { + audiences = _json["audiences"]; + } + if (_json.containsKey("providerId")) { + providerId = _json["providerId"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (audiences != null) { + _json["audiences"] = audiences; + } + if (providerId != null) { + _json["providerId"] = providerId; + } + return _json; + } +} + +/// `Authentication` defines the authentication configuration for an API. +/// +/// Example for an API targeted for external use: +/// +/// name: calendar.googleapis.com +/// authentication: +/// providers: +/// - id: google_calendar_auth +/// jwks_uri: https://www.googleapis.com/oauth2/v1/certs +/// issuer: https://securetoken.google.com +/// rules: +/// - selector: "*" +/// requirements: +/// provider_id: google_calendar_auth +class Authentication { + /// Defines a set of authentication providers that a service supports. + core.List<AuthProvider> providers; + + /// A list of authentication rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + core.List<AuthenticationRule> rules; + + Authentication(); + + Authentication.fromJson(core.Map _json) { + if (_json.containsKey("providers")) { + providers = (_json["providers"] as core.List) + .map<AuthProvider>((value) => new AuthProvider.fromJson(value)) + .toList(); + } + if (_json.containsKey("rules")) { + rules = (_json["rules"] as core.List) + .map<AuthenticationRule>( + (value) => new AuthenticationRule.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (providers != null) { + _json["providers"] = providers.map((value) => (value).toJson()).toList(); + } + if (rules != null) { + _json["rules"] = rules.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Authentication rules for the service. +/// +/// By default, if a method has any authentication requirements, every request +/// must include a valid credential matching one of the requirements. +/// It's an error to include more than one kind of credential in a single +/// request. +/// +/// If a method doesn't have any auth requirements, request credentials will be +/// ignored. +class AuthenticationRule { + /// If true, the service accepts API keys without any other credential. + core.bool allowWithoutCredential; + + /// The requirements for OAuth credentials. + OAuthRequirements oauth; + + /// Requirements for additional authentication providers. + core.List<AuthRequirement> requirements; + + /// Selects the methods to which this rule applies. + /// + /// Refer to selector for syntax details. + core.String selector; + + AuthenticationRule(); + + AuthenticationRule.fromJson(core.Map _json) { + if (_json.containsKey("allowWithoutCredential")) { + allowWithoutCredential = _json["allowWithoutCredential"]; + } + if (_json.containsKey("oauth")) { + oauth = new OAuthRequirements.fromJson(_json["oauth"]); + } + if (_json.containsKey("requirements")) { + requirements = (_json["requirements"] as core.List) + .map<AuthRequirement>((value) => new AuthRequirement.fromJson(value)) + .toList(); + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (allowWithoutCredential != null) { + _json["allowWithoutCredential"] = allowWithoutCredential; + } + if (oauth != null) { + _json["oauth"] = (oauth).toJson(); + } + if (requirements != null) { + _json["requirements"] = + requirements.map((value) => (value).toJson()).toList(); + } + if (selector != null) { + _json["selector"] = selector; + } + return _json; + } +} + +/// Configuration of authorization. +/// +/// This section determines the authorization provider, if unspecified, then no +/// authorization check will be done. +/// +/// Example: +/// +/// experimental: +/// authorization: +/// provider: firebaserules.googleapis.com +class AuthorizationConfig { + /// The name of the authorization provider, such as + /// firebaserules.googleapis.com. + core.String provider; + + AuthorizationConfig(); + + AuthorizationConfig.fromJson(core.Map _json) { + if (_json.containsKey("provider")) { + provider = _json["provider"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (provider != null) { + _json["provider"] = provider; + } + return _json; + } +} + +/// `Backend` defines the backend configuration for a service. +class Backend { + /// A list of API backend rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + core.List<BackendRule> rules; + + Backend(); + + Backend.fromJson(core.Map _json) { + if (_json.containsKey("rules")) { + rules = (_json["rules"] as core.List) + .map<BackendRule>((value) => new BackendRule.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (rules != null) { + _json["rules"] = rules.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A backend rule provides configuration for an individual API element. +class BackendRule { + /// The address of the API backend. + core.String address; + + /// The number of seconds to wait for a response from a request. The default + /// deadline for gRPC is infinite (no deadline) and HTTP requests is 5 + /// seconds. + core.double deadline; + + /// The JWT audience is used when generating a JWT id token for the backend. + core.String jwtAudience; + + /// Minimum deadline in seconds needed for this method. Calls having deadline + /// value lower than this will be rejected. + core.double minDeadline; + + /// The number of seconds to wait for the completion of a long running + /// operation. The default is no deadline. + core.double operationDeadline; + + /// + /// Possible string values are: + /// - "PATH_TRANSLATION_UNSPECIFIED" + /// - "CONSTANT_ADDRESS" : Use the backend address as-is, with no modification + /// to the path. If the + /// URL pattern contains variables, the variable names and values will be + /// appended to the query string. If a query string parameter and a URL + /// pattern variable have the same name, this may result in duplicate keys in + /// the query string. + /// + /// # Examples + /// + /// Given the following operation config: + /// + /// Method path: /api/company/{cid}/user/{uid} + /// Backend address: https://example.cloudfunctions.net/getUser + /// + /// Requests to the following request paths will call the backend at the + /// translated path: + /// + /// Request path: /api/company/widgetworks/user/johndoe + /// Translated: + /// https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe + /// + /// Request path: /api/company/widgetworks/user/johndoe?timezone=EST + /// Translated: + /// https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe + /// - "APPEND_PATH_TO_ADDRESS" : The request path will be appended to the + /// backend address. + /// + /// # Examples + /// + /// Given the following operation config: + /// + /// Method path: /api/company/{cid}/user/{uid} + /// Backend address: https://example.appspot.com + /// + /// Requests to the following request paths will call the backend at the + /// translated path: + /// + /// Request path: /api/company/widgetworks/user/johndoe + /// Translated: + /// https://example.appspot.com/api/company/widgetworks/user/johndoe + /// + /// Request path: /api/company/widgetworks/user/johndoe?timezone=EST + /// Translated: + /// https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST + core.String pathTranslation; + + /// Selects the methods to which this rule applies. + /// + /// Refer to selector for syntax details. + core.String selector; + + BackendRule(); + + BackendRule.fromJson(core.Map _json) { + if (_json.containsKey("address")) { + address = _json["address"]; + } + if (_json.containsKey("deadline")) { + deadline = _json["deadline"].toDouble(); + } + if (_json.containsKey("jwtAudience")) { + jwtAudience = _json["jwtAudience"]; + } + if (_json.containsKey("minDeadline")) { + minDeadline = _json["minDeadline"].toDouble(); + } + if (_json.containsKey("operationDeadline")) { + operationDeadline = _json["operationDeadline"].toDouble(); + } + if (_json.containsKey("pathTranslation")) { + pathTranslation = _json["pathTranslation"]; + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (address != null) { + _json["address"] = address; + } + if (deadline != null) { + _json["deadline"] = deadline; + } + if (jwtAudience != null) { + _json["jwtAudience"] = jwtAudience; + } + if (minDeadline != null) { + _json["minDeadline"] = minDeadline; + } + if (operationDeadline != null) { + _json["operationDeadline"] = operationDeadline; + } + if (pathTranslation != null) { + _json["pathTranslation"] = pathTranslation; + } + if (selector != null) { + _json["selector"] = selector; + } + return _json; + } +} + +/// Billing related configuration of the service. +/// +/// The following example shows how to configure monitored resources and metrics +/// for billing: +/// +/// monitored_resources: +/// - type: library.googleapis.com/branch +/// labels: +/// - key: /city +/// description: The city where the library branch is located in. +/// - key: /name +/// description: The name of the branch. +/// metrics: +/// - name: library.googleapis.com/book/borrowed_count +/// metric_kind: DELTA +/// value_type: INT64 +/// billing: +/// consumer_destinations: +/// - monitored_resource: library.googleapis.com/branch +/// metrics: +/// - library.googleapis.com/book/borrowed_count +class Billing { + /// Billing configurations for sending metrics to the consumer project. + /// There can be multiple consumer destinations per service, each one must + /// have + /// a different monitored resource type. A metric can be used in at most + /// one consumer destination. + core.List<BillingDestination> consumerDestinations; + + Billing(); + + Billing.fromJson(core.Map _json) { + if (_json.containsKey("consumerDestinations")) { + consumerDestinations = (_json["consumerDestinations"] as core.List) + .map<BillingDestination>( + (value) => new BillingDestination.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (consumerDestinations != null) { + _json["consumerDestinations"] = + consumerDestinations.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Configuration of a specific billing destination (Currently only support +/// bill against consumer project). +class BillingDestination { + /// Names of the metrics to report to this billing destination. + /// Each name must be defined in Service.metrics section. + core.List<core.String> metrics; + + /// The monitored resource type. The type must be defined in + /// Service.monitored_resources section. + core.String monitoredResource; + + BillingDestination(); + + BillingDestination.fromJson(core.Map _json) { + if (_json.containsKey("metrics")) { + metrics = (_json["metrics"] as core.List).cast<core.String>(); + } + if (_json.containsKey("monitoredResource")) { + monitoredResource = _json["monitoredResource"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (metrics != null) { + _json["metrics"] = metrics; + } + if (monitoredResource != null) { + _json["monitoredResource"] = monitoredResource; + } + return _json; + } +} + +/// Represents a private connection resource. A private connection is +/// implemented +/// as a VPC Network Peering connection between a service producer's VPC network +/// and a service consumer's VPC network. +class Connection { + /// The name of service consumer's VPC network that's connected with service + /// producer network, in the following format: + /// `projects/{project}/global/networks/{network}`. + /// `{project}` is a project number, such as in `12345` that includes + /// the VPC service consumer's VPC network. `{network}` is the name of the + /// service consumer's VPC network. + core.String network; + + /// Output only. + /// The name of the VPC Network Peering connection that was created by the + /// service producer. + core.String peering; + + /// The name of one or more allocated IP address ranges for this service + /// producer of type `PEERING`. + /// Note that invoking this method with a different range when connection is + /// already established will not modify already provisioned service + /// producer subnetworks. + core.List<core.String> reservedPeeringRanges; + + /// Output only. + /// The name of the peering service that's associated with this connection, in + /// the following format: `services/{service name}`. + core.String service; + + Connection(); + + Connection.fromJson(core.Map _json) { + if (_json.containsKey("network")) { + network = _json["network"]; + } + if (_json.containsKey("peering")) { + peering = _json["peering"]; + } + if (_json.containsKey("reservedPeeringRanges")) { + reservedPeeringRanges = + (_json["reservedPeeringRanges"] as core.List).cast<core.String>(); + } + if (_json.containsKey("service")) { + service = _json["service"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (network != null) { + _json["network"] = network; + } + if (peering != null) { + _json["peering"] = peering; + } + if (reservedPeeringRanges != null) { + _json["reservedPeeringRanges"] = reservedPeeringRanges; + } + if (service != null) { + _json["service"] = service; + } + return _json; + } +} + +/// `Context` defines which contexts an API requests. +/// +/// Example: +/// +/// context: +/// rules: +/// - selector: "*" +/// requested: +/// - google.rpc.context.ProjectContext +/// - google.rpc.context.OriginContext +/// +/// The above specifies that all methods in the API request +/// `google.rpc.context.ProjectContext` and +/// `google.rpc.context.OriginContext`. +/// +/// Available context types are defined in package +/// `google.rpc.context`. +/// +/// This also provides mechanism to whitelist any protobuf message extension +/// that +/// can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and +/// “x-goog-ext-<extension_id>-jspb” format. For example, list any service +/// specific protobuf types that can appear in grpc metadata as follows in your +/// yaml file: +/// +/// Example: +/// +/// context: +/// rules: +/// - selector: "google.example.library.v1.LibraryService.CreateBook" +/// allowed_request_extensions: +/// - google.foo.v1.NewExtension +/// allowed_response_extensions: +/// - google.foo.v1.NewExtension +/// +/// You can also specify extension ID instead of fully qualified extension name +/// here. +class Context { + /// A list of RPC context rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + core.List<ContextRule> rules; + + Context(); + + Context.fromJson(core.Map _json) { + if (_json.containsKey("rules")) { + rules = (_json["rules"] as core.List) + .map<ContextRule>((value) => new ContextRule.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (rules != null) { + _json["rules"] = rules.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A context rule provides information about the context for an individual API +/// element. +class ContextRule { + /// A list of full type names or extension IDs of extensions allowed in grpc + /// side channel from client to backend. + core.List<core.String> allowedRequestExtensions; + + /// A list of full type names or extension IDs of extensions allowed in grpc + /// side channel from backend to client. + core.List<core.String> allowedResponseExtensions; + + /// A list of full type names of provided contexts. + core.List<core.String> provided; + + /// A list of full type names of requested contexts. + core.List<core.String> requested; + + /// Selects the methods to which this rule applies. + /// + /// Refer to selector for syntax details. + core.String selector; + + ContextRule(); + + ContextRule.fromJson(core.Map _json) { + if (_json.containsKey("allowedRequestExtensions")) { + allowedRequestExtensions = + (_json["allowedRequestExtensions"] as core.List).cast<core.String>(); + } + if (_json.containsKey("allowedResponseExtensions")) { + allowedResponseExtensions = + (_json["allowedResponseExtensions"] as core.List).cast<core.String>(); + } + if (_json.containsKey("provided")) { + provided = (_json["provided"] as core.List).cast<core.String>(); + } + if (_json.containsKey("requested")) { + requested = (_json["requested"] as core.List).cast<core.String>(); + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (allowedRequestExtensions != null) { + _json["allowedRequestExtensions"] = allowedRequestExtensions; + } + if (allowedResponseExtensions != null) { + _json["allowedResponseExtensions"] = allowedResponseExtensions; + } + if (provided != null) { + _json["provided"] = provided; + } + if (requested != null) { + _json["requested"] = requested; + } + if (selector != null) { + _json["selector"] = selector; + } + return _json; + } +} + +/// Selects and configures the service controller used by the service. The +/// service controller handles features like abuse, quota, billing, logging, +/// monitoring, etc. +class Control { + /// The service control environment to use. If empty, no control plane + /// feature (like quota and billing) will be enabled. + core.String environment; + + Control(); + + Control.fromJson(core.Map _json) { + if (_json.containsKey("environment")) { + environment = _json["environment"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (environment != null) { + _json["environment"] = environment; + } + return _json; + } +} + +/// Customize service error responses. For example, list any service +/// specific protobuf types that can appear in error detail lists of +/// error responses. +/// +/// Example: +/// +/// custom_error: +/// types: +/// - google.foo.v1.CustomError +/// - google.foo.v1.AnotherError +class CustomError { + /// The list of custom error rules that apply to individual API messages. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + core.List<CustomErrorRule> rules; + + /// The list of custom error detail types, e.g. 'google.foo.v1.CustomError'. + core.List<core.String> types; + + CustomError(); + + CustomError.fromJson(core.Map _json) { + if (_json.containsKey("rules")) { + rules = (_json["rules"] as core.List) + .map<CustomErrorRule>((value) => new CustomErrorRule.fromJson(value)) + .toList(); + } + if (_json.containsKey("types")) { + types = (_json["types"] as core.List).cast<core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (rules != null) { + _json["rules"] = rules.map((value) => (value).toJson()).toList(); + } + if (types != null) { + _json["types"] = types; + } + return _json; + } +} + +/// A custom error rule. +class CustomErrorRule { + /// Mark this message as possible payload in error response. Otherwise, + /// objects of this type will be filtered when they appear in error payload. + core.bool isErrorType; + + /// Selects messages to which this rule applies. + /// + /// Refer to selector for syntax details. + core.String selector; + + CustomErrorRule(); + + CustomErrorRule.fromJson(core.Map _json) { + if (_json.containsKey("isErrorType")) { + isErrorType = _json["isErrorType"]; + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (isErrorType != null) { + _json["isErrorType"] = isErrorType; + } + if (selector != null) { + _json["selector"] = selector; + } + return _json; + } +} + +/// A custom pattern is used for defining custom HTTP verb. +class CustomHttpPattern { + /// The name of this custom HTTP verb. + core.String kind; + + /// The path matched by this custom verb. + core.String path; + + CustomHttpPattern(); + + CustomHttpPattern.fromJson(core.Map _json) { + if (_json.containsKey("kind")) { + kind = _json["kind"]; + } + if (_json.containsKey("path")) { + path = _json["path"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (kind != null) { + _json["kind"] = kind; + } + if (path != null) { + _json["path"] = path; + } + return _json; + } +} + +/// `Documentation` provides the information for describing a service. +/// +/// Example: +/// <pre><code>documentation: +/// summary: > +/// The Google Calendar API gives access +/// to most calendar features. +/// pages: +/// - name: Overview +/// content: (== include google/foo/overview.md ==) +/// - name: Tutorial +/// content: (== include google/foo/tutorial.md ==) +/// subpages; +/// - name: Java +/// content: (== include google/foo/tutorial_java.md ==) +/// rules: +/// - selector: google.calendar.Calendar.Get +/// description: > +/// ... +/// - selector: google.calendar.Calendar.Put +/// description: > +/// ... +/// </code></pre> +/// Documentation is provided in markdown syntax. In addition to +/// standard markdown features, definition lists, tables and fenced +/// code blocks are supported. Section headers can be provided and are +/// interpreted relative to the section nesting of the context where +/// a documentation fragment is embedded. +/// +/// Documentation from the IDL is merged with documentation defined +/// via the config at normalization time, where documentation provided +/// by config rules overrides IDL provided. +/// +/// A number of constructs specific to the API platform are supported +/// in documentation text. +/// +/// In order to reference a proto element, the following +/// notation can be used: +/// <pre><code>[fully.qualified.proto.name][]</code></pre> +/// To override the display text used for the link, this can be used: +/// <pre><code>[display text][fully.qualified.proto.name]</code></pre> +/// Text can be excluded from doc using the following notation: +/// <pre><code>(-- internal comment --)</code></pre> +/// +/// A few directives are available in documentation. Note that +/// directives must appear on a single line to be properly +/// identified. The `include` directive includes a markdown file from +/// an external source: +/// <pre><code>(== include path/to/file ==)</code></pre> +/// The `resource_for` directive marks a message to be the resource of +/// a collection in REST view. If it is not specified, tools attempt +/// to infer the resource from the operations in a collection: +/// <pre><code>(== resource_for v1.shelves.books ==)</code></pre> +/// The directive `suppress_warning` does not directly affect documentation +/// and is documented together with service config validation. +class Documentation { + /// The URL to the root of documentation. + core.String documentationRootUrl; + + /// Declares a single overview page. For example: + /// <pre><code>documentation: + /// summary: ... + /// overview: (== include overview.md ==) + /// </code></pre> + /// This is a shortcut for the following declaration (using pages style): + /// <pre><code>documentation: + /// summary: ... + /// pages: + /// - name: Overview + /// content: (== include overview.md ==) + /// </code></pre> + /// Note: you cannot specify both `overview` field and `pages` field. + core.String overview; + + /// The top level pages for the documentation set. + core.List<Page> pages; + + /// A list of documentation rules that apply to individual API elements. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + core.List<DocumentationRule> rules; + + /// A short summary of what the service does. Can only be provided by + /// plain text. + core.String summary; + + Documentation(); + + Documentation.fromJson(core.Map _json) { + if (_json.containsKey("documentationRootUrl")) { + documentationRootUrl = _json["documentationRootUrl"]; + } + if (_json.containsKey("overview")) { + overview = _json["overview"]; + } + if (_json.containsKey("pages")) { + pages = (_json["pages"] as core.List) + .map<Page>((value) => new Page.fromJson(value)) + .toList(); + } + if (_json.containsKey("rules")) { + rules = (_json["rules"] as core.List) + .map<DocumentationRule>( + (value) => new DocumentationRule.fromJson(value)) + .toList(); + } + if (_json.containsKey("summary")) { + summary = _json["summary"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (documentationRootUrl != null) { + _json["documentationRootUrl"] = documentationRootUrl; + } + if (overview != null) { + _json["overview"] = overview; + } + if (pages != null) { + _json["pages"] = pages.map((value) => (value).toJson()).toList(); + } + if (rules != null) { + _json["rules"] = rules.map((value) => (value).toJson()).toList(); + } + if (summary != null) { + _json["summary"] = summary; + } + return _json; + } +} + +/// A documentation rule provides information about individual API elements. +class DocumentationRule { + /// Deprecation description of the selected element(s). It can be provided if + /// an + /// element is marked as `deprecated`. + core.String deprecationDescription; + + /// Description of the selected API(s). + core.String description; + + /// The selector is a comma-separated list of patterns. Each pattern is a + /// qualified name of the element which may end in "*", indicating a wildcard. + /// Wildcards are only allowed at the end and for a whole component of the + /// qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To + /// specify a default for all applicable elements, the whole pattern "*" + /// is used. + core.String selector; + + DocumentationRule(); + + DocumentationRule.fromJson(core.Map _json) { + if (_json.containsKey("deprecationDescription")) { + deprecationDescription = _json["deprecationDescription"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (deprecationDescription != null) { + _json["deprecationDescription"] = deprecationDescription; + } + if (description != null) { + _json["description"] = description; + } + if (selector != null) { + _json["selector"] = selector; + } + return _json; + } +} + +/// `Endpoint` describes a network endpoint that serves a set of APIs. +/// A service may expose any number of endpoints, and all endpoints share the +/// same service configuration, such as quota configuration and monitoring +/// configuration. +/// +/// Example service configuration: +/// +/// name: library-example.googleapis.com +/// endpoints: +/// # Below entry makes 'google.example.library.v1.Library' +/// # API be served from endpoint address library-example.googleapis.com. +/// # It also allows HTTP OPTIONS calls to be passed to the backend, for +/// # it to decide whether the subsequent cross-origin request is +/// # allowed to proceed. +/// - name: library-example.googleapis.com +/// allow_cors: true +class Endpoint { + /// DEPRECATED: This field is no longer supported. Instead of using aliases, + /// please specify multiple google.api.Endpoint for each of the intended + /// aliases. + /// + /// Additional names that this endpoint will be hosted on. + core.List<core.String> aliases; + + /// Allowing + /// [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka + /// cross-domain traffic, would allow the backends served from this endpoint + /// to + /// receive and respond to HTTP OPTIONS requests. The response will be used by + /// the browser to determine whether the subsequent cross-origin request is + /// allowed to proceed. + core.bool allowCors; + + /// The list of features enabled on this endpoint. + core.List<core.String> features; + + /// The canonical name of this endpoint. + core.String name; + + /// The specification of an Internet routable address of API frontend that + /// will + /// handle requests to this [API + /// Endpoint](https://cloud.google.com/apis/design/glossary). + /// It should be either a valid IPv4 address or a fully-qualified domain name. + /// For example, "8.8.8.8" or "myservice.appspot.com". + core.String target; + + Endpoint(); + + Endpoint.fromJson(core.Map _json) { + if (_json.containsKey("aliases")) { + aliases = (_json["aliases"] as core.List).cast<core.String>(); + } + if (_json.containsKey("allowCors")) { + allowCors = _json["allowCors"]; + } + if (_json.containsKey("features")) { + features = (_json["features"] as core.List).cast<core.String>(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("target")) { + target = _json["target"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (aliases != null) { + _json["aliases"] = aliases; + } + if (allowCors != null) { + _json["allowCors"] = allowCors; + } + if (features != null) { + _json["features"] = features; + } + if (name != null) { + _json["name"] = name; + } + if (target != null) { + _json["target"] = target; + } + return _json; + } +} + +/// Enum type definition. +class Enum { + /// Enum value definitions. + core.List<EnumValue> enumvalue; + + /// Enum type name. + core.String name; + + /// Protocol buffer options. + core.List<Option> options; + + /// The source context. + SourceContext sourceContext; + + /// The source syntax. + /// Possible string values are: + /// - "SYNTAX_PROTO2" : Syntax `proto2`. + /// - "SYNTAX_PROTO3" : Syntax `proto3`. + core.String syntax; + + Enum(); + + Enum.fromJson(core.Map _json) { + if (_json.containsKey("enumvalue")) { + enumvalue = (_json["enumvalue"] as core.List) + .map<EnumValue>((value) => new EnumValue.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("options")) { + options = (_json["options"] as core.List) + .map<Option>((value) => new Option.fromJson(value)) + .toList(); + } + if (_json.containsKey("sourceContext")) { + sourceContext = new SourceContext.fromJson(_json["sourceContext"]); + } + if (_json.containsKey("syntax")) { + syntax = _json["syntax"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (enumvalue != null) { + _json["enumvalue"] = enumvalue.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + if (options != null) { + _json["options"] = options.map((value) => (value).toJson()).toList(); + } + if (sourceContext != null) { + _json["sourceContext"] = (sourceContext).toJson(); + } + if (syntax != null) { + _json["syntax"] = syntax; + } + return _json; + } +} + +/// Enum value definition. +class EnumValue { + /// Enum value name. + core.String name; + + /// Enum value number. + core.int number; + + /// Protocol buffer options. + core.List<Option> options; + + EnumValue(); + + EnumValue.fromJson(core.Map _json) { + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("number")) { + number = _json["number"]; + } + if (_json.containsKey("options")) { + options = (_json["options"] as core.List) + .map<Option>((value) => new Option.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (name != null) { + _json["name"] = name; + } + if (number != null) { + _json["number"] = number; + } + if (options != null) { + _json["options"] = options.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Experimental service configuration. These configuration options can +/// only be used by whitelisted users. +class Experimental { + /// Authorization configuration. + AuthorizationConfig authorization; + + Experimental(); + + Experimental.fromJson(core.Map _json) { + if (_json.containsKey("authorization")) { + authorization = new AuthorizationConfig.fromJson(_json["authorization"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (authorization != null) { + _json["authorization"] = (authorization).toJson(); + } + return _json; + } +} + +/// A single field of a message type. +class Field { + /// The field cardinality. + /// Possible string values are: + /// - "CARDINALITY_UNKNOWN" : For fields with unknown cardinality. + /// - "CARDINALITY_OPTIONAL" : For optional fields. + /// - "CARDINALITY_REQUIRED" : For required fields. Proto2 syntax only. + /// - "CARDINALITY_REPEATED" : For repeated fields. + core.String cardinality; + + /// The string value of the default value of this field. Proto2 syntax only. + core.String defaultValue; + + /// The field JSON name. + core.String jsonName; + + /// The field type. + /// Possible string values are: + /// - "TYPE_UNKNOWN" : Field type unknown. + /// - "TYPE_DOUBLE" : Field type double. + /// - "TYPE_FLOAT" : Field type float. + /// - "TYPE_INT64" : Field type int64. + /// - "TYPE_UINT64" : Field type uint64. + /// - "TYPE_INT32" : Field type int32. + /// - "TYPE_FIXED64" : Field type fixed64. + /// - "TYPE_FIXED32" : Field type fixed32. + /// - "TYPE_BOOL" : Field type bool. + /// - "TYPE_STRING" : Field type string. + /// - "TYPE_GROUP" : Field type group. Proto2 syntax only, and deprecated. + /// - "TYPE_MESSAGE" : Field type message. + /// - "TYPE_BYTES" : Field type bytes. + /// - "TYPE_UINT32" : Field type uint32. + /// - "TYPE_ENUM" : Field type enum. + /// - "TYPE_SFIXED32" : Field type sfixed32. + /// - "TYPE_SFIXED64" : Field type sfixed64. + /// - "TYPE_SINT32" : Field type sint32. + /// - "TYPE_SINT64" : Field type sint64. + core.String kind; + + /// The field name. + core.String name; + + /// The field number. + core.int number; + + /// The index of the field type in `Type.oneofs`, for message or enumeration + /// types. The first type has index 1; zero means the type is not in the list. + core.int oneofIndex; + + /// The protocol buffer options. + core.List<Option> options; + + /// Whether to use alternative packed wire representation. + core.bool packed; + + /// The field type URL, without the scheme, for message or enumeration + /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + core.String typeUrl; + + Field(); + + Field.fromJson(core.Map _json) { + if (_json.containsKey("cardinality")) { + cardinality = _json["cardinality"]; + } + if (_json.containsKey("defaultValue")) { + defaultValue = _json["defaultValue"]; + } + if (_json.containsKey("jsonName")) { + jsonName = _json["jsonName"]; + } + if (_json.containsKey("kind")) { + kind = _json["kind"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("number")) { + number = _json["number"]; + } + if (_json.containsKey("oneofIndex")) { + oneofIndex = _json["oneofIndex"]; + } + if (_json.containsKey("options")) { + options = (_json["options"] as core.List) + .map<Option>((value) => new Option.fromJson(value)) + .toList(); + } + if (_json.containsKey("packed")) { + packed = _json["packed"]; + } + if (_json.containsKey("typeUrl")) { + typeUrl = _json["typeUrl"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (cardinality != null) { + _json["cardinality"] = cardinality; + } + if (defaultValue != null) { + _json["defaultValue"] = defaultValue; + } + if (jsonName != null) { + _json["jsonName"] = jsonName; + } + if (kind != null) { + _json["kind"] = kind; + } + if (name != null) { + _json["name"] = name; + } + if (number != null) { + _json["number"] = number; + } + if (oneofIndex != null) { + _json["oneofIndex"] = oneofIndex; + } + if (options != null) { + _json["options"] = options.map((value) => (value).toJson()).toList(); + } + if (packed != null) { + _json["packed"] = packed; + } + if (typeUrl != null) { + _json["typeUrl"] = typeUrl; + } + return _json; + } +} + +/// Represents a subnet that was created or discovered by a private access +/// management service. +class GoogleCloudServicenetworkingV1betaSubnetwork { + /// Subnetwork CIDR range in `10.x.x.x/y` format. + core.String ipCidrRange; + + /// Subnetwork name. + /// See https://cloud.google.com/compute/docs/vpc/ + core.String name; + + /// In the Shared VPC host project, the VPC network that's peered with the + /// consumer network. For example: + /// `projects/1234321/global/networks/host-network` + core.String network; + + /// This is a discovered subnet that is not within the current consumer + /// allocated ranges. + core.bool outsideAllocation; + + GoogleCloudServicenetworkingV1betaSubnetwork(); + + GoogleCloudServicenetworkingV1betaSubnetwork.fromJson(core.Map _json) { + if (_json.containsKey("ipCidrRange")) { + ipCidrRange = _json["ipCidrRange"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("network")) { + network = _json["network"]; + } + if (_json.containsKey("outsideAllocation")) { + outsideAllocation = _json["outsideAllocation"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (ipCidrRange != null) { + _json["ipCidrRange"] = ipCidrRange; + } + if (name != null) { + _json["name"] = name; + } + if (network != null) { + _json["network"] = network; + } + if (outsideAllocation != null) { + _json["outsideAllocation"] = outsideAllocation; + } + return _json; + } +} + +/// Defines the HTTP configuration for an API service. It contains a list of +/// HttpRule, each specifying the mapping of an RPC method +/// to one or more HTTP REST API methods. +class Http { + /// When set to true, URL path parmeters will be fully URI-decoded except in + /// cases of single segment matches in reserved expansion, where "%2F" will be + /// left encoded. + /// + /// The default behavior is to not decode RFC 6570 reserved characters in + /// multi + /// segment matches. + core.bool fullyDecodeReservedExpansion; + + /// A list of HTTP configuration rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + core.List<HttpRule> rules; + + Http(); + + Http.fromJson(core.Map _json) { + if (_json.containsKey("fullyDecodeReservedExpansion")) { + fullyDecodeReservedExpansion = _json["fullyDecodeReservedExpansion"]; + } + if (_json.containsKey("rules")) { + rules = (_json["rules"] as core.List) + .map<HttpRule>((value) => new HttpRule.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fullyDecodeReservedExpansion != null) { + _json["fullyDecodeReservedExpansion"] = fullyDecodeReservedExpansion; + } + if (rules != null) { + _json["rules"] = rules.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// # gRPC Transcoding +/// +/// gRPC Transcoding is a feature for mapping between a gRPC method and one or +/// more HTTP REST endpoints. It allows developers to build a single API service +/// that supports both gRPC APIs and REST APIs. Many systems, including [Google +/// APIs](https://github.com/googleapis/googleapis), +/// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +/// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +/// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +/// and use it for large scale production services. +/// +/// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping +/// specifies +/// how different portions of the gRPC request message are mapped to the URL +/// path, URL query parameters, and HTTP request body. It also controls how the +/// gRPC response message is mapped to the HTTP response body. `HttpRule` is +/// typically specified as an `google.api.http` annotation on the gRPC method. +/// +/// Each mapping specifies a URL path template and an HTTP method. The path +/// template may refer to one or more fields in the gRPC request message, as +/// long +/// as each field is a non-repeated field with a primitive (non-message) type. +/// The path template controls how fields of the request message are mapped to +/// the URL path. +/// +/// Example: +/// +/// service Messaging { +/// rpc GetMessage(GetMessageRequest) returns (Message) { +/// option (google.api.http) = { +/// get: "/v1/{name=messages / * }" +/// }; +/// } +/// } +/// message GetMessageRequest { +/// string name = 1; // Mapped to URL path. +/// } +/// message Message { +/// string text = 1; // The resource content. +/// } +/// +/// This enables an HTTP REST to gRPC mapping as below: +/// +/// HTTP | gRPC +/// -----|----- +/// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +/// +/// Any fields in the request message which are not bound by the path template +/// automatically become HTTP query parameters if there is no HTTP request body. +/// For example: +/// +/// service Messaging { +/// rpc GetMessage(GetMessageRequest) returns (Message) { +/// option (google.api.http) = { +/// get:"/v1/messages/{message_id}" +/// }; +/// } +/// } +/// message GetMessageRequest { +/// message SubMessage { +/// string subfield = 1; +/// } +/// string message_id = 1; // Mapped to URL path. +/// int64 revision = 2; // Mapped to URL query parameter `revision`. +/// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +/// } +/// +/// This enables a HTTP JSON to RPC mapping as below: +/// +/// HTTP | gRPC +/// -----|----- +/// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +/// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +/// "foo"))` +/// +/// Note that fields which are mapped to URL query parameters must have a +/// primitive type or a repeated primitive type or a non-repeated message type. +/// In the case of a repeated type, the parameter can be repeated in the URL +/// as `...?param=A¶m=B`. In the case of a message type, each field of the +/// message is mapped to a separate parameter, such as +/// `...?foo.a=A&foo.b=B&foo.c=C`. +/// +/// For HTTP methods that allow a request body, the `body` field +/// specifies the mapping. Consider a REST update method on the +/// message resource collection: +/// +/// service Messaging { +/// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +/// option (google.api.http) = { +/// patch: "/v1/messages/{message_id}" +/// body: "message" +/// }; +/// } +/// } +/// message UpdateMessageRequest { +/// string message_id = 1; // mapped to the URL +/// Message message = 2; // mapped to the body +/// } +/// +/// The following HTTP JSON to RPC mapping is enabled, where the +/// representation of the JSON in the request body is determined by +/// protos JSON encoding: +/// +/// HTTP | gRPC +/// -----|----- +/// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +/// "123456" message { text: "Hi!" })` +/// +/// The special name `*` can be used in the body mapping to define that +/// every field not bound by the path template should be mapped to the +/// request body. This enables the following alternative definition of +/// the update method: +/// +/// service Messaging { +/// rpc UpdateMessage(Message) returns (Message) { +/// option (google.api.http) = { +/// patch: "/v1/messages/{message_id}" +/// body: "*" +/// }; +/// } +/// } +/// message Message { +/// string message_id = 1; +/// string text = 2; +/// } +/// +/// +/// The following HTTP JSON to RPC mapping is enabled: +/// +/// HTTP | gRPC +/// -----|----- +/// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +/// "123456" text: "Hi!")` +/// +/// Note that when using `*` in the body mapping, it is not possible to +/// have HTTP parameters, as all fields not bound by the path end in +/// the body. This makes this option more rarely used in practice when +/// defining REST APIs. The common usage of `*` is in custom methods +/// which don't use the URL at all for transferring data. +/// +/// It is possible to define multiple HTTP methods for one RPC by using +/// the `additional_bindings` option. Example: +/// +/// service Messaging { +/// rpc GetMessage(GetMessageRequest) returns (Message) { +/// option (google.api.http) = { +/// get: "/v1/messages/{message_id}" +/// additional_bindings { +/// get: "/v1/users/{user_id}/messages/{message_id}" +/// } +/// }; +/// } +/// } +/// message GetMessageRequest { +/// string message_id = 1; +/// string user_id = 2; +/// } +/// +/// This enables the following two alternative HTTP JSON to RPC mappings: +/// +/// HTTP | gRPC +/// -----|----- +/// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +/// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +/// "123456")` +/// +/// ## Rules for HTTP mapping +/// +/// 1. Leaf request fields (recursive expansion nested messages in the request +/// message) are classified into three categories: +/// - Fields referred by the path template. They are passed via the URL path. +/// - Fields referred by the HttpRule.body. They are passed via the HTTP +/// request body. +/// - All other fields are passed via the URL query parameters, and the +/// parameter name is the field path in the request message. A repeated +/// field can be represented as multiple query parameters under the same +/// name. +/// 2. If HttpRule.body is "*", there is no URL query parameter, all fields +/// are passed via URL path and HTTP request body. +/// 3. If HttpRule.body is omitted, there is no HTTP request body, all +/// fields are passed via URL path and URL query parameters. +/// +/// ### Path template syntax +/// +/// Template = "/" Segments [ Verb ] ; +/// Segments = Segment { "/" Segment } ; +/// Segment = "*" | "**" | LITERAL | Variable ; +/// Variable = "{" FieldPath [ "=" Segments ] "}" ; +/// FieldPath = IDENT { "." IDENT } ; +/// Verb = ":" LITERAL ; +/// +/// The syntax `*` matches a single URL path segment. The syntax `**` matches +/// zero or more URL path segments, which must be the last part of the URL path +/// except the `Verb`. +/// +/// The syntax `Variable` matches part of the URL path as specified by its +/// template. A variable template must not contain other variables. If a +/// variable +/// matches a single path segment, its template may be omitted, e.g. `{var}` +/// is equivalent to `{var=*}`. +/// +/// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +/// contains any reserved character, such characters should be percent-encoded +/// before the matching. +/// +/// If a variable contains exactly one path segment, such as `"{var}"` or +/// `"{var=*}"`, when such a variable is expanded into a URL path on the client +/// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +/// server side does the reverse decoding. Such variables show up in the +/// [Discovery +/// Document](https://developers.google.com/discovery/v1/reference/apis) +/// as `{var}`. +/// +/// If a variable contains multiple path segments, such as `"{var=foo / * }"` +/// or `"{var=**}"`, when such a variable is expanded into a URL path on the +/// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +/// The server side does the reverse decoding, except "%2F" and "%2f" are left +/// unchanged. Such variables show up in the +/// [Discovery +/// Document](https://developers.google.com/discovery/v1/reference/apis) +/// as `{+var}`. +/// +/// ## Using gRPC API Service Configuration +/// +/// gRPC API Service Configuration (service config) is a configuration language +/// for configuring a gRPC service to become a user-facing product. The +/// service config is simply the YAML representation of the `google.api.Service` +/// proto message. +/// +/// As an alternative to annotating your proto file, you can configure gRPC +/// transcoding in your service config YAML files. You do this by specifying a +/// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +/// effect as the proto annotation. This can be particularly useful if you +/// have a proto that is reused in multiple services. Note that any transcoding +/// specified in the service config will override any matching transcoding +/// configuration in the proto. +/// +/// Example: +/// +/// http: +/// rules: +/// # Selects a gRPC method and applies HttpRule to it. +/// - selector: example.v1.Messaging.GetMessage +/// get: /v1/messages/{message_id}/{sub.subfield} +/// +/// ## Special notes +/// +/// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +/// proto to JSON conversion must follow the [proto3 +/// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +/// +/// While the single segment variable follows the semantics of +/// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +/// Expansion, the multi segment variable **does not** follow RFC 6570 Section +/// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +/// does not expand special characters like `?` and `#`, which would lead +/// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +/// for multi segment variables. +/// +/// The path variables **must not** refer to any repeated or mapped field, +/// because client libraries are not capable of handling such variable +/// expansion. +/// +/// The path variables **must not** capture the leading "/" character. The +/// reason +/// is that the most common use case "{var}" does not capture the leading "/" +/// character. For consistency, all path variables must share the same behavior. +/// +/// Repeated message fields must not be mapped to URL query parameters, because +/// no client library can support such complicated mapping. +/// +/// If an API needs to use a JSON array for request or response body, it can map +/// the request or response body to a repeated field. However, some gRPC +/// Transcoding implementations may not support this feature. +class HttpRule { + /// Additional HTTP bindings for the selector. Nested bindings must + /// not contain an `additional_bindings` field themselves (that is, + /// the nesting may only be one level deep). + core.List<HttpRule> additionalBindings; + + /// The name of the request field whose value is mapped to the HTTP request + /// body, or `*` for mapping all request fields not captured by the path + /// pattern to the HTTP body, or omitted for not having any HTTP request body. + /// + /// NOTE: the referred field must be present at the top-level of the request + /// message type. + core.String body; + + /// The custom pattern is used for specifying an HTTP method that is not + /// included in the `pattern` field, such as HEAD, or "*" to leave the + /// HTTP method unspecified for this rule. The wild-card rule is useful + /// for services that provide content to Web (HTML) clients. + CustomHttpPattern custom; + + /// Maps to HTTP DELETE. Used for deleting a resource. + core.String delete; + + /// Maps to HTTP GET. Used for listing and getting information about + /// resources. + core.String get; + + /// Maps to HTTP PATCH. Used for updating a resource. + core.String patch; + + /// Maps to HTTP POST. Used for creating a resource or performing an action. + core.String post; + + /// Maps to HTTP PUT. Used for replacing a resource. + core.String put; + + /// Optional. The name of the response field whose value is mapped to the HTTP + /// response body. When omitted, the entire response message will be used + /// as the HTTP response body. + /// + /// NOTE: The referred field must be present at the top-level of the response + /// message type. + core.String responseBody; + + /// Selects a method to which this rule applies. + /// + /// Refer to selector for syntax details. + core.String selector; + + HttpRule(); + + HttpRule.fromJson(core.Map _json) { + if (_json.containsKey("additionalBindings")) { + additionalBindings = (_json["additionalBindings"] as core.List) + .map<HttpRule>((value) => new HttpRule.fromJson(value)) + .toList(); + } + if (_json.containsKey("body")) { + body = _json["body"]; + } + if (_json.containsKey("custom")) { + custom = new CustomHttpPattern.fromJson(_json["custom"]); + } + if (_json.containsKey("delete")) { + delete = _json["delete"]; + } + if (_json.containsKey("get")) { + get = _json["get"]; + } + if (_json.containsKey("patch")) { + patch = _json["patch"]; + } + if (_json.containsKey("post")) { + post = _json["post"]; + } + if (_json.containsKey("put")) { + put = _json["put"]; + } + if (_json.containsKey("responseBody")) { + responseBody = _json["responseBody"]; + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (additionalBindings != null) { + _json["additionalBindings"] = + additionalBindings.map((value) => (value).toJson()).toList(); + } + if (body != null) { + _json["body"] = body; + } + if (custom != null) { + _json["custom"] = (custom).toJson(); + } + if (delete != null) { + _json["delete"] = delete; + } + if (get != null) { + _json["get"] = get; + } + if (patch != null) { + _json["patch"] = patch; + } + if (post != null) { + _json["post"] = post; + } + if (put != null) { + _json["put"] = put; + } + if (responseBody != null) { + _json["responseBody"] = responseBody; + } + if (selector != null) { + _json["selector"] = selector; + } + return _json; + } +} + +/// A description of a label. +class LabelDescriptor { + /// A human-readable description for the label. + core.String description; + + /// The label key. + core.String key; + + /// The type of data that can be assigned to the label. + /// Possible string values are: + /// - "STRING" : A variable-length string. This is the default. + /// - "BOOL" : Boolean; true or false. + /// - "INT64" : A 64-bit signed integer. + core.String valueType; + + LabelDescriptor(); + + LabelDescriptor.fromJson(core.Map _json) { + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("key")) { + key = _json["key"]; + } + if (_json.containsKey("valueType")) { + valueType = _json["valueType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (description != null) { + _json["description"] = description; + } + if (key != null) { + _json["key"] = key; + } + if (valueType != null) { + _json["valueType"] = valueType; + } + return _json; + } +} + +/// ListConnectionsResponse is the response to list peering states for the +/// given service and consumer project. +class ListConnectionsResponse { + /// The list of Connections. + core.List<Connection> connections; + + ListConnectionsResponse(); + + ListConnectionsResponse.fromJson(core.Map _json) { + if (_json.containsKey("connections")) { + connections = (_json["connections"] as core.List) + .map<Connection>((value) => new Connection.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (connections != null) { + _json["connections"] = + connections.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A description of a log type. Example in YAML format: +/// +/// - name: library.googleapis.com/activity_history +/// description: The history of borrowing and returning library items. +/// display_name: Activity +/// labels: +/// - key: /customer_id +/// description: Identifier of a library customer +class LogDescriptor { + /// A human-readable description of this log. This information appears in + /// the documentation and can contain details. + core.String description; + + /// The human-readable name for this log. This information appears on + /// the user interface and should be concise. + core.String displayName; + + /// The set of labels that are available to describe a specific log entry. + /// Runtime requests that contain labels not specified here are + /// considered invalid. + core.List<LabelDescriptor> labels; + + /// The name of the log. It must be less than 512 characters long and can + /// include the following characters: upper- and lower-case alphanumeric + /// characters [A-Za-z0-9], and punctuation characters including + /// slash, underscore, hyphen, period [/_-.]. + core.String name; + + LogDescriptor(); + + LogDescriptor.fromJson(core.Map _json) { + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("labels")) { + labels = (_json["labels"] as core.List) + .map<LabelDescriptor>((value) => new LabelDescriptor.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (description != null) { + _json["description"] = description; + } + if (displayName != null) { + _json["displayName"] = displayName; + } + if (labels != null) { + _json["labels"] = labels.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + return _json; + } +} + +/// Logging configuration of the service. +/// +/// The following example shows how to configure logs to be sent to the +/// producer and consumer projects. In the example, the `activity_history` +/// log is sent to both the producer and consumer projects, whereas the +/// `purchase_history` log is only sent to the producer project. +/// +/// monitored_resources: +/// - type: library.googleapis.com/branch +/// labels: +/// - key: /city +/// description: The city where the library branch is located in. +/// - key: /name +/// description: The name of the branch. +/// logs: +/// - name: activity_history +/// labels: +/// - key: /customer_id +/// - name: purchase_history +/// logging: +/// producer_destinations: +/// - monitored_resource: library.googleapis.com/branch +/// logs: +/// - activity_history +/// - purchase_history +/// consumer_destinations: +/// - monitored_resource: library.googleapis.com/branch +/// logs: +/// - activity_history +class Logging { + /// Logging configurations for sending logs to the consumer project. + /// There can be multiple consumer destinations, each one must have a + /// different monitored resource type. A log can be used in at most + /// one consumer destination. + core.List<LoggingDestination> consumerDestinations; + + /// Logging configurations for sending logs to the producer project. + /// There can be multiple producer destinations, each one must have a + /// different monitored resource type. A log can be used in at most + /// one producer destination. + core.List<LoggingDestination> producerDestinations; + + Logging(); + + Logging.fromJson(core.Map _json) { + if (_json.containsKey("consumerDestinations")) { + consumerDestinations = (_json["consumerDestinations"] as core.List) + .map<LoggingDestination>( + (value) => new LoggingDestination.fromJson(value)) + .toList(); + } + if (_json.containsKey("producerDestinations")) { + producerDestinations = (_json["producerDestinations"] as core.List) + .map<LoggingDestination>( + (value) => new LoggingDestination.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (consumerDestinations != null) { + _json["consumerDestinations"] = + consumerDestinations.map((value) => (value).toJson()).toList(); + } + if (producerDestinations != null) { + _json["producerDestinations"] = + producerDestinations.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Configuration of a specific logging destination (the producer project +/// or the consumer project). +class LoggingDestination { + /// Names of the logs to be sent to this destination. Each name must + /// be defined in the Service.logs section. If the log name is + /// not a domain scoped name, it will be automatically prefixed with + /// the service name followed by "/". + core.List<core.String> logs; + + /// The monitored resource type. The type must be defined in the + /// Service.monitored_resources section. + core.String monitoredResource; + + LoggingDestination(); + + LoggingDestination.fromJson(core.Map _json) { + if (_json.containsKey("logs")) { + logs = (_json["logs"] as core.List).cast<core.String>(); + } + if (_json.containsKey("monitoredResource")) { + monitoredResource = _json["monitoredResource"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (logs != null) { + _json["logs"] = logs; + } + if (monitoredResource != null) { + _json["monitoredResource"] = monitoredResource; + } + return _json; + } +} + +/// Method represents a method of an API interface. +class Method { + /// The simple name of this method. + core.String name; + + /// Any metadata attached to the method. + core.List<Option> options; + + /// If true, the request is streamed. + core.bool requestStreaming; + + /// A URL of the input message type. + core.String requestTypeUrl; + + /// If true, the response is streamed. + core.bool responseStreaming; + + /// The URL of the output message type. + core.String responseTypeUrl; + + /// The source syntax of this method. + /// Possible string values are: + /// - "SYNTAX_PROTO2" : Syntax `proto2`. + /// - "SYNTAX_PROTO3" : Syntax `proto3`. + core.String syntax; + + Method(); + + Method.fromJson(core.Map _json) { + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("options")) { + options = (_json["options"] as core.List) + .map<Option>((value) => new Option.fromJson(value)) + .toList(); + } + if (_json.containsKey("requestStreaming")) { + requestStreaming = _json["requestStreaming"]; + } + if (_json.containsKey("requestTypeUrl")) { + requestTypeUrl = _json["requestTypeUrl"]; + } + if (_json.containsKey("responseStreaming")) { + responseStreaming = _json["responseStreaming"]; + } + if (_json.containsKey("responseTypeUrl")) { + responseTypeUrl = _json["responseTypeUrl"]; + } + if (_json.containsKey("syntax")) { + syntax = _json["syntax"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (name != null) { + _json["name"] = name; + } + if (options != null) { + _json["options"] = options.map((value) => (value).toJson()).toList(); + } + if (requestStreaming != null) { + _json["requestStreaming"] = requestStreaming; + } + if (requestTypeUrl != null) { + _json["requestTypeUrl"] = requestTypeUrl; + } + if (responseStreaming != null) { + _json["responseStreaming"] = responseStreaming; + } + if (responseTypeUrl != null) { + _json["responseTypeUrl"] = responseTypeUrl; + } + if (syntax != null) { + _json["syntax"] = syntax; + } + return _json; + } +} + +/// Defines a metric type and its schema. Once a metric descriptor is created, +/// deleting or altering it stops data collection and makes the metric type's +/// existing data unusable. +class MetricDescriptor { + /// A detailed description of the metric, which can be used in documentation. + core.String description; + + /// A concise name for the metric, which can be displayed in user interfaces. + /// Use sentence case without an ending period, for example "Request count". + /// This field is optional but it is recommended to be set for any metrics + /// associated with user-visible concepts, such as Quota. + core.String displayName; + + /// The set of labels that can be used to describe a specific + /// instance of this metric type. For example, the + /// `appengine.googleapis.com/http/server/response_latencies` metric + /// type has a label for the HTTP response code, `response_code`, so + /// you can look at latencies for successful responses or just + /// for responses that failed. + core.List<LabelDescriptor> labels; + + /// Optional. Metadata which can be used to guide usage of the metric. + MetricDescriptorMetadata metadata; + + /// Whether the metric records instantaneous values, changes to a value, etc. + /// Some combinations of `metric_kind` and `value_type` might not be + /// supported. + /// Possible string values are: + /// - "METRIC_KIND_UNSPECIFIED" : Do not use this default value. + /// - "GAUGE" : An instantaneous measurement of a value. + /// - "DELTA" : The change in a value during a time interval. + /// - "CUMULATIVE" : A value accumulated over a time interval. Cumulative + /// measurements in a time series should have the same start time + /// and increasing end times, until an event resets the cumulative + /// value to zero and sets a new start time for the following + /// points. + core.String metricKind; + + /// The resource name of the metric descriptor. + core.String name; + + /// The metric type, including its DNS name prefix. The type is not + /// URL-encoded. All user-defined metric types have the DNS name + /// `custom.googleapis.com` or `external.googleapis.com`. Metric types should + /// use a natural hierarchical grouping. For example: + /// + /// "custom.googleapis.com/invoice/paid/amount" + /// "external.googleapis.com/prometheus/up" + /// "appengine.googleapis.com/http/server/response_latencies" + core.String type; + + /// The unit in which the metric value is reported. It is only applicable + /// if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The + /// supported units are a subset of [The Unified Code for Units of + /// Measure](http://unitsofmeasure.org/ucum.html) standard: + /// + /// **Basic units (UNIT)** + /// + /// * `bit` bit + /// * `By` byte + /// * `s` second + /// * `min` minute + /// * `h` hour + /// * `d` day + /// + /// **Prefixes (PREFIX)** + /// + /// * `k` kilo (10**3) + /// * `M` mega (10**6) + /// * `G` giga (10**9) + /// * `T` tera (10**12) + /// * `P` peta (10**15) + /// * `E` exa (10**18) + /// * `Z` zetta (10**21) + /// * `Y` yotta (10**24) + /// * `m` milli (10**-3) + /// * `u` micro (10**-6) + /// * `n` nano (10**-9) + /// * `p` pico (10**-12) + /// * `f` femto (10**-15) + /// * `a` atto (10**-18) + /// * `z` zepto (10**-21) + /// * `y` yocto (10**-24) + /// * `Ki` kibi (2**10) + /// * `Mi` mebi (2**20) + /// * `Gi` gibi (2**30) + /// * `Ti` tebi (2**40) + /// + /// **Grammar** + /// + /// The grammar also includes these connectors: + /// + /// * `/` division (as an infix operator, e.g. `1/s`). + /// * `.` multiplication (as an infix operator, e.g. `GBy.d`) + /// + /// The grammar for a unit is as follows: + /// + /// Expression = Component { "." Component } { "/" Component } ; + /// + /// Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] + /// | Annotation + /// | "1" + /// ; + /// + /// Annotation = "{" NAME "}" ; + /// + /// Notes: + /// + /// * `Annotation` is just a comment if it follows a `UNIT` and is + /// equivalent to `1` if it is used alone. For examples, + /// `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. + /// * `NAME` is a sequence of non-blank printable ASCII characters not + /// containing '{' or '}'. + /// * `1` represents dimensionless value 1, such as in `1/s`. + /// * `%` represents dimensionless value 1/100, and annotates values giving + /// a percentage. + core.String unit; + + /// Whether the measurement is an integer, a floating-point number, etc. + /// Some combinations of `metric_kind` and `value_type` might not be + /// supported. + /// Possible string values are: + /// - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value. + /// - "BOOL" : The value is a boolean. + /// This value type can be used only if the metric kind is `GAUGE`. + /// - "INT64" : The value is a signed 64-bit integer. + /// - "DOUBLE" : The value is a double precision floating point number. + /// - "STRING" : The value is a text string. + /// This value type can be used only if the metric kind is `GAUGE`. + /// - "DISTRIBUTION" : The value is a `Distribution`. + /// - "MONEY" : The value is money. + core.String valueType; + + MetricDescriptor(); + + MetricDescriptor.fromJson(core.Map _json) { + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("labels")) { + labels = (_json["labels"] as core.List) + .map<LabelDescriptor>((value) => new LabelDescriptor.fromJson(value)) + .toList(); + } + if (_json.containsKey("metadata")) { + metadata = new MetricDescriptorMetadata.fromJson(_json["metadata"]); + } + if (_json.containsKey("metricKind")) { + metricKind = _json["metricKind"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + if (_json.containsKey("unit")) { + unit = _json["unit"]; + } + if (_json.containsKey("valueType")) { + valueType = _json["valueType"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (description != null) { + _json["description"] = description; + } + if (displayName != null) { + _json["displayName"] = displayName; + } + if (labels != null) { + _json["labels"] = labels.map((value) => (value).toJson()).toList(); + } + if (metadata != null) { + _json["metadata"] = (metadata).toJson(); + } + if (metricKind != null) { + _json["metricKind"] = metricKind; + } + if (name != null) { + _json["name"] = name; + } + if (type != null) { + _json["type"] = type; + } + if (unit != null) { + _json["unit"] = unit; + } + if (valueType != null) { + _json["valueType"] = valueType; + } + return _json; + } +} + +/// Additional annotations that can be used to guide the usage of a metric. +class MetricDescriptorMetadata { + /// The delay of data points caused by ingestion. Data points older than this + /// age are guaranteed to be ingested and available to be read, excluding + /// data loss due to errors. + core.String ingestDelay; + + /// The launch stage of the metric definition. + /// Possible string values are: + /// - "LAUNCH_STAGE_UNSPECIFIED" : Do not use this default value. + /// - "EARLY_ACCESS" : Early Access features are limited to a closed group of + /// testers. To use + /// these features, you must sign up in advance and sign a Trusted Tester + /// agreement (which includes confidentiality provisions). These features may + /// be unstable, changed in backward-incompatible ways, and are not + /// guaranteed to be released. + /// - "ALPHA" : Alpha is a limited availability test for releases before they + /// are cleared + /// for widespread use. By Alpha, all significant design issues are resolved + /// and we are in the process of verifying functionality. Alpha customers + /// need to apply for access, agree to applicable terms, and have their + /// projects whitelisted. Alpha releases don’t have to be feature complete, + /// no SLAs are provided, and there are no technical support obligations, but + /// they will be far enough along that customers can actually use them in + /// test environments or for limited-use tests -- just like they would in + /// normal production cases. + /// - "BETA" : Beta is the point at which we are ready to open a release for + /// any + /// customer to use. There are no SLA or technical support obligations in a + /// Beta release. Products will be complete from a feature perspective, but + /// may have some open outstanding issues. Beta releases are suitable for + /// limited production use cases. + /// - "GA" : GA features are open to all developers and are considered stable + /// and + /// fully qualified for production use. + /// - "DEPRECATED" : Deprecated features are scheduled to be shut down and + /// removed. For more + /// information, see the “Deprecation Policy” section of our [Terms of + /// Service](https://cloud.google.com/terms/) + /// and the [Google Cloud Platform Subject to the Deprecation + /// Policy](https://cloud.google.com/terms/deprecation) documentation. + core.String launchStage; + + /// The sampling period of metric data points. For metrics which are written + /// periodically, consecutive data points are stored at this time interval, + /// excluding data loss due to errors. Metrics with a higher granularity have + /// a smaller sampling period. + core.String samplePeriod; + + MetricDescriptorMetadata(); + + MetricDescriptorMetadata.fromJson(core.Map _json) { + if (_json.containsKey("ingestDelay")) { + ingestDelay = _json["ingestDelay"]; + } + if (_json.containsKey("launchStage")) { + launchStage = _json["launchStage"]; + } + if (_json.containsKey("samplePeriod")) { + samplePeriod = _json["samplePeriod"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (ingestDelay != null) { + _json["ingestDelay"] = ingestDelay; + } + if (launchStage != null) { + _json["launchStage"] = launchStage; + } + if (samplePeriod != null) { + _json["samplePeriod"] = samplePeriod; + } + return _json; + } +} + +/// Bind API methods to metrics. Binding a method to a metric causes that +/// metric's configured quota behaviors to apply to the method call. +class MetricRule { + /// Metrics to update when the selected methods are called, and the associated + /// cost applied to each metric. + /// + /// The key of the map is the metric name, and the values are the amount + /// increased for the metric against which the quota limits are defined. + /// The value must not be negative. + core.Map<core.String, core.String> metricCosts; + + /// Selects the methods to which this rule applies. + /// + /// Refer to selector for syntax details. + core.String selector; + + MetricRule(); + + MetricRule.fromJson(core.Map _json) { + if (_json.containsKey("metricCosts")) { + metricCosts = + (_json["metricCosts"] as core.Map).cast<core.String, core.String>(); + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (metricCosts != null) { + _json["metricCosts"] = metricCosts; + } + if (selector != null) { + _json["selector"] = selector; + } + return _json; + } +} + +/// Declares an API Interface to be included in this interface. The including +/// interface must redeclare all the methods from the included interface, but +/// documentation and options are inherited as follows: +/// +/// - If after comment and whitespace stripping, the documentation +/// string of the redeclared method is empty, it will be inherited +/// from the original method. +/// +/// - Each annotation belonging to the service config (http, +/// visibility) which is not set in the redeclared method will be +/// inherited. +/// +/// - If an http annotation is inherited, the path pattern will be +/// modified as follows. Any version prefix will be replaced by the +/// version of the including interface plus the root path if +/// specified. +/// +/// Example of a simple mixin: +/// +/// package google.acl.v1; +/// service AccessControl { +/// // Get the underlying ACL object. +/// rpc GetAcl(GetAclRequest) returns (Acl) { +/// option (google.api.http).get = "/v1/{resource=**}:getAcl"; +/// } +/// } +/// +/// package google.storage.v2; +/// service Storage { +/// // rpc GetAcl(GetAclRequest) returns (Acl); +/// +/// // Get a data record. +/// rpc GetData(GetDataRequest) returns (Data) { +/// option (google.api.http).get = "/v2/{resource=**}"; +/// } +/// } +/// +/// Example of a mixin configuration: +/// +/// apis: +/// - name: google.storage.v2.Storage +/// mixins: +/// - name: google.acl.v1.AccessControl +/// +/// The mixin construct implies that all methods in `AccessControl` are +/// also declared with same name and request/response types in +/// `Storage`. A documentation generator or annotation processor will +/// see the effective `Storage.GetAcl` method after inherting +/// documentation and annotations as follows: +/// +/// service Storage { +/// // Get the underlying ACL object. +/// rpc GetAcl(GetAclRequest) returns (Acl) { +/// option (google.api.http).get = "/v2/{resource=**}:getAcl"; +/// } +/// ... +/// } +/// +/// Note how the version in the path pattern changed from `v1` to `v2`. +/// +/// If the `root` field in the mixin is specified, it should be a +/// relative path under which inherited HTTP paths are placed. Example: +/// +/// apis: +/// - name: google.storage.v2.Storage +/// mixins: +/// - name: google.acl.v1.AccessControl +/// root: acls +/// +/// This implies the following inherited HTTP annotation: +/// +/// service Storage { +/// // Get the underlying ACL object. +/// rpc GetAcl(GetAclRequest) returns (Acl) { +/// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; +/// } +/// ... +/// } +class Mixin { + /// The fully qualified name of the interface which is included. + core.String name; + + /// If non-empty specifies a path under which inherited HTTP paths + /// are rooted. + core.String root; + + Mixin(); + + Mixin.fromJson(core.Map _json) { + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("root")) { + root = _json["root"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (name != null) { + _json["name"] = name; + } + if (root != null) { + _json["root"] = root; + } + return _json; + } +} + +/// An object that describes the schema of a MonitoredResource object using a +/// type name and a set of labels. For example, the monitored resource +/// descriptor for Google Compute Engine VM instances has a type of +/// `"gce_instance"` and specifies the use of the labels `"instance_id"` and +/// `"zone"` to identify particular VM instances. +/// +/// Different APIs can support different monitored resource types. APIs +/// generally +/// provide a `list` method that returns the monitored resource descriptors used +/// by the API. +class MonitoredResourceDescriptor { + /// Optional. A detailed description of the monitored resource type that might + /// be used in documentation. + core.String description; + + /// Optional. A concise name for the monitored resource type that might be + /// displayed in user interfaces. It should be a Title Cased Noun Phrase, + /// without any article or other determiners. For example, + /// `"Google Cloud SQL Database"`. + core.String displayName; + + /// Required. A set of labels used to describe instances of this monitored + /// resource type. For example, an individual Google Cloud SQL database is + /// identified by values for the labels `"database_id"` and `"zone"`. + core.List<LabelDescriptor> labels; + + /// Optional. The resource name of the monitored resource descriptor: + /// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where + /// {type} is the value of the `type` field in this object and + /// {project_id} is a project ID that provides API-specific context for + /// accessing the type. APIs that do not use project information can use the + /// resource name format `"monitoredResourceDescriptors/{type}"`. + core.String name; + + /// Required. The monitored resource type. For example, the type + /// `"cloudsql_database"` represents databases in Google Cloud SQL. + /// The maximum length of this value is 256 characters. + core.String type; + + MonitoredResourceDescriptor(); + + MonitoredResourceDescriptor.fromJson(core.Map _json) { + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("labels")) { + labels = (_json["labels"] as core.List) + .map<LabelDescriptor>((value) => new LabelDescriptor.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("type")) { + type = _json["type"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (description != null) { + _json["description"] = description; + } + if (displayName != null) { + _json["displayName"] = displayName; + } + if (labels != null) { + _json["labels"] = labels.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + if (type != null) { + _json["type"] = type; + } + return _json; + } +} + +/// Monitoring configuration of the service. +/// +/// The example below shows how to configure monitored resources and metrics +/// for monitoring. In the example, a monitored resource and two metrics are +/// defined. The `library.googleapis.com/book/returned_count` metric is sent +/// to both producer and consumer projects, whereas the +/// `library.googleapis.com/book/overdue_count` metric is only sent to the +/// consumer project. +/// +/// monitored_resources: +/// - type: library.googleapis.com/branch +/// labels: +/// - key: /city +/// description: The city where the library branch is located in. +/// - key: /name +/// description: The name of the branch. +/// metrics: +/// - name: library.googleapis.com/book/returned_count +/// metric_kind: DELTA +/// value_type: INT64 +/// labels: +/// - key: /customer_id +/// - name: library.googleapis.com/book/overdue_count +/// metric_kind: GAUGE +/// value_type: INT64 +/// labels: +/// - key: /customer_id +/// monitoring: +/// producer_destinations: +/// - monitored_resource: library.googleapis.com/branch +/// metrics: +/// - library.googleapis.com/book/returned_count +/// consumer_destinations: +/// - monitored_resource: library.googleapis.com/branch +/// metrics: +/// - library.googleapis.com/book/returned_count +/// - library.googleapis.com/book/overdue_count +class Monitoring { + /// Monitoring configurations for sending metrics to the consumer project. + /// There can be multiple consumer destinations. A monitored resouce type may + /// appear in multiple monitoring destinations if different aggregations are + /// needed for different sets of metrics associated with that monitored + /// resource type. A monitored resource and metric pair may only be used once + /// in the Monitoring configuration. + core.List<MonitoringDestination> consumerDestinations; + + /// Monitoring configurations for sending metrics to the producer project. + /// There can be multiple producer destinations. A monitored resouce type may + /// appear in multiple monitoring destinations if different aggregations are + /// needed for different sets of metrics associated with that monitored + /// resource type. A monitored resource and metric pair may only be used once + /// in the Monitoring configuration. + core.List<MonitoringDestination> producerDestinations; + + Monitoring(); + + Monitoring.fromJson(core.Map _json) { + if (_json.containsKey("consumerDestinations")) { + consumerDestinations = (_json["consumerDestinations"] as core.List) + .map<MonitoringDestination>( + (value) => new MonitoringDestination.fromJson(value)) + .toList(); + } + if (_json.containsKey("producerDestinations")) { + producerDestinations = (_json["producerDestinations"] as core.List) + .map<MonitoringDestination>( + (value) => new MonitoringDestination.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (consumerDestinations != null) { + _json["consumerDestinations"] = + consumerDestinations.map((value) => (value).toJson()).toList(); + } + if (producerDestinations != null) { + _json["producerDestinations"] = + producerDestinations.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Configuration of a specific monitoring destination (the producer project +/// or the consumer project). +class MonitoringDestination { + /// Types of the metrics to report to this monitoring destination. + /// Each type must be defined in Service.metrics section. + core.List<core.String> metrics; + + /// The monitored resource type. The type must be defined in + /// Service.monitored_resources section. + core.String monitoredResource; + + MonitoringDestination(); + + MonitoringDestination.fromJson(core.Map _json) { + if (_json.containsKey("metrics")) { + metrics = (_json["metrics"] as core.List).cast<core.String>(); + } + if (_json.containsKey("monitoredResource")) { + monitoredResource = _json["monitoredResource"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (metrics != null) { + _json["metrics"] = metrics; + } + if (monitoredResource != null) { + _json["monitoredResource"] = monitoredResource; + } + return _json; + } +} + +/// OAuth scopes are a way to define data and permissions on data. For example, +/// there are scopes defined for "Read-only access to Google Calendar" and +/// "Access to Cloud Platform". Users can consent to a scope for an application, +/// giving it permission to access that data on their behalf. +/// +/// OAuth scope specifications should be fairly coarse grained; a user will need +/// to see and understand the text description of what your scope means. +/// +/// In most cases: use one or at most two OAuth scopes for an entire family of +/// products. If your product has multiple APIs, you should probably be sharing +/// the OAuth scope across all of those APIs. +/// +/// When you need finer grained OAuth consent screens: talk with your product +/// management about how developers will use them in practice. +/// +/// Please note that even though each of the canonical scopes is enough for a +/// request to be accepted and passed to the backend, a request can still fail +/// due to the backend requiring additional scopes or permissions. +class OAuthRequirements { + /// The list of publicly documented OAuth scopes that are allowed access. An + /// OAuth token containing any of these scopes will be accepted. + /// + /// Example: + /// + /// canonical_scopes: https://www.googleapis.com/auth/calendar, + /// https://www.googleapis.com/auth/calendar.read + core.String canonicalScopes; + + OAuthRequirements(); + + OAuthRequirements.fromJson(core.Map _json) { + if (_json.containsKey("canonicalScopes")) { + canonicalScopes = _json["canonicalScopes"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (canonicalScopes != null) { + _json["canonicalScopes"] = canonicalScopes; + } + return _json; + } +} + +/// 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 have the format of `operations/some/unique/name`. + 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(); + + Operation.fromJson(core.Map _json) { + if (_json.containsKey("done")) { + done = _json["done"]; + } + if (_json.containsKey("error")) { + error = new Status.fromJson(_json["error"]); + } + if (_json.containsKey("metadata")) { + metadata = + (_json["metadata"] as core.Map).cast<core.String, core.Object>(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("response")) { + response = + (_json["response"] as core.Map).cast<core.String, core.Object>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (done != null) { + _json["done"] = done; + } + if (error != null) { + _json["error"] = (error).toJson(); + } + if (metadata != null) { + _json["metadata"] = metadata; + } + if (name != null) { + _json["name"] = name; + } + if (response != null) { + _json["response"] = response; + } + return _json; + } +} + +/// A protocol buffer option, which can be attached to a message, field, +/// enumeration, etc. +class Option { + /// The option's name. For protobuf built-in options (options defined in + /// descriptor.proto), this is the short name. For example, `"map_entry"`. + /// For custom options, it should be the fully-qualified name. For example, + /// `"google.api.http"`. + core.String name; + + /// The option's value packed in an Any message. If the value is a primitive, + /// the corresponding wrapper type defined in google/protobuf/wrappers.proto + /// should be used. If the value is an enum, it should be stored as an int32 + /// value using the google.protobuf.Int32Value type. + /// + /// 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> value; + + Option(); + + Option.fromJson(core.Map _json) { + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("value")) { + value = (_json["value"] as core.Map).cast<core.String, core.Object>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (name != null) { + _json["name"] = name; + } + if (value != null) { + _json["value"] = value; + } + return _json; + } +} + +/// Represents a documentation page. A page can contain subpages to represent +/// nested documentation set structure. +class Page { + /// The Markdown content of the page. You can use <code>(== include {path} + /// ==)</code> + /// to include content from a Markdown file. + core.String content; + + /// The name of the page. It will be used as an identity of the page to + /// generate URI of the page, text of the link to this page in navigation, + /// etc. The full page name (start from the root page name to this page + /// concatenated with `.`) can be used as reference to the page in your + /// documentation. For example: + /// <pre><code>pages: + /// - name: Tutorial + /// content: (== include tutorial.md ==) + /// subpages: + /// - name: Java + /// content: (== include tutorial_java.md ==) + /// </code></pre> + /// You can reference `Java` page using Markdown reference link syntax: + /// `Java`. + core.String name; + + /// Subpages of this page. The order of subpages specified here will be + /// honored in the generated docset. + core.List<Page> subpages; + + Page(); + + Page.fromJson(core.Map _json) { + if (_json.containsKey("content")) { + content = _json["content"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("subpages")) { + subpages = (_json["subpages"] as core.List) + .map<Page>((value) => new Page.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (content != null) { + _json["content"] = content; + } + if (name != null) { + _json["name"] = name; + } + if (subpages != null) { + _json["subpages"] = subpages.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Quota configuration helps to achieve fairness and budgeting in service +/// usage. +/// +/// The quota configuration works this way: +/// - The service configuration defines a set of metrics. +/// - For API calls, the quota.metric_rules maps methods to metrics with +/// corresponding costs. +/// - The quota.limits defines limits on the metrics, which will be used for +/// quota checks at runtime. +/// +/// An example quota configuration in yaml format: +/// +/// quota: +/// limits: +/// +/// - name: apiWriteQpsPerProject +/// metric: library.googleapis.com/write_calls +/// unit: "1/min/{project}" # rate limit for consumer projects +/// values: +/// STANDARD: 10000 +/// +/// +/// # The metric rules bind all methods to the read_calls metric, +/// # except for the UpdateBook and DeleteBook methods. These two methods +/// # are mapped to the write_calls metric, with the UpdateBook method +/// # consuming at twice rate as the DeleteBook method. +/// metric_rules: +/// - selector: "*" +/// metric_costs: +/// library.googleapis.com/read_calls: 1 +/// - selector: google.example.library.v1.LibraryService.UpdateBook +/// metric_costs: +/// library.googleapis.com/write_calls: 2 +/// - selector: google.example.library.v1.LibraryService.DeleteBook +/// metric_costs: +/// library.googleapis.com/write_calls: 1 +/// +/// Corresponding Metric definition: +/// +/// metrics: +/// - name: library.googleapis.com/read_calls +/// display_name: Read requests +/// metric_kind: DELTA +/// value_type: INT64 +/// +/// - name: library.googleapis.com/write_calls +/// display_name: Write requests +/// metric_kind: DELTA +/// value_type: INT64 +class Quota { + /// List of `QuotaLimit` definitions for the service. + core.List<QuotaLimit> limits; + + /// List of `MetricRule` definitions, each one mapping a selected method to + /// one + /// or more metrics. + core.List<MetricRule> metricRules; + + Quota(); + + Quota.fromJson(core.Map _json) { + if (_json.containsKey("limits")) { + limits = (_json["limits"] as core.List) + .map<QuotaLimit>((value) => new QuotaLimit.fromJson(value)) + .toList(); + } + if (_json.containsKey("metricRules")) { + metricRules = (_json["metricRules"] as core.List) + .map<MetricRule>((value) => new MetricRule.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (limits != null) { + _json["limits"] = limits.map((value) => (value).toJson()).toList(); + } + if (metricRules != null) { + _json["metricRules"] = + metricRules.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// `QuotaLimit` defines a specific limit that applies over a specified duration +/// for a limit type. There can be at most one limit for a duration and limit +/// type combination defined within a `QuotaGroup`. +class QuotaLimit { + /// Default number of tokens that can be consumed during the specified + /// duration. This is the number of tokens assigned when a client + /// application developer activates the service for his/her project. + /// + /// Specifying a value of 0 will block all requests. This can be used if you + /// are provisioning quota to selected consumers and blocking others. + /// Similarly, a value of -1 will indicate an unlimited quota. No other + /// negative values are allowed. + /// + /// Used by group-based quotas only. + core.String defaultLimit; + + /// Optional. User-visible, extended description for this quota limit. + /// Should be used only when more context is needed to understand this limit + /// than provided by the limit's display name (see: `display_name`). + core.String description; + + /// User-visible display name for this limit. + /// Optional. If not set, the UI will provide a default display name based on + /// the quota configuration. This field can be used to override the default + /// display name generated from the configuration. + core.String displayName; + + /// Duration of this limit in textual notation. Example: "100s", "24h", "1d". + /// For duration longer than a day, only multiple of days is supported. We + /// support only "100s" and "1d" for now. Additional support will be added in + /// the future. "0" indicates indefinite duration. + /// + /// Used by group-based quotas only. + core.String duration; + + /// Free tier value displayed in the Developers Console for this limit. + /// The free tier is the number of tokens that will be subtracted from the + /// billed amount when billing is enabled. + /// This field can only be set on a limit with duration "1d", in a billable + /// group; it is invalid on any other limit. If this field is not set, it + /// defaults to 0, indicating that there is no free tier for this service. + /// + /// Used by group-based quotas only. + core.String freeTier; + + /// Maximum number of tokens that can be consumed during the specified + /// duration. Client application developers can override the default limit up + /// to this maximum. If specified, this value cannot be set to a value less + /// than the default limit. If not specified, it is set to the default limit. + /// + /// To allow clients to apply overrides with no upper bound, set this to -1, + /// indicating unlimited maximum quota. + /// + /// Used by group-based quotas only. + core.String maxLimit; + + /// The name of the metric this quota limit applies to. The quota limits with + /// the same metric will be checked together during runtime. The metric must + /// be + /// defined within the service config. + core.String metric; + + /// Name of the quota limit. + /// + /// The name must be provided, and it must be unique within the service. The + /// name can only include alphanumeric characters as well as '-'. + /// + /// The maximum length of the limit name is 64 characters. + core.String name; + + /// Specify the unit of the quota limit. It uses the same syntax as + /// Metric.unit. The supported unit kinds are determined by the quota + /// backend system. + /// + /// Here are some examples: + /// * "1/min/{project}" for quota per minute per project. + /// + /// Note: the order of unit components is insignificant. + /// The "1" at the beginning is required to follow the metric unit syntax. + core.String unit; + + /// Tiered limit values. You must specify this as a key:value pair, with an + /// integer value that is the maximum number of requests allowed for the + /// specified unit. Currently only STANDARD is supported. + core.Map<core.String, core.String> values; + + QuotaLimit(); + + QuotaLimit.fromJson(core.Map _json) { + if (_json.containsKey("defaultLimit")) { + defaultLimit = _json["defaultLimit"]; + } + if (_json.containsKey("description")) { + description = _json["description"]; + } + if (_json.containsKey("displayName")) { + displayName = _json["displayName"]; + } + if (_json.containsKey("duration")) { + duration = _json["duration"]; + } + if (_json.containsKey("freeTier")) { + freeTier = _json["freeTier"]; + } + if (_json.containsKey("maxLimit")) { + maxLimit = _json["maxLimit"]; + } + if (_json.containsKey("metric")) { + metric = _json["metric"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("unit")) { + unit = _json["unit"]; + } + if (_json.containsKey("values")) { + values = (_json["values"] as core.Map).cast<core.String, core.String>(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (defaultLimit != null) { + _json["defaultLimit"] = defaultLimit; + } + if (description != null) { + _json["description"] = description; + } + if (displayName != null) { + _json["displayName"] = displayName; + } + if (duration != null) { + _json["duration"] = duration; + } + if (freeTier != null) { + _json["freeTier"] = freeTier; + } + if (maxLimit != null) { + _json["maxLimit"] = maxLimit; + } + if (metric != null) { + _json["metric"] = metric; + } + if (name != null) { + _json["name"] = name; + } + if (unit != null) { + _json["unit"] = unit; + } + if (values != null) { + _json["values"] = values; + } + return _json; + } +} + +/// Represents a found unused range. +class Range { + /// CIDR range in "10.x.x.x/y" format that is within the + /// allocated ranges and currently unused. + core.String ipCidrRange; + + /// In the Shared VPC host project, the VPC network that's peered with the + /// consumer network. For example: + /// `projects/1234321/global/networks/host-network` + core.String network; + + Range(); + + Range.fromJson(core.Map _json) { + if (_json.containsKey("ipCidrRange")) { + ipCidrRange = _json["ipCidrRange"]; + } + if (_json.containsKey("network")) { + network = _json["network"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (ipCidrRange != null) { + _json["ipCidrRange"] = ipCidrRange; + } + if (network != null) { + _json["network"] = network; + } + return _json; + } +} + +/// Request to search for an unused range within allocated ranges. +class SearchRangeRequest { + /// Required. The prefix length of the IP range. + /// Use usual CIDR range notation. + /// For example, '30' to find unused x.x.x.x/30 CIDR range. + /// Actual range will be determined using allocated range for the consumer + /// peered network and returned in the result. + core.int ipPrefixLength; + + /// Network name in the consumer project. This network must have been + /// already peered with a shared VPC network using CreateConnection + /// method. + /// Must be in a form 'projects/{project}/global/networks/{network}'. + /// {project} is a project number, as in '12345' + /// {network} is network name. + core.String network; + + SearchRangeRequest(); + + SearchRangeRequest.fromJson(core.Map _json) { + if (_json.containsKey("ipPrefixLength")) { + ipPrefixLength = _json["ipPrefixLength"]; + } + if (_json.containsKey("network")) { + network = _json["network"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (ipPrefixLength != null) { + _json["ipPrefixLength"] = ipPrefixLength; + } + if (network != null) { + _json["network"] = network; + } + return _json; + } +} + +/// `Service` is the root object of Google service configuration schema. It +/// describes basic information about a service, such as the name and the +/// title, and delegates other aspects to sub-sections. Each sub-section is +/// either a proto message or a repeated proto message that configures a +/// specific aspect, such as auth. See each proto message definition for +/// details. +/// +/// Example: +/// +/// type: google.api.Service +/// config_version: 3 +/// name: calendar.googleapis.com +/// title: Google Calendar API +/// apis: +/// - name: google.calendar.v3.Calendar +/// authentication: +/// providers: +/// - id: google_calendar_auth +/// jwks_uri: https://www.googleapis.com/oauth2/v1/certs +/// issuer: https://securetoken.google.com +/// rules: +/// - selector: "*" +/// requirements: +/// provider_id: google_calendar_auth +class Service { + /// A list of API interfaces exported by this service. Only the `name` field + /// of the google.protobuf.Api needs to be provided by the configuration + /// author, as the remaining fields will be derived from the IDL during the + /// normalization process. It is an error to specify an API interface here + /// which cannot be resolved against the associated IDL files. + core.List<Api> apis; + + /// Auth configuration. + Authentication authentication; + + /// API backend configuration. + Backend backend; + + /// Billing configuration. + Billing billing; + + /// The semantic version of the service configuration. The config version + /// affects the interpretation of the service configuration. For example, + /// certain features are enabled by default for certain config versions. + /// The latest config version is `3`. + core.int configVersion; + + /// Context configuration. + Context context; + + /// Configuration for the service control plane. + Control control; + + /// Custom error configuration. + CustomError customError; + + /// Additional API documentation. + Documentation documentation; + + /// Configuration for network endpoints. If this is empty, then an endpoint + /// with the same name as the service is automatically generated to service + /// all + /// defined APIs. + core.List<Endpoint> endpoints; + + /// A list of all enum types included in this API service. Enums + /// referenced directly or indirectly by the `apis` are automatically + /// included. Enums which are not referenced but shall be included + /// should be listed here by name. Example: + /// + /// enums: + /// - name: google.someapi.v1.SomeEnum + core.List<Enum> enums; + + /// Experimental configuration. + Experimental experimental; + + /// HTTP configuration. + Http http; + + /// A unique ID for a specific instance of this message, typically assigned + /// by the client for tracking purpose. If empty, the server may choose to + /// generate one instead. Must be no longer than 60 characters. + core.String id; + + /// Logging configuration. + Logging logging; + + /// Defines the logs used by this service. + core.List<LogDescriptor> logs; + + /// Defines the metrics used by this service. + core.List<MetricDescriptor> metrics; + + /// Defines the monitored resources used by this service. This is required + /// by the Service.monitoring and Service.logging configurations. + core.List<MonitoredResourceDescriptor> monitoredResources; + + /// Monitoring configuration. + Monitoring monitoring; + + /// The service name, which is a DNS-like logical identifier for the + /// service, such as `calendar.googleapis.com`. The service name + /// typically goes through DNS verification to make sure the owner + /// of the service also owns the DNS name. + core.String name; + + /// The Google project that owns this service. + core.String producerProjectId; + + /// Quota configuration. + Quota quota; + + /// Output only. The source information for this configuration if available. + SourceInfo sourceInfo; + + /// System parameter configuration. + SystemParameters systemParameters; + + /// A list of all proto message types included in this API service. + /// It serves similar purpose as [google.api.Service.types], except that + /// these types are not needed by user-defined APIs. Therefore, they will not + /// show up in the generated discovery doc. This field should only be used + /// to define system APIs in ESF. + core.List<Type> systemTypes; + + /// The product title for this service. + core.String title; + + /// A list of all proto message types included in this API service. + /// Types referenced directly or indirectly by the `apis` are + /// automatically included. Messages which are not referenced but + /// shall be included, such as types used by the `google.protobuf.Any` type, + /// should be listed here by name. Example: + /// + /// types: + /// - name: google.protobuf.Int32 + core.List<Type> types; + + /// Configuration controlling usage of this service. + Usage usage; + + Service(); + + Service.fromJson(core.Map _json) { + if (_json.containsKey("apis")) { + apis = (_json["apis"] as core.List) + .map<Api>((value) => new Api.fromJson(value)) + .toList(); + } + if (_json.containsKey("authentication")) { + authentication = new Authentication.fromJson(_json["authentication"]); + } + if (_json.containsKey("backend")) { + backend = new Backend.fromJson(_json["backend"]); + } + if (_json.containsKey("billing")) { + billing = new Billing.fromJson(_json["billing"]); + } + if (_json.containsKey("configVersion")) { + configVersion = _json["configVersion"]; + } + if (_json.containsKey("context")) { + context = new Context.fromJson(_json["context"]); + } + if (_json.containsKey("control")) { + control = new Control.fromJson(_json["control"]); + } + if (_json.containsKey("customError")) { + customError = new CustomError.fromJson(_json["customError"]); + } + if (_json.containsKey("documentation")) { + documentation = new Documentation.fromJson(_json["documentation"]); + } + if (_json.containsKey("endpoints")) { + endpoints = (_json["endpoints"] as core.List) + .map<Endpoint>((value) => new Endpoint.fromJson(value)) + .toList(); + } + if (_json.containsKey("enums")) { + enums = (_json["enums"] as core.List) + .map<Enum>((value) => new Enum.fromJson(value)) + .toList(); + } + if (_json.containsKey("experimental")) { + experimental = new Experimental.fromJson(_json["experimental"]); + } + if (_json.containsKey("http")) { + http = new Http.fromJson(_json["http"]); + } + if (_json.containsKey("id")) { + id = _json["id"]; + } + if (_json.containsKey("logging")) { + logging = new Logging.fromJson(_json["logging"]); + } + if (_json.containsKey("logs")) { + logs = (_json["logs"] as core.List) + .map<LogDescriptor>((value) => new LogDescriptor.fromJson(value)) + .toList(); + } + if (_json.containsKey("metrics")) { + metrics = (_json["metrics"] as core.List) + .map<MetricDescriptor>( + (value) => new MetricDescriptor.fromJson(value)) + .toList(); + } + if (_json.containsKey("monitoredResources")) { + monitoredResources = (_json["monitoredResources"] as core.List) + .map<MonitoredResourceDescriptor>( + (value) => new MonitoredResourceDescriptor.fromJson(value)) + .toList(); + } + if (_json.containsKey("monitoring")) { + monitoring = new Monitoring.fromJson(_json["monitoring"]); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("producerProjectId")) { + producerProjectId = _json["producerProjectId"]; + } + if (_json.containsKey("quota")) { + quota = new Quota.fromJson(_json["quota"]); + } + if (_json.containsKey("sourceInfo")) { + sourceInfo = new SourceInfo.fromJson(_json["sourceInfo"]); + } + if (_json.containsKey("systemParameters")) { + systemParameters = + new SystemParameters.fromJson(_json["systemParameters"]); + } + if (_json.containsKey("systemTypes")) { + systemTypes = (_json["systemTypes"] as core.List) + .map<Type>((value) => new Type.fromJson(value)) + .toList(); + } + if (_json.containsKey("title")) { + title = _json["title"]; + } + if (_json.containsKey("types")) { + types = (_json["types"] as core.List) + .map<Type>((value) => new Type.fromJson(value)) + .toList(); + } + if (_json.containsKey("usage")) { + usage = new Usage.fromJson(_json["usage"]); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (apis != null) { + _json["apis"] = apis.map((value) => (value).toJson()).toList(); + } + if (authentication != null) { + _json["authentication"] = (authentication).toJson(); + } + if (backend != null) { + _json["backend"] = (backend).toJson(); + } + if (billing != null) { + _json["billing"] = (billing).toJson(); + } + if (configVersion != null) { + _json["configVersion"] = configVersion; + } + if (context != null) { + _json["context"] = (context).toJson(); + } + if (control != null) { + _json["control"] = (control).toJson(); + } + if (customError != null) { + _json["customError"] = (customError).toJson(); + } + if (documentation != null) { + _json["documentation"] = (documentation).toJson(); + } + if (endpoints != null) { + _json["endpoints"] = endpoints.map((value) => (value).toJson()).toList(); + } + if (enums != null) { + _json["enums"] = enums.map((value) => (value).toJson()).toList(); + } + if (experimental != null) { + _json["experimental"] = (experimental).toJson(); + } + if (http != null) { + _json["http"] = (http).toJson(); + } + if (id != null) { + _json["id"] = id; + } + if (logging != null) { + _json["logging"] = (logging).toJson(); + } + if (logs != null) { + _json["logs"] = logs.map((value) => (value).toJson()).toList(); + } + if (metrics != null) { + _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); + } + if (monitoredResources != null) { + _json["monitoredResources"] = + monitoredResources.map((value) => (value).toJson()).toList(); + } + if (monitoring != null) { + _json["monitoring"] = (monitoring).toJson(); + } + if (name != null) { + _json["name"] = name; + } + if (producerProjectId != null) { + _json["producerProjectId"] = producerProjectId; + } + if (quota != null) { + _json["quota"] = (quota).toJson(); + } + if (sourceInfo != null) { + _json["sourceInfo"] = (sourceInfo).toJson(); + } + if (systemParameters != null) { + _json["systemParameters"] = (systemParameters).toJson(); + } + if (systemTypes != null) { + _json["systemTypes"] = + systemTypes.map((value) => (value).toJson()).toList(); + } + if (title != null) { + _json["title"] = title; + } + if (types != null) { + _json["types"] = types.map((value) => (value).toJson()).toList(); + } + if (usage != null) { + _json["usage"] = (usage).toJson(); + } + return _json; + } +} + +/// `SourceContext` represents information about the source of a +/// protobuf element, like the file in which it is defined. +class SourceContext { + /// The path-qualified name of the .proto file that contained the associated + /// protobuf element. For example: `"google/protobuf/source_context.proto"`. + core.String fileName; + + SourceContext(); + + SourceContext.fromJson(core.Map _json) { + if (_json.containsKey("fileName")) { + fileName = _json["fileName"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fileName != null) { + _json["fileName"] = fileName; + } + return _json; + } +} + +/// Source information used to create a Service Config +class SourceInfo { + /// All files used during config generation. + /// + /// 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.List<core.Map<core.String, core.Object>> sourceFiles; + + SourceInfo(); + + SourceInfo.fromJson(core.Map _json) { + if (_json.containsKey("sourceFiles")) { + sourceFiles = (_json["sourceFiles"] as core.List) + .map<core.Map<core.String, core.Object>>( + (value) => (value as core.Map).cast<core.String, core.Object>()) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (sourceFiles != null) { + _json["sourceFiles"] = sourceFiles; + } + return _json; + } +} + +/// 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). The error model is designed to be: +/// +/// - Simple to use and understand for most users +/// - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error +/// message, +/// and error details. The error code should be an enum value of +/// google.rpc.Code, but it may accept additional error codes if needed. The +/// error message should be a developer-facing English message that helps +/// developers *understand* and *resolve* the error. If a localized user-facing +/// error message is needed, put the localized message in the error details or +/// localize it in the client. The optional error details may contain arbitrary +/// information about the error. There is a predefined set of error detail types +/// in the package `google.rpc` that can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but +/// it +/// is not necessarily the actual wire format. When the `Status` message is +/// exposed in different client libraries and different wire protocols, it can +/// be +/// mapped differently. For example, it will likely be mapped to some exceptions +/// in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of +/// environments, either with or without APIs, to provide a +/// consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, +/// it may embed the `Status` in the normal response to indicate the partial +/// errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may +/// have a `Status` message for error reporting. +/// +/// - Batch operations. If a client uses batch request and batch response, the +/// `Status` message should be used directly inside batch response, one for +/// each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation +/// results in its response, the status of those operations should be +/// represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could +/// be used directly after any stripping needed for security/privacy reasons. +class Status { + /// The status code, which should be an enum value of google.rpc.Code. + core.int code; + + /// A list of messages that carry the error details. There is a common set of + /// message types for APIs to use. + /// + /// 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.List<core.Map<core.String, core.Object>> details; + + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// google.rpc.Status.details field, or localized by the client. + core.String message; + + Status(); + + Status.fromJson(core.Map _json) { + if (_json.containsKey("code")) { + code = _json["code"]; + } + if (_json.containsKey("details")) { + details = (_json["details"] as core.List) + .map<core.Map<core.String, core.Object>>( + (value) => (value as core.Map).cast<core.String, core.Object>()) + .toList(); + } + if (_json.containsKey("message")) { + message = _json["message"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (code != null) { + _json["code"] = code; + } + if (details != null) { + _json["details"] = details; + } + if (message != null) { + _json["message"] = message; + } + return _json; + } +} + +/// Represents a subnet that was created or discovered by a private access +/// management service. +class Subnetwork { + /// Subnetwork CIDR range in `10.x.x.x/y` format. + core.String ipCidrRange; + + /// Subnetwork name. + /// See https://cloud.google.com/compute/docs/vpc/ + core.String name; + + /// In the Shared VPC host project, the VPC network that's peered with the + /// consumer network. For example: + /// `projects/1234321/global/networks/host-network` + core.String network; + + /// This is a discovered subnet that is not within the current consumer + /// allocated ranges. + core.bool outsideAllocation; + + Subnetwork(); + + Subnetwork.fromJson(core.Map _json) { + if (_json.containsKey("ipCidrRange")) { + ipCidrRange = _json["ipCidrRange"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("network")) { + network = _json["network"]; + } + if (_json.containsKey("outsideAllocation")) { + outsideAllocation = _json["outsideAllocation"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (ipCidrRange != null) { + _json["ipCidrRange"] = ipCidrRange; + } + if (name != null) { + _json["name"] = name; + } + if (network != null) { + _json["network"] = network; + } + if (outsideAllocation != null) { + _json["outsideAllocation"] = outsideAllocation; + } + return _json; + } +} + +/// Define a parameter's name and location. The parameter may be passed as +/// either +/// an HTTP header or a URL query parameter, and if both are passed the behavior +/// is implementation-dependent. +class SystemParameter { + /// Define the HTTP header name to use for the parameter. It is case + /// insensitive. + core.String httpHeader; + + /// Define the name of the parameter, such as "api_key" . It is case + /// sensitive. + core.String name; + + /// Define the URL query parameter name to use for the parameter. It is case + /// sensitive. + core.String urlQueryParameter; + + SystemParameter(); + + SystemParameter.fromJson(core.Map _json) { + if (_json.containsKey("httpHeader")) { + httpHeader = _json["httpHeader"]; + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("urlQueryParameter")) { + urlQueryParameter = _json["urlQueryParameter"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (httpHeader != null) { + _json["httpHeader"] = httpHeader; + } + if (name != null) { + _json["name"] = name; + } + if (urlQueryParameter != null) { + _json["urlQueryParameter"] = urlQueryParameter; + } + return _json; + } +} + +/// Define a system parameter rule mapping system parameter definitions to +/// methods. +class SystemParameterRule { + /// Define parameters. Multiple names may be defined for a parameter. + /// For a given method call, only one of them should be used. If multiple + /// names are used the behavior is implementation-dependent. + /// If none of the specified names are present the behavior is + /// parameter-dependent. + core.List<SystemParameter> parameters; + + /// Selects the methods to which this rule applies. Use '*' to indicate all + /// methods in all APIs. + /// + /// Refer to selector for syntax details. + core.String selector; + + SystemParameterRule(); + + SystemParameterRule.fromJson(core.Map _json) { + if (_json.containsKey("parameters")) { + parameters = (_json["parameters"] as core.List) + .map<SystemParameter>((value) => new SystemParameter.fromJson(value)) + .toList(); + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (parameters != null) { + _json["parameters"] = + parameters.map((value) => (value).toJson()).toList(); + } + if (selector != null) { + _json["selector"] = selector; + } + return _json; + } +} + +/// ### System parameter configuration +/// +/// A system parameter is a special kind of parameter defined by the API +/// system, not by an individual API. It is typically mapped to an HTTP header +/// and/or a URL query parameter. This configuration specifies which methods +/// change the names of the system parameters. +class SystemParameters { + /// Define system parameters. + /// + /// The parameters defined here will override the default parameters + /// implemented by the system. If this field is missing from the service + /// config, default system parameters will be used. Default system parameters + /// and names is implementation-dependent. + /// + /// Example: define api key for all methods + /// + /// system_parameters + /// rules: + /// - selector: "*" + /// parameters: + /// - name: api_key + /// url_query_parameter: api_key + /// + /// + /// Example: define 2 api key names for a specific method. + /// + /// system_parameters + /// rules: + /// - selector: "/ListShelves" + /// parameters: + /// - name: api_key + /// http_header: Api-Key1 + /// - name: api_key + /// http_header: Api-Key2 + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + core.List<SystemParameterRule> rules; + + SystemParameters(); + + SystemParameters.fromJson(core.Map _json) { + if (_json.containsKey("rules")) { + rules = (_json["rules"] as core.List) + .map<SystemParameterRule>( + (value) => new SystemParameterRule.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (rules != null) { + _json["rules"] = rules.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// A protocol buffer message type. +class Type { + /// The list of fields. + core.List<Field> fields; + + /// The fully qualified message name. + core.String name; + + /// The list of types appearing in `oneof` definitions in this type. + core.List<core.String> oneofs; + + /// The protocol buffer options. + core.List<Option> options; + + /// The source context. + SourceContext sourceContext; + + /// The source syntax. + /// Possible string values are: + /// - "SYNTAX_PROTO2" : Syntax `proto2`. + /// - "SYNTAX_PROTO3" : Syntax `proto3`. + core.String syntax; + + Type(); + + Type.fromJson(core.Map _json) { + if (_json.containsKey("fields")) { + fields = (_json["fields"] as core.List) + .map<Field>((value) => new Field.fromJson(value)) + .toList(); + } + if (_json.containsKey("name")) { + name = _json["name"]; + } + if (_json.containsKey("oneofs")) { + oneofs = (_json["oneofs"] as core.List).cast<core.String>(); + } + if (_json.containsKey("options")) { + options = (_json["options"] as core.List) + .map<Option>((value) => new Option.fromJson(value)) + .toList(); + } + if (_json.containsKey("sourceContext")) { + sourceContext = new SourceContext.fromJson(_json["sourceContext"]); + } + if (_json.containsKey("syntax")) { + syntax = _json["syntax"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (fields != null) { + _json["fields"] = fields.map((value) => (value).toJson()).toList(); + } + if (name != null) { + _json["name"] = name; + } + if (oneofs != null) { + _json["oneofs"] = oneofs; + } + if (options != null) { + _json["options"] = options.map((value) => (value).toJson()).toList(); + } + if (sourceContext != null) { + _json["sourceContext"] = (sourceContext).toJson(); + } + if (syntax != null) { + _json["syntax"] = syntax; + } + return _json; + } +} + +/// Configuration controlling usage of a service. +class Usage { + /// The full resource name of a channel used for sending notifications to the + /// service producer. + /// + /// Google Service Management currently only supports + /// [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification + /// channel. To use Google Cloud Pub/Sub as the channel, this must be the name + /// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format + /// documented in https://cloud.google.com/pubsub/docs/overview. + core.String producerNotificationChannel; + + /// Requirements that must be satisfied before a consumer project can use the + /// service. Each requirement is of the form <service.name>/<requirement-id>; + /// for example 'serviceusage.googleapis.com/billing-enabled'. + core.List<core.String> requirements; + + /// A list of usage rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + core.List<UsageRule> rules; + + Usage(); + + Usage.fromJson(core.Map _json) { + if (_json.containsKey("producerNotificationChannel")) { + producerNotificationChannel = _json["producerNotificationChannel"]; + } + if (_json.containsKey("requirements")) { + requirements = (_json["requirements"] as core.List).cast<core.String>(); + } + if (_json.containsKey("rules")) { + rules = (_json["rules"] as core.List) + .map<UsageRule>((value) => new UsageRule.fromJson(value)) + .toList(); + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (producerNotificationChannel != null) { + _json["producerNotificationChannel"] = producerNotificationChannel; + } + if (requirements != null) { + _json["requirements"] = requirements; + } + if (rules != null) { + _json["rules"] = rules.map((value) => (value).toJson()).toList(); + } + return _json; + } +} + +/// Usage configuration rules for the service. +/// +/// NOTE: Under development. +/// +/// +/// Use this rule to configure unregistered calls for the service. Unregistered +/// calls are calls that do not contain consumer project identity. +/// (Example: calls that do not contain an API key). +/// By default, API methods do not allow unregistered calls, and each method +/// call +/// must be identified by a consumer project identity. Use this rule to +/// allow/disallow unregistered calls. +/// +/// Example of an API that wants to allow unregistered calls for entire service. +/// +/// usage: +/// rules: +/// - selector: "*" +/// allow_unregistered_calls: true +/// +/// Example of a method that wants to allow unregistered calls. +/// +/// usage: +/// rules: +/// - selector: "google.example.library.v1.LibraryService.CreateBook" +/// allow_unregistered_calls: true +class UsageRule { + /// If true, the selected method allows unregistered calls, e.g. calls + /// that don't identify any user or application. + core.bool allowUnregisteredCalls; + + /// Selects the methods to which this rule applies. Use '*' to indicate all + /// methods in all APIs. + /// + /// Refer to selector for syntax details. + core.String selector; + + /// If true, the selected method should skip service control and the control + /// plane features, such as quota and billing, will not be available. + /// This flag is used by Google Cloud Endpoints to bypass checks for internal + /// methods, such as service health check methods. + core.bool skipServiceControl; + + UsageRule(); + + UsageRule.fromJson(core.Map _json) { + if (_json.containsKey("allowUnregisteredCalls")) { + allowUnregisteredCalls = _json["allowUnregisteredCalls"]; + } + if (_json.containsKey("selector")) { + selector = _json["selector"]; + } + if (_json.containsKey("skipServiceControl")) { + skipServiceControl = _json["skipServiceControl"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (allowUnregisteredCalls != null) { + _json["allowUnregisteredCalls"] = allowUnregisteredCalls; + } + if (selector != null) { + _json["selector"] = selector; + } + if (skipServiceControl != null) { + _json["skipServiceControl"] = skipServiceControl; + } + return _json; + } +}
diff --git a/generated/googleapis_beta/lib/speech/v1beta1.dart b/generated/googleapis_beta/lib/speech/v1beta1.dart deleted file mode 100644 index 89d98ce..0000000 --- a/generated/googleapis_beta/lib/speech/v1beta1.dart +++ /dev/null
@@ -1,722 +0,0 @@ -// This is a generated file (see the discoveryapis_generator project). - -// ignore_for_file: unnecessary_cast - -library googleapis_beta.speech.v1beta1; - -import 'dart:core' as core; -import 'dart:async' as async; -import 'dart:convert' as convert; - -import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; -import 'package:http/http.dart' as http; - -export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' - show ApiRequestError, DetailedApiRequestError; - -const core.String USER_AGENT = 'dart-api-client speech/v1beta1'; - -/// Converts audio to text by applying powerful neural network models. -class SpeechApi { - /// View and manage your data across Google Cloud Platform services - static const CloudPlatformScope = - "https://www.googleapis.com/auth/cloud-platform"; - - final commons.ApiRequester _requester; - - OperationsResourceApi get operations => new OperationsResourceApi(_requester); - SpeechResourceApi get speech => new SpeechResourceApi(_requester); - - SpeechApi(http.Client client, - {core.String rootUrl: "https://speech.googleapis.com/", - core.String servicePath: ""}) - : _requester = - new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); -} - -class OperationsResourceApi { - final commons.ApiRequester _requester; - - OperationsResourceApi(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 "^[^/]+$". - /// - /// [$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}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (name == null) { - throw new core.ArgumentError("Parameter name is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = - 'v1beta1/operations/' + commons.Escaper.ecapeVariableReserved('$name'); - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Operation.fromJson(data)); - } -} - -class SpeechResourceApi { - final commons.ApiRequester _requester; - - SpeechResourceApi(commons.ApiRequester client) : _requester = client; - - /// Performs asynchronous speech recognition: receive results via the - /// [google.longrunning.Operations] - /// (/speech/reference/rest/v1beta1/operations#Operation) - /// interface. Returns either an - /// `Operation.error` or an `Operation.response` which contains - /// an `AsyncRecognizeResponse` message. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [$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> asyncrecognize(AsyncRecognizeRequest request, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/speech:asyncrecognize'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new Operation.fromJson(data)); - } - - /// Performs synchronous speech recognition: receive results after all audio - /// has been sent and processed. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [SyncRecognizeResponse]. - /// - /// 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<SyncRecognizeResponse> syncrecognize( - SyncRecognizeRequest request, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'v1beta1/speech:syncrecognize'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new SyncRecognizeResponse.fromJson(data)); - } -} - -/// The top-level message sent by the client for the `AsyncRecognize` method. -class AsyncRecognizeRequest { - /// *Required* The audio data to be recognized. - RecognitionAudio audio; - - /// *Required* Provides information to the recognizer that specifies how to - /// process the request. - RecognitionConfig config; - - AsyncRecognizeRequest(); - - AsyncRecognizeRequest.fromJson(core.Map _json) { - if (_json.containsKey("audio")) { - audio = new RecognitionAudio.fromJson(_json["audio"]); - } - if (_json.containsKey("config")) { - config = new RecognitionConfig.fromJson(_json["config"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (audio != null) { - _json["audio"] = (audio).toJson(); - } - if (config != null) { - _json["config"] = (config).toJson(); - } - return _json; - } -} - -/// 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 have the format of `operations/some/unique/name`. - 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(); - - Operation.fromJson(core.Map _json) { - if (_json.containsKey("done")) { - done = _json["done"]; - } - if (_json.containsKey("error")) { - error = new Status.fromJson(_json["error"]); - } - if (_json.containsKey("metadata")) { - metadata = - (_json["metadata"] as core.Map).cast<core.String, core.Object>(); - } - if (_json.containsKey("name")) { - name = _json["name"]; - } - if (_json.containsKey("response")) { - response = - (_json["response"] as core.Map).cast<core.String, core.Object>(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (done != null) { - _json["done"] = done; - } - if (error != null) { - _json["error"] = (error).toJson(); - } - if (metadata != null) { - _json["metadata"] = metadata; - } - if (name != null) { - _json["name"] = name; - } - if (response != null) { - _json["response"] = response; - } - return _json; - } -} - -/// Contains audio data in the encoding specified in the `RecognitionConfig`. -/// Either `content` or `uri` must be supplied. Supplying both or neither -/// returns google.rpc.Code.INVALID_ARGUMENT. See -/// [audio limits](https://cloud.google.com/speech/limits#content). -class RecognitionAudio { - /// The audio data bytes encoded as specified in - /// `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a - /// pure binary representation, whereas JSON representations use base64. - core.String content; - core.List<core.int> get contentAsBytes { - return convert.base64.decode(content); - } - - void set contentAsBytes(core.List<core.int> _bytes) { - content = - convert.base64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); - } - - /// URI that points to a file that contains audio data bytes as specified in - /// `RecognitionConfig`. Currently, only Google Cloud Storage URIs are - /// supported, which must be specified in the following format: - /// `gs://bucket_name/object_name` (other URI formats return - /// google.rpc.Code.INVALID_ARGUMENT). For more information, see - /// [Request URIs](https://cloud.google.com/storage/docs/reference-uris). - core.String uri; - - RecognitionAudio(); - - RecognitionAudio.fromJson(core.Map _json) { - if (_json.containsKey("content")) { - content = _json["content"]; - } - if (_json.containsKey("uri")) { - uri = _json["uri"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (content != null) { - _json["content"] = content; - } - if (uri != null) { - _json["uri"] = uri; - } - return _json; - } -} - -/// Provides information to the recognizer that specifies how to process the -/// request. -class RecognitionConfig { - /// *Required* Encoding of audio data sent in all `RecognitionAudio` messages. - /// Possible string values are: - /// - "ENCODING_UNSPECIFIED" : Not specified. Will return result - /// google.rpc.Code.INVALID_ARGUMENT. - /// - "LINEAR16" : Uncompressed 16-bit signed little-endian samples (Linear - /// PCM). - /// This is the only encoding that may be used by `AsyncRecognize`. - /// - "FLAC" : This is the recommended encoding for `SyncRecognize` and - /// `StreamingRecognize` because it uses lossless compression; therefore - /// recognition accuracy is not compromised by a lossy codec. - /// - /// The stream FLAC (Free Lossless Audio Codec) encoding is specified at: - /// http://flac.sourceforge.net/documentation.html. - /// 16-bit and 24-bit samples are supported. - /// Not all fields in STREAMINFO are supported. - /// - "MULAW" : 8-bit samples that compand 14-bit audio samples using G.711 - /// PCMU/mu-law. - /// - "AMR" : Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 - /// Hz. - /// - "AMR_WB" : Adaptive Multi-Rate Wideband codec. `sample_rate` must be - /// 16000 Hz. - core.String encoding; - - /// *Optional* The language of the supplied audio as a BCP-47 language tag. - /// Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt - /// If omitted, defaults to "en-US". See - /// [Language Support](https://cloud.google.com/speech/docs/languages) - /// for a list of the currently supported language codes. - core.String languageCode; - - /// *Optional* Maximum number of recognition hypotheses to be returned. - /// Specifically, the maximum number of `SpeechRecognitionAlternative` - /// messages - /// within each `SpeechRecognitionResult`. - /// The server may return fewer than `max_alternatives`. - /// Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of - /// one. If omitted, will return a maximum of one. - core.int maxAlternatives; - - /// *Optional* If set to `true`, the server will attempt to filter out - /// profanities, replacing all but the initial character in each filtered word - /// with asterisks, e.g. "f***". If set to `false` or omitted, profanities - /// won't be filtered out. - core.bool profanityFilter; - - /// *Required* Sample rate in Hertz of the audio data sent in all - /// `RecognitionAudio` messages. Valid values are: 8000-48000. - /// 16000 is optimal. For best results, set the sampling rate of the audio - /// source to 16000 Hz. If that's not possible, use the native sample rate of - /// the audio source (instead of re-sampling). - core.int sampleRate; - - /// *Optional* A means to provide context to assist the speech recognition. - SpeechContext speechContext; - - RecognitionConfig(); - - RecognitionConfig.fromJson(core.Map _json) { - if (_json.containsKey("encoding")) { - encoding = _json["encoding"]; - } - if (_json.containsKey("languageCode")) { - languageCode = _json["languageCode"]; - } - if (_json.containsKey("maxAlternatives")) { - maxAlternatives = _json["maxAlternatives"]; - } - if (_json.containsKey("profanityFilter")) { - profanityFilter = _json["profanityFilter"]; - } - if (_json.containsKey("sampleRate")) { - sampleRate = _json["sampleRate"]; - } - if (_json.containsKey("speechContext")) { - speechContext = new SpeechContext.fromJson(_json["speechContext"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (encoding != null) { - _json["encoding"] = encoding; - } - if (languageCode != null) { - _json["languageCode"] = languageCode; - } - if (maxAlternatives != null) { - _json["maxAlternatives"] = maxAlternatives; - } - if (profanityFilter != null) { - _json["profanityFilter"] = profanityFilter; - } - if (sampleRate != null) { - _json["sampleRate"] = sampleRate; - } - if (speechContext != null) { - _json["speechContext"] = (speechContext).toJson(); - } - return _json; - } -} - -/// Provides "hints" to the speech recognizer to favor specific words and -/// phrases -/// in the results. -class SpeechContext { - /// *Optional* A list of strings containing words and phrases "hints" so that - /// the speech recognition is more likely to recognize them. This can be used - /// to improve the accuracy for specific words and phrases, for example, if - /// specific commands are typically spoken by the user. This can also be used - /// to add additional words to the vocabulary of the recognizer. See - /// [usage limits](https://cloud.google.com/speech/limits#content). - core.List<core.String> phrases; - - SpeechContext(); - - SpeechContext.fromJson(core.Map _json) { - if (_json.containsKey("phrases")) { - phrases = (_json["phrases"] as core.List).cast<core.String>(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (phrases != null) { - _json["phrases"] = phrases; - } - return _json; - } -} - -/// Alternative hypotheses (a.k.a. n-best list). -class SpeechRecognitionAlternative { - /// *Output-only* The confidence estimate between 0.0 and 1.0. A higher number - /// indicates an estimated greater likelihood that the recognized words are - /// correct. This field is typically provided only for the top hypothesis, and - /// only for `is_final=true` results. Clients should not rely on the - /// `confidence` field as it is not guaranteed to be accurate, or even set, in - /// any of the results. - /// The default of 0.0 is a sentinel value indicating `confidence` was not - /// set. - core.double confidence; - - /// *Output-only* Transcript text representing the words that the user spoke. - core.String transcript; - - SpeechRecognitionAlternative(); - - SpeechRecognitionAlternative.fromJson(core.Map _json) { - if (_json.containsKey("confidence")) { - confidence = _json["confidence"].toDouble(); - } - if (_json.containsKey("transcript")) { - transcript = _json["transcript"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (confidence != null) { - _json["confidence"] = confidence; - } - if (transcript != null) { - _json["transcript"] = transcript; - } - return _json; - } -} - -/// A speech recognition result corresponding to a portion of the audio. -class SpeechRecognitionResult { - /// *Output-only* May contain one or more recognition hypotheses (up to the - /// maximum specified in `max_alternatives`). - core.List<SpeechRecognitionAlternative> alternatives; - - SpeechRecognitionResult(); - - SpeechRecognitionResult.fromJson(core.Map _json) { - if (_json.containsKey("alternatives")) { - alternatives = (_json["alternatives"] as core.List) - .map<SpeechRecognitionAlternative>( - (value) => new SpeechRecognitionAlternative.fromJson(value)) - .toList(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (alternatives != null) { - _json["alternatives"] = - alternatives.map((value) => (value).toJson()).toList(); - } - return _json; - } -} - -/// 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). The error model is designed to be: -/// -/// - Simple to use and understand for most users -/// - Flexible enough to meet unexpected needs -/// -/// # Overview -/// -/// The `Status` message contains three pieces of data: error code, error -/// message, -/// and error details. The error code should be an enum value of -/// google.rpc.Code, but it may accept additional error codes if needed. The -/// error message should be a developer-facing English message that helps -/// developers *understand* and *resolve* the error. If a localized user-facing -/// error message is needed, put the localized message in the error details or -/// localize it in the client. The optional error details may contain arbitrary -/// information about the error. There is a predefined set of error detail types -/// in the package `google.rpc` that can be used for common error conditions. -/// -/// # Language mapping -/// -/// The `Status` message is the logical representation of the error model, but -/// it -/// is not necessarily the actual wire format. When the `Status` message is -/// exposed in different client libraries and different wire protocols, it can -/// be -/// mapped differently. For example, it will likely be mapped to some exceptions -/// in Java, but more likely mapped to some error codes in C. -/// -/// # Other uses -/// -/// The error model and the `Status` message can be used in a variety of -/// environments, either with or without APIs, to provide a -/// consistent developer experience across different environments. -/// -/// Example uses of this error model include: -/// -/// - Partial errors. If a service needs to return partial errors to the client, -/// it may embed the `Status` in the normal response to indicate the partial -/// errors. -/// -/// - Workflow errors. A typical workflow has multiple steps. Each step may -/// have a `Status` message for error reporting. -/// -/// - Batch operations. If a client uses batch request and batch response, the -/// `Status` message should be used directly inside batch response, one for -/// each error sub-response. -/// -/// - Asynchronous operations. If an API call embeds asynchronous operation -/// results in its response, the status of those operations should be -/// represented directly using the `Status` message. -/// -/// - Logging. If some API errors are stored in logs, the message `Status` could -/// be used directly after any stripping needed for security/privacy reasons. -class Status { - /// The status code, which should be an enum value of google.rpc.Code. - core.int code; - - /// A list of messages that carry the error details. There is a common set of - /// message types for APIs to use. - /// - /// 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.List<core.Map<core.String, core.Object>> details; - - /// A developer-facing error message, which should be in English. Any - /// user-facing error message should be localized and sent in the - /// google.rpc.Status.details field, or localized by the client. - core.String message; - - Status(); - - Status.fromJson(core.Map _json) { - if (_json.containsKey("code")) { - code = _json["code"]; - } - if (_json.containsKey("details")) { - details = (_json["details"] as core.List) - .map<core.Map<core.String, core.Object>>( - (value) => (value as core.Map).cast<core.String, core.Object>()) - .toList(); - } - if (_json.containsKey("message")) { - message = _json["message"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (code != null) { - _json["code"] = code; - } - if (details != null) { - _json["details"] = details; - } - if (message != null) { - _json["message"] = message; - } - return _json; - } -} - -/// The top-level message sent by the client for the `SyncRecognize` method. -class SyncRecognizeRequest { - /// *Required* The audio data to be recognized. - RecognitionAudio audio; - - /// *Required* Provides information to the recognizer that specifies how to - /// process the request. - RecognitionConfig config; - - SyncRecognizeRequest(); - - SyncRecognizeRequest.fromJson(core.Map _json) { - if (_json.containsKey("audio")) { - audio = new RecognitionAudio.fromJson(_json["audio"]); - } - if (_json.containsKey("config")) { - config = new RecognitionConfig.fromJson(_json["config"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (audio != null) { - _json["audio"] = (audio).toJson(); - } - if (config != null) { - _json["config"] = (config).toJson(); - } - return _json; - } -} - -/// The only message returned to the client by `SyncRecognize`. method. It -/// contains the result as zero or more sequential `SpeechRecognitionResult` -/// messages. -class SyncRecognizeResponse { - /// *Output-only* Sequential list of transcription results corresponding to - /// sequential portions of audio. - core.List<SpeechRecognitionResult> results; - - SyncRecognizeResponse(); - - SyncRecognizeResponse.fromJson(core.Map _json) { - if (_json.containsKey("results")) { - results = (_json["results"] as core.List) - .map<SpeechRecognitionResult>( - (value) => new SpeechRecognitionResult.fromJson(value)) - .toList(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (results != null) { - _json["results"] = results.map((value) => (value).toJson()).toList(); - } - return _json; - } -}
diff --git a/generated/googleapis_beta/lib/sqladmin/v1beta3.dart b/generated/googleapis_beta/lib/sqladmin/v1beta3.dart deleted file mode 100644 index 61b39e0..0000000 --- a/generated/googleapis_beta/lib/sqladmin/v1beta3.dart +++ /dev/null
@@ -1,3612 +0,0 @@ -// This is a generated file (see the discoveryapis_generator project). - -// ignore_for_file: unnecessary_cast - -library googleapis_beta.sqladmin.v1beta3; - -import 'dart:core' as core; -import 'dart:async' as async; -import 'dart:convert' as convert; - -import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; -import 'package:http/http.dart' as http; - -export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' - show ApiRequestError, DetailedApiRequestError; - -const core.String USER_AGENT = 'dart-api-client sqladmin/v1beta3'; - -/// Cloud SQL provides the Cloud SQL Admin API, a REST API for administering -/// your instances programmatically. -class SqladminApi { - /// View and manage your data across Google Cloud Platform services - static const CloudPlatformScope = - "https://www.googleapis.com/auth/cloud-platform"; - - /// Manage your Google SQL Service instances - static const SqlserviceAdminScope = - "https://www.googleapis.com/auth/sqlservice.admin"; - - final commons.ApiRequester _requester; - - BackupRunsResourceApi get backupRuns => new BackupRunsResourceApi(_requester); - FlagsResourceApi get flags => new FlagsResourceApi(_requester); - InstancesResourceApi get instances => new InstancesResourceApi(_requester); - OperationsResourceApi get operations => new OperationsResourceApi(_requester); - SslCertsResourceApi get sslCerts => new SslCertsResourceApi(_requester); - TiersResourceApi get tiers => new TiersResourceApi(_requester); - - SqladminApi(http.Client client, - {core.String rootUrl: "https://www.googleapis.com/", - core.String servicePath: "sql/v1beta3/"}) - : _requester = - new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); -} - -class BackupRunsResourceApi { - final commons.ApiRequester _requester; - - BackupRunsResourceApi(commons.ApiRequester client) : _requester = client; - - /// Retrieves information about a specified backup run for a Cloud SQL - /// instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [backupConfiguration] - Identifier for the backup configuration. This gets - /// generated automatically when a backup configuration is created. - /// - /// [dueTime] - The start time of the four-hour backup window. The backup can - /// occur any time in the window. The time is in RFC 3339 format, for example - /// 2012-11-15T16:19:00.094Z. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [BackupRun]. - /// - /// 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<BackupRun> get(core.String project, core.String instance, - core.String backupConfiguration, core.String dueTime, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if (backupConfiguration == null) { - throw new core.ArgumentError( - "Parameter backupConfiguration is required."); - } - if (dueTime == null) { - throw new core.ArgumentError("Parameter dueTime is required."); - } - _queryParams["dueTime"] = [dueTime]; - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/backupRuns/' + - commons.Escaper.ecapeVariable('$backupConfiguration'); - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new BackupRun.fromJson(data)); - } - - /// Lists all backup runs associated with a Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [backupConfiguration] - Identifier for the backup configuration. This gets - /// generated automatically when a backup configuration is created. - /// - /// [maxResults] - Maximum number of backup runs per response. - /// - /// [pageToken] - A previously-returned page token representing part of the - /// larger set of results to view. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [BackupRunsListResponse]. - /// - /// 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<BackupRunsListResponse> list(core.String project, - core.String instance, core.String backupConfiguration, - {core.int maxResults, core.String pageToken, core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if (backupConfiguration == null) { - throw new core.ArgumentError( - "Parameter backupConfiguration is required."); - } - _queryParams["backupConfiguration"] = [backupConfiguration]; - if (maxResults != null) { - _queryParams["maxResults"] = ["${maxResults}"]; - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/backupRuns'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new BackupRunsListResponse.fromJson(data)); - } -} - -class FlagsResourceApi { - final commons.ApiRequester _requester; - - FlagsResourceApi(commons.ApiRequester client) : _requester = client; - - /// Lists all database flags that can be set for Google Cloud SQL instances. - /// - /// Request parameters: - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [FlagsListResponse]. - /// - /// 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<FlagsListResponse> list({core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'flags'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new FlagsListResponse.fromJson(data)); - } -} - -class InstancesResourceApi { - final commons.ApiRequester _requester; - - InstancesResourceApi(commons.ApiRequester client) : _requester = client; - - /// Creates a Cloud SQL instance as a clone of a source instance. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - Project ID of the source as well as the clone Cloud SQL - /// instance. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesCloneResponse]. - /// - /// 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<InstancesCloneResponse> clone( - InstancesCloneRequest request, core.String project, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/clone'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstancesCloneResponse.fromJson(data)); - } - - /// Deletes a Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance to be - /// deleted. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesDeleteResponse]. - /// - /// 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<InstancesDeleteResponse> delete( - core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance'); - - var _response = _requester.request(_url, "DELETE", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstancesDeleteResponse.fromJson(data)); - } - - /// Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as - /// a MySQL dump file. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance to be - /// exported. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesExportResponse]. - /// - /// 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<InstancesExportResponse> export( - InstancesExportRequest request, core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/export'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstancesExportResponse.fromJson(data)); - } - - /// Retrieves information about a Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Database instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [DatabaseInstance]. - /// - /// 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<DatabaseInstance> get(core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance'); - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new DatabaseInstance.fromJson(data)); - } - - /// Imports data into a Cloud SQL instance from a MySQL dump file stored in a - /// Google Cloud Storage bucket. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesImportResponse]. - /// - /// 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<InstancesImportResponse> import( - InstancesImportRequest request, core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/import'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstancesImportResponse.fromJson(data)); - } - - /// Creates a new Cloud SQL instance. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project to which the newly created Cloud SQL - /// instances should belong. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesInsertResponse]. - /// - /// 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<InstancesInsertResponse> insert( - DatabaseInstance request, core.String project, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = - 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstancesInsertResponse.fromJson(data)); - } - - /// Lists instances for a given project, in alphabetical order by instance - /// name. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project for which to list Cloud SQL - /// instances. - /// - /// [maxResults] - The maximum number of results to return per response. - /// - /// [pageToken] - A previously-returned page token representing part of the - /// larger set of results to view. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesListResponse]. - /// - /// 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<InstancesListResponse> list(core.String project, - {core.int maxResults, core.String pageToken, core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (maxResults != null) { - _queryParams["maxResults"] = ["${maxResults}"]; - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = - 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstancesListResponse.fromJson(data)); - } - - /// Updates the settings of a Cloud SQL instance. This method supports patch - /// semantics. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesUpdateResponse]. - /// - /// 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<InstancesUpdateResponse> patch( - DatabaseInstance request, core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance'); - - var _response = _requester.request(_url, "PATCH", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstancesUpdateResponse.fromJson(data)); - } - - /// Promotes the read replica instance to be a stand-alone Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - ID of the project that contains the read replica. - /// - /// [instance] - Cloud SQL read replica instance name. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesPromoteReplicaResponse]. - /// - /// 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<InstancesPromoteReplicaResponse> promoteReplica( - core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/promoteReplica'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response - .then((data) => new InstancesPromoteReplicaResponse.fromJson(data)); - } - - /// Deletes all client certificates and generates a new server SSL certificate - /// for a Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesResetSslConfigResponse]. - /// - /// 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<InstancesResetSslConfigResponse> resetSslConfig( - core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/resetSslConfig'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response - .then((data) => new InstancesResetSslConfigResponse.fromJson(data)); - } - - /// Restarts a Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance to be - /// restarted. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesRestartResponse]. - /// - /// 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<InstancesRestartResponse> restart( - core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/restart'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response - .then((data) => new InstancesRestartResponse.fromJson(data)); - } - - /// Restores a backup of a Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [backupConfiguration] - The identifier of the backup configuration. This - /// gets generated automatically when a backup configuration is created. - /// - /// [dueTime] - The start time of the four-hour backup window. The backup can - /// occur any time in the window. The time is in RFC 3339 format, for example - /// 2012-11-15T16:19:00.094Z. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesRestoreBackupResponse]. - /// - /// 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<InstancesRestoreBackupResponse> restoreBackup( - core.String project, - core.String instance, - core.String backupConfiguration, - core.String dueTime, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if (backupConfiguration == null) { - throw new core.ArgumentError( - "Parameter backupConfiguration is required."); - } - _queryParams["backupConfiguration"] = [backupConfiguration]; - if (dueTime == null) { - throw new core.ArgumentError("Parameter dueTime is required."); - } - _queryParams["dueTime"] = [dueTime]; - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/restoreBackup'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response - .then((data) => new InstancesRestoreBackupResponse.fromJson(data)); - } - - /// Sets the password for the root user of the specified Cloud SQL instance. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesSetRootPasswordResponse]. - /// - /// 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<InstancesSetRootPasswordResponse> setRootPassword( - InstanceSetRootPasswordRequest request, - core.String project, - core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/setRootPassword'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response - .then((data) => new InstancesSetRootPasswordResponse.fromJson(data)); - } - - /// Updates the settings of a Cloud SQL instance. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstancesUpdateResponse]. - /// - /// 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<InstancesUpdateResponse> update( - DatabaseInstance request, core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance'); - - var _response = _requester.request(_url, "PUT", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstancesUpdateResponse.fromJson(data)); - } -} - -class OperationsResourceApi { - final commons.ApiRequester _requester; - - OperationsResourceApi(commons.ApiRequester client) : _requester = client; - - /// Retrieves information about a specific operation that was performed on a - /// Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [operation] - Instance operation ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [InstanceOperation]. - /// - /// 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<InstanceOperation> get( - core.String project, core.String instance, core.String operation, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if (operation == null) { - throw new core.ArgumentError("Parameter operation is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/operations/' + - commons.Escaper.ecapeVariable('$operation'); - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new InstanceOperation.fromJson(data)); - } - - /// Lists all operations that have been performed on a Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [maxResults] - Maximum number of operations per response. - /// - /// [pageToken] - A previously-returned page token representing part of the - /// larger set of results to view. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [OperationsListResponse]. - /// - /// 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<OperationsListResponse> list( - core.String project, core.String instance, - {core.int maxResults, core.String pageToken, core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if (maxResults != null) { - _queryParams["maxResults"] = ["${maxResults}"]; - } - if (pageToken != null) { - _queryParams["pageToken"] = [pageToken]; - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/operations'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new OperationsListResponse.fromJson(data)); - } -} - -class SslCertsResourceApi { - final commons.ApiRequester _requester; - - SslCertsResourceApi(commons.ApiRequester client) : _requester = client; - - /// Deletes an SSL certificate from a Cloud SQL instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance to be - /// deleted. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [sha1Fingerprint] - Sha1 FingerPrint. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [SslCertsDeleteResponse]. - /// - /// 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<SslCertsDeleteResponse> delete( - core.String project, core.String instance, core.String sha1Fingerprint, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if (sha1Fingerprint == null) { - throw new core.ArgumentError("Parameter sha1Fingerprint is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/sslCerts/' + - commons.Escaper.ecapeVariable('$sha1Fingerprint'); - - var _response = _requester.request(_url, "DELETE", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new SslCertsDeleteResponse.fromJson(data)); - } - - /// Retrieves an SSL certificate as specified by its SHA-1 fingerprint. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project that contains the instance. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [sha1Fingerprint] - Sha1 FingerPrint. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [SslCert]. - /// - /// 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<SslCert> get( - core.String project, core.String instance, core.String sha1Fingerprint, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if (sha1Fingerprint == null) { - throw new core.ArgumentError("Parameter sha1Fingerprint is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/sslCerts/' + - commons.Escaper.ecapeVariable('$sha1Fingerprint'); - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new SslCert.fromJson(data)); - } - - /// Creates an SSL certificate and returns the certificate, the associated - /// private key, and the server certificate authority. - /// - /// [request] - The metadata request object. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project to which the newly created Cloud SQL - /// instances should belong. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [SslCertsInsertResponse]. - /// - /// 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<SslCertsInsertResponse> insert( - SslCertsInsertRequest request, core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (request != null) { - _body = convert.json.encode((request).toJson()); - } - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/sslCerts'; - - var _response = _requester.request(_url, "POST", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new SslCertsInsertResponse.fromJson(data)); - } - - /// Lists all of the current SSL certificates defined for a Cloud SQL - /// instance. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project for which to list Cloud SQL - /// instances. - /// - /// [instance] - Cloud SQL instance ID. This does not include the project ID. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [SslCertsListResponse]. - /// - /// 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<SslCertsListResponse> list( - core.String project, core.String instance, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if (instance == null) { - throw new core.ArgumentError("Parameter instance is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + - commons.Escaper.ecapeVariable('$project') + - '/instances/' + - commons.Escaper.ecapeVariable('$instance') + - '/sslCerts'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new SslCertsListResponse.fromJson(data)); - } -} - -class TiersResourceApi { - final commons.ApiRequester _requester; - - TiersResourceApi(commons.ApiRequester client) : _requester = client; - - /// Lists service tiers that can be used to create Google Cloud SQL instances. - /// - /// Request parameters: - /// - /// [project] - Project ID of the project for which to list tiers. - /// - /// [$fields] - Selector specifying which fields to include in a partial - /// response. - /// - /// Completes with a [TiersListResponse]. - /// - /// 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<TiersListResponse> list(core.String project, - {core.String $fields}) { - var _url = null; - var _queryParams = new core.Map<core.String, core.List<core.String>>(); - var _uploadMedia = null; - var _uploadOptions = null; - var _downloadOptions = commons.DownloadOptions.Metadata; - var _body = null; - - if (project == null) { - throw new core.ArgumentError("Parameter project is required."); - } - if ($fields != null) { - _queryParams["fields"] = [$fields]; - } - - _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/tiers'; - - var _response = _requester.request(_url, "GET", - body: _body, - queryParams: _queryParams, - uploadOptions: _uploadOptions, - uploadMedia: _uploadMedia, - downloadOptions: _downloadOptions); - return _response.then((data) => new TiersListResponse.fromJson(data)); - } -} - -/// Database instance backup configuration. -class BackupConfiguration { - /// Whether binary log is enabled. If backup configuration is disabled, binary - /// log must be disabled as well. - core.bool binaryLogEnabled; - - /// Whether this configuration is enabled. - core.bool enabled; - - /// Identifier for this configuration. This gets generated automatically when - /// a backup configuration is created. - core.String id; - - /// This is always sql#backupConfiguration. - core.String kind; - - /// Whether replication log archiving is enabled. Replication log archiving is - /// required for the point-in-time recovery (PITR) feature. PostgreSQL - /// instances only. - core.bool replicationLogArchivingEnabled; - - /// Start time for the daily backup configuration in UTC timezone in the 24 - /// hour format - HH:MM. - core.String startTime; - - BackupConfiguration(); - - BackupConfiguration.fromJson(core.Map _json) { - if (_json.containsKey("binaryLogEnabled")) { - binaryLogEnabled = _json["binaryLogEnabled"]; - } - if (_json.containsKey("enabled")) { - enabled = _json["enabled"]; - } - if (_json.containsKey("id")) { - id = _json["id"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("replicationLogArchivingEnabled")) { - replicationLogArchivingEnabled = _json["replicationLogArchivingEnabled"]; - } - if (_json.containsKey("startTime")) { - startTime = _json["startTime"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (binaryLogEnabled != null) { - _json["binaryLogEnabled"] = binaryLogEnabled; - } - if (enabled != null) { - _json["enabled"] = enabled; - } - if (id != null) { - _json["id"] = id; - } - if (kind != null) { - _json["kind"] = kind; - } - if (replicationLogArchivingEnabled != null) { - _json["replicationLogArchivingEnabled"] = replicationLogArchivingEnabled; - } - if (startTime != null) { - _json["startTime"] = startTime; - } - return _json; - } -} - -/// A database instance backup run resource. -class BackupRun { - /// Backup Configuration identifier. - core.String backupConfiguration; - - /// The due time of this run in UTC timezone in RFC 3339 format, for example - /// 2012-11-15T16:19:00.094Z. - core.DateTime dueTime; - - /// The time the backup operation completed in UTC timezone in RFC 3339 - /// format, for example 2012-11-15T16:19:00.094Z. - core.DateTime endTime; - - /// The time the run was enqueued in UTC timezone in RFC 3339 format, for - /// example 2012-11-15T16:19:00.094Z. - core.DateTime enqueuedTime; - - /// Information about why the backup operation failed. This is only present if - /// the run has the FAILED status. - OperationError error; - - /// Name of the database instance. - core.String instance; - - /// This is always sql#backupRun. - core.String kind; - - /// The time the backup operation actually started in UTC timezone in RFC 3339 - /// format, for example 2012-11-15T16:19:00.094Z. - core.DateTime startTime; - - /// The status of this run. - core.String status; - - BackupRun(); - - BackupRun.fromJson(core.Map _json) { - if (_json.containsKey("backupConfiguration")) { - backupConfiguration = _json["backupConfiguration"]; - } - if (_json.containsKey("dueTime")) { - dueTime = core.DateTime.parse(_json["dueTime"]); - } - if (_json.containsKey("endTime")) { - endTime = core.DateTime.parse(_json["endTime"]); - } - if (_json.containsKey("enqueuedTime")) { - enqueuedTime = core.DateTime.parse(_json["enqueuedTime"]); - } - if (_json.containsKey("error")) { - error = new OperationError.fromJson(_json["error"]); - } - if (_json.containsKey("instance")) { - instance = _json["instance"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("startTime")) { - startTime = core.DateTime.parse(_json["startTime"]); - } - if (_json.containsKey("status")) { - status = _json["status"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (backupConfiguration != null) { - _json["backupConfiguration"] = backupConfiguration; - } - if (dueTime != null) { - _json["dueTime"] = (dueTime).toIso8601String(); - } - if (endTime != null) { - _json["endTime"] = (endTime).toIso8601String(); - } - if (enqueuedTime != null) { - _json["enqueuedTime"] = (enqueuedTime).toIso8601String(); - } - if (error != null) { - _json["error"] = (error).toJson(); - } - if (instance != null) { - _json["instance"] = instance; - } - if (kind != null) { - _json["kind"] = kind; - } - if (startTime != null) { - _json["startTime"] = (startTime).toIso8601String(); - } - if (status != null) { - _json["status"] = status; - } - return _json; - } -} - -/// Backup run list results. -class BackupRunsListResponse { - /// A list of backup runs in reverse chronological order of the enqueued time. - core.List<BackupRun> items; - - /// This is always sql#backupRunsList. - core.String kind; - - /// The continuation token, used to page through large result sets. Provide - /// this value in a subsequent request to return the next page of results. - core.String nextPageToken; - - BackupRunsListResponse(); - - BackupRunsListResponse.fromJson(core.Map _json) { - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<BackupRun>((value) => new BackupRun.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("nextPageToken")) { - nextPageToken = _json["nextPageToken"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - if (nextPageToken != null) { - _json["nextPageToken"] = nextPageToken; - } - return _json; - } -} - -/// Binary log coordinates. -class BinLogCoordinates { - /// Name of the binary log file for a Cloud SQL instance. - core.String binLogFileName; - - /// Position (offset) within the binary log file. - core.String binLogPosition; - - /// This is always sql#binLogCoordinates. - core.String kind; - - BinLogCoordinates(); - - BinLogCoordinates.fromJson(core.Map _json) { - if (_json.containsKey("binLogFileName")) { - binLogFileName = _json["binLogFileName"]; - } - if (_json.containsKey("binLogPosition")) { - binLogPosition = _json["binLogPosition"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (binLogFileName != null) { - _json["binLogFileName"] = binLogFileName; - } - if (binLogPosition != null) { - _json["binLogPosition"] = binLogPosition; - } - if (kind != null) { - _json["kind"] = kind; - } - return _json; - } -} - -/// Database instance clone context. -class CloneContext { - /// Binary log coordinates, if specified, indentify the position up to which - /// the source instance should be cloned. If not specified, the source - /// instance is cloned up to the most recent binary log coordinates. - BinLogCoordinates binLogCoordinates; - - /// Name of the Cloud SQL instance to be created as a clone. - core.String destinationInstanceName; - - /// This is always sql#cloneContext. - core.String kind; - - /// The epoch timestamp, in milliseconds, of the time to which a point-in-time - /// recovery (PITR) is performed. PostgreSQL instances only. For MySQL - /// instances, use the binLogCoordinates property. - core.String pitrTimestampMs; - - /// Name of the Cloud SQL instance to be cloned. - core.String sourceInstanceName; - - CloneContext(); - - CloneContext.fromJson(core.Map _json) { - if (_json.containsKey("binLogCoordinates")) { - binLogCoordinates = - new BinLogCoordinates.fromJson(_json["binLogCoordinates"]); - } - if (_json.containsKey("destinationInstanceName")) { - destinationInstanceName = _json["destinationInstanceName"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("pitrTimestampMs")) { - pitrTimestampMs = _json["pitrTimestampMs"]; - } - if (_json.containsKey("sourceInstanceName")) { - sourceInstanceName = _json["sourceInstanceName"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (binLogCoordinates != null) { - _json["binLogCoordinates"] = (binLogCoordinates).toJson(); - } - if (destinationInstanceName != null) { - _json["destinationInstanceName"] = destinationInstanceName; - } - if (kind != null) { - _json["kind"] = kind; - } - if (pitrTimestampMs != null) { - _json["pitrTimestampMs"] = pitrTimestampMs; - } - if (sourceInstanceName != null) { - _json["sourceInstanceName"] = sourceInstanceName; - } - return _json; - } -} - -/// MySQL flags for Cloud SQL instances. -class DatabaseFlags { - /// The name of the flag. These flags are passed at instance startup, so - /// include both MySQL server options and MySQL system variables. Flags should - /// be specified with underscores, not hyphens. For more information, see - /// Configuring MySQL Flags in the Google Cloud SQL documentation, as well as - /// the official MySQL documentation for server options and system variables. - core.String name; - - /// The value of the flag. Booleans should be set to on for true and off for - /// false. This field must be omitted if the flag doesn't take a value. - core.String value; - - DatabaseFlags(); - - DatabaseFlags.fromJson(core.Map _json) { - if (_json.containsKey("name")) { - name = _json["name"]; - } - if (_json.containsKey("value")) { - value = _json["value"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (name != null) { - _json["name"] = name; - } - if (value != null) { - _json["value"] = value; - } - return _json; - } -} - -/// A Cloud SQL instance resource. -class DatabaseInstance { - /// Connection name of the Cloud SQL instance used in connection strings. - core.String connectionName; - - /// The current disk usage of the instance in bytes. - core.String currentDiskSize; - - /// The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. - /// Defaults to MYSQL_5_5. The databaseVersion cannot be changed after - /// instance creation. - core.String databaseVersion; - - /// HTTP 1.1 Entity tag for the resource. - core.String etag; - - /// Name of the Cloud SQL instance. This does not include the project ID. - core.String instance; - - /// The instance type. This can be one of the following. - /// CLOUD_SQL_INSTANCE: Regular Cloud SQL instance. - /// READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica. - core.String instanceType; - - /// The assigned IP addresses for the instance. - core.List<IpMapping> ipAddresses; - - /// The IPv6 address assigned to the instance. - core.String ipv6Address; - - /// This is always sql#instance. - core.String kind; - - /// The name of the instance which will act as master in the replication - /// setup. - core.String masterInstanceName; - - /// The maximum disk size of the instance in bytes. - core.String maxDiskSize; - - /// The project ID of the project containing the Cloud SQL instance. The - /// Google apps domain is prefixed if applicable. - core.String project; - - /// The geographical region. Can be us-central, asia-east1 or europe-west1. - /// Defaults to us-central. The region can not be changed after instance - /// creation. - core.String region; - - /// The replicas of the instance. - core.List<core.String> replicaNames; - - /// SSL configuration. - SslCert serverCaCert; - - /// The service account email address assigned to the instance. - core.String serviceAccountEmailAddress; - - /// The user settings. - Settings settings; - - /// The current serving state of the Cloud SQL instance. This can be one of - /// the following. - /// RUNNABLE: The instance is running, or is ready to run when accessed. - /// SUSPENDED: The instance is not available, for example due to problems with - /// billing. - /// PENDING_CREATE: The instance is being created. - /// MAINTENANCE: The instance is down for maintenance. - /// UNKNOWN_STATE: The state of the instance is unknown. - core.String state; - - DatabaseInstance(); - - DatabaseInstance.fromJson(core.Map _json) { - if (_json.containsKey("connectionName")) { - connectionName = _json["connectionName"]; - } - if (_json.containsKey("currentDiskSize")) { - currentDiskSize = _json["currentDiskSize"]; - } - if (_json.containsKey("databaseVersion")) { - databaseVersion = _json["databaseVersion"]; - } - if (_json.containsKey("etag")) { - etag = _json["etag"]; - } - if (_json.containsKey("instance")) { - instance = _json["instance"]; - } - if (_json.containsKey("instanceType")) { - instanceType = _json["instanceType"]; - } - if (_json.containsKey("ipAddresses")) { - ipAddresses = (_json["ipAddresses"] as core.List) - .map<IpMapping>((value) => new IpMapping.fromJson(value)) - .toList(); - } - if (_json.containsKey("ipv6Address")) { - ipv6Address = _json["ipv6Address"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("masterInstanceName")) { - masterInstanceName = _json["masterInstanceName"]; - } - if (_json.containsKey("maxDiskSize")) { - maxDiskSize = _json["maxDiskSize"]; - } - if (_json.containsKey("project")) { - project = _json["project"]; - } - if (_json.containsKey("region")) { - region = _json["region"]; - } - if (_json.containsKey("replicaNames")) { - replicaNames = (_json["replicaNames"] as core.List).cast<core.String>(); - } - if (_json.containsKey("serverCaCert")) { - serverCaCert = new SslCert.fromJson(_json["serverCaCert"]); - } - if (_json.containsKey("serviceAccountEmailAddress")) { - serviceAccountEmailAddress = _json["serviceAccountEmailAddress"]; - } - if (_json.containsKey("settings")) { - settings = new Settings.fromJson(_json["settings"]); - } - if (_json.containsKey("state")) { - state = _json["state"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (connectionName != null) { - _json["connectionName"] = connectionName; - } - if (currentDiskSize != null) { - _json["currentDiskSize"] = currentDiskSize; - } - if (databaseVersion != null) { - _json["databaseVersion"] = databaseVersion; - } - if (etag != null) { - _json["etag"] = etag; - } - if (instance != null) { - _json["instance"] = instance; - } - if (instanceType != null) { - _json["instanceType"] = instanceType; - } - if (ipAddresses != null) { - _json["ipAddresses"] = - ipAddresses.map((value) => (value).toJson()).toList(); - } - if (ipv6Address != null) { - _json["ipv6Address"] = ipv6Address; - } - if (kind != null) { - _json["kind"] = kind; - } - if (masterInstanceName != null) { - _json["masterInstanceName"] = masterInstanceName; - } - if (maxDiskSize != null) { - _json["maxDiskSize"] = maxDiskSize; - } - if (project != null) { - _json["project"] = project; - } - if (region != null) { - _json["region"] = region; - } - if (replicaNames != null) { - _json["replicaNames"] = replicaNames; - } - if (serverCaCert != null) { - _json["serverCaCert"] = (serverCaCert).toJson(); - } - if (serviceAccountEmailAddress != null) { - _json["serviceAccountEmailAddress"] = serviceAccountEmailAddress; - } - if (settings != null) { - _json["settings"] = (settings).toJson(); - } - if (state != null) { - _json["state"] = state; - } - return _json; - } -} - -/// Database instance export context. -class ExportContext { - /// Databases (for example, guestbook) from which the export is made. If - /// unspecified, all databases are exported. - core.List<core.String> database; - - /// This is always sql#exportContext. - core.String kind; - - /// Tables to export, or that were exported, from the specified database. If - /// you specify tables, specify one and only one database. - core.List<core.String> table; - - /// The path to the file in Google Cloud Storage where the export will be - /// stored, or where it was already stored. The URI is in the form - /// gs://bucketName/fileName. If the file already exists, the operation fails. - /// If the filename ends with .gz, the contents are compressed. - core.String uri; - - ExportContext(); - - ExportContext.fromJson(core.Map _json) { - if (_json.containsKey("database")) { - database = (_json["database"] as core.List).cast<core.String>(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("table")) { - table = (_json["table"] as core.List).cast<core.String>(); - } - if (_json.containsKey("uri")) { - uri = _json["uri"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (database != null) { - _json["database"] = database; - } - if (kind != null) { - _json["kind"] = kind; - } - if (table != null) { - _json["table"] = table; - } - if (uri != null) { - _json["uri"] = uri; - } - return _json; - } -} - -/// A Google Cloud SQL service flag resource. -class Flag { - /// For STRING flags, a list of strings that the value can be set to. - core.List<core.String> allowedStringValues; - - /// The database version this flag applies to. Currently this can only be - /// [MYSQL_5_5]. - core.List<core.String> appliesTo; - - /// This is always sql#flag. - core.String kind; - - /// For INTEGER flags, the maximum allowed value. - core.String maxValue; - - /// For INTEGER flags, the minimum allowed value. - core.String minValue; - - /// This is the name of the flag. Flag names always use underscores, not - /// hyphens, e.g. max_allowed_packet - core.String name; - - /// The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or - /// NONE. NONE is used for flags which do not take a value, such as - /// skip_grant_tables. - core.String type; - - Flag(); - - Flag.fromJson(core.Map _json) { - if (_json.containsKey("allowedStringValues")) { - allowedStringValues = - (_json["allowedStringValues"] as core.List).cast<core.String>(); - } - if (_json.containsKey("appliesTo")) { - appliesTo = (_json["appliesTo"] as core.List).cast<core.String>(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("maxValue")) { - maxValue = _json["maxValue"]; - } - if (_json.containsKey("minValue")) { - minValue = _json["minValue"]; - } - if (_json.containsKey("name")) { - name = _json["name"]; - } - if (_json.containsKey("type")) { - type = _json["type"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (allowedStringValues != null) { - _json["allowedStringValues"] = allowedStringValues; - } - if (appliesTo != null) { - _json["appliesTo"] = appliesTo; - } - if (kind != null) { - _json["kind"] = kind; - } - if (maxValue != null) { - _json["maxValue"] = maxValue; - } - if (minValue != null) { - _json["minValue"] = minValue; - } - if (name != null) { - _json["name"] = name; - } - if (type != null) { - _json["type"] = type; - } - return _json; - } -} - -/// Flags list response. -class FlagsListResponse { - /// List of flags. - core.List<Flag> items; - - /// This is always sql#flagsList. - core.String kind; - - FlagsListResponse(); - - FlagsListResponse.fromJson(core.Map _json) { - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<Flag>((value) => new Flag.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - return _json; - } -} - -/// Database instance import context. -class ImportContext { - /// The database (for example, guestbook) to which the import is made. If not - /// set, it is assumed that the database is specified in the file to be - /// imported. - core.String database; - - /// This is always sql#importContext. - core.String kind; - - /// A path to the MySQL dump file in Google Cloud Storage from which the - /// import is made. The URI is in the form gs://bucketName/fileName. - /// Compressed gzip files (.gz) are also supported. - core.List<core.String> uri; - - ImportContext(); - - ImportContext.fromJson(core.Map _json) { - if (_json.containsKey("database")) { - database = _json["database"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("uri")) { - uri = (_json["uri"] as core.List).cast<core.String>(); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (database != null) { - _json["database"] = database; - } - if (kind != null) { - _json["kind"] = kind; - } - if (uri != null) { - _json["uri"] = uri; - } - return _json; - } -} - -/// An Operations resource contains information about database instance -/// operations such as create, delete, and restart. Operations resources are -/// created in response to operations that were initiated; you never create them -/// directly. -class InstanceOperation { - /// The time this operation finished in UTC timezone in RFC 3339 format, for - /// example 2012-11-15T16:19:00.094Z. - core.DateTime endTime; - - /// The time this operation was enqueued in UTC timezone in RFC 3339 format, - /// for example 2012-11-15T16:19:00.094Z. - core.DateTime enqueuedTime; - - /// The error(s) encountered by this operation. Only set if the operation - /// results in an error. - core.List<OperationError> error; - - /// The context for export operation, if applicable. - ExportContext exportContext; - - /// The context for import operation, if applicable. - ImportContext importContext; - - /// Name of the database instance. - core.String instance; - - /// This is always sql#instanceOperation. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - /// The type of the operation. Valid values are CREATE, DELETE, UPDATE, - /// RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME. - core.String operationType; - - /// The time this operation actually started in UTC timezone in RFC 3339 - /// format, for example 2012-11-15T16:19:00.094Z. - core.DateTime startTime; - - /// The state of an operation. Valid values are PENDING, RUNNING, DONE, - /// UNKNOWN. - core.String state; - - /// The email address of the user who initiated this operation. - core.String userEmailAddress; - - InstanceOperation(); - - InstanceOperation.fromJson(core.Map _json) { - if (_json.containsKey("endTime")) { - endTime = core.DateTime.parse(_json["endTime"]); - } - if (_json.containsKey("enqueuedTime")) { - enqueuedTime = core.DateTime.parse(_json["enqueuedTime"]); - } - if (_json.containsKey("error")) { - error = (_json["error"] as core.List) - .map<OperationError>((value) => new OperationError.fromJson(value)) - .toList(); - } - if (_json.containsKey("exportContext")) { - exportContext = new ExportContext.fromJson(_json["exportContext"]); - } - if (_json.containsKey("importContext")) { - importContext = new ImportContext.fromJson(_json["importContext"]); - } - if (_json.containsKey("instance")) { - instance = _json["instance"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - if (_json.containsKey("operationType")) { - operationType = _json["operationType"]; - } - if (_json.containsKey("startTime")) { - startTime = core.DateTime.parse(_json["startTime"]); - } - if (_json.containsKey("state")) { - state = _json["state"]; - } - if (_json.containsKey("userEmailAddress")) { - userEmailAddress = _json["userEmailAddress"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (endTime != null) { - _json["endTime"] = (endTime).toIso8601String(); - } - if (enqueuedTime != null) { - _json["enqueuedTime"] = (enqueuedTime).toIso8601String(); - } - if (error != null) { - _json["error"] = error.map((value) => (value).toJson()).toList(); - } - if (exportContext != null) { - _json["exportContext"] = (exportContext).toJson(); - } - if (importContext != null) { - _json["importContext"] = (importContext).toJson(); - } - if (instance != null) { - _json["instance"] = instance; - } - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - if (operationType != null) { - _json["operationType"] = operationType; - } - if (startTime != null) { - _json["startTime"] = (startTime).toIso8601String(); - } - if (state != null) { - _json["state"] = state; - } - if (userEmailAddress != null) { - _json["userEmailAddress"] = userEmailAddress; - } - return _json; - } -} - -/// Database instance set root password request. -class InstanceSetRootPasswordRequest { - /// Set Root Password Context. - SetRootPasswordContext setRootPasswordContext; - - InstanceSetRootPasswordRequest(); - - InstanceSetRootPasswordRequest.fromJson(core.Map _json) { - if (_json.containsKey("setRootPasswordContext")) { - setRootPasswordContext = - new SetRootPasswordContext.fromJson(_json["setRootPasswordContext"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (setRootPasswordContext != null) { - _json["setRootPasswordContext"] = (setRootPasswordContext).toJson(); - } - return _json; - } -} - -/// Database instance clone request. -class InstancesCloneRequest { - /// Contains details about the clone operation. - CloneContext cloneContext; - - InstancesCloneRequest(); - - InstancesCloneRequest.fromJson(core.Map _json) { - if (_json.containsKey("cloneContext")) { - cloneContext = new CloneContext.fromJson(_json["cloneContext"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (cloneContext != null) { - _json["cloneContext"] = (cloneContext).toJson(); - } - return _json; - } -} - -/// Database instance clone response. -class InstancesCloneResponse { - /// This is always sql#instancesClone. - core.String kind; - - /// An unique identifier for the operation associated with the cloned - /// instance. You can use this identifier to retrieve the Operations resource, - /// which has information about the operation. - core.String operation; - - InstancesCloneResponse(); - - InstancesCloneResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance delete response. -class InstancesDeleteResponse { - /// This is always sql#instancesDelete. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - InstancesDeleteResponse(); - - InstancesDeleteResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance export request. -class InstancesExportRequest { - /// Contains details about the export operation. - ExportContext exportContext; - - InstancesExportRequest(); - - InstancesExportRequest.fromJson(core.Map _json) { - if (_json.containsKey("exportContext")) { - exportContext = new ExportContext.fromJson(_json["exportContext"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (exportContext != null) { - _json["exportContext"] = (exportContext).toJson(); - } - return _json; - } -} - -/// Database instance export response. -class InstancesExportResponse { - /// This is always sql#instancesExport. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - InstancesExportResponse(); - - InstancesExportResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance import request. -class InstancesImportRequest { - /// Contains details about the import operation. - ImportContext importContext; - - InstancesImportRequest(); - - InstancesImportRequest.fromJson(core.Map _json) { - if (_json.containsKey("importContext")) { - importContext = new ImportContext.fromJson(_json["importContext"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (importContext != null) { - _json["importContext"] = (importContext).toJson(); - } - return _json; - } -} - -/// Database instance import response. -class InstancesImportResponse { - /// This is always sql#instancesImport. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - InstancesImportResponse(); - - InstancesImportResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance insert response. -class InstancesInsertResponse { - /// This is always sql#instancesInsert. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - InstancesInsertResponse(); - - InstancesInsertResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instances list response. -class InstancesListResponse { - /// List of database instance resources. - core.List<DatabaseInstance> items; - - /// This is always sql#instancesList. - core.String kind; - - /// The continuation token, used to page through large result sets. Provide - /// this value in a subsequent request to return the next page of results. - core.String nextPageToken; - - InstancesListResponse(); - - InstancesListResponse.fromJson(core.Map _json) { - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<DatabaseInstance>( - (value) => new DatabaseInstance.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("nextPageToken")) { - nextPageToken = _json["nextPageToken"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - if (nextPageToken != null) { - _json["nextPageToken"] = nextPageToken; - } - return _json; - } -} - -/// Database promote read replica response. -class InstancesPromoteReplicaResponse { - /// This is always sql#instancesPromoteReplica. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - InstancesPromoteReplicaResponse(); - - InstancesPromoteReplicaResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance resetSslConfig response. -class InstancesResetSslConfigResponse { - /// This is always sql#instancesResetSslConfig. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. All ssl client certificates will be deleted and a new - /// server certificate will be created. Does not take effect until the next - /// instance restart. - core.String operation; - - InstancesResetSslConfigResponse(); - - InstancesResetSslConfigResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance restart response. -class InstancesRestartResponse { - /// This is always sql#instancesRestart. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - InstancesRestartResponse(); - - InstancesRestartResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance restore backup response. -class InstancesRestoreBackupResponse { - /// This is always sql#instancesRestoreBackup. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - InstancesRestoreBackupResponse(); - - InstancesRestoreBackupResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance set root password response. -class InstancesSetRootPasswordResponse { - /// This is always sql#instancesSetRootPassword. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - InstancesSetRootPasswordResponse(); - - InstancesSetRootPasswordResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// Database instance update response. -class InstancesUpdateResponse { - /// This is always sql#instancesUpdate. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve information about the operation. - core.String operation; - - InstancesUpdateResponse(); - - InstancesUpdateResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// IP Management configuration. -class IpConfiguration { - /// The list of external networks that are allowed to connect to the instance - /// using the IP. In CIDR notation, also known as 'slash' notation (e.g. - /// 192.168.100.0/24). - core.List<core.String> authorizedNetworks; - - /// Whether the instance should be assigned an IP address or not. - core.bool enabled; - - /// This is always sql#ipConfiguration. - core.String kind; - - /// Whether SSL connections over IP should be enforced or not. - core.bool requireSsl; - - IpConfiguration(); - - IpConfiguration.fromJson(core.Map _json) { - if (_json.containsKey("authorizedNetworks")) { - authorizedNetworks = - (_json["authorizedNetworks"] as core.List).cast<core.String>(); - } - if (_json.containsKey("enabled")) { - enabled = _json["enabled"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("requireSsl")) { - requireSsl = _json["requireSsl"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (authorizedNetworks != null) { - _json["authorizedNetworks"] = authorizedNetworks; - } - if (enabled != null) { - _json["enabled"] = enabled; - } - if (kind != null) { - _json["kind"] = kind; - } - if (requireSsl != null) { - _json["requireSsl"] = requireSsl; - } - return _json; - } -} - -/// Database instance IP Mapping. -class IpMapping { - /// The IP address assigned. - core.String ipAddress; - - /// The due time for this IP to be retired in RFC 3339 format, for example - /// 2012-11-15T16:19:00.094Z. This field is only available when the IP is - /// scheduled to be retired. - core.DateTime timeToRetire; - - IpMapping(); - - IpMapping.fromJson(core.Map _json) { - if (_json.containsKey("ipAddress")) { - ipAddress = _json["ipAddress"]; - } - if (_json.containsKey("timeToRetire")) { - timeToRetire = core.DateTime.parse(_json["timeToRetire"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (ipAddress != null) { - _json["ipAddress"] = ipAddress; - } - if (timeToRetire != null) { - _json["timeToRetire"] = (timeToRetire).toIso8601String(); - } - return _json; - } -} - -/// Preferred location. This specifies where a Cloud SQL instance should -/// preferably be located, either in a specific Compute Engine zone, or -/// co-located with an App Engine application. Note that if the preferred -/// location is not available, the instance will be located as close as possible -/// within the region. Only one location may be specified. -class LocationPreference { - /// The App Engine application to follow, it must be in the same region as the - /// Cloud SQL instance. - core.String followGaeApplication; - - /// This is always sql#locationPreference. - core.String kind; - - /// The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, - /// etc.). - core.String zone; - - LocationPreference(); - - LocationPreference.fromJson(core.Map _json) { - if (_json.containsKey("followGaeApplication")) { - followGaeApplication = _json["followGaeApplication"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("zone")) { - zone = _json["zone"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (followGaeApplication != null) { - _json["followGaeApplication"] = followGaeApplication; - } - if (kind != null) { - _json["kind"] = kind; - } - if (zone != null) { - _json["zone"] = zone; - } - return _json; - } -} - -/// Database instance operation error. -class OperationError { - /// Identifies the specific error that occurred. - core.String code; - - /// This is always sql#operationError. - core.String kind; - - OperationError(); - - OperationError.fromJson(core.Map _json) { - if (_json.containsKey("code")) { - code = _json["code"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (code != null) { - _json["code"] = code; - } - if (kind != null) { - _json["kind"] = kind; - } - return _json; - } -} - -/// Database instance list operations response. -class OperationsListResponse { - /// List of operation resources. - core.List<InstanceOperation> items; - - /// This is always sql#operationsList. - core.String kind; - - /// The continuation token, used to page through large result sets. Provide - /// this value in a subsequent request to return the next page of results. - core.String nextPageToken; - - OperationsListResponse(); - - OperationsListResponse.fromJson(core.Map _json) { - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<InstanceOperation>( - (value) => new InstanceOperation.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("nextPageToken")) { - nextPageToken = _json["nextPageToken"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - if (nextPageToken != null) { - _json["nextPageToken"] = nextPageToken; - } - return _json; - } -} - -/// Database instance set root password context. -class SetRootPasswordContext { - /// This is always sql#setRootUserContext. - core.String kind; - - /// The password for the root user. - core.String password; - - SetRootPasswordContext(); - - SetRootPasswordContext.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("password")) { - password = _json["password"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (password != null) { - _json["password"] = password; - } - return _json; - } -} - -/// Database instance settings. -class Settings { - /// The activation policy for this instance. This specifies when the instance - /// should be activated and is applicable only when the instance state is - /// RUNNABLE. This can be one of the following. - /// ALWAYS: The instance should always be active. - /// NEVER: The instance should never be activated. - /// ON_DEMAND: The instance is activated upon receiving requests. - core.String activationPolicy; - - /// The App Engine app IDs that can access this instance. - core.List<core.String> authorizedGaeApplications; - - /// The daily backup configuration for the instance. - core.List<BackupConfiguration> backupConfiguration; - - /// The database flags passed to the instance at startup. - core.List<DatabaseFlags> databaseFlags; - - /// Configuration specific to read replica instance. Indicates whether - /// replication is enabled or not. - core.bool databaseReplicationEnabled; - - /// The settings for IP Management. This allows to enable or disable the - /// instance IP and manage which external networks can connect to the - /// instance. - IpConfiguration ipConfiguration; - - /// This is always sql#settings. - core.String kind; - - /// The location preference settings. This allows the instance to be located - /// as near as possible to either an App Engine app or GCE zone for better - /// performance. - LocationPreference locationPreference; - - /// The pricing plan for this instance. This can be either PER_USE or PACKAGE. - core.String pricingPlan; - - /// The type of replication this instance uses. This can be either - /// ASYNCHRONOUS or SYNCHRONOUS. - core.String replicationType; - - /// The version of instance settings. This is a required field for update - /// method to make sure concurrent updates are handled properly. During - /// update, use the most recent settingsVersion value for this instance and do - /// not try to update this value. - core.String settingsVersion; - - /// The tier of service for this instance, for example D1, D2. For more - /// information, see pricing. - core.String tier; - - Settings(); - - Settings.fromJson(core.Map _json) { - if (_json.containsKey("activationPolicy")) { - activationPolicy = _json["activationPolicy"]; - } - if (_json.containsKey("authorizedGaeApplications")) { - authorizedGaeApplications = - (_json["authorizedGaeApplications"] as core.List).cast<core.String>(); - } - if (_json.containsKey("backupConfiguration")) { - backupConfiguration = (_json["backupConfiguration"] as core.List) - .map<BackupConfiguration>( - (value) => new BackupConfiguration.fromJson(value)) - .toList(); - } - if (_json.containsKey("databaseFlags")) { - databaseFlags = (_json["databaseFlags"] as core.List) - .map<DatabaseFlags>((value) => new DatabaseFlags.fromJson(value)) - .toList(); - } - if (_json.containsKey("databaseReplicationEnabled")) { - databaseReplicationEnabled = _json["databaseReplicationEnabled"]; - } - if (_json.containsKey("ipConfiguration")) { - ipConfiguration = new IpConfiguration.fromJson(_json["ipConfiguration"]); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("locationPreference")) { - locationPreference = - new LocationPreference.fromJson(_json["locationPreference"]); - } - if (_json.containsKey("pricingPlan")) { - pricingPlan = _json["pricingPlan"]; - } - if (_json.containsKey("replicationType")) { - replicationType = _json["replicationType"]; - } - if (_json.containsKey("settingsVersion")) { - settingsVersion = _json["settingsVersion"]; - } - if (_json.containsKey("tier")) { - tier = _json["tier"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (activationPolicy != null) { - _json["activationPolicy"] = activationPolicy; - } - if (authorizedGaeApplications != null) { - _json["authorizedGaeApplications"] = authorizedGaeApplications; - } - if (backupConfiguration != null) { - _json["backupConfiguration"] = - backupConfiguration.map((value) => (value).toJson()).toList(); - } - if (databaseFlags != null) { - _json["databaseFlags"] = - databaseFlags.map((value) => (value).toJson()).toList(); - } - if (databaseReplicationEnabled != null) { - _json["databaseReplicationEnabled"] = databaseReplicationEnabled; - } - if (ipConfiguration != null) { - _json["ipConfiguration"] = (ipConfiguration).toJson(); - } - if (kind != null) { - _json["kind"] = kind; - } - if (locationPreference != null) { - _json["locationPreference"] = (locationPreference).toJson(); - } - if (pricingPlan != null) { - _json["pricingPlan"] = pricingPlan; - } - if (replicationType != null) { - _json["replicationType"] = replicationType; - } - if (settingsVersion != null) { - _json["settingsVersion"] = settingsVersion; - } - if (tier != null) { - _json["tier"] = tier; - } - return _json; - } -} - -/// SslCerts Resource -class SslCert { - /// PEM representation. - core.String cert; - - /// Serial number, as extracted from the certificate. - core.String certSerialNumber; - - /// User supplied name. Constrained to [a-zA-Z.-_ ]+. - core.String commonName; - - /// Time when the certificate was created. - core.DateTime createTime; - - /// Time when the certificate expires. - core.DateTime expirationTime; - - /// Name of the database instance. - core.String instance; - - /// This is always sql#sslCert. - core.String kind; - - /// Sha1 Fingerprint. - core.String sha1Fingerprint; - - SslCert(); - - SslCert.fromJson(core.Map _json) { - if (_json.containsKey("cert")) { - cert = _json["cert"]; - } - if (_json.containsKey("certSerialNumber")) { - certSerialNumber = _json["certSerialNumber"]; - } - if (_json.containsKey("commonName")) { - commonName = _json["commonName"]; - } - if (_json.containsKey("createTime")) { - createTime = core.DateTime.parse(_json["createTime"]); - } - if (_json.containsKey("expirationTime")) { - expirationTime = core.DateTime.parse(_json["expirationTime"]); - } - if (_json.containsKey("instance")) { - instance = _json["instance"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("sha1Fingerprint")) { - sha1Fingerprint = _json["sha1Fingerprint"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (cert != null) { - _json["cert"] = cert; - } - if (certSerialNumber != null) { - _json["certSerialNumber"] = certSerialNumber; - } - if (commonName != null) { - _json["commonName"] = commonName; - } - if (createTime != null) { - _json["createTime"] = (createTime).toIso8601String(); - } - if (expirationTime != null) { - _json["expirationTime"] = (expirationTime).toIso8601String(); - } - if (instance != null) { - _json["instance"] = instance; - } - if (kind != null) { - _json["kind"] = kind; - } - if (sha1Fingerprint != null) { - _json["sha1Fingerprint"] = sha1Fingerprint; - } - return _json; - } -} - -/// SslCertDetail. -class SslCertDetail { - /// The public information about the cert. - SslCert certInfo; - - /// The private key for the client cert, in pem format. Keep private in order - /// to protect your security. - core.String certPrivateKey; - - SslCertDetail(); - - SslCertDetail.fromJson(core.Map _json) { - if (_json.containsKey("certInfo")) { - certInfo = new SslCert.fromJson(_json["certInfo"]); - } - if (_json.containsKey("certPrivateKey")) { - certPrivateKey = _json["certPrivateKey"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (certInfo != null) { - _json["certInfo"] = (certInfo).toJson(); - } - if (certPrivateKey != null) { - _json["certPrivateKey"] = certPrivateKey; - } - return _json; - } -} - -/// SslCert delete response. -class SslCertsDeleteResponse { - /// This is always sql#sslCertsDelete. - core.String kind; - - /// An identifier that uniquely identifies the operation. You can use this - /// identifier to retrieve the Operations resource that has information about - /// the operation. - core.String operation; - - SslCertsDeleteResponse(); - - SslCertsDeleteResponse.fromJson(core.Map _json) { - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("operation")) { - operation = _json["operation"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (kind != null) { - _json["kind"] = kind; - } - if (operation != null) { - _json["operation"] = operation; - } - return _json; - } -} - -/// SslCerts insert request. -class SslCertsInsertRequest { - /// User supplied name. Must be a distinct name from the other certificates - /// for this instance. New certificates will not be usable until the instance - /// is restarted. - core.String commonName; - - SslCertsInsertRequest(); - - SslCertsInsertRequest.fromJson(core.Map _json) { - if (_json.containsKey("commonName")) { - commonName = _json["commonName"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (commonName != null) { - _json["commonName"] = commonName; - } - return _json; - } -} - -/// SslCert insert response. -class SslCertsInsertResponse { - /// The new client certificate and private key. The new certificate will not - /// work until the instance is restarted. - SslCertDetail clientCert; - - /// This is always sql#sslCertsInsert. - core.String kind; - - /// The server Certificate Authority's certificate. If this is missing you can - /// force a new one to be generated by calling resetSslConfig method on - /// instances resource.. - SslCert serverCaCert; - - SslCertsInsertResponse(); - - SslCertsInsertResponse.fromJson(core.Map _json) { - if (_json.containsKey("clientCert")) { - clientCert = new SslCertDetail.fromJson(_json["clientCert"]); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("serverCaCert")) { - serverCaCert = new SslCert.fromJson(_json["serverCaCert"]); - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (clientCert != null) { - _json["clientCert"] = (clientCert).toJson(); - } - if (kind != null) { - _json["kind"] = kind; - } - if (serverCaCert != null) { - _json["serverCaCert"] = (serverCaCert).toJson(); - } - return _json; - } -} - -/// SslCerts list response. -class SslCertsListResponse { - /// List of client certificates for the instance. - core.List<SslCert> items; - - /// This is always sql#sslCertsList. - core.String kind; - - SslCertsListResponse(); - - SslCertsListResponse.fromJson(core.Map _json) { - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<SslCert>((value) => new SslCert.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - return _json; - } -} - -/// A Google Cloud SQL service tier resource. -class Tier { - /// The maximum disk size of this tier in bytes. - core.String DiskQuota; - - /// The maximum RAM usage of this tier in bytes. - core.String RAM; - - /// This is always sql#tier. - core.String kind; - - /// The applicable regions for this tier. - core.List<core.String> region; - - /// An identifier for the service tier, for example D1, D2 etc. For related - /// information, see Pricing. - core.String tier; - - Tier(); - - Tier.fromJson(core.Map _json) { - if (_json.containsKey("DiskQuota")) { - DiskQuota = _json["DiskQuota"]; - } - if (_json.containsKey("RAM")) { - RAM = _json["RAM"]; - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - if (_json.containsKey("region")) { - region = (_json["region"] as core.List).cast<core.String>(); - } - if (_json.containsKey("tier")) { - tier = _json["tier"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (DiskQuota != null) { - _json["DiskQuota"] = DiskQuota; - } - if (RAM != null) { - _json["RAM"] = RAM; - } - if (kind != null) { - _json["kind"] = kind; - } - if (region != null) { - _json["region"] = region; - } - if (tier != null) { - _json["tier"] = tier; - } - return _json; - } -} - -/// Tiers list response. -class TiersListResponse { - /// List of tiers. - core.List<Tier> items; - - /// This is always sql#tiersList. - core.String kind; - - TiersListResponse(); - - TiersListResponse.fromJson(core.Map _json) { - if (_json.containsKey("items")) { - items = (_json["items"] as core.List) - .map<Tier>((value) => new Tier.fromJson(value)) - .toList(); - } - if (_json.containsKey("kind")) { - kind = _json["kind"]; - } - } - - core.Map<core.String, core.Object> toJson() { - final core.Map<core.String, core.Object> _json = - new core.Map<core.String, core.Object>(); - if (items != null) { - _json["items"] = items.map((value) => (value).toJson()).toList(); - } - if (kind != null) { - _json["kind"] = kind; - } - return _json; - } -}
diff --git a/generated/googleapis_beta/lib/sqladmin/v1beta4.dart b/generated/googleapis_beta/lib/sqladmin/v1beta4.dart index baf1993..fd1317b 100644 --- a/generated/googleapis_beta/lib/sqladmin/v1beta4.dart +++ b/generated/googleapis_beta/lib/sqladmin/v1beta4.dart
@@ -16,8 +16,8 @@ const core.String USER_AGENT = 'dart-api-client sqladmin/v1beta4'; -/// Cloud SQL provides the Cloud SQL Admin API, a REST API for administering -/// your instances programmatically. +/// Creates and manages Cloud SQL instances, which provide fully managed MySQL +/// or PostgreSQL databases. class SqladminApi { /// View and manage your data across Google Cloud Platform services static const CloudPlatformScope = @@ -229,7 +229,7 @@ } /// Lists all backup runs associated with a given instance and configuration - /// in the reverse chronological order of the enqueued time. + /// in the reverse chronological order of the backup initiation time. /// /// Request parameters: /// @@ -670,8 +670,9 @@ /// /// Request parameters: /// - /// [databaseVersion] - Database version for flag retrieval. Flags are - /// specific to the database version. + /// [databaseVersion] - Database type and version you want to retrieve flags + /// for. By default, this method returns flags for all database types and + /// versions. /// /// [$fields] - Selector specifying which fields to include in a partial /// response. @@ -2567,10 +2568,10 @@ /// /// [instance] - Database instance ID. This does not include the project ID. /// - /// [host] - Host of the user in the instance. - /// /// [name] - Name of the user in the instance. /// + /// [host] - Host of the user in the instance. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -2581,9 +2582,9 @@ /// /// 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> update(User request, core.String project, - core.String instance, core.String host, core.String name, - {core.String $fields}) { + async.Future<Operation> update( + User request, core.String project, core.String instance, core.String name, + {core.String host, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -2600,14 +2601,13 @@ if (instance == null) { throw new core.ArgumentError("Parameter instance is required."); } - if (host == null) { - throw new core.ArgumentError("Parameter host is required."); - } - _queryParams["host"] = [host]; if (name == null) { throw new core.ArgumentError("Parameter name is required."); } _queryParams["name"] = [name]; + if (host != null) { + _queryParams["host"] = [host]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -2679,6 +2679,38 @@ } } +/// An Admin API warning message. +class ApiWarning { + /// Code to uniquely identify the warning type. + core.String code; + + /// The warning message. + core.String message; + + ApiWarning(); + + ApiWarning.fromJson(core.Map _json) { + if (_json.containsKey("code")) { + code = _json["code"]; + } + if (_json.containsKey("message")) { + message = _json["message"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (code != null) { + _json["code"] = code; + } + if (message != null) { + _json["message"] = message; + } + return _json; + } +} + /// Database instance backup configuration. class BackupConfiguration { /// Whether binary log is enabled. If backup configuration is disabled, binary @@ -2740,7 +2772,7 @@ } } -/// A database instance backup run resource. +/// A BackupRun resource. class BackupRun { /// The description of this run, only applicable to on-demand backups. core.String description; @@ -2757,8 +2789,8 @@ /// the run has the FAILED status. OperationError error; - /// A unique identifier for this backup run. Note that this is unique only - /// within the scope of a particular Cloud SQL instance. + /// The identifier for this backup run. Unique only for a specific Cloud SQL + /// instance. core.String id; /// Name of the database instance. @@ -3006,7 +3038,7 @@ } } -/// A database resource inside a Cloud SQL instance. +/// Represents a SQL database on the Cloud SQL instance. class Database { /// The MySQL charset value. core.String charset; @@ -3014,7 +3046,8 @@ /// The MySQL collation value. core.String collation; - /// HTTP 1.1 Entity tag for the resource. + /// This field is deprecated and will be removed from a future version of the + /// API. core.String etag; /// The name of the Cloud SQL instance. This does not include the project ID. @@ -3094,13 +3127,12 @@ } } -/// MySQL flags for Cloud SQL instances. +/// Database flags for Cloud SQL instances. class DatabaseFlags { /// The name of the flag. These flags are passed at instance startup, so - /// include both MySQL server options and MySQL system variables. Flags should + /// include both server options and system variables for MySQL. Flags should /// be specified with underscores, not hyphens. For more information, see - /// Configuring MySQL Flags in the Google Cloud SQL documentation, as well as - /// the official MySQL documentation for server options and system variables. + /// Configuring Database Flags in the Cloud SQL documentation. core.String name; /// The value of the flag. Booleans should be set to on for true and off for @@ -3171,10 +3203,11 @@ /// A Cloud SQL instance resource. class DatabaseInstance { - /// FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed - /// container. - /// SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM. - /// EXTERNAL: A MySQL server that is not managed by Google. + /// FIRST_GEN: First Generation instance. MySQL only. + /// SECOND_GEN: Second Generation instance or PostgreSQL instance. + /// EXTERNAL: A database server that is not managed by Google. + /// This property is read-only; use the tier property in the settings object + /// to determine the database type and Second or First Generation. core.String backendType; /// Connection name of the Cloud SQL instance used in connection strings. @@ -3183,9 +3216,7 @@ /// The current disk usage of the instance in bytes. This property has been /// deprecated. Users should use the /// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - /// Monitoring API instead. Please see - /// https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ - /// for details. + /// Monitoring API instead. Please see this announcement for details. core.String currentDiskSize; /// The database engine type and version. The databaseVersion field can not be @@ -3194,7 +3225,8 @@ /// First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5 core.String databaseVersion; - /// HTTP 1.1 Entity tag for the resource. + /// This field is deprecated and will be removed from a future version of the + /// API. Use the settings.settingsVersion field instead. core.String etag; /// The name and status of the failover replica. This property is applicable @@ -3248,8 +3280,7 @@ /// after instance creation. core.String region; - /// Configuration specific to read-replicas replicating from on-premises - /// masters. + /// Configuration specific to failover replicas and read replicas. ReplicaConfiguration replicaConfiguration; /// The replicas of the instance. @@ -3678,8 +3709,37 @@ } } +/// Options for exporting from MySQL. +class ExportContextSqlExportOptionsMysqlExportOptions { + /// Option to include SQL statement required to set up replication. If set to + /// 1, the dump file includes a CHANGE MASTER TO statement with the binary log + /// coordinates. If set to 2, the CHANGE MASTER TO statement is written as a + /// SQL comment, and has no effect. All other values are ignored. + core.int masterData; + + ExportContextSqlExportOptionsMysqlExportOptions(); + + ExportContextSqlExportOptionsMysqlExportOptions.fromJson(core.Map _json) { + if (_json.containsKey("masterData")) { + masterData = _json["masterData"]; + } + } + + core.Map<core.String, core.Object> toJson() { + final core.Map<core.String, core.Object> _json = + new core.Map<core.String, core.Object>(); + if (masterData != null) { + _json["masterData"] = masterData; + } + return _json; + } +} + /// Options for exporting data as SQL statements. class ExportContextSqlExportOptions { + /// Options for exporting from MySQL. + ExportContextSqlExportOptionsMysqlExportOptions mysqlExportOptions; + /// Export only schemas. core.bool schemaOnly; @@ -3691,6 +3751,11 @@ ExportContextSqlExportOptions(); ExportContextSqlExportOptions.fromJson(core.Map _json) { + if (_json.containsKey("mysqlExportOptions")) { + mysqlExportOptions = + new ExportContextSqlExportOptionsMysqlExportOptions.fromJson( + _json["mysqlExportOptions"]); + } if (_json.containsKey("schemaOnly")) { schemaOnly = _json["schemaOnly"]; } @@ -3702,6 +3767,9 @@ core.Map<core.String, core.Object> toJson() { final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>(); + if (mysqlExportOptions != null) { + _json["mysqlExportOptions"] = (mysqlExportOptions).toJson(); + } if (schemaOnly != null) { _json["schemaOnly"] = schemaOnly; } @@ -3831,7 +3899,7 @@ } } -/// A Google Cloud SQL service flag resource. +/// A flag resource. class Flag { /// For STRING flags, a list of strings that the value can be set to. core.List<core.String> allowedStringValues; @@ -4202,6 +4270,9 @@ /// this value in a subsequent request to return the next page of results. core.String nextPageToken; + /// List of warnings that ocurred while handling the request. + core.List<ApiWarning> warnings; + InstancesListResponse(); InstancesListResponse.fromJson(core.Map _json) { @@ -4217,6 +4288,11 @@ if (_json.containsKey("nextPageToken")) { nextPageToken = _json["nextPageToken"]; } + if (_json.containsKey("warnings")) { + warnings = (_json["warnings"] as core.List) + .map<ApiWarning>((value) => new ApiWarning.fromJson(value)) + .toList(); + } } core.Map<core.String, core.Object> toJson() { @@ -4231,6 +4307,9 @@ if (nextPageToken != null) { _json["nextPageToken"] = nextPageToken; } + if (warnings != null) { + _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); + } return _json; } } @@ -4359,7 +4438,10 @@ /// Whether the instance should be assigned an IP address or not. core.bool ipv4Enabled; - /// Reserved for future use. + /// The resource link for the VPC network from which the Cloud SQL instance is + /// accessible for private IP. For example, + /// /projects/myProject/global/networks/default. This setting can be updated, + /// but it cannot be removed after it is set. core.String privateNetwork; /// Whether SSL connections over IP should be enforced or not. @@ -4497,7 +4579,7 @@ } /// Maintenance window. This specifies when a v2 Cloud SQL instance should -/// preferably be restarted for system maintenance puruposes. +/// preferably be restarted for system maintenance purposes. class MaintenanceWindow { /// day of week (1-7), starting on Monday. core.int day; @@ -5117,8 +5199,8 @@ /// PER_PACKAGE pricing turn off after 12 hours of inactivity. core.String activationPolicy; - /// The App Engine app IDs that can access this instance. This property is - /// only applicable to First Generation instances. + /// The App Engine app IDs that can access this instance. First Generation + /// instances only. core.List<core.String> authorizedGaeApplications; /// Availability type (PostgreSQL instances only). Potential values: @@ -5137,12 +5219,12 @@ /// only applicable to First Generation instances. core.bool crashSafeReplicationEnabled; - /// The size of data disk, in GB. The data disk size minimum is 10GB. Applies - /// only to Second Generation instances. + /// The size of data disk, in GB. The data disk size minimum is 10GB. Not used + /// for First Generation instances. core.String dataDiskSizeGb; - /// The type of data disk. Only supported for Second Generation instances. The - /// default type is PD_SSD. Applies only to Second Generation instances. + /// The type of data disk: PD_SSD (default) or PD_HDD. Not used for First + /// Generation instances. core.String dataDiskType; /// The database flags passed to the instance at startup. @@ -5168,8 +5250,8 @@ LocationPreference locationPreference; /// The maintenance window for this instance. This specifies when the instance - /// may be restarted for maintenance purposes. Applies only to Second - /// Generation instances. + /// can be restarted for maintenance purposes. Not used for First Generation + /// instances. MaintenanceWindow maintenanceWindow; /// The pricing plan for this instance. This can be either PER_USE or PACKAGE. @@ -5188,16 +5270,18 @@ core.String settingsVersion; /// Configuration to increase storage size automatically. The default value is - /// true. Applies only to Second Generation instances. + /// true. Not used for First Generation instances. core.bool storageAutoResize; /// The maximum size to which storage capacity can be automatically increased. - /// The default value is 0, which specifies that there is no limit. Applies - /// only to Second Generation instances. + /// The default value is 0, which specifies that there is no limit. Not used + /// for First Generation instances. core.String storageAutoResizeLimit; - /// The tier of service for this instance, for example D1, D2. For more - /// information, see pricing. + /// The tier (or machine type) for this instance, for example db-n1-standard-1 + /// (MySQL instances) or db-custom-1-3840 (PostgreSQL instances). For MySQL + /// instances, this property determines whether the instance is First or + /// Second Generation. For more information, see Instance Settings. core.String tier; /// User-provided labels, represented as a dictionary where each label is a @@ -5738,7 +5822,8 @@ /// A Cloud SQL user resource. class User { - /// HTTP 1.1 Entity tag for the resource. + /// This field is deprecated and will be removed from a future version of the + /// API. core.String etag; /// The host name from which the user can connect. For insert operations, host @@ -5754,7 +5839,7 @@ core.String kind; /// The name of the user in the Cloud SQL instance. Can be omitted for update - /// since it is already specified on the URL. + /// since it is already specified in the URL. core.String name; /// The password for the user.
diff --git a/generated/googleapis_beta/lib/toolresults/v1beta3.dart b/generated/googleapis_beta/lib/toolresults/v1beta3.dart index cf9b8d3..f33e617 100644 --- a/generated/googleapis_beta/lib/toolresults/v1beta3.dart +++ b/generated/googleapis_beta/lib/toolresults/v1beta3.dart
@@ -538,7 +538,7 @@ return _response.then((data) => new Execution.fromJson(data)); } - /// Lists Histories for a given Project. + /// Lists Executions for a given History. /// /// The executions are sorted by creation_time in descending order. The /// execution_id key will be used to order the executions with the same @@ -2301,10 +2301,10 @@ /// } class Any { /// A URL/resource name that uniquely identifies the type of the serialized - /// protocol buffer message. The last segment of the URL's path must represent - /// the fully qualified name of the type (as in - /// `path/google.protobuf.Duration`). The name should be in a canonical form - /// (e.g., leading "." is not accepted). + /// protocol buffer message. This string must contain at least one "/" + /// character. The last segment of the URL's path must represent the fully + /// qualified name of the type (as in `path/google.protobuf.Duration`). The + /// name should be in a canonical form (e.g., leading "." is not accepted). /// /// In practice, teams usually precompile into the binary all types that they /// expect it to use in the context of Any. However, for URLs which use the @@ -4624,16 +4624,20 @@ /// - "encounteredNonAndroidUiWidgetScreen" /// - "failedToInstall" /// - "fatalException" + /// - "inAppPurchases" /// - "incompleteRoboScriptExecution" + /// - "insufficientCoverage" /// - "iosCrash" /// - "iosException" /// - "launcherActivityNotFound" /// - "nativeCrash" /// - "nonSdkApiUsageViolation" /// - "performedGoogleLogin" + /// - "performedMonkeyActions" /// - "startActivityNotFound" /// - "unspecifiedType" /// - "unusedRoboDirective" + /// - "usedRoboDirective" core.String type; /// Warning message with additional details of the issue. Should always be a @@ -4878,16 +4882,19 @@ } } -/// A Timestamp represents a point in time independent of any time zone or -/// calendar, represented as seconds and fractions of seconds at nanosecond -/// resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian -/// Calendar which extends the Gregorian calendar backwards to year one. It is -/// encoded assuming all minutes are 60 seconds long, i.e. leap seconds are -/// "smeared" so that no leap second table is needed for interpretation. Range -/// is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -/// restricting to that range, we ensure that we can convert to and from RFC -/// 3339 date strings. See -/// [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +/// A Timestamp represents a point in time independent of any time zone or local +/// calendar, encoded as a count of seconds and fractions of seconds at +/// nanosecond resolution. The count is relative to an epoch at UTC midnight on +/// January 1, 1970, in the proleptic Gregorian calendar which extends the +/// Gregorian calendar backwards to year one. +/// +/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +/// second table is needed for interpretation, using a [24-hour linear +/// smear](https://developers.google.com/time/smear). +/// +/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +/// restricting to that range, we ensure that we can convert to and from [RFC +/// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. /// /// # Examples /// @@ -4944,13 +4951,13 @@ /// /// In JavaScript, one can convert a Date object to this format using the /// standard -/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) /// method. In Python, a standard `datetime.datetime` object can be converted to /// this format using /// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with /// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use /// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -/// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- +/// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D /// ) to obtain a formatter capable of generating timestamps in this format. class Timestamp { /// Non-negative fractions of a second at nanosecond resolution. Negative
diff --git a/generated/googleapis_beta/lib/tpu/v1alpha1.dart b/generated/googleapis_beta/lib/tpu/v1alpha1.dart index 0b12860..6824fe0 100644 --- a/generated/googleapis_beta/lib/tpu/v1alpha1.dart +++ b/generated/googleapis_beta/lib/tpu/v1alpha1.dart
@@ -107,12 +107,12 @@ /// [name] - The resource that owns the locations collection, if applicable. /// Value must have pattern "^projects/[^/]+$". /// + /// [pageSize] - The standard list page size. + /// /// [filter] - The standard list filter. /// /// [pageToken] - The standard list page token. /// - /// [pageSize] - The standard list page size. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -124,9 +124,9 @@ /// 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 filter, core.String pageToken, - core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -138,15 +138,15 @@ if (name == null) { throw new core.ArgumentError("Parameter name is required."); } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if (filter != null) { _queryParams["filter"] = [filter]; } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -222,6 +222,8 @@ /// [parent] - The parent resource name. /// Value must have pattern "^projects/[^/]+/locations/[^/]+$". /// + /// [pageSize] - The maximum number of items to return. + /// /// [filter] - List filter. /// /// [pageToken] - The next_page_token value returned from a previous List @@ -229,8 +231,6 @@ /// /// [orderBy] - Sort results. /// - /// [pageSize] - The maximum number of items to return. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -242,10 +242,10 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListAcceleratorTypesResponse> list(core.String parent, - {core.String filter, + {core.int pageSize, + core.String filter, core.String pageToken, core.String orderBy, - core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -257,6 +257,9 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if (filter != null) { _queryParams["filter"] = [filter]; } @@ -266,9 +269,6 @@ if (orderBy != null) { _queryParams["orderBy"] = [orderBy]; } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -816,12 +816,12 @@ /// [name] - The name of the operation's parent resource. /// Value must have pattern "^projects/[^/]+/locations/[^/]+$". /// + /// [pageSize] - The standard list page size. + /// /// [filter] - The standard list filter. /// /// [pageToken] - The standard list page token. /// - /// [pageSize] - The standard list page size. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -833,9 +833,9 @@ /// 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 filter, core.String pageToken, - core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -847,15 +847,15 @@ if (name == null) { throw new core.ArgumentError("Parameter name is required."); } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if (filter != null) { _queryParams["filter"] = [filter]; } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -931,6 +931,8 @@ /// [parent] - The parent resource name. /// Value must have pattern "^projects/[^/]+/locations/[^/]+$". /// + /// [pageSize] - The maximum number of items to return. + /// /// [filter] - List filter. /// /// [pageToken] - The next_page_token value returned from a previous List @@ -938,8 +940,6 @@ /// /// [orderBy] - Sort results. /// - /// [pageSize] - The maximum number of items to return. - /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -951,10 +951,10 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListTensorFlowVersionsResponse> list(core.String parent, - {core.String filter, + {core.int pageSize, + core.String filter, core.String pageToken, core.String orderBy, - core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); @@ -966,6 +966,9 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if (filter != null) { _queryParams["filter"] = [filter]; } @@ -975,9 +978,6 @@ if (orderBy != null) { _queryParams["orderBy"] = [orderBy]; } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1127,6 +1127,9 @@ /// The listed nodes. core.List<Node> nodes; + /// Locations that could not be reached. + core.List<core.String> unreachable; + ListNodesResponse(); ListNodesResponse.fromJson(core.Map _json) { @@ -1138,6 +1141,9 @@ .map<Node>((value) => new Node.fromJson(value)) .toList(); } + if (_json.containsKey("unreachable")) { + unreachable = (_json["unreachable"] as core.List).cast<core.String>(); + } } core.Map<core.String, core.Object> toJson() { @@ -1149,6 +1155,9 @@ if (nodes != null) { _json["nodes"] = nodes.map((value) => (value).toJson()).toList(); } + if (unreachable != null) { + _json["unreachable"] = unreachable; + } return _json; } } @@ -1417,6 +1426,9 @@ /// - "STARTING" : TPU node is currently starting. /// - "PREEMPTED" : TPU node has been preempted. Only applies to Preemptible /// TPU Nodes. + /// - "TERMINATED" : TPU node has been terminated due to maintenance or has + /// reached the end of + /// its life cycle (for preemptible nodes). core.String state; /// The version of Tensorflow running in the Node.
diff --git a/generated/googleapis_beta/lib/websecurityscanner/v1alpha.dart b/generated/googleapis_beta/lib/websecurityscanner/v1alpha.dart index b3024ac..1ce53a8 100644 --- a/generated/googleapis_beta/lib/websecurityscanner/v1alpha.dart +++ b/generated/googleapis_beta/lib/websecurityscanner/v1alpha.dart
@@ -16,7 +16,7 @@ const core.String USER_AGENT = 'dart-api-client websecurityscanner/v1alpha'; -/// Web Security Scanner API (under development). +/// Scans your Compute and App Engine apps for common web vulnerabilities. class WebsecurityscannerApi { /// View and manage your data across Google Cloud Platform services static const CloudPlatformScope = @@ -441,16 +441,16 @@ /// format 'projects/{projectId}/scanConfigs/{scanConfigId}'. /// Value must have pattern "^projects/[^/]+/scanConfigs/[^/]+$". /// - /// [pageSize] - The maximum number of ScanRuns to return, can be limited by - /// server. - /// If not specified or not positive, the implementation will select a - /// reasonable value. - /// /// [pageToken] - A token identifying a page of results to be returned. This /// should be a /// `next_page_token` value returned from a previous List request. /// If unspecified, the first page of results is returned. /// + /// [pageSize] - The maximum number of ScanRuns to return, can be limited by + /// server. + /// If not specified or not positive, the implementation will select a + /// reasonable value. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -462,7 +462,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListScanRunsResponse> list(core.String parent, - {core.int pageSize, core.String pageToken, core.String $fields}) { + {core.String pageToken, core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -473,12 +473,12 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -568,16 +568,16 @@ /// Value must have pattern /// "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$". /// - /// [pageSize] - The maximum number of CrawledUrls to return, can be limited - /// by server. - /// If not specified or not positive, the implementation will select a - /// reasonable value. - /// /// [pageToken] - A token identifying a page of results to be returned. This /// should be a /// `next_page_token` value returned from a previous List request. /// If unspecified, the first page of results is returned. /// + /// [pageSize] - The maximum number of CrawledUrls to return, can be limited + /// by server. + /// If not specified or not positive, the implementation will select a + /// reasonable value. + /// /// [$fields] - Selector specifying which fields to include in a partial /// response. /// @@ -589,7 +589,7 @@ /// If the used [http.Client] completes with an error when making a REST call, /// this method will complete with the same error. async.Future<ListCrawledUrlsResponse> list(core.String parent, - {core.int pageSize, core.String pageToken, core.String $fields}) { + {core.String pageToken, core.int pageSize, core.String $fields}) { var _url = null; var _queryParams = new core.Map<core.String, core.List<core.String>>(); var _uploadMedia = null; @@ -600,12 +600,12 @@ if (parent == null) { throw new core.ArgumentError("Parameter parent is required."); } - if (pageSize != null) { - _queryParams["pageSize"] = ["${pageSize}"]; - } if (pageToken != null) { _queryParams["pageToken"] = [pageToken]; } + if (pageSize != null) { + _queryParams["pageSize"] = ["${pageSize}"]; + } if ($fields != null) { _queryParams["fields"] = [$fields]; } @@ -1021,6 +1021,10 @@ /// - "XSS_ANGULAR_CALLBACK" : A cross-site scripting (XSS) vulnerability in /// AngularJS module that /// occurs when a user-provided string is interpolated by Angular. + /// - "INVALID_HEADER" : A malformed or invalid valued header. + /// - "MISSPELLED_SECURITY_HEADER_NAME" : Misspelled security header name. + /// - "MISMATCHING_SECURITY_HEADER_VALUES" : Mismatching values in a duplicate + /// security header. core.String findingType; /// Output only. @@ -1234,6 +1238,10 @@ /// - "XSS_ANGULAR_CALLBACK" : A cross-site scripting (XSS) vulnerability in /// AngularJS module that /// occurs when a user-provided string is interpolated by Angular. + /// - "INVALID_HEADER" : A malformed or invalid valued header. + /// - "MISSPELLED_SECURITY_HEADER_NAME" : Misspelled security header name. + /// - "MISMATCHING_SECURITY_HEADER_VALUES" : Mismatching values in a duplicate + /// security header. core.String findingType; FindingTypeStats(); @@ -1539,6 +1547,7 @@ } /// A ScanConfig resource contains the configurations to launch a scan. +/// next id: 12 class ScanConfig { /// The authentication configuration. If specified, service will use the /// authentication configuration during scanning. @@ -1552,6 +1561,9 @@ /// The user provided display name of the ScanConfig. core.String displayName; + /// Latest ScanRun if available. + ScanRun latestRun; + /// The maximum QPS during scanning. A valid value ranges from 5 to 20 /// inclusively. If the field is unspecified or its value is set 0, server /// will @@ -1598,6 +1610,9 @@ if (_json.containsKey("displayName")) { displayName = _json["displayName"]; } + if (_json.containsKey("latestRun")) { + latestRun = new ScanRun.fromJson(_json["latestRun"]); + } if (_json.containsKey("maxQps")) { maxQps = _json["maxQps"]; } @@ -1631,6 +1646,9 @@ if (displayName != null) { _json["displayName"] = displayName; } + if (latestRun != null) { + _json["latestRun"] = (latestRun).toJson(); + } if (maxQps != null) { _json["maxQps"] = maxQps; }
diff --git a/generated/googleapis_beta/pubspec.yaml b/generated/googleapis_beta/pubspec.yaml index ed5d4f4..66d73ee 100644 --- a/generated/googleapis_beta/pubspec.yaml +++ b/generated/googleapis_beta/pubspec.yaml
@@ -1,7 +1,7 @@ name: googleapis_beta -version: 0.47.0+1 +version: 0.48.0 author: Dart Team <misc@dartlang.org> -description: "Auto-generated client libraries for accessing the following APIs:adexchangebuyer2:v2beta1, appengine:v1beta, appengine:v1beta4, appengine:v1beta5, binaryauthorization:v1beta1, clouderrorreporting:v1beta1, cloudresourcemanager:v1beta1, cloudtasks:v2beta2, dataflow:v1b3, dialogflow:v2beta1, dns:v2beta1, iap:v1beta1, language:v1beta1, language:v1beta2, logging:v2beta1, oslogin:v1alpha, oslogin:v1beta, proximitybeacon:v1beta1, pubsub:v1beta2, redis:v1beta1, replicapoolupdater:v1beta1, runtimeconfig:v1beta1, speech:v1beta1, sqladmin:v1beta3, sqladmin:v1beta4, toolresults:v1beta3, tpu:v1alpha1, websecurityscanner:v1alpha" +description: "Auto-generated client libraries for accessing the following APIs:accesscontextmanager:v1beta, adexchangebuyer2:v2beta1, alertcenter:v1beta1, appengine:v1beta, appengine:v1beta4, appengine:v1beta5, binaryauthorization:v1beta1, cloudasset:v1beta1, clouderrorreporting:v1beta1, cloudresourcemanager:v1beta1, cloudscheduler:v1beta1, cloudtasks:v2beta3, containeranalysis:v1beta1, dataflow:v1b3, dialogflow:v2beta1, dns:v2beta1, file:v1beta1, firebasehosting:v1beta1, language:v1beta1, language:v1beta2, logging:v2beta1, oslogin:v1alpha, oslogin:v1beta, proximitybeacon:v1beta1, pubsub:v1beta2, replicapool:v1beta1, runtimeconfig:v1beta1, servicenetworking:v1beta, sqladmin:v1beta4, toolresults:v1beta3, tpu:v1alpha1, websecurityscanner:v1alpha" homepage: http://www.dartlang.org/googleapis/ environment: sdk: '>=2.0.0-dev.22.0 <3.0.0'
diff --git a/generated/googleapis_beta/test/accesscontextmanager/v1beta_test.dart b/generated/googleapis_beta/test/accesscontextmanager/v1beta_test.dart new file mode 100644 index 0000000..b7c4a9c --- /dev/null +++ b/generated/googleapis_beta/test/accesscontextmanager/v1beta_test.dart
@@ -0,0 +1,1678 @@ +library googleapis_beta.accesscontextmanager.v1beta.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/accesscontextmanager/v1beta.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAccessLevel = 0; +buildAccessLevel() { + var o = new api.AccessLevel(); + buildCounterAccessLevel++; + if (buildCounterAccessLevel < 3) { + o.basic = buildBasicLevel(); + o.createTime = "foo"; + o.description = "foo"; + o.name = "foo"; + o.title = "foo"; + o.updateTime = "foo"; + } + buildCounterAccessLevel--; + return o; +} + +checkAccessLevel(api.AccessLevel o) { + buildCounterAccessLevel++; + if (buildCounterAccessLevel < 3) { + checkBasicLevel(o.basic); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterAccessLevel--; +} + +core.int buildCounterAccessPolicy = 0; +buildAccessPolicy() { + var o = new api.AccessPolicy(); + buildCounterAccessPolicy++; + if (buildCounterAccessPolicy < 3) { + o.createTime = "foo"; + o.name = "foo"; + o.parent = "foo"; + o.title = "foo"; + o.updateTime = "foo"; + } + buildCounterAccessPolicy--; + return o; +} + +checkAccessPolicy(api.AccessPolicy o) { + buildCounterAccessPolicy++; + if (buildCounterAccessPolicy < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.parent, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterAccessPolicy--; +} + +buildUnnamed4630() { + var o = new core.List<api.Condition>(); + o.add(buildCondition()); + o.add(buildCondition()); + return o; +} + +checkUnnamed4630(core.List<api.Condition> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCondition(o[0]); + checkCondition(o[1]); +} + +core.int buildCounterBasicLevel = 0; +buildBasicLevel() { + var o = new api.BasicLevel(); + buildCounterBasicLevel++; + if (buildCounterBasicLevel < 3) { + o.combiningFunction = "foo"; + o.conditions = buildUnnamed4630(); + } + buildCounterBasicLevel--; + return o; +} + +checkBasicLevel(api.BasicLevel o) { + buildCounterBasicLevel++; + if (buildCounterBasicLevel < 3) { + unittest.expect(o.combiningFunction, unittest.equals('foo')); + checkUnnamed4630(o.conditions); + } + buildCounterBasicLevel--; +} + +buildUnnamed4631() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4631(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4632() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4632(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4633() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4633(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCondition = 0; +buildCondition() { + var o = new api.Condition(); + buildCounterCondition++; + if (buildCounterCondition < 3) { + o.devicePolicy = buildDevicePolicy(); + o.ipSubnetworks = buildUnnamed4631(); + o.members = buildUnnamed4632(); + o.negate = true; + o.requiredAccessLevels = buildUnnamed4633(); + } + buildCounterCondition--; + return o; +} + +checkCondition(api.Condition o) { + buildCounterCondition++; + if (buildCounterCondition < 3) { + checkDevicePolicy(o.devicePolicy); + checkUnnamed4631(o.ipSubnetworks); + checkUnnamed4632(o.members); + unittest.expect(o.negate, unittest.isTrue); + checkUnnamed4633(o.requiredAccessLevels); + } + buildCounterCondition--; +} + +buildUnnamed4634() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4634(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4635() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4635(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4636() { + var o = new core.List<api.OsConstraint>(); + o.add(buildOsConstraint()); + o.add(buildOsConstraint()); + return o; +} + +checkUnnamed4636(core.List<api.OsConstraint> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOsConstraint(o[0]); + checkOsConstraint(o[1]); +} + +core.int buildCounterDevicePolicy = 0; +buildDevicePolicy() { + var o = new api.DevicePolicy(); + buildCounterDevicePolicy++; + if (buildCounterDevicePolicy < 3) { + o.allowedDeviceManagementLevels = buildUnnamed4634(); + o.allowedEncryptionStatuses = buildUnnamed4635(); + o.osConstraints = buildUnnamed4636(); + o.requireScreenlock = true; + } + buildCounterDevicePolicy--; + return o; +} + +checkDevicePolicy(api.DevicePolicy o) { + buildCounterDevicePolicy++; + if (buildCounterDevicePolicy < 3) { + checkUnnamed4634(o.allowedDeviceManagementLevels); + checkUnnamed4635(o.allowedEncryptionStatuses); + checkUnnamed4636(o.osConstraints); + unittest.expect(o.requireScreenlock, unittest.isTrue); + } + buildCounterDevicePolicy--; +} + +buildUnnamed4637() { + var o = new core.List<api.AccessLevel>(); + o.add(buildAccessLevel()); + o.add(buildAccessLevel()); + return o; +} + +checkUnnamed4637(core.List<api.AccessLevel> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAccessLevel(o[0]); + checkAccessLevel(o[1]); +} + +core.int buildCounterListAccessLevelsResponse = 0; +buildListAccessLevelsResponse() { + var o = new api.ListAccessLevelsResponse(); + buildCounterListAccessLevelsResponse++; + if (buildCounterListAccessLevelsResponse < 3) { + o.accessLevels = buildUnnamed4637(); + o.nextPageToken = "foo"; + } + buildCounterListAccessLevelsResponse--; + return o; +} + +checkListAccessLevelsResponse(api.ListAccessLevelsResponse o) { + buildCounterListAccessLevelsResponse++; + if (buildCounterListAccessLevelsResponse < 3) { + checkUnnamed4637(o.accessLevels); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListAccessLevelsResponse--; +} + +buildUnnamed4638() { + var o = new core.List<api.AccessPolicy>(); + o.add(buildAccessPolicy()); + o.add(buildAccessPolicy()); + return o; +} + +checkUnnamed4638(core.List<api.AccessPolicy> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAccessPolicy(o[0]); + checkAccessPolicy(o[1]); +} + +core.int buildCounterListAccessPoliciesResponse = 0; +buildListAccessPoliciesResponse() { + var o = new api.ListAccessPoliciesResponse(); + buildCounterListAccessPoliciesResponse++; + if (buildCounterListAccessPoliciesResponse < 3) { + o.accessPolicies = buildUnnamed4638(); + o.nextPageToken = "foo"; + } + buildCounterListAccessPoliciesResponse--; + return o; +} + +checkListAccessPoliciesResponse(api.ListAccessPoliciesResponse o) { + buildCounterListAccessPoliciesResponse++; + if (buildCounterListAccessPoliciesResponse < 3) { + checkUnnamed4638(o.accessPolicies); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListAccessPoliciesResponse--; +} + +buildUnnamed4639() { + var o = new core.List<api.ServicePerimeter>(); + o.add(buildServicePerimeter()); + o.add(buildServicePerimeter()); + return o; +} + +checkUnnamed4639(core.List<api.ServicePerimeter> o) { + unittest.expect(o, unittest.hasLength(2)); + checkServicePerimeter(o[0]); + checkServicePerimeter(o[1]); +} + +core.int buildCounterListServicePerimetersResponse = 0; +buildListServicePerimetersResponse() { + var o = new api.ListServicePerimetersResponse(); + buildCounterListServicePerimetersResponse++; + if (buildCounterListServicePerimetersResponse < 3) { + o.nextPageToken = "foo"; + o.servicePerimeters = buildUnnamed4639(); + } + buildCounterListServicePerimetersResponse--; + return o; +} + +checkListServicePerimetersResponse(api.ListServicePerimetersResponse o) { + buildCounterListServicePerimetersResponse++; + if (buildCounterListServicePerimetersResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4639(o.servicePerimeters); + } + buildCounterListServicePerimetersResponse--; +} + +buildUnnamed4640() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4640(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +buildUnnamed4641() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4641(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted3 = (o["x"]) as core.Map; + unittest.expect(casted3, unittest.hasLength(3)); + unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted3["bool"], unittest.equals(true)); + unittest.expect(casted3["string"], unittest.equals('foo')); + var casted4 = (o["y"]) as core.Map; + unittest.expect(casted4, unittest.hasLength(3)); + unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted4["bool"], unittest.equals(true)); + unittest.expect(casted4["string"], unittest.equals('foo')); +} + +core.int buildCounterOperation = 0; +buildOperation() { + var o = new api.Operation(); + buildCounterOperation++; + if (buildCounterOperation < 3) { + o.done = true; + o.error = buildStatus(); + o.metadata = buildUnnamed4640(); + o.name = "foo"; + o.response = buildUnnamed4641(); + } + buildCounterOperation--; + return o; +} + +checkOperation(api.Operation o) { + buildCounterOperation++; + if (buildCounterOperation < 3) { + unittest.expect(o.done, unittest.isTrue); + checkStatus(o.error); + checkUnnamed4640(o.metadata); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4641(o.response); + } + buildCounterOperation--; +} + +core.int buildCounterOsConstraint = 0; +buildOsConstraint() { + var o = new api.OsConstraint(); + buildCounterOsConstraint++; + if (buildCounterOsConstraint < 3) { + o.minimumVersion = "foo"; + o.osType = "foo"; + } + buildCounterOsConstraint--; + return o; +} + +checkOsConstraint(api.OsConstraint o) { + buildCounterOsConstraint++; + if (buildCounterOsConstraint < 3) { + unittest.expect(o.minimumVersion, unittest.equals('foo')); + unittest.expect(o.osType, unittest.equals('foo')); + } + buildCounterOsConstraint--; +} + +core.int buildCounterServicePerimeter = 0; +buildServicePerimeter() { + var o = new api.ServicePerimeter(); + buildCounterServicePerimeter++; + if (buildCounterServicePerimeter < 3) { + o.createTime = "foo"; + o.description = "foo"; + o.name = "foo"; + o.perimeterType = "foo"; + o.status = buildServicePerimeterConfig(); + o.title = "foo"; + o.updateTime = "foo"; + } + buildCounterServicePerimeter--; + return o; +} + +checkServicePerimeter(api.ServicePerimeter o) { + buildCounterServicePerimeter++; + if (buildCounterServicePerimeter < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.perimeterType, unittest.equals('foo')); + checkServicePerimeterConfig(o.status); + unittest.expect(o.title, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterServicePerimeter--; +} + +buildUnnamed4642() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4642(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4643() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4643(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4644() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4644(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4645() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4645(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterServicePerimeterConfig = 0; +buildServicePerimeterConfig() { + var o = new api.ServicePerimeterConfig(); + buildCounterServicePerimeterConfig++; + if (buildCounterServicePerimeterConfig < 3) { + o.accessLevels = buildUnnamed4642(); + o.resources = buildUnnamed4643(); + o.restrictedServices = buildUnnamed4644(); + o.unrestrictedServices = buildUnnamed4645(); + } + buildCounterServicePerimeterConfig--; + return o; +} + +checkServicePerimeterConfig(api.ServicePerimeterConfig o) { + buildCounterServicePerimeterConfig++; + if (buildCounterServicePerimeterConfig < 3) { + checkUnnamed4642(o.accessLevels); + checkUnnamed4643(o.resources); + checkUnnamed4644(o.restrictedServices); + checkUnnamed4645(o.unrestrictedServices); + } + buildCounterServicePerimeterConfig--; +} + +buildUnnamed4646() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4646(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted5 = (o["x"]) as core.Map; + unittest.expect(casted5, unittest.hasLength(3)); + unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted5["bool"], unittest.equals(true)); + unittest.expect(casted5["string"], unittest.equals('foo')); + var casted6 = (o["y"]) as core.Map; + unittest.expect(casted6, unittest.hasLength(3)); + unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted6["bool"], unittest.equals(true)); + unittest.expect(casted6["string"], unittest.equals('foo')); +} + +buildUnnamed4647() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4646()); + o.add(buildUnnamed4646()); + return o; +} + +checkUnnamed4647(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4646(o[0]); + checkUnnamed4646(o[1]); +} + +core.int buildCounterStatus = 0; +buildStatus() { + var o = new api.Status(); + buildCounterStatus++; + if (buildCounterStatus < 3) { + o.code = 42; + o.details = buildUnnamed4647(); + o.message = "foo"; + } + buildCounterStatus--; + return o; +} + +checkStatus(api.Status o) { + buildCounterStatus++; + if (buildCounterStatus < 3) { + unittest.expect(o.code, unittest.equals(42)); + checkUnnamed4647(o.details); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterStatus--; +} + +main() { + unittest.group("obj-schema-AccessLevel", () { + unittest.test("to-json--from-json", () { + var o = buildAccessLevel(); + var od = new api.AccessLevel.fromJson(o.toJson()); + checkAccessLevel(od); + }); + }); + + unittest.group("obj-schema-AccessPolicy", () { + unittest.test("to-json--from-json", () { + var o = buildAccessPolicy(); + var od = new api.AccessPolicy.fromJson(o.toJson()); + checkAccessPolicy(od); + }); + }); + + unittest.group("obj-schema-BasicLevel", () { + unittest.test("to-json--from-json", () { + var o = buildBasicLevel(); + var od = new api.BasicLevel.fromJson(o.toJson()); + checkBasicLevel(od); + }); + }); + + unittest.group("obj-schema-Condition", () { + unittest.test("to-json--from-json", () { + var o = buildCondition(); + var od = new api.Condition.fromJson(o.toJson()); + checkCondition(od); + }); + }); + + unittest.group("obj-schema-DevicePolicy", () { + unittest.test("to-json--from-json", () { + var o = buildDevicePolicy(); + var od = new api.DevicePolicy.fromJson(o.toJson()); + checkDevicePolicy(od); + }); + }); + + unittest.group("obj-schema-ListAccessLevelsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListAccessLevelsResponse(); + var od = new api.ListAccessLevelsResponse.fromJson(o.toJson()); + checkListAccessLevelsResponse(od); + }); + }); + + unittest.group("obj-schema-ListAccessPoliciesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListAccessPoliciesResponse(); + var od = new api.ListAccessPoliciesResponse.fromJson(o.toJson()); + checkListAccessPoliciesResponse(od); + }); + }); + + unittest.group("obj-schema-ListServicePerimetersResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListServicePerimetersResponse(); + var od = new api.ListServicePerimetersResponse.fromJson(o.toJson()); + checkListServicePerimetersResponse(od); + }); + }); + + unittest.group("obj-schema-Operation", () { + unittest.test("to-json--from-json", () { + var o = buildOperation(); + var od = new api.Operation.fromJson(o.toJson()); + checkOperation(od); + }); + }); + + unittest.group("obj-schema-OsConstraint", () { + unittest.test("to-json--from-json", () { + var o = buildOsConstraint(); + var od = new api.OsConstraint.fromJson(o.toJson()); + checkOsConstraint(od); + }); + }); + + unittest.group("obj-schema-ServicePerimeter", () { + unittest.test("to-json--from-json", () { + var o = buildServicePerimeter(); + var od = new api.ServicePerimeter.fromJson(o.toJson()); + checkServicePerimeter(od); + }); + }); + + unittest.group("obj-schema-ServicePerimeterConfig", () { + unittest.test("to-json--from-json", () { + var o = buildServicePerimeterConfig(); + var od = new api.ServicePerimeterConfig.fromJson(o.toJson()); + checkServicePerimeterConfig(od); + }); + }); + + unittest.group("obj-schema-Status", () { + unittest.test("to-json--from-json", () { + var o = buildStatus(); + var od = new api.Status.fromJson(o.toJson()); + checkStatus(od); + }); + }); + + unittest.group("resource-AccessPoliciesResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_request = buildAccessPolicy(); + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AccessPolicy.fromJson(json); + checkAccessPolicy(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 21), + unittest.equals("v1beta/accessPolicies")); + pathOffset += 21; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAccessPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAccessPolicy(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 21), + unittest.equals("v1beta/accessPolicies")); + pathOffset += 21; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["parent"].first, unittest.equals(arg_parent)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListAccessPoliciesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list( + parent: arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListAccessPoliciesResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_request = buildAccessPolicy(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AccessPolicy.fromJson(json); + checkAccessPolicy(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-AccessPoliciesAccessLevelsResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_request = buildAccessLevel(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AccessLevel.fromJson(json); + checkAccessLevel(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_name = "foo"; + var arg_accessLevelFormat = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["accessLevelFormat"].first, + unittest.equals(arg_accessLevelFormat)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAccessLevel()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, + accessLevelFormat: arg_accessLevelFormat, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAccessLevel(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_accessLevelFormat = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["accessLevelFormat"].first, + unittest.equals(arg_accessLevelFormat)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListAccessLevelsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + accessLevelFormat: arg_accessLevelFormat, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListAccessLevelsResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_request = buildAccessLevel(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AccessLevel.fromJson(json); + checkAccessLevel(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-AccessPoliciesServicePerimetersResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_request = buildServicePerimeter(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ServicePerimeter.fromJson(json); + checkServicePerimeter(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildServicePerimeter()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkServicePerimeter(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListServicePerimetersResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListServicePerimetersResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_request = buildServicePerimeter(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ServicePerimeter.fromJson(json); + checkServicePerimeter(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-OperationsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.OperationsResourceApi res = + new api.AccesscontextmanagerApi(mock).operations; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart b/generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart index cfc3d3e..c31d738 100644 --- a/generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart +++ b/generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart
@@ -71,6 +71,48 @@ buildCounterAbsoluteDateRange--; } +core.int buildCounterAcceptProposalRequest = 0; +buildAcceptProposalRequest() { + var o = new api.AcceptProposalRequest(); + buildCounterAcceptProposalRequest++; + if (buildCounterAcceptProposalRequest < 3) { + o.proposalRevision = "foo"; + } + buildCounterAcceptProposalRequest--; + return o; +} + +checkAcceptProposalRequest(api.AcceptProposalRequest o) { + buildCounterAcceptProposalRequest++; + if (buildCounterAcceptProposalRequest < 3) { + unittest.expect(o.proposalRevision, unittest.equals('foo')); + } + buildCounterAcceptProposalRequest--; +} + +core.int buildCounterAdSize = 0; +buildAdSize() { + var o = new api.AdSize(); + buildCounterAdSize++; + if (buildCounterAdSize < 3) { + o.height = "foo"; + o.sizeType = "foo"; + o.width = "foo"; + } + buildCounterAdSize--; + return o; +} + +checkAdSize(api.AdSize o) { + buildCounterAdSize++; + if (buildCounterAdSize < 3) { + unittest.expect(o.height, unittest.equals('foo')); + unittest.expect(o.sizeType, unittest.equals('foo')); + unittest.expect(o.width, unittest.equals('foo')); + } + buildCounterAdSize--; +} + core.int buildCounterAddDealAssociationRequest = 0; buildAddDealAssociationRequest() { var o = new api.AddDealAssociationRequest(); @@ -90,14 +132,33 @@ buildCounterAddDealAssociationRequest--; } -buildUnnamed5286() { +core.int buildCounterAddNoteRequest = 0; +buildAddNoteRequest() { + var o = new api.AddNoteRequest(); + buildCounterAddNoteRequest++; + if (buildCounterAddNoteRequest < 3) { + o.note = buildNote(); + } + buildCounterAddNoteRequest--; + return o; +} + +checkAddNoteRequest(api.AddNoteRequest o) { + buildCounterAddNoteRequest++; + if (buildCounterAddNoteRequest < 3) { + checkNote(o.note); + } + buildCounterAddNoteRequest--; +} + +buildUnnamed4793() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5286(core.List<core.String> o) { +checkUnnamed4793(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -108,7 +169,7 @@ var o = new api.AppContext(); buildCounterAppContext++; if (buildCounterAppContext < 3) { - o.appTypes = buildUnnamed5286(); + o.appTypes = buildUnnamed4793(); } buildCounterAppContext--; return o; @@ -117,19 +178,19 @@ checkAppContext(api.AppContext o) { buildCounterAppContext++; if (buildCounterAppContext < 3) { - checkUnnamed5286(o.appTypes); + checkUnnamed4793(o.appTypes); } buildCounterAppContext--; } -buildUnnamed5287() { +buildUnnamed4794() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5287(core.List<core.String> o) { +checkUnnamed4794(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -140,7 +201,7 @@ var o = new api.AuctionContext(); buildCounterAuctionContext++; if (buildCounterAuctionContext < 3) { - o.auctionTypes = buildUnnamed5287(); + o.auctionTypes = buildUnnamed4794(); } buildCounterAuctionContext--; return o; @@ -149,7 +210,7 @@ checkAuctionContext(api.AuctionContext o) { buildCounterAuctionContext++; if (buildCounterAuctionContext < 3) { - checkUnnamed5287(o.auctionTypes); + checkUnnamed4794(o.auctionTypes); } buildCounterAuctionContext--; } @@ -208,6 +269,25 @@ buildCounterBidResponseWithoutBidsStatusRow--; } +core.int buildCounterBuyer = 0; +buildBuyer() { + var o = new api.Buyer(); + buildCounterBuyer++; + if (buildCounterBuyer < 3) { + o.accountId = "foo"; + } + buildCounterBuyer--; + return o; +} + +checkBuyer(api.Buyer o) { + buildCounterBuyer++; + if (buildCounterBuyer < 3) { + unittest.expect(o.accountId, unittest.equals('foo')); + } + buildCounterBuyer--; +} + core.int buildCounterCalloutStatusRow = 0; buildCalloutStatusRow() { var o = new api.CalloutStatusRow(); @@ -231,6 +311,21 @@ buildCounterCalloutStatusRow--; } +core.int buildCounterCancelNegotiationRequest = 0; +buildCancelNegotiationRequest() { + var o = new api.CancelNegotiationRequest(); + buildCounterCancelNegotiationRequest++; + if (buildCounterCancelNegotiationRequest < 3) {} + buildCounterCancelNegotiationRequest--; + return o; +} + +checkCancelNegotiationRequest(api.CancelNegotiationRequest o) { + buildCounterCancelNegotiationRequest++; + if (buildCounterCancelNegotiationRequest < 3) {} + buildCounterCancelNegotiationRequest--; +} + core.int buildCounterClient = 0; buildClient() { var o = new api.Client(); @@ -314,27 +409,63 @@ buildCounterClientUserInvitation--; } -buildUnnamed5288() { +core.int buildCounterCompleteSetupRequest = 0; +buildCompleteSetupRequest() { + var o = new api.CompleteSetupRequest(); + buildCounterCompleteSetupRequest++; + if (buildCounterCompleteSetupRequest < 3) {} + buildCounterCompleteSetupRequest--; + return o; +} + +checkCompleteSetupRequest(api.CompleteSetupRequest o) { + buildCounterCompleteSetupRequest++; + if (buildCounterCompleteSetupRequest < 3) {} + buildCounterCompleteSetupRequest--; +} + +core.int buildCounterContactInformation = 0; +buildContactInformation() { + var o = new api.ContactInformation(); + buildCounterContactInformation++; + if (buildCounterContactInformation < 3) { + o.email = "foo"; + o.name = "foo"; + } + buildCounterContactInformation--; + return o; +} + +checkContactInformation(api.ContactInformation o) { + buildCounterContactInformation++; + if (buildCounterContactInformation < 3) { + unittest.expect(o.email, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterContactInformation--; +} + +buildUnnamed4795() { var o = new core.List<api.ServingContext>(); o.add(buildServingContext()); o.add(buildServingContext()); return o; } -checkUnnamed5288(core.List<api.ServingContext> o) { +checkUnnamed4795(core.List<api.ServingContext> o) { unittest.expect(o, unittest.hasLength(2)); checkServingContext(o[0]); checkServingContext(o[1]); } -buildUnnamed5289() { +buildUnnamed4796() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5289(core.List<core.String> o) { +checkUnnamed4796(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -345,8 +476,8 @@ var o = new api.Correction(); buildCounterCorrection++; if (buildCounterCorrection < 3) { - o.contexts = buildUnnamed5288(); - o.details = buildUnnamed5289(); + o.contexts = buildUnnamed4795(); + o.details = buildUnnamed4796(); o.type = "foo"; } buildCounterCorrection--; @@ -356,177 +487,177 @@ checkCorrection(api.Correction o) { buildCounterCorrection++; if (buildCounterCorrection < 3) { - checkUnnamed5288(o.contexts); - checkUnnamed5289(o.details); + checkUnnamed4795(o.contexts); + checkUnnamed4796(o.details); unittest.expect(o.type, unittest.equals('foo')); } buildCounterCorrection--; } -buildUnnamed5290() { +buildUnnamed4797() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5290(core.List<core.String> o) { +checkUnnamed4797(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5291() { +buildUnnamed4798() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5291(core.List<core.String> o) { +checkUnnamed4798(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5292() { +buildUnnamed4799() { var o = new core.List<api.Correction>(); o.add(buildCorrection()); o.add(buildCorrection()); return o; } -checkUnnamed5292(core.List<api.Correction> o) { +checkUnnamed4799(core.List<api.Correction> o) { unittest.expect(o, unittest.hasLength(2)); checkCorrection(o[0]); checkCorrection(o[1]); } -buildUnnamed5293() { +buildUnnamed4800() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5293(core.List<core.String> o) { +checkUnnamed4800(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5294() { +buildUnnamed4801() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5294(core.List<core.String> o) { +checkUnnamed4801(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5295() { +buildUnnamed4802() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5295(core.List<core.String> o) { +checkUnnamed4802(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5296() { +buildUnnamed4803() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5296(core.List<core.String> o) { +checkUnnamed4803(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5297() { +buildUnnamed4804() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5297(core.List<core.int> o) { +checkUnnamed4804(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); } -buildUnnamed5298() { +buildUnnamed4805() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5298(core.List<core.int> o) { +checkUnnamed4805(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); } -buildUnnamed5299() { +buildUnnamed4806() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5299(core.List<core.String> o) { +checkUnnamed4806(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5300() { +buildUnnamed4807() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5300(core.List<core.String> o) { +checkUnnamed4807(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5301() { +buildUnnamed4808() { var o = new core.List<api.ServingRestriction>(); o.add(buildServingRestriction()); o.add(buildServingRestriction()); return o; } -checkUnnamed5301(core.List<api.ServingRestriction> o) { +checkUnnamed4808(core.List<api.ServingRestriction> o) { unittest.expect(o, unittest.hasLength(2)); checkServingRestriction(o[0]); checkServingRestriction(o[1]); } -buildUnnamed5302() { +buildUnnamed4809() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5302(core.List<core.int> o) { +checkUnnamed4809(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); @@ -542,25 +673,25 @@ o.advertiserName = "foo"; o.agencyId = "foo"; o.apiUpdateTime = "foo"; - o.attributes = buildUnnamed5290(); - o.clickThroughUrls = buildUnnamed5291(); - o.corrections = buildUnnamed5292(); + o.attributes = buildUnnamed4797(); + o.clickThroughUrls = buildUnnamed4798(); + o.corrections = buildUnnamed4799(); o.creativeId = "foo"; o.dealsStatus = "foo"; - o.declaredClickThroughUrls = buildUnnamed5293(); - o.detectedAdvertiserIds = buildUnnamed5294(); - o.detectedDomains = buildUnnamed5295(); - o.detectedLanguages = buildUnnamed5296(); - o.detectedProductCategories = buildUnnamed5297(); - o.detectedSensitiveCategories = buildUnnamed5298(); + o.declaredClickThroughUrls = buildUnnamed4800(); + o.detectedAdvertiserIds = buildUnnamed4801(); + o.detectedDomains = buildUnnamed4802(); + o.detectedLanguages = buildUnnamed4803(); + o.detectedProductCategories = buildUnnamed4804(); + o.detectedSensitiveCategories = buildUnnamed4805(); o.filteringStats = buildFilteringStats(); o.html = buildHtmlContent(); - o.impressionTrackingUrls = buildUnnamed5299(); + o.impressionTrackingUrls = buildUnnamed4806(); o.native = buildNativeContent(); o.openAuctionStatus = "foo"; - o.restrictedCategories = buildUnnamed5300(); - o.servingRestrictions = buildUnnamed5301(); - o.vendorIds = buildUnnamed5302(); + o.restrictedCategories = buildUnnamed4807(); + o.servingRestrictions = buildUnnamed4808(); + o.vendorIds = buildUnnamed4809(); o.version = 42; o.video = buildVideoContent(); } @@ -576,25 +707,25 @@ unittest.expect(o.advertiserName, unittest.equals('foo')); unittest.expect(o.agencyId, unittest.equals('foo')); unittest.expect(o.apiUpdateTime, unittest.equals('foo')); - checkUnnamed5290(o.attributes); - checkUnnamed5291(o.clickThroughUrls); - checkUnnamed5292(o.corrections); + checkUnnamed4797(o.attributes); + checkUnnamed4798(o.clickThroughUrls); + checkUnnamed4799(o.corrections); unittest.expect(o.creativeId, unittest.equals('foo')); unittest.expect(o.dealsStatus, unittest.equals('foo')); - checkUnnamed5293(o.declaredClickThroughUrls); - checkUnnamed5294(o.detectedAdvertiserIds); - checkUnnamed5295(o.detectedDomains); - checkUnnamed5296(o.detectedLanguages); - checkUnnamed5297(o.detectedProductCategories); - checkUnnamed5298(o.detectedSensitiveCategories); + checkUnnamed4800(o.declaredClickThroughUrls); + checkUnnamed4801(o.detectedAdvertiserIds); + checkUnnamed4802(o.detectedDomains); + checkUnnamed4803(o.detectedLanguages); + checkUnnamed4804(o.detectedProductCategories); + checkUnnamed4805(o.detectedSensitiveCategories); checkFilteringStats(o.filteringStats); checkHtmlContent(o.html); - checkUnnamed5299(o.impressionTrackingUrls); + checkUnnamed4806(o.impressionTrackingUrls); checkNativeContent(o.native); unittest.expect(o.openAuctionStatus, unittest.equals('foo')); - checkUnnamed5300(o.restrictedCategories); - checkUnnamed5301(o.servingRestrictions); - checkUnnamed5302(o.vendorIds); + checkUnnamed4807(o.restrictedCategories); + checkUnnamed4808(o.servingRestrictions); + checkUnnamed4809(o.vendorIds); unittest.expect(o.version, unittest.equals(42)); checkVideoContent(o.video); } @@ -624,6 +755,131 @@ buildCounterCreativeDealAssociation--; } +buildUnnamed4810() { + var o = new core.List<api.CreativeSpecification>(); + o.add(buildCreativeSpecification()); + o.add(buildCreativeSpecification()); + return o; +} + +checkUnnamed4810(core.List<api.CreativeSpecification> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCreativeSpecification(o[0]); + checkCreativeSpecification(o[1]); +} + +core.int buildCounterCreativeRestrictions = 0; +buildCreativeRestrictions() { + var o = new api.CreativeRestrictions(); + buildCounterCreativeRestrictions++; + if (buildCounterCreativeRestrictions < 3) { + o.creativeFormat = "foo"; + o.creativeSpecifications = buildUnnamed4810(); + o.skippableAdType = "foo"; + } + buildCounterCreativeRestrictions--; + return o; +} + +checkCreativeRestrictions(api.CreativeRestrictions o) { + buildCounterCreativeRestrictions++; + if (buildCounterCreativeRestrictions < 3) { + unittest.expect(o.creativeFormat, unittest.equals('foo')); + checkUnnamed4810(o.creativeSpecifications); + unittest.expect(o.skippableAdType, unittest.equals('foo')); + } + buildCounterCreativeRestrictions--; +} + +buildUnnamed4811() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4811(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4812() { + var o = new core.List<api.Size>(); + o.add(buildSize()); + o.add(buildSize()); + return o; +} + +checkUnnamed4812(core.List<api.Size> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSize(o[0]); + checkSize(o[1]); +} + +core.int buildCounterCreativeSize = 0; +buildCreativeSize() { + var o = new api.CreativeSize(); + buildCounterCreativeSize++; + if (buildCounterCreativeSize < 3) { + o.allowedFormats = buildUnnamed4811(); + o.companionSizes = buildUnnamed4812(); + o.creativeSizeType = "foo"; + o.nativeTemplate = "foo"; + o.size = buildSize(); + o.skippableAdType = "foo"; + } + buildCounterCreativeSize--; + return o; +} + +checkCreativeSize(api.CreativeSize o) { + buildCounterCreativeSize++; + if (buildCounterCreativeSize < 3) { + checkUnnamed4811(o.allowedFormats); + checkUnnamed4812(o.companionSizes); + unittest.expect(o.creativeSizeType, unittest.equals('foo')); + unittest.expect(o.nativeTemplate, unittest.equals('foo')); + checkSize(o.size); + unittest.expect(o.skippableAdType, unittest.equals('foo')); + } + buildCounterCreativeSize--; +} + +buildUnnamed4813() { + var o = new core.List<api.AdSize>(); + o.add(buildAdSize()); + o.add(buildAdSize()); + return o; +} + +checkUnnamed4813(core.List<api.AdSize> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAdSize(o[0]); + checkAdSize(o[1]); +} + +core.int buildCounterCreativeSpecification = 0; +buildCreativeSpecification() { + var o = new api.CreativeSpecification(); + buildCounterCreativeSpecification++; + if (buildCounterCreativeSpecification < 3) { + o.creativeCompanionSizes = buildUnnamed4813(); + o.creativeSize = buildAdSize(); + } + buildCounterCreativeSpecification--; + return o; +} + +checkCreativeSpecification(api.CreativeSpecification o) { + buildCounterCreativeSpecification++; + if (buildCounterCreativeSpecification < 3) { + checkUnnamed4813(o.creativeCompanionSizes); + checkAdSize(o.creativeSize); + } + buildCounterCreativeSpecification--; +} + core.int buildCounterCreativeStatusRow = 0; buildCreativeStatusRow() { var o = new api.CreativeStatusRow(); @@ -647,6 +903,53 @@ buildCounterCreativeStatusRow--; } +buildUnnamed4814() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4814(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4815() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4815(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCriteriaTargeting = 0; +buildCriteriaTargeting() { + var o = new api.CriteriaTargeting(); + buildCounterCriteriaTargeting++; + if (buildCounterCriteriaTargeting < 3) { + o.excludedCriteriaIds = buildUnnamed4814(); + o.targetedCriteriaIds = buildUnnamed4815(); + } + buildCounterCriteriaTargeting--; + return o; +} + +checkCriteriaTargeting(api.CriteriaTargeting o) { + buildCounterCriteriaTargeting++; + if (buildCounterCriteriaTargeting < 3) { + checkUnnamed4814(o.excludedCriteriaIds); + checkUnnamed4815(o.targetedCriteriaIds); + } + buildCounterCriteriaTargeting--; +} + core.int buildCounterDate = 0; buildDate() { var o = new api.Date(); @@ -670,14 +973,279 @@ buildCounterDate--; } -buildUnnamed5303() { +core.int buildCounterDayPart = 0; +buildDayPart() { + var o = new api.DayPart(); + buildCounterDayPart++; + if (buildCounterDayPart < 3) { + o.dayOfWeek = "foo"; + o.endTime = buildTimeOfDay(); + o.startTime = buildTimeOfDay(); + } + buildCounterDayPart--; + return o; +} + +checkDayPart(api.DayPart o) { + buildCounterDayPart++; + if (buildCounterDayPart < 3) { + unittest.expect(o.dayOfWeek, unittest.equals('foo')); + checkTimeOfDay(o.endTime); + checkTimeOfDay(o.startTime); + } + buildCounterDayPart--; +} + +buildUnnamed4816() { + var o = new core.List<api.DayPart>(); + o.add(buildDayPart()); + o.add(buildDayPart()); + return o; +} + +checkUnnamed4816(core.List<api.DayPart> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDayPart(o[0]); + checkDayPart(o[1]); +} + +core.int buildCounterDayPartTargeting = 0; +buildDayPartTargeting() { + var o = new api.DayPartTargeting(); + buildCounterDayPartTargeting++; + if (buildCounterDayPartTargeting < 3) { + o.dayParts = buildUnnamed4816(); + o.timeZoneType = "foo"; + } + buildCounterDayPartTargeting--; + return o; +} + +checkDayPartTargeting(api.DayPartTargeting o) { + buildCounterDayPartTargeting++; + if (buildCounterDayPartTargeting < 3) { + checkUnnamed4816(o.dayParts); + unittest.expect(o.timeZoneType, unittest.equals('foo')); + } + buildCounterDayPartTargeting--; +} + +buildUnnamed4817() { + var o = new core.List<api.ContactInformation>(); + o.add(buildContactInformation()); + o.add(buildContactInformation()); + return o; +} + +checkUnnamed4817(core.List<api.ContactInformation> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContactInformation(o[0]); + checkContactInformation(o[1]); +} + +buildUnnamed4818() { + var o = new core.List<api.TargetingCriteria>(); + o.add(buildTargetingCriteria()); + o.add(buildTargetingCriteria()); + return o; +} + +checkUnnamed4818(core.List<api.TargetingCriteria> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTargetingCriteria(o[0]); + checkTargetingCriteria(o[1]); +} + +core.int buildCounterDeal = 0; +buildDeal() { + var o = new api.Deal(); + buildCounterDeal++; + if (buildCounterDeal < 3) { + o.availableEndTime = "foo"; + o.availableStartTime = "foo"; + o.buyerPrivateData = buildPrivateData(); + o.createProductId = "foo"; + o.createProductRevision = "foo"; + o.createTime = "foo"; + o.creativePreApprovalPolicy = "foo"; + o.creativeRestrictions = buildCreativeRestrictions(); + o.creativeSafeFrameCompatibility = "foo"; + o.dealId = "foo"; + o.dealServingMetadata = buildDealServingMetadata(); + o.dealTerms = buildDealTerms(); + o.deliveryControl = buildDeliveryControl(); + o.description = "foo"; + o.displayName = "foo"; + o.externalDealId = "foo"; + o.isSetupComplete = true; + o.programmaticCreativeSource = "foo"; + o.proposalId = "foo"; + o.sellerContacts = buildUnnamed4817(); + o.syndicationProduct = "foo"; + o.targeting = buildMarketplaceTargeting(); + o.targetingCriterion = buildUnnamed4818(); + o.updateTime = "foo"; + o.webPropertyCode = "foo"; + } + buildCounterDeal--; + return o; +} + +checkDeal(api.Deal o) { + buildCounterDeal++; + if (buildCounterDeal < 3) { + unittest.expect(o.availableEndTime, unittest.equals('foo')); + unittest.expect(o.availableStartTime, unittest.equals('foo')); + checkPrivateData(o.buyerPrivateData); + unittest.expect(o.createProductId, unittest.equals('foo')); + unittest.expect(o.createProductRevision, unittest.equals('foo')); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.creativePreApprovalPolicy, unittest.equals('foo')); + checkCreativeRestrictions(o.creativeRestrictions); + unittest.expect(o.creativeSafeFrameCompatibility, unittest.equals('foo')); + unittest.expect(o.dealId, unittest.equals('foo')); + checkDealServingMetadata(o.dealServingMetadata); + checkDealTerms(o.dealTerms); + checkDeliveryControl(o.deliveryControl); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + unittest.expect(o.externalDealId, unittest.equals('foo')); + unittest.expect(o.isSetupComplete, unittest.isTrue); + unittest.expect(o.programmaticCreativeSource, unittest.equals('foo')); + unittest.expect(o.proposalId, unittest.equals('foo')); + checkUnnamed4817(o.sellerContacts); + unittest.expect(o.syndicationProduct, unittest.equals('foo')); + checkMarketplaceTargeting(o.targeting); + checkUnnamed4818(o.targetingCriterion); + unittest.expect(o.updateTime, unittest.equals('foo')); + unittest.expect(o.webPropertyCode, unittest.equals('foo')); + } + buildCounterDeal--; +} + +core.int buildCounterDealPauseStatus = 0; +buildDealPauseStatus() { + var o = new api.DealPauseStatus(); + buildCounterDealPauseStatus++; + if (buildCounterDealPauseStatus < 3) { + o.buyerPauseReason = "foo"; + o.firstPausedBy = "foo"; + o.hasBuyerPaused = true; + o.hasSellerPaused = true; + o.sellerPauseReason = "foo"; + } + buildCounterDealPauseStatus--; + return o; +} + +checkDealPauseStatus(api.DealPauseStatus o) { + buildCounterDealPauseStatus++; + if (buildCounterDealPauseStatus < 3) { + unittest.expect(o.buyerPauseReason, unittest.equals('foo')); + unittest.expect(o.firstPausedBy, unittest.equals('foo')); + unittest.expect(o.hasBuyerPaused, unittest.isTrue); + unittest.expect(o.hasSellerPaused, unittest.isTrue); + unittest.expect(o.sellerPauseReason, unittest.equals('foo')); + } + buildCounterDealPauseStatus--; +} + +core.int buildCounterDealServingMetadata = 0; +buildDealServingMetadata() { + var o = new api.DealServingMetadata(); + buildCounterDealServingMetadata++; + if (buildCounterDealServingMetadata < 3) { + o.dealPauseStatus = buildDealPauseStatus(); + } + buildCounterDealServingMetadata--; + return o; +} + +checkDealServingMetadata(api.DealServingMetadata o) { + buildCounterDealServingMetadata++; + if (buildCounterDealServingMetadata < 3) { + checkDealPauseStatus(o.dealPauseStatus); + } + buildCounterDealServingMetadata--; +} + +core.int buildCounterDealTerms = 0; +buildDealTerms() { + var o = new api.DealTerms(); + buildCounterDealTerms++; + if (buildCounterDealTerms < 3) { + o.brandingType = "foo"; + o.description = "foo"; + o.estimatedGrossSpend = buildPrice(); + o.estimatedImpressionsPerDay = "foo"; + o.guaranteedFixedPriceTerms = buildGuaranteedFixedPriceTerms(); + o.nonGuaranteedAuctionTerms = buildNonGuaranteedAuctionTerms(); + o.nonGuaranteedFixedPriceTerms = buildNonGuaranteedFixedPriceTerms(); + o.sellerTimeZone = "foo"; + } + buildCounterDealTerms--; + return o; +} + +checkDealTerms(api.DealTerms o) { + buildCounterDealTerms++; + if (buildCounterDealTerms < 3) { + unittest.expect(o.brandingType, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + checkPrice(o.estimatedGrossSpend); + unittest.expect(o.estimatedImpressionsPerDay, unittest.equals('foo')); + checkGuaranteedFixedPriceTerms(o.guaranteedFixedPriceTerms); + checkNonGuaranteedAuctionTerms(o.nonGuaranteedAuctionTerms); + checkNonGuaranteedFixedPriceTerms(o.nonGuaranteedFixedPriceTerms); + unittest.expect(o.sellerTimeZone, unittest.equals('foo')); + } + buildCounterDealTerms--; +} + +buildUnnamed4819() { + var o = new core.List<api.FrequencyCap>(); + o.add(buildFrequencyCap()); + o.add(buildFrequencyCap()); + return o; +} + +checkUnnamed4819(core.List<api.FrequencyCap> o) { + unittest.expect(o, unittest.hasLength(2)); + checkFrequencyCap(o[0]); + checkFrequencyCap(o[1]); +} + +core.int buildCounterDeliveryControl = 0; +buildDeliveryControl() { + var o = new api.DeliveryControl(); + buildCounterDeliveryControl++; + if (buildCounterDeliveryControl < 3) { + o.creativeBlockingLevel = "foo"; + o.deliveryRateType = "foo"; + o.frequencyCaps = buildUnnamed4819(); + } + buildCounterDeliveryControl--; + return o; +} + +checkDeliveryControl(api.DeliveryControl o) { + buildCounterDeliveryControl++; + if (buildCounterDeliveryControl < 3) { + unittest.expect(o.creativeBlockingLevel, unittest.equals('foo')); + unittest.expect(o.deliveryRateType, unittest.equals('foo')); + checkUnnamed4819(o.frequencyCaps); + } + buildCounterDeliveryControl--; +} + +buildUnnamed4820() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5303(core.List<core.String> o) { +checkUnnamed4820(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -688,7 +1256,7 @@ var o = new api.Disapproval(); buildCounterDisapproval++; if (buildCounterDisapproval < 3) { - o.details = buildUnnamed5303(); + o.details = buildUnnamed4820(); o.reason = "foo"; } buildCounterDisapproval--; @@ -698,7 +1266,7 @@ checkDisapproval(api.Disapproval o) { buildCounterDisapproval++; if (buildCounterDisapproval < 3) { - checkUnnamed5303(o.details); + checkUnnamed4820(o.details); unittest.expect(o.reason, unittest.equals('foo')); } buildCounterDisapproval--; @@ -719,53 +1287,66 @@ buildCounterEmpty--; } -buildUnnamed5304() { +buildUnnamed4821() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5304(core.List<core.String> o) { +checkUnnamed4821(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5305() { +buildUnnamed4822() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5305(core.List<core.String> o) { +checkUnnamed4822(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5306() { +buildUnnamed4823() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5306(core.List<core.String> o) { +checkUnnamed4823(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5307() { +buildUnnamed4824() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4824(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4825() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5307(core.List<core.int> o) { +checkUnnamed4825(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); @@ -777,16 +1358,17 @@ buildCounterFilterSet++; if (buildCounterFilterSet < 3) { o.absoluteDateRange = buildAbsoluteDateRange(); + o.breakdownDimensions = buildUnnamed4821(); o.creativeId = "foo"; o.dealId = "foo"; o.environment = "foo"; - o.formats = buildUnnamed5304(); + o.formats = buildUnnamed4822(); o.name = "foo"; - o.platforms = buildUnnamed5305(); - o.publisherIdentifiers = buildUnnamed5306(); + o.platforms = buildUnnamed4823(); + o.publisherIdentifiers = buildUnnamed4824(); o.realtimeTimeRange = buildRealtimeTimeRange(); o.relativeDateRange = buildRelativeDateRange(); - o.sellerNetworkIds = buildUnnamed5307(); + o.sellerNetworkIds = buildUnnamed4825(); o.timeSeriesGranularity = "foo"; } buildCounterFilterSet--; @@ -797,16 +1379,17 @@ buildCounterFilterSet++; if (buildCounterFilterSet < 3) { checkAbsoluteDateRange(o.absoluteDateRange); + checkUnnamed4821(o.breakdownDimensions); unittest.expect(o.creativeId, unittest.equals('foo')); unittest.expect(o.dealId, unittest.equals('foo')); unittest.expect(o.environment, unittest.equals('foo')); - checkUnnamed5304(o.formats); + checkUnnamed4822(o.formats); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5305(o.platforms); - checkUnnamed5306(o.publisherIdentifiers); + checkUnnamed4823(o.platforms); + checkUnnamed4824(o.publisherIdentifiers); checkRealtimeTimeRange(o.realtimeTimeRange); checkRelativeDateRange(o.relativeDateRange); - checkUnnamed5307(o.sellerNetworkIds); + checkUnnamed4825(o.sellerNetworkIds); unittest.expect(o.timeSeriesGranularity, unittest.equals('foo')); } buildCounterFilterSet--; @@ -858,14 +1441,14 @@ buildCounterFilteredBidDetailRow--; } -buildUnnamed5308() { +buildUnnamed4826() { var o = new core.List<api.Reason>(); o.add(buildReason()); o.add(buildReason()); return o; } -checkUnnamed5308(core.List<api.Reason> o) { +checkUnnamed4826(core.List<api.Reason> o) { unittest.expect(o, unittest.hasLength(2)); checkReason(o[0]); checkReason(o[1]); @@ -877,7 +1460,7 @@ buildCounterFilteringStats++; if (buildCounterFilteringStats < 3) { o.date = buildDate(); - o.reasons = buildUnnamed5308(); + o.reasons = buildUnnamed4826(); } buildCounterFilteringStats--; return o; @@ -887,11 +1470,120 @@ buildCounterFilteringStats++; if (buildCounterFilteringStats < 3) { checkDate(o.date); - checkUnnamed5308(o.reasons); + checkUnnamed4826(o.reasons); } buildCounterFilteringStats--; } +buildUnnamed4827() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4827(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4828() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4828(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterFirstPartyMobileApplicationTargeting = 0; +buildFirstPartyMobileApplicationTargeting() { + var o = new api.FirstPartyMobileApplicationTargeting(); + buildCounterFirstPartyMobileApplicationTargeting++; + if (buildCounterFirstPartyMobileApplicationTargeting < 3) { + o.excludedAppIds = buildUnnamed4827(); + o.targetedAppIds = buildUnnamed4828(); + } + buildCounterFirstPartyMobileApplicationTargeting--; + return o; +} + +checkFirstPartyMobileApplicationTargeting( + api.FirstPartyMobileApplicationTargeting o) { + buildCounterFirstPartyMobileApplicationTargeting++; + if (buildCounterFirstPartyMobileApplicationTargeting < 3) { + checkUnnamed4827(o.excludedAppIds); + checkUnnamed4828(o.targetedAppIds); + } + buildCounterFirstPartyMobileApplicationTargeting--; +} + +core.int buildCounterFrequencyCap = 0; +buildFrequencyCap() { + var o = new api.FrequencyCap(); + buildCounterFrequencyCap++; + if (buildCounterFrequencyCap < 3) { + o.maxImpressions = 42; + o.numTimeUnits = 42; + o.timeUnitType = "foo"; + } + buildCounterFrequencyCap--; + return o; +} + +checkFrequencyCap(api.FrequencyCap o) { + buildCounterFrequencyCap++; + if (buildCounterFrequencyCap < 3) { + unittest.expect(o.maxImpressions, unittest.equals(42)); + unittest.expect(o.numTimeUnits, unittest.equals(42)); + unittest.expect(o.timeUnitType, unittest.equals('foo')); + } + buildCounterFrequencyCap--; +} + +buildUnnamed4829() { + var o = new core.List<api.PricePerBuyer>(); + o.add(buildPricePerBuyer()); + o.add(buildPricePerBuyer()); + return o; +} + +checkUnnamed4829(core.List<api.PricePerBuyer> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPricePerBuyer(o[0]); + checkPricePerBuyer(o[1]); +} + +core.int buildCounterGuaranteedFixedPriceTerms = 0; +buildGuaranteedFixedPriceTerms() { + var o = new api.GuaranteedFixedPriceTerms(); + buildCounterGuaranteedFixedPriceTerms++; + if (buildCounterGuaranteedFixedPriceTerms < 3) { + o.fixedPrices = buildUnnamed4829(); + o.guaranteedImpressions = "foo"; + o.guaranteedLooks = "foo"; + o.minimumDailyLooks = "foo"; + } + buildCounterGuaranteedFixedPriceTerms--; + return o; +} + +checkGuaranteedFixedPriceTerms(api.GuaranteedFixedPriceTerms o) { + buildCounterGuaranteedFixedPriceTerms++; + if (buildCounterGuaranteedFixedPriceTerms < 3) { + checkUnnamed4829(o.fixedPrices); + unittest.expect(o.guaranteedImpressions, unittest.equals('foo')); + unittest.expect(o.guaranteedLooks, unittest.equals('foo')); + unittest.expect(o.minimumDailyLooks, unittest.equals('foo')); + } + buildCounterGuaranteedFixedPriceTerms--; +} + core.int buildCounterHtmlContent = 0; buildHtmlContent() { var o = new api.HtmlContent(); @@ -967,14 +1659,61 @@ buildCounterImpressionMetricsRow--; } -buildUnnamed5309() { +buildUnnamed4830() { + var o = new core.List<api.AdSize>(); + o.add(buildAdSize()); + o.add(buildAdSize()); + return o; +} + +checkUnnamed4830(core.List<api.AdSize> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAdSize(o[0]); + checkAdSize(o[1]); +} + +buildUnnamed4831() { + var o = new core.List<api.AdSize>(); + o.add(buildAdSize()); + o.add(buildAdSize()); + return o; +} + +checkUnnamed4831(core.List<api.AdSize> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAdSize(o[0]); + checkAdSize(o[1]); +} + +core.int buildCounterInventorySizeTargeting = 0; +buildInventorySizeTargeting() { + var o = new api.InventorySizeTargeting(); + buildCounterInventorySizeTargeting++; + if (buildCounterInventorySizeTargeting < 3) { + o.excludedInventorySizes = buildUnnamed4830(); + o.targetedInventorySizes = buildUnnamed4831(); + } + buildCounterInventorySizeTargeting--; + return o; +} + +checkInventorySizeTargeting(api.InventorySizeTargeting o) { + buildCounterInventorySizeTargeting++; + if (buildCounterInventorySizeTargeting < 3) { + checkUnnamed4830(o.excludedInventorySizes); + checkUnnamed4831(o.targetedInventorySizes); + } + buildCounterInventorySizeTargeting--; +} + +buildUnnamed4832() { var o = new core.List<api.BidMetricsRow>(); o.add(buildBidMetricsRow()); o.add(buildBidMetricsRow()); return o; } -checkUnnamed5309(core.List<api.BidMetricsRow> o) { +checkUnnamed4832(core.List<api.BidMetricsRow> o) { unittest.expect(o, unittest.hasLength(2)); checkBidMetricsRow(o[0]); checkBidMetricsRow(o[1]); @@ -985,7 +1724,7 @@ var o = new api.ListBidMetricsResponse(); buildCounterListBidMetricsResponse++; if (buildCounterListBidMetricsResponse < 3) { - o.bidMetricsRows = buildUnnamed5309(); + o.bidMetricsRows = buildUnnamed4832(); o.nextPageToken = "foo"; } buildCounterListBidMetricsResponse--; @@ -995,20 +1734,20 @@ checkListBidMetricsResponse(api.ListBidMetricsResponse o) { buildCounterListBidMetricsResponse++; if (buildCounterListBidMetricsResponse < 3) { - checkUnnamed5309(o.bidMetricsRows); + checkUnnamed4832(o.bidMetricsRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListBidMetricsResponse--; } -buildUnnamed5310() { +buildUnnamed4833() { var o = new core.List<api.CalloutStatusRow>(); o.add(buildCalloutStatusRow()); o.add(buildCalloutStatusRow()); return o; } -checkUnnamed5310(core.List<api.CalloutStatusRow> o) { +checkUnnamed4833(core.List<api.CalloutStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkCalloutStatusRow(o[0]); checkCalloutStatusRow(o[1]); @@ -1019,7 +1758,7 @@ var o = new api.ListBidResponseErrorsResponse(); buildCounterListBidResponseErrorsResponse++; if (buildCounterListBidResponseErrorsResponse < 3) { - o.calloutStatusRows = buildUnnamed5310(); + o.calloutStatusRows = buildUnnamed4833(); o.nextPageToken = "foo"; } buildCounterListBidResponseErrorsResponse--; @@ -1029,20 +1768,20 @@ checkListBidResponseErrorsResponse(api.ListBidResponseErrorsResponse o) { buildCounterListBidResponseErrorsResponse++; if (buildCounterListBidResponseErrorsResponse < 3) { - checkUnnamed5310(o.calloutStatusRows); + checkUnnamed4833(o.calloutStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListBidResponseErrorsResponse--; } -buildUnnamed5311() { +buildUnnamed4834() { var o = new core.List<api.BidResponseWithoutBidsStatusRow>(); o.add(buildBidResponseWithoutBidsStatusRow()); o.add(buildBidResponseWithoutBidsStatusRow()); return o; } -checkUnnamed5311(core.List<api.BidResponseWithoutBidsStatusRow> o) { +checkUnnamed4834(core.List<api.BidResponseWithoutBidsStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkBidResponseWithoutBidsStatusRow(o[0]); checkBidResponseWithoutBidsStatusRow(o[1]); @@ -1053,7 +1792,7 @@ var o = new api.ListBidResponsesWithoutBidsResponse(); buildCounterListBidResponsesWithoutBidsResponse++; if (buildCounterListBidResponsesWithoutBidsResponse < 3) { - o.bidResponseWithoutBidsStatusRows = buildUnnamed5311(); + o.bidResponseWithoutBidsStatusRows = buildUnnamed4834(); o.nextPageToken = "foo"; } buildCounterListBidResponsesWithoutBidsResponse--; @@ -1064,20 +1803,20 @@ api.ListBidResponsesWithoutBidsResponse o) { buildCounterListBidResponsesWithoutBidsResponse++; if (buildCounterListBidResponsesWithoutBidsResponse < 3) { - checkUnnamed5311(o.bidResponseWithoutBidsStatusRows); + checkUnnamed4834(o.bidResponseWithoutBidsStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListBidResponsesWithoutBidsResponse--; } -buildUnnamed5312() { +buildUnnamed4835() { var o = new core.List<api.ClientUserInvitation>(); o.add(buildClientUserInvitation()); o.add(buildClientUserInvitation()); return o; } -checkUnnamed5312(core.List<api.ClientUserInvitation> o) { +checkUnnamed4835(core.List<api.ClientUserInvitation> o) { unittest.expect(o, unittest.hasLength(2)); checkClientUserInvitation(o[0]); checkClientUserInvitation(o[1]); @@ -1088,7 +1827,7 @@ var o = new api.ListClientUserInvitationsResponse(); buildCounterListClientUserInvitationsResponse++; if (buildCounterListClientUserInvitationsResponse < 3) { - o.invitations = buildUnnamed5312(); + o.invitations = buildUnnamed4835(); o.nextPageToken = "foo"; } buildCounterListClientUserInvitationsResponse--; @@ -1099,20 +1838,20 @@ api.ListClientUserInvitationsResponse o) { buildCounterListClientUserInvitationsResponse++; if (buildCounterListClientUserInvitationsResponse < 3) { - checkUnnamed5312(o.invitations); + checkUnnamed4835(o.invitations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListClientUserInvitationsResponse--; } -buildUnnamed5313() { +buildUnnamed4836() { var o = new core.List<api.ClientUser>(); o.add(buildClientUser()); o.add(buildClientUser()); return o; } -checkUnnamed5313(core.List<api.ClientUser> o) { +checkUnnamed4836(core.List<api.ClientUser> o) { unittest.expect(o, unittest.hasLength(2)); checkClientUser(o[0]); checkClientUser(o[1]); @@ -1124,7 +1863,7 @@ buildCounterListClientUsersResponse++; if (buildCounterListClientUsersResponse < 3) { o.nextPageToken = "foo"; - o.users = buildUnnamed5313(); + o.users = buildUnnamed4836(); } buildCounterListClientUsersResponse--; return o; @@ -1134,19 +1873,19 @@ buildCounterListClientUsersResponse++; if (buildCounterListClientUsersResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5313(o.users); + checkUnnamed4836(o.users); } buildCounterListClientUsersResponse--; } -buildUnnamed5314() { +buildUnnamed4837() { var o = new core.List<api.Client>(); o.add(buildClient()); o.add(buildClient()); return o; } -checkUnnamed5314(core.List<api.Client> o) { +checkUnnamed4837(core.List<api.Client> o) { unittest.expect(o, unittest.hasLength(2)); checkClient(o[0]); checkClient(o[1]); @@ -1157,7 +1896,7 @@ var o = new api.ListClientsResponse(); buildCounterListClientsResponse++; if (buildCounterListClientsResponse < 3) { - o.clients = buildUnnamed5314(); + o.clients = buildUnnamed4837(); o.nextPageToken = "foo"; } buildCounterListClientsResponse--; @@ -1167,20 +1906,20 @@ checkListClientsResponse(api.ListClientsResponse o) { buildCounterListClientsResponse++; if (buildCounterListClientsResponse < 3) { - checkUnnamed5314(o.clients); + checkUnnamed4837(o.clients); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListClientsResponse--; } -buildUnnamed5315() { +buildUnnamed4838() { var o = new core.List<api.FilteredBidCreativeRow>(); o.add(buildFilteredBidCreativeRow()); o.add(buildFilteredBidCreativeRow()); return o; } -checkUnnamed5315(core.List<api.FilteredBidCreativeRow> o) { +checkUnnamed4838(core.List<api.FilteredBidCreativeRow> o) { unittest.expect(o, unittest.hasLength(2)); checkFilteredBidCreativeRow(o[0]); checkFilteredBidCreativeRow(o[1]); @@ -1191,7 +1930,7 @@ var o = new api.ListCreativeStatusBreakdownByCreativeResponse(); buildCounterListCreativeStatusBreakdownByCreativeResponse++; if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) { - o.filteredBidCreativeRows = buildUnnamed5315(); + o.filteredBidCreativeRows = buildUnnamed4838(); o.nextPageToken = "foo"; } buildCounterListCreativeStatusBreakdownByCreativeResponse--; @@ -1202,20 +1941,20 @@ api.ListCreativeStatusBreakdownByCreativeResponse o) { buildCounterListCreativeStatusBreakdownByCreativeResponse++; if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) { - checkUnnamed5315(o.filteredBidCreativeRows); + checkUnnamed4838(o.filteredBidCreativeRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListCreativeStatusBreakdownByCreativeResponse--; } -buildUnnamed5316() { +buildUnnamed4839() { var o = new core.List<api.FilteredBidDetailRow>(); o.add(buildFilteredBidDetailRow()); o.add(buildFilteredBidDetailRow()); return o; } -checkUnnamed5316(core.List<api.FilteredBidDetailRow> o) { +checkUnnamed4839(core.List<api.FilteredBidDetailRow> o) { unittest.expect(o, unittest.hasLength(2)); checkFilteredBidDetailRow(o[0]); checkFilteredBidDetailRow(o[1]); @@ -1227,7 +1966,7 @@ buildCounterListCreativeStatusBreakdownByDetailResponse++; if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) { o.detailType = "foo"; - o.filteredBidDetailRows = buildUnnamed5316(); + o.filteredBidDetailRows = buildUnnamed4839(); o.nextPageToken = "foo"; } buildCounterListCreativeStatusBreakdownByDetailResponse--; @@ -1239,20 +1978,20 @@ buildCounterListCreativeStatusBreakdownByDetailResponse++; if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) { unittest.expect(o.detailType, unittest.equals('foo')); - checkUnnamed5316(o.filteredBidDetailRows); + checkUnnamed4839(o.filteredBidDetailRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListCreativeStatusBreakdownByDetailResponse--; } -buildUnnamed5317() { +buildUnnamed4840() { var o = new core.List<api.Creative>(); o.add(buildCreative()); o.add(buildCreative()); return o; } -checkUnnamed5317(core.List<api.Creative> o) { +checkUnnamed4840(core.List<api.Creative> o) { unittest.expect(o, unittest.hasLength(2)); checkCreative(o[0]); checkCreative(o[1]); @@ -1263,7 +2002,7 @@ var o = new api.ListCreativesResponse(); buildCounterListCreativesResponse++; if (buildCounterListCreativesResponse < 3) { - o.creatives = buildUnnamed5317(); + o.creatives = buildUnnamed4840(); o.nextPageToken = "foo"; } buildCounterListCreativesResponse--; @@ -1273,20 +2012,20 @@ checkListCreativesResponse(api.ListCreativesResponse o) { buildCounterListCreativesResponse++; if (buildCounterListCreativesResponse < 3) { - checkUnnamed5317(o.creatives); + checkUnnamed4840(o.creatives); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListCreativesResponse--; } -buildUnnamed5318() { +buildUnnamed4841() { var o = new core.List<api.CreativeDealAssociation>(); o.add(buildCreativeDealAssociation()); o.add(buildCreativeDealAssociation()); return o; } -checkUnnamed5318(core.List<api.CreativeDealAssociation> o) { +checkUnnamed4841(core.List<api.CreativeDealAssociation> o) { unittest.expect(o, unittest.hasLength(2)); checkCreativeDealAssociation(o[0]); checkCreativeDealAssociation(o[1]); @@ -1297,7 +2036,7 @@ var o = new api.ListDealAssociationsResponse(); buildCounterListDealAssociationsResponse++; if (buildCounterListDealAssociationsResponse < 3) { - o.associations = buildUnnamed5318(); + o.associations = buildUnnamed4841(); o.nextPageToken = "foo"; } buildCounterListDealAssociationsResponse--; @@ -1307,20 +2046,20 @@ checkListDealAssociationsResponse(api.ListDealAssociationsResponse o) { buildCounterListDealAssociationsResponse++; if (buildCounterListDealAssociationsResponse < 3) { - checkUnnamed5318(o.associations); + checkUnnamed4841(o.associations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListDealAssociationsResponse--; } -buildUnnamed5319() { +buildUnnamed4842() { var o = new core.List<api.FilterSet>(); o.add(buildFilterSet()); o.add(buildFilterSet()); return o; } -checkUnnamed5319(core.List<api.FilterSet> o) { +checkUnnamed4842(core.List<api.FilterSet> o) { unittest.expect(o, unittest.hasLength(2)); checkFilterSet(o[0]); checkFilterSet(o[1]); @@ -1331,7 +2070,7 @@ var o = new api.ListFilterSetsResponse(); buildCounterListFilterSetsResponse++; if (buildCounterListFilterSetsResponse < 3) { - o.filterSets = buildUnnamed5319(); + o.filterSets = buildUnnamed4842(); o.nextPageToken = "foo"; } buildCounterListFilterSetsResponse--; @@ -1341,20 +2080,20 @@ checkListFilterSetsResponse(api.ListFilterSetsResponse o) { buildCounterListFilterSetsResponse++; if (buildCounterListFilterSetsResponse < 3) { - checkUnnamed5319(o.filterSets); + checkUnnamed4842(o.filterSets); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListFilterSetsResponse--; } -buildUnnamed5320() { +buildUnnamed4843() { var o = new core.List<api.CalloutStatusRow>(); o.add(buildCalloutStatusRow()); o.add(buildCalloutStatusRow()); return o; } -checkUnnamed5320(core.List<api.CalloutStatusRow> o) { +checkUnnamed4843(core.List<api.CalloutStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkCalloutStatusRow(o[0]); checkCalloutStatusRow(o[1]); @@ -1365,7 +2104,7 @@ var o = new api.ListFilteredBidRequestsResponse(); buildCounterListFilteredBidRequestsResponse++; if (buildCounterListFilteredBidRequestsResponse < 3) { - o.calloutStatusRows = buildUnnamed5320(); + o.calloutStatusRows = buildUnnamed4843(); o.nextPageToken = "foo"; } buildCounterListFilteredBidRequestsResponse--; @@ -1375,20 +2114,20 @@ checkListFilteredBidRequestsResponse(api.ListFilteredBidRequestsResponse o) { buildCounterListFilteredBidRequestsResponse++; if (buildCounterListFilteredBidRequestsResponse < 3) { - checkUnnamed5320(o.calloutStatusRows); + checkUnnamed4843(o.calloutStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListFilteredBidRequestsResponse--; } -buildUnnamed5321() { +buildUnnamed4844() { var o = new core.List<api.CreativeStatusRow>(); o.add(buildCreativeStatusRow()); o.add(buildCreativeStatusRow()); return o; } -checkUnnamed5321(core.List<api.CreativeStatusRow> o) { +checkUnnamed4844(core.List<api.CreativeStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkCreativeStatusRow(o[0]); checkCreativeStatusRow(o[1]); @@ -1399,7 +2138,7 @@ var o = new api.ListFilteredBidsResponse(); buildCounterListFilteredBidsResponse++; if (buildCounterListFilteredBidsResponse < 3) { - o.creativeStatusRows = buildUnnamed5321(); + o.creativeStatusRows = buildUnnamed4844(); o.nextPageToken = "foo"; } buildCounterListFilteredBidsResponse--; @@ -1409,20 +2148,20 @@ checkListFilteredBidsResponse(api.ListFilteredBidsResponse o) { buildCounterListFilteredBidsResponse++; if (buildCounterListFilteredBidsResponse < 3) { - checkUnnamed5321(o.creativeStatusRows); + checkUnnamed4844(o.creativeStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListFilteredBidsResponse--; } -buildUnnamed5322() { +buildUnnamed4845() { var o = new core.List<api.ImpressionMetricsRow>(); o.add(buildImpressionMetricsRow()); o.add(buildImpressionMetricsRow()); return o; } -checkUnnamed5322(core.List<api.ImpressionMetricsRow> o) { +checkUnnamed4845(core.List<api.ImpressionMetricsRow> o) { unittest.expect(o, unittest.hasLength(2)); checkImpressionMetricsRow(o[0]); checkImpressionMetricsRow(o[1]); @@ -1433,7 +2172,7 @@ var o = new api.ListImpressionMetricsResponse(); buildCounterListImpressionMetricsResponse++; if (buildCounterListImpressionMetricsResponse < 3) { - o.impressionMetricsRows = buildUnnamed5322(); + o.impressionMetricsRows = buildUnnamed4845(); o.nextPageToken = "foo"; } buildCounterListImpressionMetricsResponse--; @@ -1443,20 +2182,20 @@ checkListImpressionMetricsResponse(api.ListImpressionMetricsResponse o) { buildCounterListImpressionMetricsResponse++; if (buildCounterListImpressionMetricsResponse < 3) { - checkUnnamed5322(o.impressionMetricsRows); + checkUnnamed4845(o.impressionMetricsRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListImpressionMetricsResponse--; } -buildUnnamed5323() { +buildUnnamed4846() { var o = new core.List<api.CreativeStatusRow>(); o.add(buildCreativeStatusRow()); o.add(buildCreativeStatusRow()); return o; } -checkUnnamed5323(core.List<api.CreativeStatusRow> o) { +checkUnnamed4846(core.List<api.CreativeStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkCreativeStatusRow(o[0]); checkCreativeStatusRow(o[1]); @@ -1467,7 +2206,7 @@ var o = new api.ListLosingBidsResponse(); buildCounterListLosingBidsResponse++; if (buildCounterListLosingBidsResponse < 3) { - o.creativeStatusRows = buildUnnamed5323(); + o.creativeStatusRows = buildUnnamed4846(); o.nextPageToken = "foo"; } buildCounterListLosingBidsResponse--; @@ -1477,20 +2216,20 @@ checkListLosingBidsResponse(api.ListLosingBidsResponse o) { buildCounterListLosingBidsResponse++; if (buildCounterListLosingBidsResponse < 3) { - checkUnnamed5323(o.creativeStatusRows); + checkUnnamed4846(o.creativeStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLosingBidsResponse--; } -buildUnnamed5324() { +buildUnnamed4847() { var o = new core.List<api.NonBillableWinningBidStatusRow>(); o.add(buildNonBillableWinningBidStatusRow()); o.add(buildNonBillableWinningBidStatusRow()); return o; } -checkUnnamed5324(core.List<api.NonBillableWinningBidStatusRow> o) { +checkUnnamed4847(core.List<api.NonBillableWinningBidStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkNonBillableWinningBidStatusRow(o[0]); checkNonBillableWinningBidStatusRow(o[1]); @@ -1502,7 +2241,7 @@ buildCounterListNonBillableWinningBidsResponse++; if (buildCounterListNonBillableWinningBidsResponse < 3) { o.nextPageToken = "foo"; - o.nonBillableWinningBidStatusRows = buildUnnamed5324(); + o.nonBillableWinningBidStatusRows = buildUnnamed4847(); } buildCounterListNonBillableWinningBidsResponse--; return o; @@ -1513,19 +2252,121 @@ buildCounterListNonBillableWinningBidsResponse++; if (buildCounterListNonBillableWinningBidsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5324(o.nonBillableWinningBidStatusRows); + checkUnnamed4847(o.nonBillableWinningBidStatusRows); } buildCounterListNonBillableWinningBidsResponse--; } -buildUnnamed5325() { +buildUnnamed4848() { + var o = new core.List<api.Product>(); + o.add(buildProduct()); + o.add(buildProduct()); + return o; +} + +checkUnnamed4848(core.List<api.Product> o) { + unittest.expect(o, unittest.hasLength(2)); + checkProduct(o[0]); + checkProduct(o[1]); +} + +core.int buildCounterListProductsResponse = 0; +buildListProductsResponse() { + var o = new api.ListProductsResponse(); + buildCounterListProductsResponse++; + if (buildCounterListProductsResponse < 3) { + o.nextPageToken = "foo"; + o.products = buildUnnamed4848(); + } + buildCounterListProductsResponse--; + return o; +} + +checkListProductsResponse(api.ListProductsResponse o) { + buildCounterListProductsResponse++; + if (buildCounterListProductsResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4848(o.products); + } + buildCounterListProductsResponse--; +} + +buildUnnamed4849() { + var o = new core.List<api.Proposal>(); + o.add(buildProposal()); + o.add(buildProposal()); + return o; +} + +checkUnnamed4849(core.List<api.Proposal> o) { + unittest.expect(o, unittest.hasLength(2)); + checkProposal(o[0]); + checkProposal(o[1]); +} + +core.int buildCounterListProposalsResponse = 0; +buildListProposalsResponse() { + var o = new api.ListProposalsResponse(); + buildCounterListProposalsResponse++; + if (buildCounterListProposalsResponse < 3) { + o.nextPageToken = "foo"; + o.proposals = buildUnnamed4849(); + } + buildCounterListProposalsResponse--; + return o; +} + +checkListProposalsResponse(api.ListProposalsResponse o) { + buildCounterListProposalsResponse++; + if (buildCounterListProposalsResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4849(o.proposals); + } + buildCounterListProposalsResponse--; +} + +buildUnnamed4850() { + var o = new core.List<api.PublisherProfile>(); + o.add(buildPublisherProfile()); + o.add(buildPublisherProfile()); + return o; +} + +checkUnnamed4850(core.List<api.PublisherProfile> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPublisherProfile(o[0]); + checkPublisherProfile(o[1]); +} + +core.int buildCounterListPublisherProfilesResponse = 0; +buildListPublisherProfilesResponse() { + var o = new api.ListPublisherProfilesResponse(); + buildCounterListPublisherProfilesResponse++; + if (buildCounterListPublisherProfilesResponse < 3) { + o.nextPageToken = "foo"; + o.publisherProfiles = buildUnnamed4850(); + } + buildCounterListPublisherProfilesResponse--; + return o; +} + +checkListPublisherProfilesResponse(api.ListPublisherProfilesResponse o) { + buildCounterListPublisherProfilesResponse++; + if (buildCounterListPublisherProfilesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4850(o.publisherProfiles); + } + buildCounterListPublisherProfilesResponse--; +} + +buildUnnamed4851() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5325(core.List<core.int> o) { +checkUnnamed4851(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); @@ -1536,7 +2377,7 @@ var o = new api.LocationContext(); buildCounterLocationContext++; if (buildCounterLocationContext < 3) { - o.geoCriteriaIds = buildUnnamed5325(); + o.geoCriteriaIds = buildUnnamed4851(); } buildCounterLocationContext--; return o; @@ -1545,11 +2386,38 @@ checkLocationContext(api.LocationContext o) { buildCounterLocationContext++; if (buildCounterLocationContext < 3) { - checkUnnamed5325(o.geoCriteriaIds); + checkUnnamed4851(o.geoCriteriaIds); } buildCounterLocationContext--; } +core.int buildCounterMarketplaceTargeting = 0; +buildMarketplaceTargeting() { + var o = new api.MarketplaceTargeting(); + buildCounterMarketplaceTargeting++; + if (buildCounterMarketplaceTargeting < 3) { + o.geoTargeting = buildCriteriaTargeting(); + o.inventorySizeTargeting = buildInventorySizeTargeting(); + o.placementTargeting = buildPlacementTargeting(); + o.technologyTargeting = buildTechnologyTargeting(); + o.videoTargeting = buildVideoTargeting(); + } + buildCounterMarketplaceTargeting--; + return o; +} + +checkMarketplaceTargeting(api.MarketplaceTargeting o) { + buildCounterMarketplaceTargeting++; + if (buildCounterMarketplaceTargeting < 3) { + checkCriteriaTargeting(o.geoTargeting); + checkInventorySizeTargeting(o.inventorySizeTargeting); + checkPlacementTargeting(o.placementTargeting); + checkTechnologyTargeting(o.technologyTargeting); + checkVideoTargeting(o.videoTargeting); + } + buildCounterMarketplaceTargeting--; +} + core.int buildCounterMetricValue = 0; buildMetricValue() { var o = new api.MetricValue(); @@ -1571,6 +2439,48 @@ buildCounterMetricValue--; } +core.int buildCounterMobileApplicationTargeting = 0; +buildMobileApplicationTargeting() { + var o = new api.MobileApplicationTargeting(); + buildCounterMobileApplicationTargeting++; + if (buildCounterMobileApplicationTargeting < 3) { + o.firstPartyTargeting = buildFirstPartyMobileApplicationTargeting(); + } + buildCounterMobileApplicationTargeting--; + return o; +} + +checkMobileApplicationTargeting(api.MobileApplicationTargeting o) { + buildCounterMobileApplicationTargeting++; + if (buildCounterMobileApplicationTargeting < 3) { + checkFirstPartyMobileApplicationTargeting(o.firstPartyTargeting); + } + buildCounterMobileApplicationTargeting--; +} + +core.int buildCounterMoney = 0; +buildMoney() { + var o = new api.Money(); + buildCounterMoney++; + if (buildCounterMoney < 3) { + o.currencyCode = "foo"; + o.nanos = 42; + o.units = "foo"; + } + buildCounterMoney--; + return o; +} + +checkMoney(api.Money o) { + buildCounterMoney++; + if (buildCounterMoney < 3) { + unittest.expect(o.currencyCode, unittest.equals('foo')); + unittest.expect(o.nanos, unittest.equals(42)); + unittest.expect(o.units, unittest.equals('foo')); + } + buildCounterMoney--; +} + core.int buildCounterNativeContent = 0; buildNativeContent() { var o = new api.NativeContent(); @@ -1637,14 +2547,168 @@ buildCounterNonBillableWinningBidStatusRow--; } -buildUnnamed5326() { +buildUnnamed4852() { + var o = new core.List<api.PricePerBuyer>(); + o.add(buildPricePerBuyer()); + o.add(buildPricePerBuyer()); + return o; +} + +checkUnnamed4852(core.List<api.PricePerBuyer> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPricePerBuyer(o[0]); + checkPricePerBuyer(o[1]); +} + +core.int buildCounterNonGuaranteedAuctionTerms = 0; +buildNonGuaranteedAuctionTerms() { + var o = new api.NonGuaranteedAuctionTerms(); + buildCounterNonGuaranteedAuctionTerms++; + if (buildCounterNonGuaranteedAuctionTerms < 3) { + o.autoOptimizePrivateAuction = true; + o.reservePricesPerBuyer = buildUnnamed4852(); + } + buildCounterNonGuaranteedAuctionTerms--; + return o; +} + +checkNonGuaranteedAuctionTerms(api.NonGuaranteedAuctionTerms o) { + buildCounterNonGuaranteedAuctionTerms++; + if (buildCounterNonGuaranteedAuctionTerms < 3) { + unittest.expect(o.autoOptimizePrivateAuction, unittest.isTrue); + checkUnnamed4852(o.reservePricesPerBuyer); + } + buildCounterNonGuaranteedAuctionTerms--; +} + +buildUnnamed4853() { + var o = new core.List<api.PricePerBuyer>(); + o.add(buildPricePerBuyer()); + o.add(buildPricePerBuyer()); + return o; +} + +checkUnnamed4853(core.List<api.PricePerBuyer> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPricePerBuyer(o[0]); + checkPricePerBuyer(o[1]); +} + +core.int buildCounterNonGuaranteedFixedPriceTerms = 0; +buildNonGuaranteedFixedPriceTerms() { + var o = new api.NonGuaranteedFixedPriceTerms(); + buildCounterNonGuaranteedFixedPriceTerms++; + if (buildCounterNonGuaranteedFixedPriceTerms < 3) { + o.fixedPrices = buildUnnamed4853(); + } + buildCounterNonGuaranteedFixedPriceTerms--; + return o; +} + +checkNonGuaranteedFixedPriceTerms(api.NonGuaranteedFixedPriceTerms o) { + buildCounterNonGuaranteedFixedPriceTerms++; + if (buildCounterNonGuaranteedFixedPriceTerms < 3) { + checkUnnamed4853(o.fixedPrices); + } + buildCounterNonGuaranteedFixedPriceTerms--; +} + +core.int buildCounterNote = 0; +buildNote() { + var o = new api.Note(); + buildCounterNote++; + if (buildCounterNote < 3) { + o.createTime = "foo"; + o.creatorRole = "foo"; + o.note = "foo"; + o.noteId = "foo"; + o.proposalRevision = "foo"; + } + buildCounterNote--; + return o; +} + +checkNote(api.Note o) { + buildCounterNote++; + if (buildCounterNote < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.creatorRole, unittest.equals('foo')); + unittest.expect(o.note, unittest.equals('foo')); + unittest.expect(o.noteId, unittest.equals('foo')); + unittest.expect(o.proposalRevision, unittest.equals('foo')); + } + buildCounterNote--; +} + +core.int buildCounterOperatingSystemTargeting = 0; +buildOperatingSystemTargeting() { + var o = new api.OperatingSystemTargeting(); + buildCounterOperatingSystemTargeting++; + if (buildCounterOperatingSystemTargeting < 3) { + o.operatingSystemCriteria = buildCriteriaTargeting(); + o.operatingSystemVersionCriteria = buildCriteriaTargeting(); + } + buildCounterOperatingSystemTargeting--; + return o; +} + +checkOperatingSystemTargeting(api.OperatingSystemTargeting o) { + buildCounterOperatingSystemTargeting++; + if (buildCounterOperatingSystemTargeting < 3) { + checkCriteriaTargeting(o.operatingSystemCriteria); + checkCriteriaTargeting(o.operatingSystemVersionCriteria); + } + buildCounterOperatingSystemTargeting--; +} + +core.int buildCounterPauseProposalRequest = 0; +buildPauseProposalRequest() { + var o = new api.PauseProposalRequest(); + buildCounterPauseProposalRequest++; + if (buildCounterPauseProposalRequest < 3) { + o.reason = "foo"; + } + buildCounterPauseProposalRequest--; + return o; +} + +checkPauseProposalRequest(api.PauseProposalRequest o) { + buildCounterPauseProposalRequest++; + if (buildCounterPauseProposalRequest < 3) { + unittest.expect(o.reason, unittest.equals('foo')); + } + buildCounterPauseProposalRequest--; +} + +core.int buildCounterPlacementTargeting = 0; +buildPlacementTargeting() { + var o = new api.PlacementTargeting(); + buildCounterPlacementTargeting++; + if (buildCounterPlacementTargeting < 3) { + o.mobileApplicationTargeting = buildMobileApplicationTargeting(); + o.urlTargeting = buildUrlTargeting(); + } + buildCounterPlacementTargeting--; + return o; +} + +checkPlacementTargeting(api.PlacementTargeting o) { + buildCounterPlacementTargeting++; + if (buildCounterPlacementTargeting < 3) { + checkMobileApplicationTargeting(o.mobileApplicationTargeting); + checkUrlTargeting(o.urlTargeting); + } + buildCounterPlacementTargeting--; +} + +buildUnnamed4854() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5326(core.List<core.String> o) { +checkUnnamed4854(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1655,7 +2719,7 @@ var o = new api.PlatformContext(); buildCounterPlatformContext++; if (buildCounterPlatformContext < 3) { - o.platforms = buildUnnamed5326(); + o.platforms = buildUnnamed4854(); } buildCounterPlatformContext--; return o; @@ -1664,11 +2728,338 @@ checkPlatformContext(api.PlatformContext o) { buildCounterPlatformContext++; if (buildCounterPlatformContext < 3) { - checkUnnamed5326(o.platforms); + checkUnnamed4854(o.platforms); } buildCounterPlatformContext--; } +core.int buildCounterPrice = 0; +buildPrice() { + var o = new api.Price(); + buildCounterPrice++; + if (buildCounterPrice < 3) { + o.amount = buildMoney(); + o.pricingType = "foo"; + } + buildCounterPrice--; + return o; +} + +checkPrice(api.Price o) { + buildCounterPrice++; + if (buildCounterPrice < 3) { + checkMoney(o.amount); + unittest.expect(o.pricingType, unittest.equals('foo')); + } + buildCounterPrice--; +} + +buildUnnamed4855() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4855(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPricePerBuyer = 0; +buildPricePerBuyer() { + var o = new api.PricePerBuyer(); + buildCounterPricePerBuyer++; + if (buildCounterPricePerBuyer < 3) { + o.advertiserIds = buildUnnamed4855(); + o.buyer = buildBuyer(); + o.price = buildPrice(); + } + buildCounterPricePerBuyer--; + return o; +} + +checkPricePerBuyer(api.PricePerBuyer o) { + buildCounterPricePerBuyer++; + if (buildCounterPricePerBuyer < 3) { + checkUnnamed4855(o.advertiserIds); + checkBuyer(o.buyer); + checkPrice(o.price); + } + buildCounterPricePerBuyer--; +} + +core.int buildCounterPrivateData = 0; +buildPrivateData() { + var o = new api.PrivateData(); + buildCounterPrivateData++; + if (buildCounterPrivateData < 3) { + o.referenceId = "foo"; + } + buildCounterPrivateData--; + return o; +} + +checkPrivateData(api.PrivateData o) { + buildCounterPrivateData++; + if (buildCounterPrivateData < 3) { + unittest.expect(o.referenceId, unittest.equals('foo')); + } + buildCounterPrivateData--; +} + +buildUnnamed4856() { + var o = new core.List<api.ContactInformation>(); + o.add(buildContactInformation()); + o.add(buildContactInformation()); + return o; +} + +checkUnnamed4856(core.List<api.ContactInformation> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContactInformation(o[0]); + checkContactInformation(o[1]); +} + +buildUnnamed4857() { + var o = new core.List<api.TargetingCriteria>(); + o.add(buildTargetingCriteria()); + o.add(buildTargetingCriteria()); + return o; +} + +checkUnnamed4857(core.List<api.TargetingCriteria> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTargetingCriteria(o[0]); + checkTargetingCriteria(o[1]); +} + +core.int buildCounterProduct = 0; +buildProduct() { + var o = new api.Product(); + buildCounterProduct++; + if (buildCounterProduct < 3) { + o.availableEndTime = "foo"; + o.availableStartTime = "foo"; + o.createTime = "foo"; + o.creatorContacts = buildUnnamed4856(); + o.displayName = "foo"; + o.hasCreatorSignedOff = true; + o.productId = "foo"; + o.productRevision = "foo"; + o.publisherProfileId = "foo"; + o.seller = buildSeller(); + o.syndicationProduct = "foo"; + o.targetingCriterion = buildUnnamed4857(); + o.terms = buildDealTerms(); + o.updateTime = "foo"; + o.webPropertyCode = "foo"; + } + buildCounterProduct--; + return o; +} + +checkProduct(api.Product o) { + buildCounterProduct++; + if (buildCounterProduct < 3) { + unittest.expect(o.availableEndTime, unittest.equals('foo')); + unittest.expect(o.availableStartTime, unittest.equals('foo')); + unittest.expect(o.createTime, unittest.equals('foo')); + checkUnnamed4856(o.creatorContacts); + unittest.expect(o.displayName, unittest.equals('foo')); + unittest.expect(o.hasCreatorSignedOff, unittest.isTrue); + unittest.expect(o.productId, unittest.equals('foo')); + unittest.expect(o.productRevision, unittest.equals('foo')); + unittest.expect(o.publisherProfileId, unittest.equals('foo')); + checkSeller(o.seller); + unittest.expect(o.syndicationProduct, unittest.equals('foo')); + checkUnnamed4857(o.targetingCriterion); + checkDealTerms(o.terms); + unittest.expect(o.updateTime, unittest.equals('foo')); + unittest.expect(o.webPropertyCode, unittest.equals('foo')); + } + buildCounterProduct--; +} + +buildUnnamed4858() { + var o = new core.List<api.ContactInformation>(); + o.add(buildContactInformation()); + o.add(buildContactInformation()); + return o; +} + +checkUnnamed4858(core.List<api.ContactInformation> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContactInformation(o[0]); + checkContactInformation(o[1]); +} + +buildUnnamed4859() { + var o = new core.List<api.Deal>(); + o.add(buildDeal()); + o.add(buildDeal()); + return o; +} + +checkUnnamed4859(core.List<api.Deal> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDeal(o[0]); + checkDeal(o[1]); +} + +buildUnnamed4860() { + var o = new core.List<api.Note>(); + o.add(buildNote()); + o.add(buildNote()); + return o; +} + +checkUnnamed4860(core.List<api.Note> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNote(o[0]); + checkNote(o[1]); +} + +buildUnnamed4861() { + var o = new core.List<api.ContactInformation>(); + o.add(buildContactInformation()); + o.add(buildContactInformation()); + return o; +} + +checkUnnamed4861(core.List<api.ContactInformation> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContactInformation(o[0]); + checkContactInformation(o[1]); +} + +core.int buildCounterProposal = 0; +buildProposal() { + var o = new api.Proposal(); + buildCounterProposal++; + if (buildCounterProposal < 3) { + o.billedBuyer = buildBuyer(); + o.buyer = buildBuyer(); + o.buyerContacts = buildUnnamed4858(); + o.buyerPrivateData = buildPrivateData(); + o.deals = buildUnnamed4859(); + o.displayName = "foo"; + o.isRenegotiating = true; + o.isSetupComplete = true; + o.lastUpdaterOrCommentorRole = "foo"; + o.notes = buildUnnamed4860(); + o.originatorRole = "foo"; + o.privateAuctionId = "foo"; + o.proposalId = "foo"; + o.proposalRevision = "foo"; + o.proposalState = "foo"; + o.seller = buildSeller(); + o.sellerContacts = buildUnnamed4861(); + o.updateTime = "foo"; + } + buildCounterProposal--; + return o; +} + +checkProposal(api.Proposal o) { + buildCounterProposal++; + if (buildCounterProposal < 3) { + checkBuyer(o.billedBuyer); + checkBuyer(o.buyer); + checkUnnamed4858(o.buyerContacts); + checkPrivateData(o.buyerPrivateData); + checkUnnamed4859(o.deals); + unittest.expect(o.displayName, unittest.equals('foo')); + unittest.expect(o.isRenegotiating, unittest.isTrue); + unittest.expect(o.isSetupComplete, unittest.isTrue); + unittest.expect(o.lastUpdaterOrCommentorRole, unittest.equals('foo')); + checkUnnamed4860(o.notes); + unittest.expect(o.originatorRole, unittest.equals('foo')); + unittest.expect(o.privateAuctionId, unittest.equals('foo')); + unittest.expect(o.proposalId, unittest.equals('foo')); + unittest.expect(o.proposalRevision, unittest.equals('foo')); + unittest.expect(o.proposalState, unittest.equals('foo')); + checkSeller(o.seller); + checkUnnamed4861(o.sellerContacts); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterProposal--; +} + +buildUnnamed4862() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4862(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4863() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4863(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPublisherProfile = 0; +buildPublisherProfile() { + var o = new api.PublisherProfile(); + buildCounterPublisherProfile++; + if (buildCounterPublisherProfile < 3) { + o.audienceDescription = "foo"; + o.buyerPitchStatement = "foo"; + o.directDealsContact = "foo"; + o.displayName = "foo"; + o.domains = buildUnnamed4862(); + o.googlePlusUrl = "foo"; + o.logoUrl = "foo"; + o.mediaKitUrl = "foo"; + o.overview = "foo"; + o.programmaticDealsContact = "foo"; + o.publisherProfileId = "foo"; + o.rateCardInfoUrl = "foo"; + o.samplePageUrl = "foo"; + o.seller = buildSeller(); + o.topHeadlines = buildUnnamed4863(); + } + buildCounterPublisherProfile--; + return o; +} + +checkPublisherProfile(api.PublisherProfile o) { + buildCounterPublisherProfile++; + if (buildCounterPublisherProfile < 3) { + unittest.expect(o.audienceDescription, unittest.equals('foo')); + unittest.expect(o.buyerPitchStatement, unittest.equals('foo')); + unittest.expect(o.directDealsContact, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + checkUnnamed4862(o.domains); + unittest.expect(o.googlePlusUrl, unittest.equals('foo')); + unittest.expect(o.logoUrl, unittest.equals('foo')); + unittest.expect(o.mediaKitUrl, unittest.equals('foo')); + unittest.expect(o.overview, unittest.equals('foo')); + unittest.expect(o.programmaticDealsContact, unittest.equals('foo')); + unittest.expect(o.publisherProfileId, unittest.equals('foo')); + unittest.expect(o.rateCardInfoUrl, unittest.equals('foo')); + unittest.expect(o.samplePageUrl, unittest.equals('foo')); + checkSeller(o.seller); + checkUnnamed4863(o.topHeadlines); + } + buildCounterPublisherProfile--; +} + core.int buildCounterRealtimeTimeRange = 0; buildRealtimeTimeRange() { var o = new api.RealtimeTimeRange(); @@ -1749,11 +3140,27 @@ buildCounterRemoveDealAssociationRequest--; } +core.int buildCounterResumeProposalRequest = 0; +buildResumeProposalRequest() { + var o = new api.ResumeProposalRequest(); + buildCounterResumeProposalRequest++; + if (buildCounterResumeProposalRequest < 3) {} + buildCounterResumeProposalRequest--; + return o; +} + +checkResumeProposalRequest(api.ResumeProposalRequest o) { + buildCounterResumeProposalRequest++; + if (buildCounterResumeProposalRequest < 3) {} + buildCounterResumeProposalRequest--; +} + core.int buildCounterRowDimensions = 0; buildRowDimensions() { var o = new api.RowDimensions(); buildCounterRowDimensions++; if (buildCounterRowDimensions < 3) { + o.publisherIdentifier = "foo"; o.timeInterval = buildTimeInterval(); } buildCounterRowDimensions--; @@ -1763,19 +3170,20 @@ checkRowDimensions(api.RowDimensions o) { buildCounterRowDimensions++; if (buildCounterRowDimensions < 3) { + unittest.expect(o.publisherIdentifier, unittest.equals('foo')); checkTimeInterval(o.timeInterval); } buildCounterRowDimensions--; } -buildUnnamed5327() { +buildUnnamed4864() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5327(core.List<core.String> o) { +checkUnnamed4864(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1786,7 +3194,7 @@ var o = new api.SecurityContext(); buildCounterSecurityContext++; if (buildCounterSecurityContext < 3) { - o.securities = buildUnnamed5327(); + o.securities = buildUnnamed4864(); } buildCounterSecurityContext--; return o; @@ -1795,11 +3203,32 @@ checkSecurityContext(api.SecurityContext o) { buildCounterSecurityContext++; if (buildCounterSecurityContext < 3) { - checkUnnamed5327(o.securities); + checkUnnamed4864(o.securities); } buildCounterSecurityContext--; } +core.int buildCounterSeller = 0; +buildSeller() { + var o = new api.Seller(); + buildCounterSeller++; + if (buildCounterSeller < 3) { + o.accountId = "foo"; + o.subAccountId = "foo"; + } + buildCounterSeller--; + return o; +} + +checkSeller(api.Seller o) { + buildCounterSeller++; + if (buildCounterSeller < 3) { + unittest.expect(o.accountId, unittest.equals('foo')); + unittest.expect(o.subAccountId, unittest.equals('foo')); + } + buildCounterSeller--; +} + core.int buildCounterServingContext = 0; buildServingContext() { var o = new api.ServingContext(); @@ -1829,27 +3258,27 @@ buildCounterServingContext--; } -buildUnnamed5328() { +buildUnnamed4865() { var o = new core.List<api.ServingContext>(); o.add(buildServingContext()); o.add(buildServingContext()); return o; } -checkUnnamed5328(core.List<api.ServingContext> o) { +checkUnnamed4865(core.List<api.ServingContext> o) { unittest.expect(o, unittest.hasLength(2)); checkServingContext(o[0]); checkServingContext(o[1]); } -buildUnnamed5329() { +buildUnnamed4866() { var o = new core.List<api.Disapproval>(); o.add(buildDisapproval()); o.add(buildDisapproval()); return o; } -checkUnnamed5329(core.List<api.Disapproval> o) { +checkUnnamed4866(core.List<api.Disapproval> o) { unittest.expect(o, unittest.hasLength(2)); checkDisapproval(o[0]); checkDisapproval(o[1]); @@ -1860,9 +3289,9 @@ var o = new api.ServingRestriction(); buildCounterServingRestriction++; if (buildCounterServingRestriction < 3) { - o.contexts = buildUnnamed5328(); + o.contexts = buildUnnamed4865(); o.disapproval = buildDisapproval(); - o.disapprovalReasons = buildUnnamed5329(); + o.disapprovalReasons = buildUnnamed4866(); o.status = "foo"; } buildCounterServingRestriction--; @@ -1872,14 +3301,35 @@ checkServingRestriction(api.ServingRestriction o) { buildCounterServingRestriction++; if (buildCounterServingRestriction < 3) { - checkUnnamed5328(o.contexts); + checkUnnamed4865(o.contexts); checkDisapproval(o.disapproval); - checkUnnamed5329(o.disapprovalReasons); + checkUnnamed4866(o.disapprovalReasons); unittest.expect(o.status, unittest.equals('foo')); } buildCounterServingRestriction--; } +core.int buildCounterSize = 0; +buildSize() { + var o = new api.Size(); + buildCounterSize++; + if (buildCounterSize < 3) { + o.height = 42; + o.width = 42; + } + buildCounterSize--; + return o; +} + +checkSize(api.Size o) { + buildCounterSize++; + if (buildCounterSize < 3) { + unittest.expect(o.height, unittest.equals(42)); + unittest.expect(o.width, unittest.equals(42)); + } + buildCounterSize--; +} + core.int buildCounterStopWatchingCreativeRequest = 0; buildStopWatchingCreativeRequest() { var o = new api.StopWatchingCreativeRequest(); @@ -1895,6 +3345,103 @@ buildCounterStopWatchingCreativeRequest--; } +buildUnnamed4867() { + var o = new core.List<api.TargetingValue>(); + o.add(buildTargetingValue()); + o.add(buildTargetingValue()); + return o; +} + +checkUnnamed4867(core.List<api.TargetingValue> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTargetingValue(o[0]); + checkTargetingValue(o[1]); +} + +buildUnnamed4868() { + var o = new core.List<api.TargetingValue>(); + o.add(buildTargetingValue()); + o.add(buildTargetingValue()); + return o; +} + +checkUnnamed4868(core.List<api.TargetingValue> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTargetingValue(o[0]); + checkTargetingValue(o[1]); +} + +core.int buildCounterTargetingCriteria = 0; +buildTargetingCriteria() { + var o = new api.TargetingCriteria(); + buildCounterTargetingCriteria++; + if (buildCounterTargetingCriteria < 3) { + o.exclusions = buildUnnamed4867(); + o.inclusions = buildUnnamed4868(); + o.key = "foo"; + } + buildCounterTargetingCriteria--; + return o; +} + +checkTargetingCriteria(api.TargetingCriteria o) { + buildCounterTargetingCriteria++; + if (buildCounterTargetingCriteria < 3) { + checkUnnamed4867(o.exclusions); + checkUnnamed4868(o.inclusions); + unittest.expect(o.key, unittest.equals('foo')); + } + buildCounterTargetingCriteria--; +} + +core.int buildCounterTargetingValue = 0; +buildTargetingValue() { + var o = new api.TargetingValue(); + buildCounterTargetingValue++; + if (buildCounterTargetingValue < 3) { + o.creativeSizeValue = buildCreativeSize(); + o.dayPartTargetingValue = buildDayPartTargeting(); + o.longValue = "foo"; + o.stringValue = "foo"; + } + buildCounterTargetingValue--; + return o; +} + +checkTargetingValue(api.TargetingValue o) { + buildCounterTargetingValue++; + if (buildCounterTargetingValue < 3) { + checkCreativeSize(o.creativeSizeValue); + checkDayPartTargeting(o.dayPartTargetingValue); + unittest.expect(o.longValue, unittest.equals('foo')); + unittest.expect(o.stringValue, unittest.equals('foo')); + } + buildCounterTargetingValue--; +} + +core.int buildCounterTechnologyTargeting = 0; +buildTechnologyTargeting() { + var o = new api.TechnologyTargeting(); + buildCounterTechnologyTargeting++; + if (buildCounterTechnologyTargeting < 3) { + o.deviceCapabilityTargeting = buildCriteriaTargeting(); + o.deviceCategoryTargeting = buildCriteriaTargeting(); + o.operatingSystemTargeting = buildOperatingSystemTargeting(); + } + buildCounterTechnologyTargeting--; + return o; +} + +checkTechnologyTargeting(api.TechnologyTargeting o) { + buildCounterTechnologyTargeting++; + if (buildCounterTechnologyTargeting < 3) { + checkCriteriaTargeting(o.deviceCapabilityTargeting); + checkCriteriaTargeting(o.deviceCategoryTargeting); + checkOperatingSystemTargeting(o.operatingSystemTargeting); + } + buildCounterTechnologyTargeting--; +} + core.int buildCounterTimeInterval = 0; buildTimeInterval() { var o = new api.TimeInterval(); @@ -1916,6 +3463,78 @@ buildCounterTimeInterval--; } +core.int buildCounterTimeOfDay = 0; +buildTimeOfDay() { + var o = new api.TimeOfDay(); + buildCounterTimeOfDay++; + if (buildCounterTimeOfDay < 3) { + o.hours = 42; + o.minutes = 42; + o.nanos = 42; + o.seconds = 42; + } + buildCounterTimeOfDay--; + return o; +} + +checkTimeOfDay(api.TimeOfDay o) { + buildCounterTimeOfDay++; + if (buildCounterTimeOfDay < 3) { + unittest.expect(o.hours, unittest.equals(42)); + unittest.expect(o.minutes, unittest.equals(42)); + unittest.expect(o.nanos, unittest.equals(42)); + unittest.expect(o.seconds, unittest.equals(42)); + } + buildCounterTimeOfDay--; +} + +buildUnnamed4869() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4869(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4870() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4870(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterUrlTargeting = 0; +buildUrlTargeting() { + var o = new api.UrlTargeting(); + buildCounterUrlTargeting++; + if (buildCounterUrlTargeting < 3) { + o.excludedUrls = buildUnnamed4869(); + o.targetedUrls = buildUnnamed4870(); + } + buildCounterUrlTargeting--; + return o; +} + +checkUrlTargeting(api.UrlTargeting o) { + buildCounterUrlTargeting++; + if (buildCounterUrlTargeting < 3) { + checkUnnamed4869(o.excludedUrls); + checkUnnamed4870(o.targetedUrls); + } + buildCounterUrlTargeting--; +} + core.int buildCounterVideoContent = 0; buildVideoContent() { var o = new api.VideoContent(); @@ -1937,6 +3556,53 @@ buildCounterVideoContent--; } +buildUnnamed4871() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4871(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4872() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4872(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterVideoTargeting = 0; +buildVideoTargeting() { + var o = new api.VideoTargeting(); + buildCounterVideoTargeting++; + if (buildCounterVideoTargeting < 3) { + o.excludedPositionTypes = buildUnnamed4871(); + o.targetedPositionTypes = buildUnnamed4872(); + } + buildCounterVideoTargeting--; + return o; +} + +checkVideoTargeting(api.VideoTargeting o) { + buildCounterVideoTargeting++; + if (buildCounterVideoTargeting < 3) { + checkUnnamed4871(o.excludedPositionTypes); + checkUnnamed4872(o.targetedPositionTypes); + } + buildCounterVideoTargeting--; +} + core.int buildCounterWatchCreativeRequest = 0; buildWatchCreativeRequest() { var o = new api.WatchCreativeRequest(); @@ -1965,6 +3631,22 @@ }); }); + unittest.group("obj-schema-AcceptProposalRequest", () { + unittest.test("to-json--from-json", () { + var o = buildAcceptProposalRequest(); + var od = new api.AcceptProposalRequest.fromJson(o.toJson()); + checkAcceptProposalRequest(od); + }); + }); + + unittest.group("obj-schema-AdSize", () { + unittest.test("to-json--from-json", () { + var o = buildAdSize(); + var od = new api.AdSize.fromJson(o.toJson()); + checkAdSize(od); + }); + }); + unittest.group("obj-schema-AddDealAssociationRequest", () { unittest.test("to-json--from-json", () { var o = buildAddDealAssociationRequest(); @@ -1973,6 +3655,14 @@ }); }); + unittest.group("obj-schema-AddNoteRequest", () { + unittest.test("to-json--from-json", () { + var o = buildAddNoteRequest(); + var od = new api.AddNoteRequest.fromJson(o.toJson()); + checkAddNoteRequest(od); + }); + }); + unittest.group("obj-schema-AppContext", () { unittest.test("to-json--from-json", () { var o = buildAppContext(); @@ -2005,6 +3695,14 @@ }); }); + unittest.group("obj-schema-Buyer", () { + unittest.test("to-json--from-json", () { + var o = buildBuyer(); + var od = new api.Buyer.fromJson(o.toJson()); + checkBuyer(od); + }); + }); + unittest.group("obj-schema-CalloutStatusRow", () { unittest.test("to-json--from-json", () { var o = buildCalloutStatusRow(); @@ -2013,6 +3711,14 @@ }); }); + unittest.group("obj-schema-CancelNegotiationRequest", () { + unittest.test("to-json--from-json", () { + var o = buildCancelNegotiationRequest(); + var od = new api.CancelNegotiationRequest.fromJson(o.toJson()); + checkCancelNegotiationRequest(od); + }); + }); + unittest.group("obj-schema-Client", () { unittest.test("to-json--from-json", () { var o = buildClient(); @@ -2037,6 +3743,22 @@ }); }); + unittest.group("obj-schema-CompleteSetupRequest", () { + unittest.test("to-json--from-json", () { + var o = buildCompleteSetupRequest(); + var od = new api.CompleteSetupRequest.fromJson(o.toJson()); + checkCompleteSetupRequest(od); + }); + }); + + unittest.group("obj-schema-ContactInformation", () { + unittest.test("to-json--from-json", () { + var o = buildContactInformation(); + var od = new api.ContactInformation.fromJson(o.toJson()); + checkContactInformation(od); + }); + }); + unittest.group("obj-schema-Correction", () { unittest.test("to-json--from-json", () { var o = buildCorrection(); @@ -2061,6 +3783,30 @@ }); }); + unittest.group("obj-schema-CreativeRestrictions", () { + unittest.test("to-json--from-json", () { + var o = buildCreativeRestrictions(); + var od = new api.CreativeRestrictions.fromJson(o.toJson()); + checkCreativeRestrictions(od); + }); + }); + + unittest.group("obj-schema-CreativeSize", () { + unittest.test("to-json--from-json", () { + var o = buildCreativeSize(); + var od = new api.CreativeSize.fromJson(o.toJson()); + checkCreativeSize(od); + }); + }); + + unittest.group("obj-schema-CreativeSpecification", () { + unittest.test("to-json--from-json", () { + var o = buildCreativeSpecification(); + var od = new api.CreativeSpecification.fromJson(o.toJson()); + checkCreativeSpecification(od); + }); + }); + unittest.group("obj-schema-CreativeStatusRow", () { unittest.test("to-json--from-json", () { var o = buildCreativeStatusRow(); @@ -2069,6 +3815,14 @@ }); }); + unittest.group("obj-schema-CriteriaTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildCriteriaTargeting(); + var od = new api.CriteriaTargeting.fromJson(o.toJson()); + checkCriteriaTargeting(od); + }); + }); + unittest.group("obj-schema-Date", () { unittest.test("to-json--from-json", () { var o = buildDate(); @@ -2077,6 +3831,62 @@ }); }); + unittest.group("obj-schema-DayPart", () { + unittest.test("to-json--from-json", () { + var o = buildDayPart(); + var od = new api.DayPart.fromJson(o.toJson()); + checkDayPart(od); + }); + }); + + unittest.group("obj-schema-DayPartTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildDayPartTargeting(); + var od = new api.DayPartTargeting.fromJson(o.toJson()); + checkDayPartTargeting(od); + }); + }); + + unittest.group("obj-schema-Deal", () { + unittest.test("to-json--from-json", () { + var o = buildDeal(); + var od = new api.Deal.fromJson(o.toJson()); + checkDeal(od); + }); + }); + + unittest.group("obj-schema-DealPauseStatus", () { + unittest.test("to-json--from-json", () { + var o = buildDealPauseStatus(); + var od = new api.DealPauseStatus.fromJson(o.toJson()); + checkDealPauseStatus(od); + }); + }); + + unittest.group("obj-schema-DealServingMetadata", () { + unittest.test("to-json--from-json", () { + var o = buildDealServingMetadata(); + var od = new api.DealServingMetadata.fromJson(o.toJson()); + checkDealServingMetadata(od); + }); + }); + + unittest.group("obj-schema-DealTerms", () { + unittest.test("to-json--from-json", () { + var o = buildDealTerms(); + var od = new api.DealTerms.fromJson(o.toJson()); + checkDealTerms(od); + }); + }); + + unittest.group("obj-schema-DeliveryControl", () { + unittest.test("to-json--from-json", () { + var o = buildDeliveryControl(); + var od = new api.DeliveryControl.fromJson(o.toJson()); + checkDeliveryControl(od); + }); + }); + unittest.group("obj-schema-Disapproval", () { unittest.test("to-json--from-json", () { var o = buildDisapproval(); @@ -2125,6 +3935,31 @@ }); }); + unittest.group("obj-schema-FirstPartyMobileApplicationTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildFirstPartyMobileApplicationTargeting(); + var od = + new api.FirstPartyMobileApplicationTargeting.fromJson(o.toJson()); + checkFirstPartyMobileApplicationTargeting(od); + }); + }); + + unittest.group("obj-schema-FrequencyCap", () { + unittest.test("to-json--from-json", () { + var o = buildFrequencyCap(); + var od = new api.FrequencyCap.fromJson(o.toJson()); + checkFrequencyCap(od); + }); + }); + + unittest.group("obj-schema-GuaranteedFixedPriceTerms", () { + unittest.test("to-json--from-json", () { + var o = buildGuaranteedFixedPriceTerms(); + var od = new api.GuaranteedFixedPriceTerms.fromJson(o.toJson()); + checkGuaranteedFixedPriceTerms(od); + }); + }); + unittest.group("obj-schema-HtmlContent", () { unittest.test("to-json--from-json", () { var o = buildHtmlContent(); @@ -2149,6 +3984,14 @@ }); }); + unittest.group("obj-schema-InventorySizeTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildInventorySizeTargeting(); + var od = new api.InventorySizeTargeting.fromJson(o.toJson()); + checkInventorySizeTargeting(od); + }); + }); + unittest.group("obj-schema-ListBidMetricsResponse", () { unittest.test("to-json--from-json", () { var o = buildListBidMetricsResponse(); @@ -2280,6 +4123,30 @@ }); }); + unittest.group("obj-schema-ListProductsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListProductsResponse(); + var od = new api.ListProductsResponse.fromJson(o.toJson()); + checkListProductsResponse(od); + }); + }); + + unittest.group("obj-schema-ListProposalsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListProposalsResponse(); + var od = new api.ListProposalsResponse.fromJson(o.toJson()); + checkListProposalsResponse(od); + }); + }); + + unittest.group("obj-schema-ListPublisherProfilesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListPublisherProfilesResponse(); + var od = new api.ListPublisherProfilesResponse.fromJson(o.toJson()); + checkListPublisherProfilesResponse(od); + }); + }); + unittest.group("obj-schema-LocationContext", () { unittest.test("to-json--from-json", () { var o = buildLocationContext(); @@ -2288,6 +4155,14 @@ }); }); + unittest.group("obj-schema-MarketplaceTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildMarketplaceTargeting(); + var od = new api.MarketplaceTargeting.fromJson(o.toJson()); + checkMarketplaceTargeting(od); + }); + }); + unittest.group("obj-schema-MetricValue", () { unittest.test("to-json--from-json", () { var o = buildMetricValue(); @@ -2296,6 +4171,22 @@ }); }); + unittest.group("obj-schema-MobileApplicationTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildMobileApplicationTargeting(); + var od = new api.MobileApplicationTargeting.fromJson(o.toJson()); + checkMobileApplicationTargeting(od); + }); + }); + + unittest.group("obj-schema-Money", () { + unittest.test("to-json--from-json", () { + var o = buildMoney(); + var od = new api.Money.fromJson(o.toJson()); + checkMoney(od); + }); + }); + unittest.group("obj-schema-NativeContent", () { unittest.test("to-json--from-json", () { var o = buildNativeContent(); @@ -2312,6 +4203,54 @@ }); }); + unittest.group("obj-schema-NonGuaranteedAuctionTerms", () { + unittest.test("to-json--from-json", () { + var o = buildNonGuaranteedAuctionTerms(); + var od = new api.NonGuaranteedAuctionTerms.fromJson(o.toJson()); + checkNonGuaranteedAuctionTerms(od); + }); + }); + + unittest.group("obj-schema-NonGuaranteedFixedPriceTerms", () { + unittest.test("to-json--from-json", () { + var o = buildNonGuaranteedFixedPriceTerms(); + var od = new api.NonGuaranteedFixedPriceTerms.fromJson(o.toJson()); + checkNonGuaranteedFixedPriceTerms(od); + }); + }); + + unittest.group("obj-schema-Note", () { + unittest.test("to-json--from-json", () { + var o = buildNote(); + var od = new api.Note.fromJson(o.toJson()); + checkNote(od); + }); + }); + + unittest.group("obj-schema-OperatingSystemTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildOperatingSystemTargeting(); + var od = new api.OperatingSystemTargeting.fromJson(o.toJson()); + checkOperatingSystemTargeting(od); + }); + }); + + unittest.group("obj-schema-PauseProposalRequest", () { + unittest.test("to-json--from-json", () { + var o = buildPauseProposalRequest(); + var od = new api.PauseProposalRequest.fromJson(o.toJson()); + checkPauseProposalRequest(od); + }); + }); + + unittest.group("obj-schema-PlacementTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildPlacementTargeting(); + var od = new api.PlacementTargeting.fromJson(o.toJson()); + checkPlacementTargeting(od); + }); + }); + unittest.group("obj-schema-PlatformContext", () { unittest.test("to-json--from-json", () { var o = buildPlatformContext(); @@ -2320,6 +4259,54 @@ }); }); + unittest.group("obj-schema-Price", () { + unittest.test("to-json--from-json", () { + var o = buildPrice(); + var od = new api.Price.fromJson(o.toJson()); + checkPrice(od); + }); + }); + + unittest.group("obj-schema-PricePerBuyer", () { + unittest.test("to-json--from-json", () { + var o = buildPricePerBuyer(); + var od = new api.PricePerBuyer.fromJson(o.toJson()); + checkPricePerBuyer(od); + }); + }); + + unittest.group("obj-schema-PrivateData", () { + unittest.test("to-json--from-json", () { + var o = buildPrivateData(); + var od = new api.PrivateData.fromJson(o.toJson()); + checkPrivateData(od); + }); + }); + + unittest.group("obj-schema-Product", () { + unittest.test("to-json--from-json", () { + var o = buildProduct(); + var od = new api.Product.fromJson(o.toJson()); + checkProduct(od); + }); + }); + + unittest.group("obj-schema-Proposal", () { + unittest.test("to-json--from-json", () { + var o = buildProposal(); + var od = new api.Proposal.fromJson(o.toJson()); + checkProposal(od); + }); + }); + + unittest.group("obj-schema-PublisherProfile", () { + unittest.test("to-json--from-json", () { + var o = buildPublisherProfile(); + var od = new api.PublisherProfile.fromJson(o.toJson()); + checkPublisherProfile(od); + }); + }); + unittest.group("obj-schema-RealtimeTimeRange", () { unittest.test("to-json--from-json", () { var o = buildRealtimeTimeRange(); @@ -2352,6 +4339,14 @@ }); }); + unittest.group("obj-schema-ResumeProposalRequest", () { + unittest.test("to-json--from-json", () { + var o = buildResumeProposalRequest(); + var od = new api.ResumeProposalRequest.fromJson(o.toJson()); + checkResumeProposalRequest(od); + }); + }); + unittest.group("obj-schema-RowDimensions", () { unittest.test("to-json--from-json", () { var o = buildRowDimensions(); @@ -2368,6 +4363,14 @@ }); }); + unittest.group("obj-schema-Seller", () { + unittest.test("to-json--from-json", () { + var o = buildSeller(); + var od = new api.Seller.fromJson(o.toJson()); + checkSeller(od); + }); + }); + unittest.group("obj-schema-ServingContext", () { unittest.test("to-json--from-json", () { var o = buildServingContext(); @@ -2384,6 +4387,14 @@ }); }); + unittest.group("obj-schema-Size", () { + unittest.test("to-json--from-json", () { + var o = buildSize(); + var od = new api.Size.fromJson(o.toJson()); + checkSize(od); + }); + }); + unittest.group("obj-schema-StopWatchingCreativeRequest", () { unittest.test("to-json--from-json", () { var o = buildStopWatchingCreativeRequest(); @@ -2392,6 +4403,30 @@ }); }); + unittest.group("obj-schema-TargetingCriteria", () { + unittest.test("to-json--from-json", () { + var o = buildTargetingCriteria(); + var od = new api.TargetingCriteria.fromJson(o.toJson()); + checkTargetingCriteria(od); + }); + }); + + unittest.group("obj-schema-TargetingValue", () { + unittest.test("to-json--from-json", () { + var o = buildTargetingValue(); + var od = new api.TargetingValue.fromJson(o.toJson()); + checkTargetingValue(od); + }); + }); + + unittest.group("obj-schema-TechnologyTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildTechnologyTargeting(); + var od = new api.TechnologyTargeting.fromJson(o.toJson()); + checkTechnologyTargeting(od); + }); + }); + unittest.group("obj-schema-TimeInterval", () { unittest.test("to-json--from-json", () { var o = buildTimeInterval(); @@ -2400,6 +4435,22 @@ }); }); + unittest.group("obj-schema-TimeOfDay", () { + unittest.test("to-json--from-json", () { + var o = buildTimeOfDay(); + var od = new api.TimeOfDay.fromJson(o.toJson()); + checkTimeOfDay(od); + }); + }); + + unittest.group("obj-schema-UrlTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildUrlTargeting(); + var od = new api.UrlTargeting.fromJson(o.toJson()); + checkUrlTargeting(od); + }); + }); + unittest.group("obj-schema-VideoContent", () { unittest.test("to-json--from-json", () { var o = buildVideoContent(); @@ -2408,6 +4459,14 @@ }); }); + unittest.group("obj-schema-VideoTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildVideoTargeting(); + var od = new api.VideoTargeting.fromJson(o.toJson()); + checkVideoTargeting(od); + }); + }); + unittest.group("obj-schema-WatchCreativeRequest", () { unittest.test("to-json--from-json", () { var o = buildWatchCreativeRequest(); @@ -3813,6 +5872,1137 @@ }); }); + unittest.group("resource-AccountsFinalizedProposalsResourceApi", () { + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccountsFinalizedProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.finalizedProposals; + var arg_accountId = "foo"; + var arg_filterSyntax = "foo"; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/finalizedProposals", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 19), + unittest.equals("/finalizedProposals")); + pathOffset += 19; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["filterSyntax"].first, unittest.equals(arg_filterSyntax)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListProposalsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_accountId, + filterSyntax: arg_filterSyntax, + filter: arg_filter, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListProposalsResponse(response); + }))); + }); + }); + + unittest.group("resource-AccountsProductsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccountsProductsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.products; + var arg_accountId = "foo"; + var arg_productId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/products/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 10), + unittest.equals("/products/")); + pathOffset += 10; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_productId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProduct()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_accountId, arg_productId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProduct(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccountsProductsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.products; + var arg_accountId = "foo"; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/products", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals("/products")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListProductsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_accountId, + filter: arg_filter, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListProductsResponse(response); + }))); + }); + }); + + unittest.group("resource-AccountsProposalsResourceApi", () { + unittest.test("method--accept", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildAcceptProposalRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AcceptProposalRequest.fromJson(json); + checkAcceptProposalRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":accept", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals(":accept")); + pathOffset += 7; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .accept(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--addNote", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildAddNoteRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AddNoteRequest.fromJson(json); + checkAddNoteRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":addNote", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals(":addNote")); + pathOffset += 8; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .addNote(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--cancelNegotiation", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildCancelNegotiationRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.CancelNegotiationRequest.fromJson(json); + checkCancelNegotiationRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":cancelNegotiation", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 18), + unittest.equals(":cancelNegotiation")); + pathOffset += 18; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .cancelNegotiation(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--completeSetup", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildCompleteSetupRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.CompleteSetupRequest.fromJson(json); + checkCompleteSetupRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":completeSetup", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 14), + unittest.equals(":completeSetup")); + pathOffset += 14; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .completeSetup(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildProposal(); + var arg_accountId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Proposal.fromJson(json); + checkProposal(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 10), + unittest.equals("/proposals")); + pathOffset += 10; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_accountId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_accountId, arg_proposalId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_accountId = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_filterSyntax = "foo"; + var arg_filter = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 10), + unittest.equals("/proposals")); + pathOffset += 10; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["filterSyntax"].first, unittest.equals(arg_filterSyntax)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListProposalsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_accountId, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + filterSyntax: arg_filterSyntax, + filter: arg_filter, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListProposalsResponse(response); + }))); + }); + + unittest.test("method--pause", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildPauseProposalRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.PauseProposalRequest.fromJson(json); + checkPauseProposalRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":pause", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 6), + unittest.equals(":pause")); + pathOffset += 6; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .pause(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--resume", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildResumeProposalRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ResumeProposalRequest.fromJson(json); + checkResumeProposalRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":resume", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals(":resume")); + pathOffset += 7; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .resume(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--update", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildProposal(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Proposal.fromJson(json); + checkProposal(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .update(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + }); + + unittest.group("resource-AccountsPublisherProfilesResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccountsPublisherProfilesResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.publisherProfiles; + var arg_accountId = "foo"; + var arg_publisherProfileId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/publisherProfiles/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 19), + unittest.equals("/publisherProfiles/")); + pathOffset += 19; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_publisherProfileId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPublisherProfile()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_accountId, arg_publisherProfileId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPublisherProfile(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccountsPublisherProfilesResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.publisherProfiles; + var arg_accountId = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/publisherProfiles", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 18), + unittest.equals("/publisherProfiles")); + pathOffset += 18; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListPublisherProfilesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_accountId, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListPublisherProfilesResponse(response); + }))); + }); + }); + + unittest.group("resource-BiddersAccountsCreativesResourceApi", () { + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.BiddersAccountsCreativesResourceApi res = + new api.Adexchangebuyer2Api(mock).bidders.accounts.creatives; + var arg_ownerName = "foo"; + var arg_creativeId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_ownerName, arg_creativeId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + }); + unittest.group("resource-BiddersAccountsFilterSetsResourceApi", () { unittest.test("method--create", () { var mock = new HttpServerMock(); @@ -5225,8 +8415,8 @@ api.BiddersFilterSetsFilteredBidsResourceApi res = new api.Adexchangebuyer2Api(mock).bidders.filterSets.filteredBids; var arg_filterSetName = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -5259,10 +8449,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -5273,8 +8463,8 @@ }), true); res .list(arg_filterSetName, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListFilteredBidsResponse(response);
diff --git a/generated/googleapis_beta/test/alertcenter/v1beta1_test.dart b/generated/googleapis_beta/test/alertcenter/v1beta1_test.dart new file mode 100644 index 0000000..c9c90ef --- /dev/null +++ b/generated/googleapis_beta/test/alertcenter/v1beta1_test.dart
@@ -0,0 +1,1581 @@ +library googleapis_beta.alertcenter.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/alertcenter/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAccountWarning = 0; +buildAccountWarning() { + var o = new api.AccountWarning(); + buildCounterAccountWarning++; + if (buildCounterAccountWarning < 3) { + o.email = "foo"; + o.loginDetails = buildLoginDetails(); + } + buildCounterAccountWarning--; + return o; +} + +checkAccountWarning(api.AccountWarning o) { + buildCounterAccountWarning++; + if (buildCounterAccountWarning < 3) { + unittest.expect(o.email, unittest.equals('foo')); + checkLoginDetails(o.loginDetails); + } + buildCounterAccountWarning--; +} + +buildUnnamed4761() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4761(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +core.int buildCounterAlert = 0; +buildAlert() { + var o = new api.Alert(); + buildCounterAlert++; + if (buildCounterAlert < 3) { + o.alertId = "foo"; + o.createTime = "foo"; + o.customerId = "foo"; + o.data = buildUnnamed4761(); + o.deleted = true; + o.endTime = "foo"; + o.securityInvestigationToolLink = "foo"; + o.source = "foo"; + o.startTime = "foo"; + o.type = "foo"; + } + buildCounterAlert--; + return o; +} + +checkAlert(api.Alert o) { + buildCounterAlert++; + if (buildCounterAlert < 3) { + unittest.expect(o.alertId, unittest.equals('foo')); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.customerId, unittest.equals('foo')); + checkUnnamed4761(o.data); + unittest.expect(o.deleted, unittest.isTrue); + unittest.expect(o.endTime, unittest.equals('foo')); + unittest.expect(o.securityInvestigationToolLink, unittest.equals('foo')); + unittest.expect(o.source, unittest.equals('foo')); + unittest.expect(o.startTime, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterAlert--; +} + +core.int buildCounterAlertFeedback = 0; +buildAlertFeedback() { + var o = new api.AlertFeedback(); + buildCounterAlertFeedback++; + if (buildCounterAlertFeedback < 3) { + o.alertId = "foo"; + o.createTime = "foo"; + o.customerId = "foo"; + o.email = "foo"; + o.feedbackId = "foo"; + o.type = "foo"; + } + buildCounterAlertFeedback--; + return o; +} + +checkAlertFeedback(api.AlertFeedback o) { + buildCounterAlertFeedback++; + if (buildCounterAlertFeedback < 3) { + unittest.expect(o.alertId, unittest.equals('foo')); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.customerId, unittest.equals('foo')); + unittest.expect(o.email, unittest.equals('foo')); + unittest.expect(o.feedbackId, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterAlertFeedback--; +} + +core.int buildCounterAttachment = 0; +buildAttachment() { + var o = new api.Attachment(); + buildCounterAttachment++; + if (buildCounterAttachment < 3) { + o.csv = buildCsv(); + } + buildCounterAttachment--; + return o; +} + +checkAttachment(api.Attachment o) { + buildCounterAttachment++; + if (buildCounterAttachment < 3) { + checkCsv(o.csv); + } + buildCounterAttachment--; +} + +buildUnnamed4762() { + var o = new core.List<api.GmailMessageInfo>(); + o.add(buildGmailMessageInfo()); + o.add(buildGmailMessageInfo()); + return o; +} + +checkUnnamed4762(core.List<api.GmailMessageInfo> o) { + unittest.expect(o, unittest.hasLength(2)); + checkGmailMessageInfo(o[0]); + checkGmailMessageInfo(o[1]); +} + +core.int buildCounterBadWhitelist = 0; +buildBadWhitelist() { + var o = new api.BadWhitelist(); + buildCounterBadWhitelist++; + if (buildCounterBadWhitelist < 3) { + o.domainId = buildDomainId(); + o.maliciousEntity = buildMaliciousEntity(); + o.messages = buildUnnamed4762(); + o.sourceIp = "foo"; + } + buildCounterBadWhitelist--; + return o; +} + +checkBadWhitelist(api.BadWhitelist o) { + buildCounterBadWhitelist++; + if (buildCounterBadWhitelist < 3) { + checkDomainId(o.domainId); + checkMaliciousEntity(o.maliciousEntity); + checkUnnamed4762(o.messages); + unittest.expect(o.sourceIp, unittest.equals('foo')); + } + buildCounterBadWhitelist--; +} + +core.int buildCounterCloudPubsubTopic = 0; +buildCloudPubsubTopic() { + var o = new api.CloudPubsubTopic(); + buildCounterCloudPubsubTopic++; + if (buildCounterCloudPubsubTopic < 3) { + o.payloadFormat = "foo"; + o.topicName = "foo"; + } + buildCounterCloudPubsubTopic--; + return o; +} + +checkCloudPubsubTopic(api.CloudPubsubTopic o) { + buildCounterCloudPubsubTopic++; + if (buildCounterCloudPubsubTopic < 3) { + unittest.expect(o.payloadFormat, unittest.equals('foo')); + unittest.expect(o.topicName, unittest.equals('foo')); + } + buildCounterCloudPubsubTopic--; +} + +buildUnnamed4763() { + var o = new core.List<api.CsvRow>(); + o.add(buildCsvRow()); + o.add(buildCsvRow()); + return o; +} + +checkUnnamed4763(core.List<api.CsvRow> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCsvRow(o[0]); + checkCsvRow(o[1]); +} + +buildUnnamed4764() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4764(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCsv = 0; +buildCsv() { + var o = new api.Csv(); + buildCounterCsv++; + if (buildCounterCsv < 3) { + o.dataRows = buildUnnamed4763(); + o.headers = buildUnnamed4764(); + } + buildCounterCsv--; + return o; +} + +checkCsv(api.Csv o) { + buildCounterCsv++; + if (buildCounterCsv < 3) { + checkUnnamed4763(o.dataRows); + checkUnnamed4764(o.headers); + } + buildCounterCsv--; +} + +buildUnnamed4765() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4765(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCsvRow = 0; +buildCsvRow() { + var o = new api.CsvRow(); + buildCounterCsvRow++; + if (buildCounterCsvRow < 3) { + o.entries = buildUnnamed4765(); + } + buildCounterCsvRow--; + return o; +} + +checkCsvRow(api.CsvRow o) { + buildCounterCsvRow++; + if (buildCounterCsvRow < 3) { + checkUnnamed4765(o.entries); + } + buildCounterCsvRow--; +} + +buildUnnamed4766() { + var o = new core.List<api.DeviceCompromisedSecurityDetail>(); + o.add(buildDeviceCompromisedSecurityDetail()); + o.add(buildDeviceCompromisedSecurityDetail()); + return o; +} + +checkUnnamed4766(core.List<api.DeviceCompromisedSecurityDetail> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDeviceCompromisedSecurityDetail(o[0]); + checkDeviceCompromisedSecurityDetail(o[1]); +} + +core.int buildCounterDeviceCompromised = 0; +buildDeviceCompromised() { + var o = new api.DeviceCompromised(); + buildCounterDeviceCompromised++; + if (buildCounterDeviceCompromised < 3) { + o.email = "foo"; + o.events = buildUnnamed4766(); + } + buildCounterDeviceCompromised--; + return o; +} + +checkDeviceCompromised(api.DeviceCompromised o) { + buildCounterDeviceCompromised++; + if (buildCounterDeviceCompromised < 3) { + unittest.expect(o.email, unittest.equals('foo')); + checkUnnamed4766(o.events); + } + buildCounterDeviceCompromised--; +} + +core.int buildCounterDeviceCompromisedSecurityDetail = 0; +buildDeviceCompromisedSecurityDetail() { + var o = new api.DeviceCompromisedSecurityDetail(); + buildCounterDeviceCompromisedSecurityDetail++; + if (buildCounterDeviceCompromisedSecurityDetail < 3) { + o.deviceCompromisedState = "foo"; + o.deviceId = "foo"; + o.deviceModel = "foo"; + o.deviceType = "foo"; + o.iosVendorId = "foo"; + o.resourceId = "foo"; + o.serialNumber = "foo"; + } + buildCounterDeviceCompromisedSecurityDetail--; + return o; +} + +checkDeviceCompromisedSecurityDetail(api.DeviceCompromisedSecurityDetail o) { + buildCounterDeviceCompromisedSecurityDetail++; + if (buildCounterDeviceCompromisedSecurityDetail < 3) { + unittest.expect(o.deviceCompromisedState, unittest.equals('foo')); + unittest.expect(o.deviceId, unittest.equals('foo')); + unittest.expect(o.deviceModel, unittest.equals('foo')); + unittest.expect(o.deviceType, unittest.equals('foo')); + unittest.expect(o.iosVendorId, unittest.equals('foo')); + unittest.expect(o.resourceId, unittest.equals('foo')); + unittest.expect(o.serialNumber, unittest.equals('foo')); + } + buildCounterDeviceCompromisedSecurityDetail--; +} + +core.int buildCounterDomainId = 0; +buildDomainId() { + var o = new api.DomainId(); + buildCounterDomainId++; + if (buildCounterDomainId < 3) { + o.customerPrimaryDomain = "foo"; + } + buildCounterDomainId--; + return o; +} + +checkDomainId(api.DomainId o) { + buildCounterDomainId++; + if (buildCounterDomainId < 3) { + unittest.expect(o.customerPrimaryDomain, unittest.equals('foo')); + } + buildCounterDomainId--; +} + +core.int buildCounterDomainWideTakeoutInitiated = 0; +buildDomainWideTakeoutInitiated() { + var o = new api.DomainWideTakeoutInitiated(); + buildCounterDomainWideTakeoutInitiated++; + if (buildCounterDomainWideTakeoutInitiated < 3) { + o.email = "foo"; + o.takeoutRequestId = "foo"; + } + buildCounterDomainWideTakeoutInitiated--; + return o; +} + +checkDomainWideTakeoutInitiated(api.DomainWideTakeoutInitiated o) { + buildCounterDomainWideTakeoutInitiated++; + if (buildCounterDomainWideTakeoutInitiated < 3) { + unittest.expect(o.email, unittest.equals('foo')); + unittest.expect(o.takeoutRequestId, unittest.equals('foo')); + } + buildCounterDomainWideTakeoutInitiated--; +} + +core.int buildCounterEmpty = 0; +buildEmpty() { + var o = new api.Empty(); + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; + return o; +} + +checkEmpty(api.Empty o) { + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; +} + +buildUnnamed4767() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4767(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterGmailMessageInfo = 0; +buildGmailMessageInfo() { + var o = new api.GmailMessageInfo(); + buildCounterGmailMessageInfo++; + if (buildCounterGmailMessageInfo < 3) { + o.attachmentsSha256Hash = buildUnnamed4767(); + o.date = "foo"; + o.md5HashMessageBody = "foo"; + o.md5HashSubject = "foo"; + o.messageBodySnippet = "foo"; + o.messageId = "foo"; + o.recipient = "foo"; + o.subjectText = "foo"; + } + buildCounterGmailMessageInfo--; + return o; +} + +checkGmailMessageInfo(api.GmailMessageInfo o) { + buildCounterGmailMessageInfo++; + if (buildCounterGmailMessageInfo < 3) { + checkUnnamed4767(o.attachmentsSha256Hash); + unittest.expect(o.date, unittest.equals('foo')); + unittest.expect(o.md5HashMessageBody, unittest.equals('foo')); + unittest.expect(o.md5HashSubject, unittest.equals('foo')); + unittest.expect(o.messageBodySnippet, unittest.equals('foo')); + unittest.expect(o.messageId, unittest.equals('foo')); + unittest.expect(o.recipient, unittest.equals('foo')); + unittest.expect(o.subjectText, unittest.equals('foo')); + } + buildCounterGmailMessageInfo--; +} + +buildUnnamed4768() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4768(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterGoogleOperations = 0; +buildGoogleOperations() { + var o = new api.GoogleOperations(); + buildCounterGoogleOperations++; + if (buildCounterGoogleOperations < 3) { + o.affectedUserEmails = buildUnnamed4768(); + o.attachmentData = buildAttachment(); + o.description = "foo"; + o.title = "foo"; + } + buildCounterGoogleOperations--; + return o; +} + +checkGoogleOperations(api.GoogleOperations o) { + buildCounterGoogleOperations++; + if (buildCounterGoogleOperations < 3) { + checkUnnamed4768(o.affectedUserEmails); + checkAttachment(o.attachmentData); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + } + buildCounterGoogleOperations--; +} + +buildUnnamed4769() { + var o = new core.List<api.AlertFeedback>(); + o.add(buildAlertFeedback()); + o.add(buildAlertFeedback()); + return o; +} + +checkUnnamed4769(core.List<api.AlertFeedback> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAlertFeedback(o[0]); + checkAlertFeedback(o[1]); +} + +core.int buildCounterListAlertFeedbackResponse = 0; +buildListAlertFeedbackResponse() { + var o = new api.ListAlertFeedbackResponse(); + buildCounterListAlertFeedbackResponse++; + if (buildCounterListAlertFeedbackResponse < 3) { + o.feedback = buildUnnamed4769(); + } + buildCounterListAlertFeedbackResponse--; + return o; +} + +checkListAlertFeedbackResponse(api.ListAlertFeedbackResponse o) { + buildCounterListAlertFeedbackResponse++; + if (buildCounterListAlertFeedbackResponse < 3) { + checkUnnamed4769(o.feedback); + } + buildCounterListAlertFeedbackResponse--; +} + +buildUnnamed4770() { + var o = new core.List<api.Alert>(); + o.add(buildAlert()); + o.add(buildAlert()); + return o; +} + +checkUnnamed4770(core.List<api.Alert> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAlert(o[0]); + checkAlert(o[1]); +} + +core.int buildCounterListAlertsResponse = 0; +buildListAlertsResponse() { + var o = new api.ListAlertsResponse(); + buildCounterListAlertsResponse++; + if (buildCounterListAlertsResponse < 3) { + o.alerts = buildUnnamed4770(); + o.nextPageToken = "foo"; + } + buildCounterListAlertsResponse--; + return o; +} + +checkListAlertsResponse(api.ListAlertsResponse o) { + buildCounterListAlertsResponse++; + if (buildCounterListAlertsResponse < 3) { + checkUnnamed4770(o.alerts); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListAlertsResponse--; +} + +core.int buildCounterLoginDetails = 0; +buildLoginDetails() { + var o = new api.LoginDetails(); + buildCounterLoginDetails++; + if (buildCounterLoginDetails < 3) { + o.ipAddress = "foo"; + o.loginTime = "foo"; + } + buildCounterLoginDetails--; + return o; +} + +checkLoginDetails(api.LoginDetails o) { + buildCounterLoginDetails++; + if (buildCounterLoginDetails < 3) { + unittest.expect(o.ipAddress, unittest.equals('foo')); + unittest.expect(o.loginTime, unittest.equals('foo')); + } + buildCounterLoginDetails--; +} + +buildUnnamed4771() { + var o = new core.List<api.GmailMessageInfo>(); + o.add(buildGmailMessageInfo()); + o.add(buildGmailMessageInfo()); + return o; +} + +checkUnnamed4771(core.List<api.GmailMessageInfo> o) { + unittest.expect(o, unittest.hasLength(2)); + checkGmailMessageInfo(o[0]); + checkGmailMessageInfo(o[1]); +} + +core.int buildCounterMailPhishing = 0; +buildMailPhishing() { + var o = new api.MailPhishing(); + buildCounterMailPhishing++; + if (buildCounterMailPhishing < 3) { + o.domainId = buildDomainId(); + o.isInternal = true; + o.maliciousEntity = buildMaliciousEntity(); + o.messages = buildUnnamed4771(); + } + buildCounterMailPhishing--; + return o; +} + +checkMailPhishing(api.MailPhishing o) { + buildCounterMailPhishing++; + if (buildCounterMailPhishing < 3) { + checkDomainId(o.domainId); + unittest.expect(o.isInternal, unittest.isTrue); + checkMaliciousEntity(o.maliciousEntity); + checkUnnamed4771(o.messages); + } + buildCounterMailPhishing--; +} + +core.int buildCounterMaliciousEntity = 0; +buildMaliciousEntity() { + var o = new api.MaliciousEntity(); + buildCounterMaliciousEntity++; + if (buildCounterMaliciousEntity < 3) { + o.fromHeader = "foo"; + } + buildCounterMaliciousEntity--; + return o; +} + +checkMaliciousEntity(api.MaliciousEntity o) { + buildCounterMaliciousEntity++; + if (buildCounterMaliciousEntity < 3) { + unittest.expect(o.fromHeader, unittest.equals('foo')); + } + buildCounterMaliciousEntity--; +} + +core.int buildCounterNotification = 0; +buildNotification() { + var o = new api.Notification(); + buildCounterNotification++; + if (buildCounterNotification < 3) { + o.cloudPubsubTopic = buildCloudPubsubTopic(); + } + buildCounterNotification--; + return o; +} + +checkNotification(api.Notification o) { + buildCounterNotification++; + if (buildCounterNotification < 3) { + checkCloudPubsubTopic(o.cloudPubsubTopic); + } + buildCounterNotification--; +} + +buildUnnamed4772() { + var o = new core.List<api.GmailMessageInfo>(); + o.add(buildGmailMessageInfo()); + o.add(buildGmailMessageInfo()); + return o; +} + +checkUnnamed4772(core.List<api.GmailMessageInfo> o) { + unittest.expect(o, unittest.hasLength(2)); + checkGmailMessageInfo(o[0]); + checkGmailMessageInfo(o[1]); +} + +core.int buildCounterPhishingSpike = 0; +buildPhishingSpike() { + var o = new api.PhishingSpike(); + buildCounterPhishingSpike++; + if (buildCounterPhishingSpike < 3) { + o.domainId = buildDomainId(); + o.isInternal = true; + o.maliciousEntity = buildMaliciousEntity(); + o.messages = buildUnnamed4772(); + } + buildCounterPhishingSpike--; + return o; +} + +checkPhishingSpike(api.PhishingSpike o) { + buildCounterPhishingSpike++; + if (buildCounterPhishingSpike < 3) { + checkDomainId(o.domainId); + unittest.expect(o.isInternal, unittest.isTrue); + checkMaliciousEntity(o.maliciousEntity); + checkUnnamed4772(o.messages); + } + buildCounterPhishingSpike--; +} + +buildUnnamed4773() { + var o = new core.List<api.Notification>(); + o.add(buildNotification()); + o.add(buildNotification()); + return o; +} + +checkUnnamed4773(core.List<api.Notification> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNotification(o[0]); + checkNotification(o[1]); +} + +core.int buildCounterSettings = 0; +buildSettings() { + var o = new api.Settings(); + buildCounterSettings++; + if (buildCounterSettings < 3) { + o.notifications = buildUnnamed4773(); + } + buildCounterSettings--; + return o; +} + +checkSettings(api.Settings o) { + buildCounterSettings++; + if (buildCounterSettings < 3) { + checkUnnamed4773(o.notifications); + } + buildCounterSettings--; +} + +core.int buildCounterStateSponsoredAttack = 0; +buildStateSponsoredAttack() { + var o = new api.StateSponsoredAttack(); + buildCounterStateSponsoredAttack++; + if (buildCounterStateSponsoredAttack < 3) { + o.email = "foo"; + } + buildCounterStateSponsoredAttack--; + return o; +} + +checkStateSponsoredAttack(api.StateSponsoredAttack o) { + buildCounterStateSponsoredAttack++; + if (buildCounterStateSponsoredAttack < 3) { + unittest.expect(o.email, unittest.equals('foo')); + } + buildCounterStateSponsoredAttack--; +} + +buildUnnamed4774() { + var o = new core.List<api.SuspiciousActivitySecurityDetail>(); + o.add(buildSuspiciousActivitySecurityDetail()); + o.add(buildSuspiciousActivitySecurityDetail()); + return o; +} + +checkUnnamed4774(core.List<api.SuspiciousActivitySecurityDetail> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSuspiciousActivitySecurityDetail(o[0]); + checkSuspiciousActivitySecurityDetail(o[1]); +} + +core.int buildCounterSuspiciousActivity = 0; +buildSuspiciousActivity() { + var o = new api.SuspiciousActivity(); + buildCounterSuspiciousActivity++; + if (buildCounterSuspiciousActivity < 3) { + o.email = "foo"; + o.events = buildUnnamed4774(); + } + buildCounterSuspiciousActivity--; + return o; +} + +checkSuspiciousActivity(api.SuspiciousActivity o) { + buildCounterSuspiciousActivity++; + if (buildCounterSuspiciousActivity < 3) { + unittest.expect(o.email, unittest.equals('foo')); + checkUnnamed4774(o.events); + } + buildCounterSuspiciousActivity--; +} + +core.int buildCounterSuspiciousActivitySecurityDetail = 0; +buildSuspiciousActivitySecurityDetail() { + var o = new api.SuspiciousActivitySecurityDetail(); + buildCounterSuspiciousActivitySecurityDetail++; + if (buildCounterSuspiciousActivitySecurityDetail < 3) { + o.deviceId = "foo"; + o.deviceModel = "foo"; + o.deviceProperty = "foo"; + o.deviceType = "foo"; + o.iosVendorId = "foo"; + o.newValue = "foo"; + o.oldValue = "foo"; + o.resourceId = "foo"; + o.serialNumber = "foo"; + } + buildCounterSuspiciousActivitySecurityDetail--; + return o; +} + +checkSuspiciousActivitySecurityDetail(api.SuspiciousActivitySecurityDetail o) { + buildCounterSuspiciousActivitySecurityDetail++; + if (buildCounterSuspiciousActivitySecurityDetail < 3) { + unittest.expect(o.deviceId, unittest.equals('foo')); + unittest.expect(o.deviceModel, unittest.equals('foo')); + unittest.expect(o.deviceProperty, unittest.equals('foo')); + unittest.expect(o.deviceType, unittest.equals('foo')); + unittest.expect(o.iosVendorId, unittest.equals('foo')); + unittest.expect(o.newValue, unittest.equals('foo')); + unittest.expect(o.oldValue, unittest.equals('foo')); + unittest.expect(o.resourceId, unittest.equals('foo')); + unittest.expect(o.serialNumber, unittest.equals('foo')); + } + buildCounterSuspiciousActivitySecurityDetail--; +} + +core.int buildCounterUndeleteAlertRequest = 0; +buildUndeleteAlertRequest() { + var o = new api.UndeleteAlertRequest(); + buildCounterUndeleteAlertRequest++; + if (buildCounterUndeleteAlertRequest < 3) { + o.customerId = "foo"; + } + buildCounterUndeleteAlertRequest--; + return o; +} + +checkUndeleteAlertRequest(api.UndeleteAlertRequest o) { + buildCounterUndeleteAlertRequest++; + if (buildCounterUndeleteAlertRequest < 3) { + unittest.expect(o.customerId, unittest.equals('foo')); + } + buildCounterUndeleteAlertRequest--; +} + +main() { + unittest.group("obj-schema-AccountWarning", () { + unittest.test("to-json--from-json", () { + var o = buildAccountWarning(); + var od = new api.AccountWarning.fromJson(o.toJson()); + checkAccountWarning(od); + }); + }); + + unittest.group("obj-schema-Alert", () { + unittest.test("to-json--from-json", () { + var o = buildAlert(); + var od = new api.Alert.fromJson(o.toJson()); + checkAlert(od); + }); + }); + + unittest.group("obj-schema-AlertFeedback", () { + unittest.test("to-json--from-json", () { + var o = buildAlertFeedback(); + var od = new api.AlertFeedback.fromJson(o.toJson()); + checkAlertFeedback(od); + }); + }); + + unittest.group("obj-schema-Attachment", () { + unittest.test("to-json--from-json", () { + var o = buildAttachment(); + var od = new api.Attachment.fromJson(o.toJson()); + checkAttachment(od); + }); + }); + + unittest.group("obj-schema-BadWhitelist", () { + unittest.test("to-json--from-json", () { + var o = buildBadWhitelist(); + var od = new api.BadWhitelist.fromJson(o.toJson()); + checkBadWhitelist(od); + }); + }); + + unittest.group("obj-schema-CloudPubsubTopic", () { + unittest.test("to-json--from-json", () { + var o = buildCloudPubsubTopic(); + var od = new api.CloudPubsubTopic.fromJson(o.toJson()); + checkCloudPubsubTopic(od); + }); + }); + + unittest.group("obj-schema-Csv", () { + unittest.test("to-json--from-json", () { + var o = buildCsv(); + var od = new api.Csv.fromJson(o.toJson()); + checkCsv(od); + }); + }); + + unittest.group("obj-schema-CsvRow", () { + unittest.test("to-json--from-json", () { + var o = buildCsvRow(); + var od = new api.CsvRow.fromJson(o.toJson()); + checkCsvRow(od); + }); + }); + + unittest.group("obj-schema-DeviceCompromised", () { + unittest.test("to-json--from-json", () { + var o = buildDeviceCompromised(); + var od = new api.DeviceCompromised.fromJson(o.toJson()); + checkDeviceCompromised(od); + }); + }); + + unittest.group("obj-schema-DeviceCompromisedSecurityDetail", () { + unittest.test("to-json--from-json", () { + var o = buildDeviceCompromisedSecurityDetail(); + var od = new api.DeviceCompromisedSecurityDetail.fromJson(o.toJson()); + checkDeviceCompromisedSecurityDetail(od); + }); + }); + + unittest.group("obj-schema-DomainId", () { + unittest.test("to-json--from-json", () { + var o = buildDomainId(); + var od = new api.DomainId.fromJson(o.toJson()); + checkDomainId(od); + }); + }); + + unittest.group("obj-schema-DomainWideTakeoutInitiated", () { + unittest.test("to-json--from-json", () { + var o = buildDomainWideTakeoutInitiated(); + var od = new api.DomainWideTakeoutInitiated.fromJson(o.toJson()); + checkDomainWideTakeoutInitiated(od); + }); + }); + + unittest.group("obj-schema-Empty", () { + unittest.test("to-json--from-json", () { + var o = buildEmpty(); + var od = new api.Empty.fromJson(o.toJson()); + checkEmpty(od); + }); + }); + + unittest.group("obj-schema-GmailMessageInfo", () { + unittest.test("to-json--from-json", () { + var o = buildGmailMessageInfo(); + var od = new api.GmailMessageInfo.fromJson(o.toJson()); + checkGmailMessageInfo(od); + }); + }); + + unittest.group("obj-schema-GoogleOperations", () { + unittest.test("to-json--from-json", () { + var o = buildGoogleOperations(); + var od = new api.GoogleOperations.fromJson(o.toJson()); + checkGoogleOperations(od); + }); + }); + + unittest.group("obj-schema-ListAlertFeedbackResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListAlertFeedbackResponse(); + var od = new api.ListAlertFeedbackResponse.fromJson(o.toJson()); + checkListAlertFeedbackResponse(od); + }); + }); + + unittest.group("obj-schema-ListAlertsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListAlertsResponse(); + var od = new api.ListAlertsResponse.fromJson(o.toJson()); + checkListAlertsResponse(od); + }); + }); + + unittest.group("obj-schema-LoginDetails", () { + unittest.test("to-json--from-json", () { + var o = buildLoginDetails(); + var od = new api.LoginDetails.fromJson(o.toJson()); + checkLoginDetails(od); + }); + }); + + unittest.group("obj-schema-MailPhishing", () { + unittest.test("to-json--from-json", () { + var o = buildMailPhishing(); + var od = new api.MailPhishing.fromJson(o.toJson()); + checkMailPhishing(od); + }); + }); + + unittest.group("obj-schema-MaliciousEntity", () { + unittest.test("to-json--from-json", () { + var o = buildMaliciousEntity(); + var od = new api.MaliciousEntity.fromJson(o.toJson()); + checkMaliciousEntity(od); + }); + }); + + unittest.group("obj-schema-Notification", () { + unittest.test("to-json--from-json", () { + var o = buildNotification(); + var od = new api.Notification.fromJson(o.toJson()); + checkNotification(od); + }); + }); + + unittest.group("obj-schema-PhishingSpike", () { + unittest.test("to-json--from-json", () { + var o = buildPhishingSpike(); + var od = new api.PhishingSpike.fromJson(o.toJson()); + checkPhishingSpike(od); + }); + }); + + unittest.group("obj-schema-Settings", () { + unittest.test("to-json--from-json", () { + var o = buildSettings(); + var od = new api.Settings.fromJson(o.toJson()); + checkSettings(od); + }); + }); + + unittest.group("obj-schema-StateSponsoredAttack", () { + unittest.test("to-json--from-json", () { + var o = buildStateSponsoredAttack(); + var od = new api.StateSponsoredAttack.fromJson(o.toJson()); + checkStateSponsoredAttack(od); + }); + }); + + unittest.group("obj-schema-SuspiciousActivity", () { + unittest.test("to-json--from-json", () { + var o = buildSuspiciousActivity(); + var od = new api.SuspiciousActivity.fromJson(o.toJson()); + checkSuspiciousActivity(od); + }); + }); + + unittest.group("obj-schema-SuspiciousActivitySecurityDetail", () { + unittest.test("to-json--from-json", () { + var o = buildSuspiciousActivitySecurityDetail(); + var od = new api.SuspiciousActivitySecurityDetail.fromJson(o.toJson()); + checkSuspiciousActivitySecurityDetail(od); + }); + }); + + unittest.group("obj-schema-UndeleteAlertRequest", () { + unittest.test("to-json--from-json", () { + var o = buildUndeleteAlertRequest(); + var od = new api.UndeleteAlertRequest.fromJson(o.toJson()); + checkUndeleteAlertRequest(od); + }); + }); + + unittest.group("resource-AlertsResourceApi", () { + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.AlertsResourceApi res = new api.AlertcenterApi(mock).alerts; + var arg_alertId = "foo"; + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_alertId, customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AlertsResourceApi res = new api.AlertcenterApi(mock).alerts; + var arg_alertId = "foo"; + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAlert()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_alertId, customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAlert(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AlertsResourceApi res = new api.AlertcenterApi(mock).alerts; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_orderBy = "foo"; + var arg_customerId = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 14), + unittest.equals("v1beta1/alerts")); + pathOffset += 14; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect( + queryMap["orderBy"].first, unittest.equals(arg_orderBy)); + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListAlertsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list( + filter: arg_filter, + pageToken: arg_pageToken, + orderBy: arg_orderBy, + customerId: arg_customerId, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListAlertsResponse(response); + }))); + }); + + unittest.test("method--undelete", () { + var mock = new HttpServerMock(); + api.AlertsResourceApi res = new api.AlertcenterApi(mock).alerts; + var arg_request = buildUndeleteAlertRequest(); + var arg_alertId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.UndeleteAlertRequest.fromJson(json); + checkUndeleteAlertRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + index = path.indexOf(":undelete", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals(":undelete")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAlert()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .undelete(arg_request, arg_alertId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAlert(response); + }))); + }); + }); + + unittest.group("resource-AlertsFeedbackResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AlertsFeedbackResourceApi res = + new api.AlertcenterApi(mock).alerts.feedback; + var arg_request = buildAlertFeedback(); + var arg_alertId = "foo"; + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AlertFeedback.fromJson(json); + checkAlertFeedback(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + index = path.indexOf("/feedback", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals("/feedback")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAlertFeedback()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_alertId, + customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAlertFeedback(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AlertsFeedbackResourceApi res = + new api.AlertcenterApi(mock).alerts.feedback; + var arg_alertId = "foo"; + var arg_customerId = "foo"; + var arg_filter = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + index = path.indexOf("/feedback", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals("/feedback")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListAlertFeedbackResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_alertId, + customerId: arg_customerId, + filter: arg_filter, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListAlertFeedbackResponse(response); + }))); + }); + }); + + unittest.group("resource-V1beta1ResourceApi", () { + unittest.test("method--getSettings", () { + var mock = new HttpServerMock(); + api.V1beta1ResourceApi res = new api.AlertcenterApi(mock).v1beta1; + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 16), + unittest.equals("v1beta1/settings")); + pathOffset += 16; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSettings()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getSettings(customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSettings(response); + }))); + }); + + unittest.test("method--updateSettings", () { + var mock = new HttpServerMock(); + api.V1beta1ResourceApi res = new api.AlertcenterApi(mock).v1beta1; + var arg_request = buildSettings(); + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Settings.fromJson(json); + checkSettings(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 16), + unittest.equals("v1beta1/settings")); + pathOffset += 16; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSettings()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .updateSettings(arg_request, + customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSettings(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/appengine/v1beta4_test.dart b/generated/googleapis_beta/test/appengine/v1beta4_test.dart index d0220b0..8d857c6 100644 --- a/generated/googleapis_beta/test/appengine/v1beta4_test.dart +++ b/generated/googleapis_beta/test/appengine/v1beta4_test.dart
@@ -96,14 +96,14 @@ buildCounterApiEndpointHandler--; } -buildUnnamed5436() { +buildUnnamed4987() { var o = new core.List<api.UrlDispatchRule>(); o.add(buildUrlDispatchRule()); o.add(buildUrlDispatchRule()); return o; } -checkUnnamed5436(core.List<api.UrlDispatchRule> o) { +checkUnnamed4987(core.List<api.UrlDispatchRule> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlDispatchRule(o[0]); checkUrlDispatchRule(o[1]); @@ -119,7 +119,7 @@ o.defaultBucket = "foo"; o.defaultCookieExpiration = "foo"; o.defaultHostname = "foo"; - o.dispatchRules = buildUnnamed5436(); + o.dispatchRules = buildUnnamed4987(); o.iap = buildIdentityAwareProxy(); o.id = "foo"; o.location = "foo"; @@ -137,7 +137,7 @@ unittest.expect(o.defaultBucket, unittest.equals('foo')); unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); unittest.expect(o.defaultHostname, unittest.equals('foo')); - checkUnnamed5436(o.dispatchRules); + checkUnnamed4987(o.dispatchRules); checkIdentityAwareProxy(o.iap); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); @@ -324,27 +324,27 @@ buildCounterDebugInstanceRequest--; } -buildUnnamed5437() { +buildUnnamed4988() { var o = new core.Map<core.String, api.FileInfo>(); o["x"] = buildFileInfo(); o["y"] = buildFileInfo(); return o; } -checkUnnamed5437(core.Map<core.String, api.FileInfo> o) { +checkUnnamed4988(core.Map<core.String, api.FileInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkFileInfo(o["x"]); checkFileInfo(o["y"]); } -buildUnnamed5438() { +buildUnnamed4989() { var o = new core.List<api.SourceReference>(); o.add(buildSourceReference()); o.add(buildSourceReference()); return o; } -checkUnnamed5438(core.List<api.SourceReference> o) { +checkUnnamed4989(core.List<api.SourceReference> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceReference(o[0]); checkSourceReference(o[1]); @@ -356,8 +356,8 @@ buildCounterDeployment++; if (buildCounterDeployment < 3) { o.container = buildContainerInfo(); - o.files = buildUnnamed5437(); - o.sourceReferences = buildUnnamed5438(); + o.files = buildUnnamed4988(); + o.sourceReferences = buildUnnamed4989(); } buildCounterDeployment--; return o; @@ -367,8 +367,8 @@ buildCounterDeployment++; if (buildCounterDeployment < 3) { checkContainerInfo(o.container); - checkUnnamed5437(o.files); - checkUnnamed5438(o.sourceReferences); + checkUnnamed4988(o.files); + checkUnnamed4989(o.sourceReferences); } buildCounterDeployment--; } @@ -595,14 +595,14 @@ buildCounterLibrary--; } -buildUnnamed5439() { +buildUnnamed4990() { var o = new core.List<api.Instance>(); o.add(buildInstance()); o.add(buildInstance()); return o; } -checkUnnamed5439(core.List<api.Instance> o) { +checkUnnamed4990(core.List<api.Instance> o) { unittest.expect(o, unittest.hasLength(2)); checkInstance(o[0]); checkInstance(o[1]); @@ -613,7 +613,7 @@ var o = new api.ListInstancesResponse(); buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5439(); + o.instances = buildUnnamed4990(); o.nextPageToken = "foo"; } buildCounterListInstancesResponse--; @@ -623,20 +623,20 @@ checkListInstancesResponse(api.ListInstancesResponse o) { buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - checkUnnamed5439(o.instances); + checkUnnamed4990(o.instances); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListInstancesResponse--; } -buildUnnamed5440() { +buildUnnamed4991() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5440(core.List<api.Location> o) { +checkUnnamed4991(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -647,7 +647,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5440(); + o.locations = buildUnnamed4991(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -657,20 +657,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5440(o.locations); + checkUnnamed4991(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5441() { +buildUnnamed4992() { var o = new core.List<api.Module>(); o.add(buildModule()); o.add(buildModule()); return o; } -checkUnnamed5441(core.List<api.Module> o) { +checkUnnamed4992(core.List<api.Module> o) { unittest.expect(o, unittest.hasLength(2)); checkModule(o[0]); checkModule(o[1]); @@ -681,7 +681,7 @@ var o = new api.ListModulesResponse(); buildCounterListModulesResponse++; if (buildCounterListModulesResponse < 3) { - o.modules = buildUnnamed5441(); + o.modules = buildUnnamed4992(); o.nextPageToken = "foo"; } buildCounterListModulesResponse--; @@ -691,20 +691,20 @@ checkListModulesResponse(api.ListModulesResponse o) { buildCounterListModulesResponse++; if (buildCounterListModulesResponse < 3) { - checkUnnamed5441(o.modules); + checkUnnamed4992(o.modules); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListModulesResponse--; } -buildUnnamed5442() { +buildUnnamed4993() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5442(core.List<api.Operation> o) { +checkUnnamed4993(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -716,7 +716,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5442(); + o.operations = buildUnnamed4993(); } buildCounterListOperationsResponse--; return o; @@ -726,19 +726,19 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5442(o.operations); + checkUnnamed4993(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5443() { +buildUnnamed4994() { var o = new core.List<api.Version>(); o.add(buildVersion()); o.add(buildVersion()); return o; } -checkUnnamed5443(core.List<api.Version> o) { +checkUnnamed4994(core.List<api.Version> o) { unittest.expect(o, unittest.hasLength(2)); checkVersion(o[0]); checkVersion(o[1]); @@ -750,7 +750,7 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { o.nextPageToken = "foo"; - o.versions = buildUnnamed5443(); + o.versions = buildUnnamed4994(); } buildCounterListVersionsResponse--; return o; @@ -760,25 +760,25 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5443(o.versions); + checkUnnamed4994(o.versions); } buildCounterListVersionsResponse--; } -buildUnnamed5444() { +buildUnnamed4995() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5444(core.Map<core.String, core.String> o) { +checkUnnamed4995(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5445() { +buildUnnamed4996() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -793,7 +793,7 @@ return o; } -checkUnnamed5445(core.Map<core.String, core.Object> o) { +checkUnnamed4996(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -813,9 +813,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5444(); + o.labels = buildUnnamed4995(); o.locationId = "foo"; - o.metadata = buildUnnamed5445(); + o.metadata = buildUnnamed4996(); o.name = "foo"; } buildCounterLocation--; @@ -826,9 +826,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5444(o.labels); + checkUnnamed4995(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5445(o.metadata); + checkUnnamed4996(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -897,14 +897,14 @@ buildCounterModule--; } -buildUnnamed5446() { +buildUnnamed4997() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5446(core.List<core.String> o) { +checkUnnamed4997(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -915,7 +915,7 @@ var o = new api.Network(); buildCounterNetwork++; if (buildCounterNetwork < 3) { - o.forwardedPorts = buildUnnamed5446(); + o.forwardedPorts = buildUnnamed4997(); o.instanceTag = "foo"; o.name = "foo"; } @@ -926,7 +926,7 @@ checkNetwork(api.Network o) { buildCounterNetwork++; if (buildCounterNetwork < 3) { - checkUnnamed5446(o.forwardedPorts); + checkUnnamed4997(o.forwardedPorts); unittest.expect(o.instanceTag, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); } @@ -958,7 +958,7 @@ buildCounterNetworkUtilization--; } -buildUnnamed5447() { +buildUnnamed4998() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -973,7 +973,7 @@ return o; } -checkUnnamed5447(core.Map<core.String, core.Object> o) { +checkUnnamed4998(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -987,7 +987,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5448() { +buildUnnamed4999() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1002,7 +1002,7 @@ return o; } -checkUnnamed5448(core.Map<core.String, core.Object> o) { +checkUnnamed4999(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -1023,9 +1023,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5447(); + o.metadata = buildUnnamed4998(); o.name = "foo"; - o.response = buildUnnamed5448(); + o.response = buildUnnamed4999(); } buildCounterOperation--; return o; @@ -1036,9 +1036,9 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5447(o.metadata); + checkUnnamed4998(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5448(o.response); + checkUnnamed4999(o.response); } buildCounterOperation--; } @@ -1072,14 +1072,14 @@ buildCounterOperationMetadata--; } -buildUnnamed5449() { +buildUnnamed5000() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5449(core.List<core.String> o) { +checkUnnamed5000(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1097,7 +1097,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5449(); + o.warning = buildUnnamed5000(); } buildCounterOperationMetadataV1--; return o; @@ -1113,19 +1113,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5449(o.warning); + checkUnnamed5000(o.warning); } buildCounterOperationMetadataV1--; } -buildUnnamed5450() { +buildUnnamed5001() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5450(core.List<core.String> o) { +checkUnnamed5001(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1143,7 +1143,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5450(); + o.warning = buildUnnamed5001(); } buildCounterOperationMetadataV1Alpha--; return o; @@ -1159,19 +1159,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5450(o.warning); + checkUnnamed5001(o.warning); } buildCounterOperationMetadataV1Alpha--; } -buildUnnamed5451() { +buildUnnamed5002() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5451(core.List<core.String> o) { +checkUnnamed5002(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1189,7 +1189,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5451(); + o.warning = buildUnnamed5002(); } buildCounterOperationMetadataV1Beta--; return o; @@ -1205,7 +1205,7 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5451(o.warning); + checkUnnamed5002(o.warning); } buildCounterOperationMetadataV1Beta--; } @@ -1258,14 +1258,14 @@ buildCounterRequestUtilization--; } -buildUnnamed5452() { +buildUnnamed5003() { var o = new core.List<api.Volume>(); o.add(buildVolume()); o.add(buildVolume()); return o; } -checkUnnamed5452(core.List<api.Volume> o) { +checkUnnamed5003(core.List<api.Volume> o) { unittest.expect(o, unittest.hasLength(2)); checkVolume(o[0]); checkVolume(o[1]); @@ -1279,7 +1279,7 @@ o.cpu = 42.0; o.diskGb = 42.0; o.memoryGb = 42.0; - o.volumes = buildUnnamed5452(); + o.volumes = buildUnnamed5003(); } buildCounterResources--; return o; @@ -1291,7 +1291,7 @@ unittest.expect(o.cpu, unittest.equals(42.0)); unittest.expect(o.diskGb, unittest.equals(42.0)); unittest.expect(o.memoryGb, unittest.equals(42.0)); - checkUnnamed5452(o.volumes); + checkUnnamed5003(o.volumes); } buildCounterResources--; } @@ -1336,14 +1336,14 @@ buildCounterSourceReference--; } -buildUnnamed5453() { +buildUnnamed5004() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5453(core.Map<core.String, core.String> o) { +checkUnnamed5004(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1357,7 +1357,7 @@ o.applicationReadable = true; o.directory = "foo"; o.expiration = "foo"; - o.httpHeaders = buildUnnamed5453(); + o.httpHeaders = buildUnnamed5004(); o.mimeType = "foo"; o.requireMatchingFile = true; } @@ -1371,21 +1371,21 @@ unittest.expect(o.applicationReadable, unittest.isTrue); unittest.expect(o.directory, unittest.equals('foo')); unittest.expect(o.expiration, unittest.equals('foo')); - checkUnnamed5453(o.httpHeaders); + checkUnnamed5004(o.httpHeaders); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.requireMatchingFile, unittest.isTrue); } buildCounterStaticDirectoryHandler--; } -buildUnnamed5454() { +buildUnnamed5005() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5454(core.Map<core.String, core.String> o) { +checkUnnamed5005(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1398,7 +1398,7 @@ if (buildCounterStaticFilesHandler < 3) { o.applicationReadable = true; o.expiration = "foo"; - o.httpHeaders = buildUnnamed5454(); + o.httpHeaders = buildUnnamed5005(); o.mimeType = "foo"; o.path = "foo"; o.requireMatchingFile = true; @@ -1413,7 +1413,7 @@ if (buildCounterStaticFilesHandler < 3) { unittest.expect(o.applicationReadable, unittest.isTrue); unittest.expect(o.expiration, unittest.equals('foo')); - checkUnnamed5454(o.httpHeaders); + checkUnnamed5005(o.httpHeaders); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.path, unittest.equals('foo')); unittest.expect(o.requireMatchingFile, unittest.isTrue); @@ -1422,7 +1422,7 @@ buildCounterStaticFilesHandler--; } -buildUnnamed5455() { +buildUnnamed5006() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1437,7 +1437,7 @@ return o; } -checkUnnamed5455(core.Map<core.String, core.Object> o) { +checkUnnamed5006(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -1451,17 +1451,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5456() { +buildUnnamed5007() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5455()); - o.add(buildUnnamed5455()); + o.add(buildUnnamed5006()); + o.add(buildUnnamed5006()); return o; } -checkUnnamed5456(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed5007(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5455(o[0]); - checkUnnamed5455(o[1]); + checkUnnamed5006(o[0]); + checkUnnamed5006(o[1]); } core.int buildCounterStatus = 0; @@ -1470,7 +1470,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5456(); + o.details = buildUnnamed5007(); o.message = "foo"; } buildCounterStatus--; @@ -1481,20 +1481,20 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5456(o.details); + checkUnnamed5007(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5457() { +buildUnnamed5008() { var o = new core.Map<core.String, core.double>(); o["x"] = 42.0; o["y"] = 42.0; return o; } -checkUnnamed5457(core.Map<core.String, core.double> o) { +checkUnnamed5008(core.Map<core.String, core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals(42.0)); unittest.expect(o["y"], unittest.equals(42.0)); @@ -1505,7 +1505,7 @@ var o = new api.TrafficSplit(); buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - o.allocations = buildUnnamed5457(); + o.allocations = buildUnnamed5008(); o.shardBy = "foo"; } buildCounterTrafficSplit--; @@ -1515,7 +1515,7 @@ checkTrafficSplit(api.TrafficSplit o) { buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - checkUnnamed5457(o.allocations); + checkUnnamed5008(o.allocations); unittest.expect(o.shardBy, unittest.equals('foo')); } buildCounterTrafficSplit--; @@ -1579,79 +1579,79 @@ buildCounterUrlMap--; } -buildUnnamed5458() { +buildUnnamed5009() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5458(core.Map<core.String, core.String> o) { +checkUnnamed5009(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5459() { +buildUnnamed5010() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5459(core.Map<core.String, core.String> o) { +checkUnnamed5010(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5460() { +buildUnnamed5011() { var o = new core.List<api.ErrorHandler>(); o.add(buildErrorHandler()); o.add(buildErrorHandler()); return o; } -checkUnnamed5460(core.List<api.ErrorHandler> o) { +checkUnnamed5011(core.List<api.ErrorHandler> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorHandler(o[0]); checkErrorHandler(o[1]); } -buildUnnamed5461() { +buildUnnamed5012() { var o = new core.List<api.UrlMap>(); o.add(buildUrlMap()); o.add(buildUrlMap()); return o; } -checkUnnamed5461(core.List<api.UrlMap> o) { +checkUnnamed5012(core.List<api.UrlMap> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlMap(o[0]); checkUrlMap(o[1]); } -buildUnnamed5462() { +buildUnnamed5013() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5462(core.List<core.String> o) { +checkUnnamed5013(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5463() { +buildUnnamed5014() { var o = new core.List<api.Library>(); o.add(buildLibrary()); o.add(buildLibrary()); return o; } -checkUnnamed5463(core.List<api.Library> o) { +checkUnnamed5014(core.List<api.Library> o) { unittest.expect(o, unittest.hasLength(2)); checkLibrary(o[0]); checkLibrary(o[1]); @@ -1665,21 +1665,21 @@ o.apiConfig = buildApiConfigHandler(); o.automaticScaling = buildAutomaticScaling(); o.basicScaling = buildBasicScaling(); - o.betaSettings = buildUnnamed5458(); + o.betaSettings = buildUnnamed5009(); o.creationTime = "foo"; o.defaultExpiration = "foo"; o.deployer = "foo"; o.deployment = buildDeployment(); o.endpointsApiService = buildEndpointsApiService(); o.env = "foo"; - o.envVariables = buildUnnamed5459(); - o.errorHandlers = buildUnnamed5460(); - o.handlers = buildUnnamed5461(); + o.envVariables = buildUnnamed5010(); + o.errorHandlers = buildUnnamed5011(); + o.handlers = buildUnnamed5012(); o.healthCheck = buildHealthCheck(); o.id = "foo"; - o.inboundServices = buildUnnamed5462(); + o.inboundServices = buildUnnamed5013(); o.instanceClass = "foo"; - o.libraries = buildUnnamed5463(); + o.libraries = buildUnnamed5014(); o.manualScaling = buildManualScaling(); o.name = "foo"; o.network = buildNetwork(); @@ -1687,6 +1687,7 @@ o.resources = buildResources(); o.runtime = "foo"; o.runtimeApiVersion = "foo"; + o.runtimeMainExecutablePath = "foo"; o.servingStatus = "foo"; o.threadsafe = true; o.vm = true; @@ -1701,21 +1702,21 @@ checkApiConfigHandler(o.apiConfig); checkAutomaticScaling(o.automaticScaling); checkBasicScaling(o.basicScaling); - checkUnnamed5458(o.betaSettings); + checkUnnamed5009(o.betaSettings); unittest.expect(o.creationTime, unittest.equals('foo')); unittest.expect(o.defaultExpiration, unittest.equals('foo')); unittest.expect(o.deployer, unittest.equals('foo')); checkDeployment(o.deployment); checkEndpointsApiService(o.endpointsApiService); unittest.expect(o.env, unittest.equals('foo')); - checkUnnamed5459(o.envVariables); - checkUnnamed5460(o.errorHandlers); - checkUnnamed5461(o.handlers); + checkUnnamed5010(o.envVariables); + checkUnnamed5011(o.errorHandlers); + checkUnnamed5012(o.handlers); checkHealthCheck(o.healthCheck); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5462(o.inboundServices); + checkUnnamed5013(o.inboundServices); unittest.expect(o.instanceClass, unittest.equals('foo')); - checkUnnamed5463(o.libraries); + checkUnnamed5014(o.libraries); checkManualScaling(o.manualScaling); unittest.expect(o.name, unittest.equals('foo')); checkNetwork(o.network); @@ -1723,6 +1724,7 @@ checkResources(o.resources); unittest.expect(o.runtime, unittest.equals('foo')); unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); + unittest.expect(o.runtimeMainExecutablePath, unittest.equals('foo')); unittest.expect(o.servingStatus, unittest.equals('foo')); unittest.expect(o.threadsafe, unittest.isTrue); unittest.expect(o.vm, unittest.isTrue); @@ -2960,9 +2962,9 @@ new api.AppengineApi(mock).apps.modules.versions; var arg_appsId = "foo"; var arg_modulesId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_view = "foo"; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3012,11 +3014,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3027,9 +3029,9 @@ }), true); res .list(arg_appsId, arg_modulesId, - pageToken: arg_pageToken, pageSize: arg_pageSize, view: arg_view, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListVersionsResponse(response); @@ -3392,8 +3394,8 @@ var arg_appsId = "foo"; var arg_modulesId = "foo"; var arg_versionsId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3452,10 +3454,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3466,8 +3468,8 @@ }), true); res .list(arg_appsId, arg_modulesId, arg_versionsId, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListInstancesResponse(response); @@ -3545,9 +3547,9 @@ api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operations; var arg_appsId = "foo"; + var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; - var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3588,11 +3590,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3603,9 +3605,9 @@ }), true); res .list(arg_appsId, + filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize, - filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListOperationsResponse(response);
diff --git a/generated/googleapis_beta/test/appengine/v1beta5_test.dart b/generated/googleapis_beta/test/appengine/v1beta5_test.dart index 96d703d..f08df06 100644 --- a/generated/googleapis_beta/test/appengine/v1beta5_test.dart +++ b/generated/googleapis_beta/test/appengine/v1beta5_test.dart
@@ -96,14 +96,14 @@ buildCounterApiEndpointHandler--; } -buildUnnamed5330() { +buildUnnamed4696() { var o = new core.List<api.UrlDispatchRule>(); o.add(buildUrlDispatchRule()); o.add(buildUrlDispatchRule()); return o; } -checkUnnamed5330(core.List<api.UrlDispatchRule> o) { +checkUnnamed4696(core.List<api.UrlDispatchRule> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlDispatchRule(o[0]); checkUrlDispatchRule(o[1]); @@ -119,7 +119,7 @@ o.defaultBucket = "foo"; o.defaultCookieExpiration = "foo"; o.defaultHostname = "foo"; - o.dispatchRules = buildUnnamed5330(); + o.dispatchRules = buildUnnamed4696(); o.iap = buildIdentityAwareProxy(); o.id = "foo"; o.location = "foo"; @@ -137,7 +137,7 @@ unittest.expect(o.defaultBucket, unittest.equals('foo')); unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); unittest.expect(o.defaultHostname, unittest.equals('foo')); - checkUnnamed5330(o.dispatchRules); + checkUnnamed4696(o.dispatchRules); checkIdentityAwareProxy(o.iap); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); @@ -324,27 +324,27 @@ buildCounterDebugInstanceRequest--; } -buildUnnamed5331() { +buildUnnamed4697() { var o = new core.Map<core.String, api.FileInfo>(); o["x"] = buildFileInfo(); o["y"] = buildFileInfo(); return o; } -checkUnnamed5331(core.Map<core.String, api.FileInfo> o) { +checkUnnamed4697(core.Map<core.String, api.FileInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkFileInfo(o["x"]); checkFileInfo(o["y"]); } -buildUnnamed5332() { +buildUnnamed4698() { var o = new core.List<api.SourceReference>(); o.add(buildSourceReference()); o.add(buildSourceReference()); return o; } -checkUnnamed5332(core.List<api.SourceReference> o) { +checkUnnamed4698(core.List<api.SourceReference> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceReference(o[0]); checkSourceReference(o[1]); @@ -356,8 +356,8 @@ buildCounterDeployment++; if (buildCounterDeployment < 3) { o.container = buildContainerInfo(); - o.files = buildUnnamed5331(); - o.sourceReferences = buildUnnamed5332(); + o.files = buildUnnamed4697(); + o.sourceReferences = buildUnnamed4698(); } buildCounterDeployment--; return o; @@ -367,8 +367,8 @@ buildCounterDeployment++; if (buildCounterDeployment < 3) { checkContainerInfo(o.container); - checkUnnamed5331(o.files); - checkUnnamed5332(o.sourceReferences); + checkUnnamed4697(o.files); + checkUnnamed4698(o.sourceReferences); } buildCounterDeployment--; } @@ -595,14 +595,14 @@ buildCounterLibrary--; } -buildUnnamed5333() { +buildUnnamed4699() { var o = new core.List<api.Instance>(); o.add(buildInstance()); o.add(buildInstance()); return o; } -checkUnnamed5333(core.List<api.Instance> o) { +checkUnnamed4699(core.List<api.Instance> o) { unittest.expect(o, unittest.hasLength(2)); checkInstance(o[0]); checkInstance(o[1]); @@ -613,7 +613,7 @@ var o = new api.ListInstancesResponse(); buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5333(); + o.instances = buildUnnamed4699(); o.nextPageToken = "foo"; } buildCounterListInstancesResponse--; @@ -623,20 +623,20 @@ checkListInstancesResponse(api.ListInstancesResponse o) { buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - checkUnnamed5333(o.instances); + checkUnnamed4699(o.instances); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListInstancesResponse--; } -buildUnnamed5334() { +buildUnnamed4700() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5334(core.List<api.Location> o) { +checkUnnamed4700(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -647,7 +647,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5334(); + o.locations = buildUnnamed4700(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -657,20 +657,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5334(o.locations); + checkUnnamed4700(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5335() { +buildUnnamed4701() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5335(core.List<api.Operation> o) { +checkUnnamed4701(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -682,7 +682,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5335(); + o.operations = buildUnnamed4701(); } buildCounterListOperationsResponse--; return o; @@ -692,19 +692,19 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5335(o.operations); + checkUnnamed4701(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5336() { +buildUnnamed4702() { var o = new core.List<api.Service>(); o.add(buildService()); o.add(buildService()); return o; } -checkUnnamed5336(core.List<api.Service> o) { +checkUnnamed4702(core.List<api.Service> o) { unittest.expect(o, unittest.hasLength(2)); checkService(o[0]); checkService(o[1]); @@ -716,7 +716,7 @@ buildCounterListServicesResponse++; if (buildCounterListServicesResponse < 3) { o.nextPageToken = "foo"; - o.services = buildUnnamed5336(); + o.services = buildUnnamed4702(); } buildCounterListServicesResponse--; return o; @@ -726,19 +726,19 @@ buildCounterListServicesResponse++; if (buildCounterListServicesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5336(o.services); + checkUnnamed4702(o.services); } buildCounterListServicesResponse--; } -buildUnnamed5337() { +buildUnnamed4703() { var o = new core.List<api.Version>(); o.add(buildVersion()); o.add(buildVersion()); return o; } -checkUnnamed5337(core.List<api.Version> o) { +checkUnnamed4703(core.List<api.Version> o) { unittest.expect(o, unittest.hasLength(2)); checkVersion(o[0]); checkVersion(o[1]); @@ -750,7 +750,7 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { o.nextPageToken = "foo"; - o.versions = buildUnnamed5337(); + o.versions = buildUnnamed4703(); } buildCounterListVersionsResponse--; return o; @@ -760,25 +760,25 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5337(o.versions); + checkUnnamed4703(o.versions); } buildCounterListVersionsResponse--; } -buildUnnamed5338() { +buildUnnamed4704() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5338(core.Map<core.String, core.String> o) { +checkUnnamed4704(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5339() { +buildUnnamed4705() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -793,7 +793,7 @@ return o; } -checkUnnamed5339(core.Map<core.String, core.Object> o) { +checkUnnamed4705(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -813,9 +813,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5338(); + o.labels = buildUnnamed4704(); o.locationId = "foo"; - o.metadata = buildUnnamed5339(); + o.metadata = buildUnnamed4705(); o.name = "foo"; } buildCounterLocation--; @@ -826,9 +826,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5338(o.labels); + checkUnnamed4704(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5339(o.metadata); + checkUnnamed4705(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -874,14 +874,14 @@ buildCounterManualScaling--; } -buildUnnamed5340() { +buildUnnamed4706() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5340(core.List<core.String> o) { +checkUnnamed4706(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -892,7 +892,7 @@ var o = new api.Network(); buildCounterNetwork++; if (buildCounterNetwork < 3) { - o.forwardedPorts = buildUnnamed5340(); + o.forwardedPorts = buildUnnamed4706(); o.instanceTag = "foo"; o.name = "foo"; o.subnetworkName = "foo"; @@ -904,7 +904,7 @@ checkNetwork(api.Network o) { buildCounterNetwork++; if (buildCounterNetwork < 3) { - checkUnnamed5340(o.forwardedPorts); + checkUnnamed4706(o.forwardedPorts); unittest.expect(o.instanceTag, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.subnetworkName, unittest.equals('foo')); @@ -937,7 +937,7 @@ buildCounterNetworkUtilization--; } -buildUnnamed5341() { +buildUnnamed4707() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -952,7 +952,7 @@ return o; } -checkUnnamed5341(core.Map<core.String, core.Object> o) { +checkUnnamed4707(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -966,7 +966,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5342() { +buildUnnamed4708() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -981,7 +981,7 @@ return o; } -checkUnnamed5342(core.Map<core.String, core.Object> o) { +checkUnnamed4708(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -1002,9 +1002,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5341(); + o.metadata = buildUnnamed4707(); o.name = "foo"; - o.response = buildUnnamed5342(); + o.response = buildUnnamed4708(); } buildCounterOperation--; return o; @@ -1015,9 +1015,9 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5341(o.metadata); + checkUnnamed4707(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5342(o.response); + checkUnnamed4708(o.response); } buildCounterOperation--; } @@ -1051,14 +1051,14 @@ buildCounterOperationMetadata--; } -buildUnnamed5343() { +buildUnnamed4709() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5343(core.List<core.String> o) { +checkUnnamed4709(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1076,7 +1076,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5343(); + o.warning = buildUnnamed4709(); } buildCounterOperationMetadataV1--; return o; @@ -1092,19 +1092,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5343(o.warning); + checkUnnamed4709(o.warning); } buildCounterOperationMetadataV1--; } -buildUnnamed5344() { +buildUnnamed4710() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5344(core.List<core.String> o) { +checkUnnamed4710(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1122,7 +1122,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5344(); + o.warning = buildUnnamed4710(); } buildCounterOperationMetadataV1Alpha--; return o; @@ -1138,19 +1138,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5344(o.warning); + checkUnnamed4710(o.warning); } buildCounterOperationMetadataV1Alpha--; } -buildUnnamed5345() { +buildUnnamed4711() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5345(core.List<core.String> o) { +checkUnnamed4711(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1168,7 +1168,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5345(); + o.warning = buildUnnamed4711(); } buildCounterOperationMetadataV1Beta--; return o; @@ -1184,7 +1184,7 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5345(o.warning); + checkUnnamed4711(o.warning); } buildCounterOperationMetadataV1Beta--; } @@ -1237,14 +1237,14 @@ buildCounterRequestUtilization--; } -buildUnnamed5346() { +buildUnnamed4712() { var o = new core.List<api.Volume>(); o.add(buildVolume()); o.add(buildVolume()); return o; } -checkUnnamed5346(core.List<api.Volume> o) { +checkUnnamed4712(core.List<api.Volume> o) { unittest.expect(o, unittest.hasLength(2)); checkVolume(o[0]); checkVolume(o[1]); @@ -1258,7 +1258,7 @@ o.cpu = 42.0; o.diskGb = 42.0; o.memoryGb = 42.0; - o.volumes = buildUnnamed5346(); + o.volumes = buildUnnamed4712(); } buildCounterResources--; return o; @@ -1270,7 +1270,7 @@ unittest.expect(o.cpu, unittest.equals(42.0)); unittest.expect(o.diskGb, unittest.equals(42.0)); unittest.expect(o.memoryGb, unittest.equals(42.0)); - checkUnnamed5346(o.volumes); + checkUnnamed4712(o.volumes); } buildCounterResources--; } @@ -1338,14 +1338,14 @@ buildCounterSourceReference--; } -buildUnnamed5347() { +buildUnnamed4713() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5347(core.Map<core.String, core.String> o) { +checkUnnamed4713(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1358,7 +1358,7 @@ if (buildCounterStaticFilesHandler < 3) { o.applicationReadable = true; o.expiration = "foo"; - o.httpHeaders = buildUnnamed5347(); + o.httpHeaders = buildUnnamed4713(); o.mimeType = "foo"; o.path = "foo"; o.requireMatchingFile = true; @@ -1373,7 +1373,7 @@ if (buildCounterStaticFilesHandler < 3) { unittest.expect(o.applicationReadable, unittest.isTrue); unittest.expect(o.expiration, unittest.equals('foo')); - checkUnnamed5347(o.httpHeaders); + checkUnnamed4713(o.httpHeaders); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.path, unittest.equals('foo')); unittest.expect(o.requireMatchingFile, unittest.isTrue); @@ -1382,7 +1382,7 @@ buildCounterStaticFilesHandler--; } -buildUnnamed5348() { +buildUnnamed4714() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1397,7 +1397,7 @@ return o; } -checkUnnamed5348(core.Map<core.String, core.Object> o) { +checkUnnamed4714(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -1411,17 +1411,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5349() { +buildUnnamed4715() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5348()); - o.add(buildUnnamed5348()); + o.add(buildUnnamed4714()); + o.add(buildUnnamed4714()); return o; } -checkUnnamed5349(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4715(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5348(o[0]); - checkUnnamed5348(o[1]); + checkUnnamed4714(o[0]); + checkUnnamed4714(o[1]); } core.int buildCounterStatus = 0; @@ -1430,7 +1430,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5349(); + o.details = buildUnnamed4715(); o.message = "foo"; } buildCounterStatus--; @@ -1441,20 +1441,20 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5349(o.details); + checkUnnamed4715(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5350() { +buildUnnamed4716() { var o = new core.Map<core.String, core.double>(); o["x"] = 42.0; o["y"] = 42.0; return o; } -checkUnnamed5350(core.Map<core.String, core.double> o) { +checkUnnamed4716(core.Map<core.String, core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals(42.0)); unittest.expect(o["y"], unittest.equals(42.0)); @@ -1465,7 +1465,7 @@ var o = new api.TrafficSplit(); buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - o.allocations = buildUnnamed5350(); + o.allocations = buildUnnamed4716(); o.shardBy = "foo"; } buildCounterTrafficSplit--; @@ -1475,7 +1475,7 @@ checkTrafficSplit(api.TrafficSplit o) { buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - checkUnnamed5350(o.allocations); + checkUnnamed4716(o.allocations); unittest.expect(o.shardBy, unittest.equals('foo')); } buildCounterTrafficSplit--; @@ -1537,79 +1537,79 @@ buildCounterUrlMap--; } -buildUnnamed5351() { +buildUnnamed4717() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5351(core.Map<core.String, core.String> o) { +checkUnnamed4717(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5352() { +buildUnnamed4718() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5352(core.Map<core.String, core.String> o) { +checkUnnamed4718(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5353() { +buildUnnamed4719() { var o = new core.List<api.ErrorHandler>(); o.add(buildErrorHandler()); o.add(buildErrorHandler()); return o; } -checkUnnamed5353(core.List<api.ErrorHandler> o) { +checkUnnamed4719(core.List<api.ErrorHandler> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorHandler(o[0]); checkErrorHandler(o[1]); } -buildUnnamed5354() { +buildUnnamed4720() { var o = new core.List<api.UrlMap>(); o.add(buildUrlMap()); o.add(buildUrlMap()); return o; } -checkUnnamed5354(core.List<api.UrlMap> o) { +checkUnnamed4720(core.List<api.UrlMap> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlMap(o[0]); checkUrlMap(o[1]); } -buildUnnamed5355() { +buildUnnamed4721() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5355(core.List<core.String> o) { +checkUnnamed4721(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5356() { +buildUnnamed4722() { var o = new core.List<api.Library>(); o.add(buildLibrary()); o.add(buildLibrary()); return o; } -checkUnnamed5356(core.List<api.Library> o) { +checkUnnamed4722(core.List<api.Library> o) { unittest.expect(o, unittest.hasLength(2)); checkLibrary(o[0]); checkLibrary(o[1]); @@ -1623,7 +1623,7 @@ o.apiConfig = buildApiConfigHandler(); o.automaticScaling = buildAutomaticScaling(); o.basicScaling = buildBasicScaling(); - o.betaSettings = buildUnnamed5351(); + o.betaSettings = buildUnnamed4717(); o.creationTime = "foo"; o.defaultExpiration = "foo"; o.deployer = "foo"; @@ -1631,14 +1631,14 @@ o.diskUsageBytes = "foo"; o.endpointsApiService = buildEndpointsApiService(); o.env = "foo"; - o.envVariables = buildUnnamed5352(); - o.errorHandlers = buildUnnamed5353(); - o.handlers = buildUnnamed5354(); + o.envVariables = buildUnnamed4718(); + o.errorHandlers = buildUnnamed4719(); + o.handlers = buildUnnamed4720(); o.healthCheck = buildHealthCheck(); o.id = "foo"; - o.inboundServices = buildUnnamed5355(); + o.inboundServices = buildUnnamed4721(); o.instanceClass = "foo"; - o.libraries = buildUnnamed5356(); + o.libraries = buildUnnamed4722(); o.manualScaling = buildManualScaling(); o.name = "foo"; o.network = buildNetwork(); @@ -1646,6 +1646,7 @@ o.resources = buildResources(); o.runtime = "foo"; o.runtimeApiVersion = "foo"; + o.runtimeMainExecutablePath = "foo"; o.servingStatus = "foo"; o.threadsafe = true; o.vm = true; @@ -1660,7 +1661,7 @@ checkApiConfigHandler(o.apiConfig); checkAutomaticScaling(o.automaticScaling); checkBasicScaling(o.basicScaling); - checkUnnamed5351(o.betaSettings); + checkUnnamed4717(o.betaSettings); unittest.expect(o.creationTime, unittest.equals('foo')); unittest.expect(o.defaultExpiration, unittest.equals('foo')); unittest.expect(o.deployer, unittest.equals('foo')); @@ -1668,14 +1669,14 @@ unittest.expect(o.diskUsageBytes, unittest.equals('foo')); checkEndpointsApiService(o.endpointsApiService); unittest.expect(o.env, unittest.equals('foo')); - checkUnnamed5352(o.envVariables); - checkUnnamed5353(o.errorHandlers); - checkUnnamed5354(o.handlers); + checkUnnamed4718(o.envVariables); + checkUnnamed4719(o.errorHandlers); + checkUnnamed4720(o.handlers); checkHealthCheck(o.healthCheck); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5355(o.inboundServices); + checkUnnamed4721(o.inboundServices); unittest.expect(o.instanceClass, unittest.equals('foo')); - checkUnnamed5356(o.libraries); + checkUnnamed4722(o.libraries); checkManualScaling(o.manualScaling); unittest.expect(o.name, unittest.equals('foo')); checkNetwork(o.network); @@ -1683,6 +1684,7 @@ checkResources(o.resources); unittest.expect(o.runtime, unittest.equals('foo')); unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); + unittest.expect(o.runtimeMainExecutablePath, unittest.equals('foo')); unittest.expect(o.servingStatus, unittest.equals('foo')); unittest.expect(o.threadsafe, unittest.isTrue); unittest.expect(o.vm, unittest.isTrue); @@ -2340,9 +2342,9 @@ api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locations; var arg_appsId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -2383,11 +2385,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -2398,9 +2400,9 @@ }), true); res .list(arg_appsId, - pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -2478,9 +2480,9 @@ api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operations; var arg_appsId = "foo"; + var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; - var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -2521,11 +2523,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -2536,9 +2538,9 @@ }), true); res .list(arg_appsId, + filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize, - filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListOperationsResponse(response); @@ -3054,9 +3056,9 @@ new api.AppengineApi(mock).apps.services.versions; var arg_appsId = "foo"; var arg_servicesId = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_view = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3106,11 +3108,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3121,9 +3123,9 @@ }), true); res .list(arg_appsId, arg_servicesId, + pageToken: arg_pageToken, pageSize: arg_pageSize, view: arg_view, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListVersionsResponse(response);
diff --git a/generated/googleapis_beta/test/appengine/v1beta_test.dart b/generated/googleapis_beta/test/appengine/v1beta_test.dart index 3e5a2af..1cd461a 100644 --- a/generated/googleapis_beta/test/appengine/v1beta_test.dart +++ b/generated/googleapis_beta/test/appengine/v1beta_test.dart
@@ -96,14 +96,14 @@ buildCounterApiEndpointHandler--; } -buildUnnamed5025() { +buildUnnamed4510() { var o = new core.List<api.UrlDispatchRule>(); o.add(buildUrlDispatchRule()); o.add(buildUrlDispatchRule()); return o; } -checkUnnamed5025(core.List<api.UrlDispatchRule> o) { +checkUnnamed4510(core.List<api.UrlDispatchRule> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlDispatchRule(o[0]); checkUrlDispatchRule(o[1]); @@ -119,7 +119,7 @@ o.defaultBucket = "foo"; o.defaultCookieExpiration = "foo"; o.defaultHostname = "foo"; - o.dispatchRules = buildUnnamed5025(); + o.dispatchRules = buildUnnamed4510(); o.featureSettings = buildFeatureSettings(); o.gcrDomain = "foo"; o.iap = buildIdentityAwareProxy(); @@ -140,7 +140,7 @@ unittest.expect(o.defaultBucket, unittest.equals('foo')); unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); unittest.expect(o.defaultHostname, unittest.equals('foo')); - checkUnnamed5025(o.dispatchRules); + checkUnnamed4510(o.dispatchRules); checkFeatureSettings(o.featureSettings); unittest.expect(o.gcrDomain, unittest.equals('foo')); checkIdentityAwareProxy(o.iap); @@ -152,27 +152,27 @@ buildCounterApplication--; } -buildUnnamed5026() { +buildUnnamed4511() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5026(core.List<core.String> o) { +checkUnnamed4511(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5027() { +buildUnnamed4512() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5027(core.List<core.String> o) { +checkUnnamed4512(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -186,12 +186,12 @@ o.certificateRawData = buildCertificateRawData(); o.displayName = "foo"; o.domainMappingsCount = 42; - o.domainNames = buildUnnamed5026(); + o.domainNames = buildUnnamed4511(); o.expireTime = "foo"; o.id = "foo"; o.managedCertificate = buildManagedCertificate(); o.name = "foo"; - o.visibleDomainMappings = buildUnnamed5027(); + o.visibleDomainMappings = buildUnnamed4512(); } buildCounterAuthorizedCertificate--; return o; @@ -203,12 +203,12 @@ checkCertificateRawData(o.certificateRawData); unittest.expect(o.displayName, unittest.equals('foo')); unittest.expect(o.domainMappingsCount, unittest.equals(42)); - checkUnnamed5026(o.domainNames); + checkUnnamed4511(o.domainNames); unittest.expect(o.expireTime, unittest.equals('foo')); unittest.expect(o.id, unittest.equals('foo')); checkManagedCertificate(o.managedCertificate); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5027(o.visibleDomainMappings); + checkUnnamed4512(o.visibleDomainMappings); } buildCounterAuthorizedCertificate--; } @@ -234,14 +234,14 @@ buildCounterAuthorizedDomain--; } -buildUnnamed5028() { +buildUnnamed4513() { var o = new core.List<api.CustomMetric>(); o.add(buildCustomMetric()); o.add(buildCustomMetric()); return o; } -checkUnnamed5028(core.List<api.CustomMetric> o) { +checkUnnamed4513(core.List<api.CustomMetric> o) { unittest.expect(o, unittest.hasLength(2)); checkCustomMetric(o[0]); checkCustomMetric(o[1]); @@ -254,7 +254,7 @@ if (buildCounterAutomaticScaling < 3) { o.coolDownPeriod = "foo"; o.cpuUtilization = buildCpuUtilization(); - o.customMetrics = buildUnnamed5028(); + o.customMetrics = buildUnnamed4513(); o.diskUtilization = buildDiskUtilization(); o.maxConcurrentRequests = 42; o.maxIdleInstances = 42; @@ -276,7 +276,7 @@ if (buildCounterAutomaticScaling < 3) { unittest.expect(o.coolDownPeriod, unittest.equals('foo')); checkCpuUtilization(o.cpuUtilization); - checkUnnamed5028(o.customMetrics); + checkUnnamed4513(o.customMetrics); checkDiskUtilization(o.diskUtilization); unittest.expect(o.maxConcurrentRequests, unittest.equals(42)); unittest.expect(o.maxIdleInstances, unittest.equals(42)); @@ -313,14 +313,14 @@ buildCounterBasicScaling--; } -buildUnnamed5029() { +buildUnnamed4514() { var o = new core.List<api.FirewallRule>(); o.add(buildFirewallRule()); o.add(buildFirewallRule()); return o; } -checkUnnamed5029(core.List<api.FirewallRule> o) { +checkUnnamed4514(core.List<api.FirewallRule> o) { unittest.expect(o, unittest.hasLength(2)); checkFirewallRule(o[0]); checkFirewallRule(o[1]); @@ -331,7 +331,7 @@ var o = new api.BatchUpdateIngressRulesRequest(); buildCounterBatchUpdateIngressRulesRequest++; if (buildCounterBatchUpdateIngressRulesRequest < 3) { - o.ingressRules = buildUnnamed5029(); + o.ingressRules = buildUnnamed4514(); } buildCounterBatchUpdateIngressRulesRequest--; return o; @@ -340,19 +340,19 @@ checkBatchUpdateIngressRulesRequest(api.BatchUpdateIngressRulesRequest o) { buildCounterBatchUpdateIngressRulesRequest++; if (buildCounterBatchUpdateIngressRulesRequest < 3) { - checkUnnamed5029(o.ingressRules); + checkUnnamed4514(o.ingressRules); } buildCounterBatchUpdateIngressRulesRequest--; } -buildUnnamed5030() { +buildUnnamed4515() { var o = new core.List<api.FirewallRule>(); o.add(buildFirewallRule()); o.add(buildFirewallRule()); return o; } -checkUnnamed5030(core.List<api.FirewallRule> o) { +checkUnnamed4515(core.List<api.FirewallRule> o) { unittest.expect(o, unittest.hasLength(2)); checkFirewallRule(o[0]); checkFirewallRule(o[1]); @@ -363,7 +363,7 @@ var o = new api.BatchUpdateIngressRulesResponse(); buildCounterBatchUpdateIngressRulesResponse++; if (buildCounterBatchUpdateIngressRulesResponse < 3) { - o.ingressRules = buildUnnamed5030(); + o.ingressRules = buildUnnamed4515(); } buildCounterBatchUpdateIngressRulesResponse--; return o; @@ -372,7 +372,7 @@ checkBatchUpdateIngressRulesResponse(api.BatchUpdateIngressRulesResponse o) { buildCounterBatchUpdateIngressRulesResponse++; if (buildCounterBatchUpdateIngressRulesResponse < 3) { - checkUnnamed5030(o.ingressRules); + checkUnnamed4515(o.ingressRules); } buildCounterBatchUpdateIngressRulesResponse--; } @@ -581,14 +581,14 @@ buildCounterDebugInstanceRequest--; } -buildUnnamed5031() { +buildUnnamed4516() { var o = new core.Map<core.String, api.FileInfo>(); o["x"] = buildFileInfo(); o["y"] = buildFileInfo(); return o; } -checkUnnamed5031(core.Map<core.String, api.FileInfo> o) { +checkUnnamed4516(core.Map<core.String, api.FileInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkFileInfo(o["x"]); checkFileInfo(o["y"]); @@ -602,7 +602,7 @@ o.build = buildBuildInfo(); o.cloudBuildOptions = buildCloudBuildOptions(); o.container = buildContainerInfo(); - o.files = buildUnnamed5031(); + o.files = buildUnnamed4516(); o.zip = buildZipInfo(); } buildCounterDeployment--; @@ -615,7 +615,7 @@ checkBuildInfo(o.build); checkCloudBuildOptions(o.cloudBuildOptions); checkContainerInfo(o.container); - checkUnnamed5031(o.files); + checkUnnamed4516(o.files); checkZipInfo(o.zip); } buildCounterDeployment--; @@ -646,14 +646,14 @@ buildCounterDiskUtilization--; } -buildUnnamed5032() { +buildUnnamed4517() { var o = new core.List<api.ResourceRecord>(); o.add(buildResourceRecord()); o.add(buildResourceRecord()); return o; } -checkUnnamed5032(core.List<api.ResourceRecord> o) { +checkUnnamed4517(core.List<api.ResourceRecord> o) { unittest.expect(o, unittest.hasLength(2)); checkResourceRecord(o[0]); checkResourceRecord(o[1]); @@ -666,7 +666,7 @@ if (buildCounterDomainMapping < 3) { o.id = "foo"; o.name = "foo"; - o.resourceRecords = buildUnnamed5032(); + o.resourceRecords = buildUnnamed4517(); o.sslSettings = buildSslSettings(); } buildCounterDomainMapping--; @@ -678,7 +678,7 @@ if (buildCounterDomainMapping < 3) { unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5032(o.resourceRecords); + checkUnnamed4517(o.resourceRecords); checkSslSettings(o.sslSettings); } buildCounterDomainMapping--; @@ -963,14 +963,14 @@ buildCounterLibrary--; } -buildUnnamed5033() { +buildUnnamed4518() { var o = new core.List<api.AuthorizedCertificate>(); o.add(buildAuthorizedCertificate()); o.add(buildAuthorizedCertificate()); return o; } -checkUnnamed5033(core.List<api.AuthorizedCertificate> o) { +checkUnnamed4518(core.List<api.AuthorizedCertificate> o) { unittest.expect(o, unittest.hasLength(2)); checkAuthorizedCertificate(o[0]); checkAuthorizedCertificate(o[1]); @@ -981,7 +981,7 @@ var o = new api.ListAuthorizedCertificatesResponse(); buildCounterListAuthorizedCertificatesResponse++; if (buildCounterListAuthorizedCertificatesResponse < 3) { - o.certificates = buildUnnamed5033(); + o.certificates = buildUnnamed4518(); o.nextPageToken = "foo"; } buildCounterListAuthorizedCertificatesResponse--; @@ -992,20 +992,20 @@ api.ListAuthorizedCertificatesResponse o) { buildCounterListAuthorizedCertificatesResponse++; if (buildCounterListAuthorizedCertificatesResponse < 3) { - checkUnnamed5033(o.certificates); + checkUnnamed4518(o.certificates); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListAuthorizedCertificatesResponse--; } -buildUnnamed5034() { +buildUnnamed4519() { var o = new core.List<api.AuthorizedDomain>(); o.add(buildAuthorizedDomain()); o.add(buildAuthorizedDomain()); return o; } -checkUnnamed5034(core.List<api.AuthorizedDomain> o) { +checkUnnamed4519(core.List<api.AuthorizedDomain> o) { unittest.expect(o, unittest.hasLength(2)); checkAuthorizedDomain(o[0]); checkAuthorizedDomain(o[1]); @@ -1016,7 +1016,7 @@ var o = new api.ListAuthorizedDomainsResponse(); buildCounterListAuthorizedDomainsResponse++; if (buildCounterListAuthorizedDomainsResponse < 3) { - o.domains = buildUnnamed5034(); + o.domains = buildUnnamed4519(); o.nextPageToken = "foo"; } buildCounterListAuthorizedDomainsResponse--; @@ -1026,20 +1026,20 @@ checkListAuthorizedDomainsResponse(api.ListAuthorizedDomainsResponse o) { buildCounterListAuthorizedDomainsResponse++; if (buildCounterListAuthorizedDomainsResponse < 3) { - checkUnnamed5034(o.domains); + checkUnnamed4519(o.domains); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListAuthorizedDomainsResponse--; } -buildUnnamed5035() { +buildUnnamed4520() { var o = new core.List<api.DomainMapping>(); o.add(buildDomainMapping()); o.add(buildDomainMapping()); return o; } -checkUnnamed5035(core.List<api.DomainMapping> o) { +checkUnnamed4520(core.List<api.DomainMapping> o) { unittest.expect(o, unittest.hasLength(2)); checkDomainMapping(o[0]); checkDomainMapping(o[1]); @@ -1050,7 +1050,7 @@ var o = new api.ListDomainMappingsResponse(); buildCounterListDomainMappingsResponse++; if (buildCounterListDomainMappingsResponse < 3) { - o.domainMappings = buildUnnamed5035(); + o.domainMappings = buildUnnamed4520(); o.nextPageToken = "foo"; } buildCounterListDomainMappingsResponse--; @@ -1060,20 +1060,20 @@ checkListDomainMappingsResponse(api.ListDomainMappingsResponse o) { buildCounterListDomainMappingsResponse++; if (buildCounterListDomainMappingsResponse < 3) { - checkUnnamed5035(o.domainMappings); + checkUnnamed4520(o.domainMappings); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListDomainMappingsResponse--; } -buildUnnamed5036() { +buildUnnamed4521() { var o = new core.List<api.FirewallRule>(); o.add(buildFirewallRule()); o.add(buildFirewallRule()); return o; } -checkUnnamed5036(core.List<api.FirewallRule> o) { +checkUnnamed4521(core.List<api.FirewallRule> o) { unittest.expect(o, unittest.hasLength(2)); checkFirewallRule(o[0]); checkFirewallRule(o[1]); @@ -1084,7 +1084,7 @@ var o = new api.ListIngressRulesResponse(); buildCounterListIngressRulesResponse++; if (buildCounterListIngressRulesResponse < 3) { - o.ingressRules = buildUnnamed5036(); + o.ingressRules = buildUnnamed4521(); o.nextPageToken = "foo"; } buildCounterListIngressRulesResponse--; @@ -1094,20 +1094,20 @@ checkListIngressRulesResponse(api.ListIngressRulesResponse o) { buildCounterListIngressRulesResponse++; if (buildCounterListIngressRulesResponse < 3) { - checkUnnamed5036(o.ingressRules); + checkUnnamed4521(o.ingressRules); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListIngressRulesResponse--; } -buildUnnamed5037() { +buildUnnamed4522() { var o = new core.List<api.Instance>(); o.add(buildInstance()); o.add(buildInstance()); return o; } -checkUnnamed5037(core.List<api.Instance> o) { +checkUnnamed4522(core.List<api.Instance> o) { unittest.expect(o, unittest.hasLength(2)); checkInstance(o[0]); checkInstance(o[1]); @@ -1118,7 +1118,7 @@ var o = new api.ListInstancesResponse(); buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5037(); + o.instances = buildUnnamed4522(); o.nextPageToken = "foo"; } buildCounterListInstancesResponse--; @@ -1128,20 +1128,20 @@ checkListInstancesResponse(api.ListInstancesResponse o) { buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - checkUnnamed5037(o.instances); + checkUnnamed4522(o.instances); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListInstancesResponse--; } -buildUnnamed5038() { +buildUnnamed4523() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5038(core.List<api.Location> o) { +checkUnnamed4523(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -1152,7 +1152,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5038(); + o.locations = buildUnnamed4523(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -1162,20 +1162,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5038(o.locations); + checkUnnamed4523(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5039() { +buildUnnamed4524() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5039(core.List<api.Operation> o) { +checkUnnamed4524(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -1187,7 +1187,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5039(); + o.operations = buildUnnamed4524(); } buildCounterListOperationsResponse--; return o; @@ -1197,19 +1197,19 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5039(o.operations); + checkUnnamed4524(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5040() { +buildUnnamed4525() { var o = new core.List<api.Service>(); o.add(buildService()); o.add(buildService()); return o; } -checkUnnamed5040(core.List<api.Service> o) { +checkUnnamed4525(core.List<api.Service> o) { unittest.expect(o, unittest.hasLength(2)); checkService(o[0]); checkService(o[1]); @@ -1221,7 +1221,7 @@ buildCounterListServicesResponse++; if (buildCounterListServicesResponse < 3) { o.nextPageToken = "foo"; - o.services = buildUnnamed5040(); + o.services = buildUnnamed4525(); } buildCounterListServicesResponse--; return o; @@ -1231,19 +1231,19 @@ buildCounterListServicesResponse++; if (buildCounterListServicesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5040(o.services); + checkUnnamed4525(o.services); } buildCounterListServicesResponse--; } -buildUnnamed5041() { +buildUnnamed4526() { var o = new core.List<api.Version>(); o.add(buildVersion()); o.add(buildVersion()); return o; } -checkUnnamed5041(core.List<api.Version> o) { +checkUnnamed4526(core.List<api.Version> o) { unittest.expect(o, unittest.hasLength(2)); checkVersion(o[0]); checkVersion(o[1]); @@ -1255,7 +1255,7 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { o.nextPageToken = "foo"; - o.versions = buildUnnamed5041(); + o.versions = buildUnnamed4526(); } buildCounterListVersionsResponse--; return o; @@ -1265,7 +1265,7 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5041(o.versions); + checkUnnamed4526(o.versions); } buildCounterListVersionsResponse--; } @@ -1301,20 +1301,20 @@ buildCounterLivenessCheck--; } -buildUnnamed5042() { +buildUnnamed4527() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5042(core.Map<core.String, core.String> o) { +checkUnnamed4527(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5043() { +buildUnnamed4528() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1329,7 +1329,7 @@ return o; } -checkUnnamed5043(core.Map<core.String, core.Object> o) { +checkUnnamed4528(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -1349,9 +1349,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5042(); + o.labels = buildUnnamed4527(); o.locationId = "foo"; - o.metadata = buildUnnamed5043(); + o.metadata = buildUnnamed4528(); o.name = "foo"; } buildCounterLocation--; @@ -1362,9 +1362,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5042(o.labels); + checkUnnamed4527(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5043(o.metadata); + checkUnnamed4528(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -1431,14 +1431,14 @@ buildCounterManualScaling--; } -buildUnnamed5044() { +buildUnnamed4529() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5044(core.List<core.String> o) { +checkUnnamed4529(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1449,7 +1449,7 @@ var o = new api.Network(); buildCounterNetwork++; if (buildCounterNetwork < 3) { - o.forwardedPorts = buildUnnamed5044(); + o.forwardedPorts = buildUnnamed4529(); o.instanceTag = "foo"; o.name = "foo"; o.sessionAffinity = true; @@ -1462,7 +1462,7 @@ checkNetwork(api.Network o) { buildCounterNetwork++; if (buildCounterNetwork < 3) { - checkUnnamed5044(o.forwardedPorts); + checkUnnamed4529(o.forwardedPorts); unittest.expect(o.instanceTag, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.sessionAffinity, unittest.isTrue); @@ -1519,7 +1519,7 @@ buildCounterOAuth2ClientInfo--; } -buildUnnamed5045() { +buildUnnamed4530() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1534,7 +1534,7 @@ return o; } -checkUnnamed5045(core.Map<core.String, core.Object> o) { +checkUnnamed4530(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -1548,7 +1548,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5046() { +buildUnnamed4531() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1563,7 +1563,7 @@ return o; } -checkUnnamed5046(core.Map<core.String, core.Object> o) { +checkUnnamed4531(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -1584,9 +1584,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5045(); + o.metadata = buildUnnamed4530(); o.name = "foo"; - o.response = buildUnnamed5046(); + o.response = buildUnnamed4531(); } buildCounterOperation--; return o; @@ -1597,9 +1597,9 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5045(o.metadata); + checkUnnamed4530(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5046(o.response); + checkUnnamed4531(o.response); } buildCounterOperation--; } @@ -1633,14 +1633,14 @@ buildCounterOperationMetadata--; } -buildUnnamed5047() { +buildUnnamed4532() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5047(core.List<core.String> o) { +checkUnnamed4532(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1658,7 +1658,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5047(); + o.warning = buildUnnamed4532(); } buildCounterOperationMetadataV1--; return o; @@ -1674,19 +1674,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5047(o.warning); + checkUnnamed4532(o.warning); } buildCounterOperationMetadataV1--; } -buildUnnamed5048() { +buildUnnamed4533() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5048(core.List<core.String> o) { +checkUnnamed4533(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1704,7 +1704,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5048(); + o.warning = buildUnnamed4533(); } buildCounterOperationMetadataV1Alpha--; return o; @@ -1720,19 +1720,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5048(o.warning); + checkUnnamed4533(o.warning); } buildCounterOperationMetadataV1Alpha--; } -buildUnnamed5049() { +buildUnnamed4534() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5049(core.List<core.String> o) { +checkUnnamed4534(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1750,7 +1750,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5049(); + o.warning = buildUnnamed4534(); } buildCounterOperationMetadataV1Beta--; return o; @@ -1766,7 +1766,7 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5049(o.warning); + checkUnnamed4534(o.warning); } buildCounterOperationMetadataV1Beta--; } @@ -1888,14 +1888,14 @@ buildCounterResourceRecord--; } -buildUnnamed5050() { +buildUnnamed4535() { var o = new core.List<api.Volume>(); o.add(buildVolume()); o.add(buildVolume()); return o; } -checkUnnamed5050(core.List<api.Volume> o) { +checkUnnamed4535(core.List<api.Volume> o) { unittest.expect(o, unittest.hasLength(2)); checkVolume(o[0]); checkVolume(o[1]); @@ -1909,7 +1909,7 @@ o.cpu = 42.0; o.diskGb = 42.0; o.memoryGb = 42.0; - o.volumes = buildUnnamed5050(); + o.volumes = buildUnnamed4535(); } buildCounterResources--; return o; @@ -1921,7 +1921,7 @@ unittest.expect(o.cpu, unittest.equals(42.0)); unittest.expect(o.diskGb, unittest.equals(42.0)); unittest.expect(o.memoryGb, unittest.equals(42.0)); - checkUnnamed5050(o.volumes); + checkUnnamed4535(o.volumes); } buildCounterResources--; } @@ -2016,14 +2016,14 @@ buildCounterStandardSchedulerSettings--; } -buildUnnamed5051() { +buildUnnamed4536() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5051(core.Map<core.String, core.String> o) { +checkUnnamed4536(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -2036,7 +2036,7 @@ if (buildCounterStaticFilesHandler < 3) { o.applicationReadable = true; o.expiration = "foo"; - o.httpHeaders = buildUnnamed5051(); + o.httpHeaders = buildUnnamed4536(); o.mimeType = "foo"; o.path = "foo"; o.requireMatchingFile = true; @@ -2051,7 +2051,7 @@ if (buildCounterStaticFilesHandler < 3) { unittest.expect(o.applicationReadable, unittest.isTrue); unittest.expect(o.expiration, unittest.equals('foo')); - checkUnnamed5051(o.httpHeaders); + checkUnnamed4536(o.httpHeaders); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.path, unittest.equals('foo')); unittest.expect(o.requireMatchingFile, unittest.isTrue); @@ -2060,7 +2060,7 @@ buildCounterStaticFilesHandler--; } -buildUnnamed5052() { +buildUnnamed4537() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2075,7 +2075,7 @@ return o; } -checkUnnamed5052(core.Map<core.String, core.Object> o) { +checkUnnamed4537(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -2089,17 +2089,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5053() { +buildUnnamed4538() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5052()); - o.add(buildUnnamed5052()); + o.add(buildUnnamed4537()); + o.add(buildUnnamed4537()); return o; } -checkUnnamed5053(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4538(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5052(o[0]); - checkUnnamed5052(o[1]); + checkUnnamed4537(o[0]); + checkUnnamed4537(o[1]); } core.int buildCounterStatus = 0; @@ -2108,7 +2108,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5053(); + o.details = buildUnnamed4538(); o.message = "foo"; } buildCounterStatus--; @@ -2119,20 +2119,20 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5053(o.details); + checkUnnamed4538(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5054() { +buildUnnamed4539() { var o = new core.Map<core.String, core.double>(); o["x"] = 42.0; o["y"] = 42.0; return o; } -checkUnnamed5054(core.Map<core.String, core.double> o) { +checkUnnamed4539(core.Map<core.String, core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals(42.0)); unittest.expect(o["y"], unittest.equals(42.0)); @@ -2143,7 +2143,7 @@ var o = new api.TrafficSplit(); buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - o.allocations = buildUnnamed5054(); + o.allocations = buildUnnamed4539(); o.shardBy = "foo"; } buildCounterTrafficSplit--; @@ -2153,7 +2153,7 @@ checkTrafficSplit(api.TrafficSplit o) { buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - checkUnnamed5054(o.allocations); + checkUnnamed4539(o.allocations); unittest.expect(o.shardBy, unittest.equals('foo')); } buildCounterTrafficSplit--; @@ -2215,92 +2215,92 @@ buildCounterUrlMap--; } -buildUnnamed5055() { +buildUnnamed4540() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5055(core.Map<core.String, core.String> o) { +checkUnnamed4540(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5056() { +buildUnnamed4541() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5056(core.Map<core.String, core.String> o) { +checkUnnamed4541(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5057() { +buildUnnamed4542() { var o = new core.List<api.ErrorHandler>(); o.add(buildErrorHandler()); o.add(buildErrorHandler()); return o; } -checkUnnamed5057(core.List<api.ErrorHandler> o) { +checkUnnamed4542(core.List<api.ErrorHandler> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorHandler(o[0]); checkErrorHandler(o[1]); } -buildUnnamed5058() { +buildUnnamed4543() { var o = new core.List<api.UrlMap>(); o.add(buildUrlMap()); o.add(buildUrlMap()); return o; } -checkUnnamed5058(core.List<api.UrlMap> o) { +checkUnnamed4543(core.List<api.UrlMap> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlMap(o[0]); checkUrlMap(o[1]); } -buildUnnamed5059() { +buildUnnamed4544() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5059(core.List<core.String> o) { +checkUnnamed4544(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5060() { +buildUnnamed4545() { var o = new core.List<api.Library>(); o.add(buildLibrary()); o.add(buildLibrary()); return o; } -checkUnnamed5060(core.List<api.Library> o) { +checkUnnamed4545(core.List<api.Library> o) { unittest.expect(o, unittest.hasLength(2)); checkLibrary(o[0]); checkLibrary(o[1]); } -buildUnnamed5061() { +buildUnnamed4546() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5061(core.List<core.String> o) { +checkUnnamed4546(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2314,7 +2314,7 @@ o.apiConfig = buildApiConfigHandler(); o.automaticScaling = buildAutomaticScaling(); o.basicScaling = buildBasicScaling(); - o.betaSettings = buildUnnamed5055(); + o.betaSettings = buildUnnamed4540(); o.createTime = "foo"; o.createdBy = "foo"; o.defaultExpiration = "foo"; @@ -2323,14 +2323,14 @@ o.endpointsApiService = buildEndpointsApiService(); o.entrypoint = buildEntrypoint(); o.env = "foo"; - o.envVariables = buildUnnamed5056(); - o.errorHandlers = buildUnnamed5057(); - o.handlers = buildUnnamed5058(); + o.envVariables = buildUnnamed4541(); + o.errorHandlers = buildUnnamed4542(); + o.handlers = buildUnnamed4543(); o.healthCheck = buildHealthCheck(); o.id = "foo"; - o.inboundServices = buildUnnamed5059(); + o.inboundServices = buildUnnamed4544(); o.instanceClass = "foo"; - o.libraries = buildUnnamed5060(); + o.libraries = buildUnnamed4545(); o.livenessCheck = buildLivenessCheck(); o.manualScaling = buildManualScaling(); o.name = "foo"; @@ -2341,11 +2341,13 @@ o.runtime = "foo"; o.runtimeApiVersion = "foo"; o.runtimeChannel = "foo"; + o.runtimeMainExecutablePath = "foo"; o.servingStatus = "foo"; o.threadsafe = true; o.versionUrl = "foo"; o.vm = true; - o.zones = buildUnnamed5061(); + o.vpcAccessConnector = buildVpcAccessConnector(); + o.zones = buildUnnamed4546(); } buildCounterVersion--; return o; @@ -2357,7 +2359,7 @@ checkApiConfigHandler(o.apiConfig); checkAutomaticScaling(o.automaticScaling); checkBasicScaling(o.basicScaling); - checkUnnamed5055(o.betaSettings); + checkUnnamed4540(o.betaSettings); unittest.expect(o.createTime, unittest.equals('foo')); unittest.expect(o.createdBy, unittest.equals('foo')); unittest.expect(o.defaultExpiration, unittest.equals('foo')); @@ -2366,14 +2368,14 @@ checkEndpointsApiService(o.endpointsApiService); checkEntrypoint(o.entrypoint); unittest.expect(o.env, unittest.equals('foo')); - checkUnnamed5056(o.envVariables); - checkUnnamed5057(o.errorHandlers); - checkUnnamed5058(o.handlers); + checkUnnamed4541(o.envVariables); + checkUnnamed4542(o.errorHandlers); + checkUnnamed4543(o.handlers); checkHealthCheck(o.healthCheck); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5059(o.inboundServices); + checkUnnamed4544(o.inboundServices); unittest.expect(o.instanceClass, unittest.equals('foo')); - checkUnnamed5060(o.libraries); + checkUnnamed4545(o.libraries); checkLivenessCheck(o.livenessCheck); checkManualScaling(o.manualScaling); unittest.expect(o.name, unittest.equals('foo')); @@ -2384,11 +2386,13 @@ unittest.expect(o.runtime, unittest.equals('foo')); unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); unittest.expect(o.runtimeChannel, unittest.equals('foo')); + unittest.expect(o.runtimeMainExecutablePath, unittest.equals('foo')); unittest.expect(o.servingStatus, unittest.equals('foo')); unittest.expect(o.threadsafe, unittest.isTrue); unittest.expect(o.versionUrl, unittest.equals('foo')); unittest.expect(o.vm, unittest.isTrue); - checkUnnamed5061(o.zones); + checkVpcAccessConnector(o.vpcAccessConnector); + checkUnnamed4546(o.zones); } buildCounterVersion--; } @@ -2416,6 +2420,25 @@ buildCounterVolume--; } +core.int buildCounterVpcAccessConnector = 0; +buildVpcAccessConnector() { + var o = new api.VpcAccessConnector(); + buildCounterVpcAccessConnector++; + if (buildCounterVpcAccessConnector < 3) { + o.name = "foo"; + } + buildCounterVpcAccessConnector--; + return o; +} + +checkVpcAccessConnector(api.VpcAccessConnector o) { + buildCounterVpcAccessConnector++; + if (buildCounterVpcAccessConnector < 3) { + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterVpcAccessConnector--; +} + core.int buildCounterZipInfo = 0; buildZipInfo() { var o = new api.ZipInfo(); @@ -3014,6 +3037,14 @@ }); }); + unittest.group("obj-schema-VpcAccessConnector", () { + unittest.test("to-json--from-json", () { + var o = buildVpcAccessConnector(); + var od = new api.VpcAccessConnector.fromJson(o.toJson()); + checkVpcAccessConnector(od); + }); + }); + unittest.group("obj-schema-ZipInfo", () { unittest.test("to-json--from-json", () { var o = buildZipInfo(); @@ -3606,8 +3637,8 @@ api.AppsAuthorizedDomainsResourceApi res = new api.AppengineApi(mock).apps.authorizedDomains; var arg_appsId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3648,10 +3679,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3662,8 +3693,8 @@ }), true); res .list(arg_appsId, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListAuthorizedDomainsResponse(response); @@ -4272,9 +4303,9 @@ api.AppsFirewallIngressRulesResourceApi res = new api.AppengineApi(mock).apps.firewall.ingressRules; var arg_appsId = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_matchingAddress = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -4315,12 +4346,12 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["matchingAddress"].first, unittest.equals(arg_matchingAddress)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -4331,9 +4362,9 @@ }), true); res .list(arg_appsId, + pageToken: arg_pageToken, pageSize: arg_pageSize, matchingAddress: arg_matchingAddress, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListIngressRulesResponse(response); @@ -4483,9 +4514,9 @@ api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locations; var arg_appsId = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -4526,11 +4557,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -4541,9 +4572,9 @@ }), true); res .list(arg_appsId, + pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -4621,9 +4652,9 @@ api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operations; var arg_appsId = "foo"; + var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; - var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -4664,11 +4695,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -4679,9 +4710,9 @@ }), true); res .list(arg_appsId, + filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize, - filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListOperationsResponse(response); @@ -5198,9 +5229,9 @@ new api.AppengineApi(mock).apps.services.versions; var arg_appsId = "foo"; var arg_servicesId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_view = "foo"; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -5250,11 +5281,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -5265,9 +5296,9 @@ }), true); res .list(arg_appsId, arg_servicesId, - pageToken: arg_pageToken, pageSize: arg_pageSize, view: arg_view, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListVersionsResponse(response);
diff --git a/generated/googleapis_beta/test/binaryauthorization/v1beta1_test.dart b/generated/googleapis_beta/test/binaryauthorization/v1beta1_test.dart index 9a80923..0db6e1c 100644 --- a/generated/googleapis_beta/test/binaryauthorization/v1beta1_test.dart +++ b/generated/googleapis_beta/test/binaryauthorization/v1beta1_test.dart
@@ -50,14 +50,14 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5092() { +buildUnnamed4648() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5092(core.List<core.String> o) { +checkUnnamed4648(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -70,7 +70,7 @@ if (buildCounterAdmissionRule < 3) { o.enforcementMode = "foo"; o.evaluationMode = "foo"; - o.requireAttestationsBy = buildUnnamed5092(); + o.requireAttestationsBy = buildUnnamed4648(); } buildCounterAdmissionRule--; return o; @@ -81,7 +81,7 @@ if (buildCounterAdmissionRule < 3) { unittest.expect(o.enforcementMode, unittest.equals('foo')); unittest.expect(o.evaluationMode, unittest.equals('foo')); - checkUnnamed5092(o.requireAttestationsBy); + checkUnnamed4648(o.requireAttestationsBy); } buildCounterAdmissionRule--; } @@ -153,14 +153,14 @@ buildCounterAttestorPublicKey--; } -buildUnnamed5093() { +buildUnnamed4649() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5093(core.List<core.String> o) { +checkUnnamed4649(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -172,7 +172,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5093(); + o.members = buildUnnamed4649(); o.role = "foo"; } buildCounterBinding--; @@ -183,7 +183,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5093(o.members); + checkUnnamed4649(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; @@ -229,14 +229,14 @@ buildCounterExpr--; } -buildUnnamed5094() { +buildUnnamed4650() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5094(core.List<api.Binding> o) { +checkUnnamed4650(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -247,7 +247,7 @@ var o = new api.IamPolicy(); buildCounterIamPolicy++; if (buildCounterIamPolicy < 3) { - o.bindings = buildUnnamed5094(); + o.bindings = buildUnnamed4650(); o.etag = "foo"; o.version = 42; } @@ -258,21 +258,21 @@ checkIamPolicy(api.IamPolicy o) { buildCounterIamPolicy++; if (buildCounterIamPolicy < 3) { - checkUnnamed5094(o.bindings); + checkUnnamed4650(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } buildCounterIamPolicy--; } -buildUnnamed5095() { +buildUnnamed4651() { var o = new core.List<api.Attestor>(); o.add(buildAttestor()); o.add(buildAttestor()); return o; } -checkUnnamed5095(core.List<api.Attestor> o) { +checkUnnamed4651(core.List<api.Attestor> o) { unittest.expect(o, unittest.hasLength(2)); checkAttestor(o[0]); checkAttestor(o[1]); @@ -283,7 +283,7 @@ var o = new api.ListAttestorsResponse(); buildCounterListAttestorsResponse++; if (buildCounterListAttestorsResponse < 3) { - o.attestors = buildUnnamed5095(); + o.attestors = buildUnnamed4651(); o.nextPageToken = "foo"; } buildCounterListAttestorsResponse--; @@ -293,33 +293,33 @@ checkListAttestorsResponse(api.ListAttestorsResponse o) { buildCounterListAttestorsResponse++; if (buildCounterListAttestorsResponse < 3) { - checkUnnamed5095(o.attestors); + checkUnnamed4651(o.attestors); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListAttestorsResponse--; } -buildUnnamed5096() { +buildUnnamed4652() { var o = new core.List<api.AdmissionWhitelistPattern>(); o.add(buildAdmissionWhitelistPattern()); o.add(buildAdmissionWhitelistPattern()); return o; } -checkUnnamed5096(core.List<api.AdmissionWhitelistPattern> o) { +checkUnnamed4652(core.List<api.AdmissionWhitelistPattern> o) { unittest.expect(o, unittest.hasLength(2)); checkAdmissionWhitelistPattern(o[0]); checkAdmissionWhitelistPattern(o[1]); } -buildUnnamed5097() { +buildUnnamed4653() { var o = new core.Map<core.String, api.AdmissionRule>(); o["x"] = buildAdmissionRule(); o["y"] = buildAdmissionRule(); return o; } -checkUnnamed5097(core.Map<core.String, api.AdmissionRule> o) { +checkUnnamed4653(core.Map<core.String, api.AdmissionRule> o) { unittest.expect(o, unittest.hasLength(2)); checkAdmissionRule(o["x"]); checkAdmissionRule(o["y"]); @@ -330,8 +330,8 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.admissionWhitelistPatterns = buildUnnamed5096(); - o.clusterAdmissionRules = buildUnnamed5097(); + o.admissionWhitelistPatterns = buildUnnamed4652(); + o.clusterAdmissionRules = buildUnnamed4653(); o.defaultAdmissionRule = buildAdmissionRule(); o.description = "foo"; o.name = "foo"; @@ -344,8 +344,8 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5096(o.admissionWhitelistPatterns); - checkUnnamed5097(o.clusterAdmissionRules); + checkUnnamed4652(o.admissionWhitelistPatterns); + checkUnnamed4653(o.clusterAdmissionRules); checkAdmissionRule(o.defaultAdmissionRule); unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); @@ -373,14 +373,14 @@ buildCounterSetIamPolicyRequest--; } -buildUnnamed5098() { +buildUnnamed4654() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5098(core.List<core.String> o) { +checkUnnamed4654(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -391,7 +391,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5098(); + o.permissions = buildUnnamed4654(); } buildCounterTestIamPermissionsRequest--; return o; @@ -400,19 +400,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5098(o.permissions); + checkUnnamed4654(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5099() { +buildUnnamed4655() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5099(core.List<core.String> o) { +checkUnnamed4655(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -423,7 +423,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5099(); + o.permissions = buildUnnamed4655(); } buildCounterTestIamPermissionsResponse--; return o; @@ -432,19 +432,19 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5099(o.permissions); + checkUnnamed4655(o.permissions); } buildCounterTestIamPermissionsResponse--; } -buildUnnamed5100() { +buildUnnamed4656() { var o = new core.List<api.AttestorPublicKey>(); o.add(buildAttestorPublicKey()); o.add(buildAttestorPublicKey()); return o; } -checkUnnamed5100(core.List<api.AttestorPublicKey> o) { +checkUnnamed4656(core.List<api.AttestorPublicKey> o) { unittest.expect(o, unittest.hasLength(2)); checkAttestorPublicKey(o[0]); checkAttestorPublicKey(o[1]); @@ -457,7 +457,7 @@ if (buildCounterUserOwnedDrydockNote < 3) { o.delegationServiceAccountEmail = "foo"; o.noteReference = "foo"; - o.publicKeys = buildUnnamed5100(); + o.publicKeys = buildUnnamed4656(); } buildCounterUserOwnedDrydockNote--; return o; @@ -468,7 +468,7 @@ if (buildCounterUserOwnedDrydockNote < 3) { unittest.expect(o.delegationServiceAccountEmail, unittest.equals('foo')); unittest.expect(o.noteReference, unittest.equals('foo')); - checkUnnamed5100(o.publicKeys); + checkUnnamed4656(o.publicKeys); } buildCounterUserOwnedDrydockNote--; } @@ -918,8 +918,8 @@ api.ProjectsAttestorsResourceApi res = new api.BinaryauthorizationApi(mock).projects.attestors; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -952,10 +952,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -966,8 +966,8 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListAttestorsResponse(response);
diff --git a/generated/googleapis_beta/test/cloudasset/v1beta1_test.dart b/generated/googleapis_beta/test/cloudasset/v1beta1_test.dart new file mode 100644 index 0000000..099108f --- /dev/null +++ b/generated/googleapis_beta/test/cloudasset/v1beta1_test.dart
@@ -0,0 +1,1124 @@ +library googleapis_beta.cloudasset.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/cloudasset/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAsset = 0; +buildAsset() { + var o = new api.Asset(); + buildCounterAsset++; + if (buildCounterAsset < 3) { + o.assetType = "foo"; + o.iamPolicy = buildPolicy(); + o.name = "foo"; + o.resource = buildResource(); + } + buildCounterAsset--; + return o; +} + +checkAsset(api.Asset o) { + buildCounterAsset++; + if (buildCounterAsset < 3) { + unittest.expect(o.assetType, unittest.equals('foo')); + checkPolicy(o.iamPolicy); + unittest.expect(o.name, unittest.equals('foo')); + checkResource(o.resource); + } + buildCounterAsset--; +} + +buildUnnamed4670() { + var o = new core.List<api.AuditLogConfig>(); + o.add(buildAuditLogConfig()); + o.add(buildAuditLogConfig()); + return o; +} + +checkUnnamed4670(core.List<api.AuditLogConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuditLogConfig(o[0]); + checkAuditLogConfig(o[1]); +} + +core.int buildCounterAuditConfig = 0; +buildAuditConfig() { + var o = new api.AuditConfig(); + buildCounterAuditConfig++; + if (buildCounterAuditConfig < 3) { + o.auditLogConfigs = buildUnnamed4670(); + o.service = "foo"; + } + buildCounterAuditConfig--; + return o; +} + +checkAuditConfig(api.AuditConfig o) { + buildCounterAuditConfig++; + if (buildCounterAuditConfig < 3) { + checkUnnamed4670(o.auditLogConfigs); + unittest.expect(o.service, unittest.equals('foo')); + } + buildCounterAuditConfig--; +} + +buildUnnamed4671() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4671(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterAuditLogConfig = 0; +buildAuditLogConfig() { + var o = new api.AuditLogConfig(); + buildCounterAuditLogConfig++; + if (buildCounterAuditLogConfig < 3) { + o.exemptedMembers = buildUnnamed4671(); + o.logType = "foo"; + } + buildCounterAuditLogConfig--; + return o; +} + +checkAuditLogConfig(api.AuditLogConfig o) { + buildCounterAuditLogConfig++; + if (buildCounterAuditLogConfig < 3) { + checkUnnamed4671(o.exemptedMembers); + unittest.expect(o.logType, unittest.equals('foo')); + } + buildCounterAuditLogConfig--; +} + +buildUnnamed4672() { + var o = new core.List<api.TemporalAsset>(); + o.add(buildTemporalAsset()); + o.add(buildTemporalAsset()); + return o; +} + +checkUnnamed4672(core.List<api.TemporalAsset> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTemporalAsset(o[0]); + checkTemporalAsset(o[1]); +} + +core.int buildCounterBatchGetAssetsHistoryResponse = 0; +buildBatchGetAssetsHistoryResponse() { + var o = new api.BatchGetAssetsHistoryResponse(); + buildCounterBatchGetAssetsHistoryResponse++; + if (buildCounterBatchGetAssetsHistoryResponse < 3) { + o.assets = buildUnnamed4672(); + } + buildCounterBatchGetAssetsHistoryResponse--; + return o; +} + +checkBatchGetAssetsHistoryResponse(api.BatchGetAssetsHistoryResponse o) { + buildCounterBatchGetAssetsHistoryResponse++; + if (buildCounterBatchGetAssetsHistoryResponse < 3) { + checkUnnamed4672(o.assets); + } + buildCounterBatchGetAssetsHistoryResponse--; +} + +buildUnnamed4673() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4673(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterBinding = 0; +buildBinding() { + var o = new api.Binding(); + buildCounterBinding++; + if (buildCounterBinding < 3) { + o.condition = buildExpr(); + o.members = buildUnnamed4673(); + o.role = "foo"; + } + buildCounterBinding--; + return o; +} + +checkBinding(api.Binding o) { + buildCounterBinding++; + if (buildCounterBinding < 3) { + checkExpr(o.condition); + checkUnnamed4673(o.members); + unittest.expect(o.role, unittest.equals('foo')); + } + buildCounterBinding--; +} + +buildUnnamed4674() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4674(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterExportAssetsRequest = 0; +buildExportAssetsRequest() { + var o = new api.ExportAssetsRequest(); + buildCounterExportAssetsRequest++; + if (buildCounterExportAssetsRequest < 3) { + o.assetTypes = buildUnnamed4674(); + o.contentType = "foo"; + o.outputConfig = buildOutputConfig(); + o.readTime = "foo"; + } + buildCounterExportAssetsRequest--; + return o; +} + +checkExportAssetsRequest(api.ExportAssetsRequest o) { + buildCounterExportAssetsRequest++; + if (buildCounterExportAssetsRequest < 3) { + checkUnnamed4674(o.assetTypes); + unittest.expect(o.contentType, unittest.equals('foo')); + checkOutputConfig(o.outputConfig); + unittest.expect(o.readTime, unittest.equals('foo')); + } + buildCounterExportAssetsRequest--; +} + +core.int buildCounterExpr = 0; +buildExpr() { + var o = new api.Expr(); + buildCounterExpr++; + if (buildCounterExpr < 3) { + o.description = "foo"; + o.expression = "foo"; + o.location = "foo"; + o.title = "foo"; + } + buildCounterExpr--; + return o; +} + +checkExpr(api.Expr o) { + buildCounterExpr++; + if (buildCounterExpr < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.expression, unittest.equals('foo')); + unittest.expect(o.location, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + } + buildCounterExpr--; +} + +core.int buildCounterGcsDestination = 0; +buildGcsDestination() { + var o = new api.GcsDestination(); + buildCounterGcsDestination++; + if (buildCounterGcsDestination < 3) { + o.uri = "foo"; + } + buildCounterGcsDestination--; + return o; +} + +checkGcsDestination(api.GcsDestination o) { + buildCounterGcsDestination++; + if (buildCounterGcsDestination < 3) { + unittest.expect(o.uri, unittest.equals('foo')); + } + buildCounterGcsDestination--; +} + +buildUnnamed4675() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4675(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +buildUnnamed4676() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4676(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted3 = (o["x"]) as core.Map; + unittest.expect(casted3, unittest.hasLength(3)); + unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted3["bool"], unittest.equals(true)); + unittest.expect(casted3["string"], unittest.equals('foo')); + var casted4 = (o["y"]) as core.Map; + unittest.expect(casted4, unittest.hasLength(3)); + unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted4["bool"], unittest.equals(true)); + unittest.expect(casted4["string"], unittest.equals('foo')); +} + +core.int buildCounterOperation = 0; +buildOperation() { + var o = new api.Operation(); + buildCounterOperation++; + if (buildCounterOperation < 3) { + o.done = true; + o.error = buildStatus(); + o.metadata = buildUnnamed4675(); + o.name = "foo"; + o.response = buildUnnamed4676(); + } + buildCounterOperation--; + return o; +} + +checkOperation(api.Operation o) { + buildCounterOperation++; + if (buildCounterOperation < 3) { + unittest.expect(o.done, unittest.isTrue); + checkStatus(o.error); + checkUnnamed4675(o.metadata); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4676(o.response); + } + buildCounterOperation--; +} + +core.int buildCounterOutputConfig = 0; +buildOutputConfig() { + var o = new api.OutputConfig(); + buildCounterOutputConfig++; + if (buildCounterOutputConfig < 3) { + o.gcsDestination = buildGcsDestination(); + } + buildCounterOutputConfig--; + return o; +} + +checkOutputConfig(api.OutputConfig o) { + buildCounterOutputConfig++; + if (buildCounterOutputConfig < 3) { + checkGcsDestination(o.gcsDestination); + } + buildCounterOutputConfig--; +} + +buildUnnamed4677() { + var o = new core.List<api.AuditConfig>(); + o.add(buildAuditConfig()); + o.add(buildAuditConfig()); + return o; +} + +checkUnnamed4677(core.List<api.AuditConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuditConfig(o[0]); + checkAuditConfig(o[1]); +} + +buildUnnamed4678() { + var o = new core.List<api.Binding>(); + o.add(buildBinding()); + o.add(buildBinding()); + return o; +} + +checkUnnamed4678(core.List<api.Binding> o) { + unittest.expect(o, unittest.hasLength(2)); + checkBinding(o[0]); + checkBinding(o[1]); +} + +core.int buildCounterPolicy = 0; +buildPolicy() { + var o = new api.Policy(); + buildCounterPolicy++; + if (buildCounterPolicy < 3) { + o.auditConfigs = buildUnnamed4677(); + o.bindings = buildUnnamed4678(); + o.etag = "foo"; + o.version = 42; + } + buildCounterPolicy--; + return o; +} + +checkPolicy(api.Policy o) { + buildCounterPolicy++; + if (buildCounterPolicy < 3) { + checkUnnamed4677(o.auditConfigs); + checkUnnamed4678(o.bindings); + unittest.expect(o.etag, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals(42)); + } + buildCounterPolicy--; +} + +buildUnnamed4679() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4679(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted5 = (o["x"]) as core.Map; + unittest.expect(casted5, unittest.hasLength(3)); + unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted5["bool"], unittest.equals(true)); + unittest.expect(casted5["string"], unittest.equals('foo')); + var casted6 = (o["y"]) as core.Map; + unittest.expect(casted6, unittest.hasLength(3)); + unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted6["bool"], unittest.equals(true)); + unittest.expect(casted6["string"], unittest.equals('foo')); +} + +core.int buildCounterResource = 0; +buildResource() { + var o = new api.Resource(); + buildCounterResource++; + if (buildCounterResource < 3) { + o.data = buildUnnamed4679(); + o.discoveryDocumentUri = "foo"; + o.discoveryName = "foo"; + o.parent = "foo"; + o.resourceUrl = "foo"; + o.version = "foo"; + } + buildCounterResource--; + return o; +} + +checkResource(api.Resource o) { + buildCounterResource++; + if (buildCounterResource < 3) { + checkUnnamed4679(o.data); + unittest.expect(o.discoveryDocumentUri, unittest.equals('foo')); + unittest.expect(o.discoveryName, unittest.equals('foo')); + unittest.expect(o.parent, unittest.equals('foo')); + unittest.expect(o.resourceUrl, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals('foo')); + } + buildCounterResource--; +} + +buildUnnamed4680() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4680(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted7 = (o["x"]) as core.Map; + unittest.expect(casted7, unittest.hasLength(3)); + unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted7["bool"], unittest.equals(true)); + unittest.expect(casted7["string"], unittest.equals('foo')); + var casted8 = (o["y"]) as core.Map; + unittest.expect(casted8, unittest.hasLength(3)); + unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted8["bool"], unittest.equals(true)); + unittest.expect(casted8["string"], unittest.equals('foo')); +} + +buildUnnamed4681() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4680()); + o.add(buildUnnamed4680()); + return o; +} + +checkUnnamed4681(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4680(o[0]); + checkUnnamed4680(o[1]); +} + +core.int buildCounterStatus = 0; +buildStatus() { + var o = new api.Status(); + buildCounterStatus++; + if (buildCounterStatus < 3) { + o.code = 42; + o.details = buildUnnamed4681(); + o.message = "foo"; + } + buildCounterStatus--; + return o; +} + +checkStatus(api.Status o) { + buildCounterStatus++; + if (buildCounterStatus < 3) { + unittest.expect(o.code, unittest.equals(42)); + checkUnnamed4681(o.details); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterStatus--; +} + +core.int buildCounterTemporalAsset = 0; +buildTemporalAsset() { + var o = new api.TemporalAsset(); + buildCounterTemporalAsset++; + if (buildCounterTemporalAsset < 3) { + o.asset = buildAsset(); + o.deleted = true; + o.window = buildTimeWindow(); + } + buildCounterTemporalAsset--; + return o; +} + +checkTemporalAsset(api.TemporalAsset o) { + buildCounterTemporalAsset++; + if (buildCounterTemporalAsset < 3) { + checkAsset(o.asset); + unittest.expect(o.deleted, unittest.isTrue); + checkTimeWindow(o.window); + } + buildCounterTemporalAsset--; +} + +core.int buildCounterTimeWindow = 0; +buildTimeWindow() { + var o = new api.TimeWindow(); + buildCounterTimeWindow++; + if (buildCounterTimeWindow < 3) { + o.endTime = "foo"; + o.startTime = "foo"; + } + buildCounterTimeWindow--; + return o; +} + +checkTimeWindow(api.TimeWindow o) { + buildCounterTimeWindow++; + if (buildCounterTimeWindow < 3) { + unittest.expect(o.endTime, unittest.equals('foo')); + unittest.expect(o.startTime, unittest.equals('foo')); + } + buildCounterTimeWindow--; +} + +buildUnnamed4682() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4682(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4683() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4683(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +main() { + unittest.group("obj-schema-Asset", () { + unittest.test("to-json--from-json", () { + var o = buildAsset(); + var od = new api.Asset.fromJson(o.toJson()); + checkAsset(od); + }); + }); + + unittest.group("obj-schema-AuditConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuditConfig(); + var od = new api.AuditConfig.fromJson(o.toJson()); + checkAuditConfig(od); + }); + }); + + unittest.group("obj-schema-AuditLogConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuditLogConfig(); + var od = new api.AuditLogConfig.fromJson(o.toJson()); + checkAuditLogConfig(od); + }); + }); + + unittest.group("obj-schema-BatchGetAssetsHistoryResponse", () { + unittest.test("to-json--from-json", () { + var o = buildBatchGetAssetsHistoryResponse(); + var od = new api.BatchGetAssetsHistoryResponse.fromJson(o.toJson()); + checkBatchGetAssetsHistoryResponse(od); + }); + }); + + unittest.group("obj-schema-Binding", () { + unittest.test("to-json--from-json", () { + var o = buildBinding(); + var od = new api.Binding.fromJson(o.toJson()); + checkBinding(od); + }); + }); + + unittest.group("obj-schema-ExportAssetsRequest", () { + unittest.test("to-json--from-json", () { + var o = buildExportAssetsRequest(); + var od = new api.ExportAssetsRequest.fromJson(o.toJson()); + checkExportAssetsRequest(od); + }); + }); + + unittest.group("obj-schema-Expr", () { + unittest.test("to-json--from-json", () { + var o = buildExpr(); + var od = new api.Expr.fromJson(o.toJson()); + checkExpr(od); + }); + }); + + unittest.group("obj-schema-GcsDestination", () { + unittest.test("to-json--from-json", () { + var o = buildGcsDestination(); + var od = new api.GcsDestination.fromJson(o.toJson()); + checkGcsDestination(od); + }); + }); + + unittest.group("obj-schema-Operation", () { + unittest.test("to-json--from-json", () { + var o = buildOperation(); + var od = new api.Operation.fromJson(o.toJson()); + checkOperation(od); + }); + }); + + unittest.group("obj-schema-OutputConfig", () { + unittest.test("to-json--from-json", () { + var o = buildOutputConfig(); + var od = new api.OutputConfig.fromJson(o.toJson()); + checkOutputConfig(od); + }); + }); + + unittest.group("obj-schema-Policy", () { + unittest.test("to-json--from-json", () { + var o = buildPolicy(); + var od = new api.Policy.fromJson(o.toJson()); + checkPolicy(od); + }); + }); + + unittest.group("obj-schema-Resource", () { + unittest.test("to-json--from-json", () { + var o = buildResource(); + var od = new api.Resource.fromJson(o.toJson()); + checkResource(od); + }); + }); + + unittest.group("obj-schema-Status", () { + unittest.test("to-json--from-json", () { + var o = buildStatus(); + var od = new api.Status.fromJson(o.toJson()); + checkStatus(od); + }); + }); + + unittest.group("obj-schema-TemporalAsset", () { + unittest.test("to-json--from-json", () { + var o = buildTemporalAsset(); + var od = new api.TemporalAsset.fromJson(o.toJson()); + checkTemporalAsset(od); + }); + }); + + unittest.group("obj-schema-TimeWindow", () { + unittest.test("to-json--from-json", () { + var o = buildTimeWindow(); + var od = new api.TimeWindow.fromJson(o.toJson()); + checkTimeWindow(od); + }); + }); + + unittest.group("resource-OrganizationsResourceApi", () { + unittest.test("method--batchGetAssetsHistory", () { + var mock = new HttpServerMock(); + api.OrganizationsResourceApi res = + new api.CloudassetApi(mock).organizations; + var arg_parent = "foo"; + var arg_readTimeWindow_endTime = "foo"; + var arg_readTimeWindow_startTime = "foo"; + var arg_assetNames = buildUnnamed4682(); + var arg_contentType = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["readTimeWindow.endTime"].first, + unittest.equals(arg_readTimeWindow_endTime)); + unittest.expect(queryMap["readTimeWindow.startTime"].first, + unittest.equals(arg_readTimeWindow_startTime)); + unittest.expect( + queryMap["assetNames"], unittest.equals(arg_assetNames)); + unittest.expect( + queryMap["contentType"].first, unittest.equals(arg_contentType)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildBatchGetAssetsHistoryResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .batchGetAssetsHistory(arg_parent, + readTimeWindow_endTime: arg_readTimeWindow_endTime, + readTimeWindow_startTime: arg_readTimeWindow_startTime, + assetNames: arg_assetNames, + contentType: arg_contentType, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkBatchGetAssetsHistoryResponse(response); + }))); + }); + + unittest.test("method--exportAssets", () { + var mock = new HttpServerMock(); + api.OrganizationsResourceApi res = + new api.CloudassetApi(mock).organizations; + var arg_request = buildExportAssetsRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ExportAssetsRequest.fromJson(json); + checkExportAssetsRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .exportAssets(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-OrganizationsOperationsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.OrganizationsOperationsResourceApi res = + new api.CloudassetApi(mock).organizations.operations; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-ProjectsResourceApi", () { + unittest.test("method--batchGetAssetsHistory", () { + var mock = new HttpServerMock(); + api.ProjectsResourceApi res = new api.CloudassetApi(mock).projects; + var arg_parent = "foo"; + var arg_readTimeWindow_endTime = "foo"; + var arg_readTimeWindow_startTime = "foo"; + var arg_assetNames = buildUnnamed4683(); + var arg_contentType = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["readTimeWindow.endTime"].first, + unittest.equals(arg_readTimeWindow_endTime)); + unittest.expect(queryMap["readTimeWindow.startTime"].first, + unittest.equals(arg_readTimeWindow_startTime)); + unittest.expect( + queryMap["assetNames"], unittest.equals(arg_assetNames)); + unittest.expect( + queryMap["contentType"].first, unittest.equals(arg_contentType)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildBatchGetAssetsHistoryResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .batchGetAssetsHistory(arg_parent, + readTimeWindow_endTime: arg_readTimeWindow_endTime, + readTimeWindow_startTime: arg_readTimeWindow_startTime, + assetNames: arg_assetNames, + contentType: arg_contentType, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkBatchGetAssetsHistoryResponse(response); + }))); + }); + + unittest.test("method--exportAssets", () { + var mock = new HttpServerMock(); + api.ProjectsResourceApi res = new api.CloudassetApi(mock).projects; + var arg_request = buildExportAssetsRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ExportAssetsRequest.fromJson(json); + checkExportAssetsRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .exportAssets(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-ProjectsOperationsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ProjectsOperationsResourceApi res = + new api.CloudassetApi(mock).projects.operations; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/clouderrorreporting/v1beta1_test.dart b/generated/googleapis_beta/test/clouderrorreporting/v1beta1_test.dart index 61644fe..663752c 100644 --- a/generated/googleapis_beta/test/clouderrorreporting/v1beta1_test.dart +++ b/generated/googleapis_beta/test/clouderrorreporting/v1beta1_test.dart
@@ -65,14 +65,14 @@ buildCounterDeleteEventsResponse--; } -buildUnnamed5062() { +buildUnnamed4547() { var o = new core.List<api.SourceReference>(); o.add(buildSourceReference()); o.add(buildSourceReference()); return o; } -checkUnnamed5062(core.List<api.SourceReference> o) { +checkUnnamed4547(core.List<api.SourceReference> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceReference(o[0]); checkSourceReference(o[1]); @@ -85,7 +85,7 @@ if (buildCounterErrorContext < 3) { o.httpRequest = buildHttpRequestContext(); o.reportLocation = buildSourceLocation(); - o.sourceReferences = buildUnnamed5062(); + o.sourceReferences = buildUnnamed4547(); o.user = "foo"; } buildCounterErrorContext--; @@ -97,7 +97,7 @@ if (buildCounterErrorContext < 3) { checkHttpRequestContext(o.httpRequest); checkSourceLocation(o.reportLocation); - checkUnnamed5062(o.sourceReferences); + checkUnnamed4547(o.sourceReferences); unittest.expect(o.user, unittest.equals('foo')); } buildCounterErrorContext--; @@ -128,14 +128,14 @@ buildCounterErrorEvent--; } -buildUnnamed5063() { +buildUnnamed4548() { var o = new core.List<api.TrackingIssue>(); o.add(buildTrackingIssue()); o.add(buildTrackingIssue()); return o; } -checkUnnamed5063(core.List<api.TrackingIssue> o) { +checkUnnamed4548(core.List<api.TrackingIssue> o) { unittest.expect(o, unittest.hasLength(2)); checkTrackingIssue(o[0]); checkTrackingIssue(o[1]); @@ -148,7 +148,7 @@ if (buildCounterErrorGroup < 3) { o.groupId = "foo"; o.name = "foo"; - o.trackingIssues = buildUnnamed5063(); + o.trackingIssues = buildUnnamed4548(); } buildCounterErrorGroup--; return o; @@ -159,32 +159,32 @@ if (buildCounterErrorGroup < 3) { unittest.expect(o.groupId, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5063(o.trackingIssues); + checkUnnamed4548(o.trackingIssues); } buildCounterErrorGroup--; } -buildUnnamed5064() { +buildUnnamed4549() { var o = new core.List<api.ServiceContext>(); o.add(buildServiceContext()); o.add(buildServiceContext()); return o; } -checkUnnamed5064(core.List<api.ServiceContext> o) { +checkUnnamed4549(core.List<api.ServiceContext> o) { unittest.expect(o, unittest.hasLength(2)); checkServiceContext(o[0]); checkServiceContext(o[1]); } -buildUnnamed5065() { +buildUnnamed4550() { var o = new core.List<api.TimedCount>(); o.add(buildTimedCount()); o.add(buildTimedCount()); return o; } -checkUnnamed5065(core.List<api.TimedCount> o) { +checkUnnamed4550(core.List<api.TimedCount> o) { unittest.expect(o, unittest.hasLength(2)); checkTimedCount(o[0]); checkTimedCount(o[1]); @@ -195,7 +195,7 @@ var o = new api.ErrorGroupStats(); buildCounterErrorGroupStats++; if (buildCounterErrorGroupStats < 3) { - o.affectedServices = buildUnnamed5064(); + o.affectedServices = buildUnnamed4549(); o.affectedUsersCount = "foo"; o.count = "foo"; o.firstSeenTime = "foo"; @@ -203,7 +203,7 @@ o.lastSeenTime = "foo"; o.numAffectedServices = 42; o.representative = buildErrorEvent(); - o.timedCounts = buildUnnamed5065(); + o.timedCounts = buildUnnamed4550(); } buildCounterErrorGroupStats--; return o; @@ -212,7 +212,7 @@ checkErrorGroupStats(api.ErrorGroupStats o) { buildCounterErrorGroupStats++; if (buildCounterErrorGroupStats < 3) { - checkUnnamed5064(o.affectedServices); + checkUnnamed4549(o.affectedServices); unittest.expect(o.affectedUsersCount, unittest.equals('foo')); unittest.expect(o.count, unittest.equals('foo')); unittest.expect(o.firstSeenTime, unittest.equals('foo')); @@ -220,7 +220,7 @@ unittest.expect(o.lastSeenTime, unittest.equals('foo')); unittest.expect(o.numAffectedServices, unittest.equals(42)); checkErrorEvent(o.representative); - checkUnnamed5065(o.timedCounts); + checkUnnamed4550(o.timedCounts); } buildCounterErrorGroupStats--; } @@ -254,14 +254,14 @@ buildCounterHttpRequestContext--; } -buildUnnamed5066() { +buildUnnamed4551() { var o = new core.List<api.ErrorEvent>(); o.add(buildErrorEvent()); o.add(buildErrorEvent()); return o; } -checkUnnamed5066(core.List<api.ErrorEvent> o) { +checkUnnamed4551(core.List<api.ErrorEvent> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorEvent(o[0]); checkErrorEvent(o[1]); @@ -272,7 +272,7 @@ var o = new api.ListEventsResponse(); buildCounterListEventsResponse++; if (buildCounterListEventsResponse < 3) { - o.errorEvents = buildUnnamed5066(); + o.errorEvents = buildUnnamed4551(); o.nextPageToken = "foo"; o.timeRangeBegin = "foo"; } @@ -283,21 +283,21 @@ checkListEventsResponse(api.ListEventsResponse o) { buildCounterListEventsResponse++; if (buildCounterListEventsResponse < 3) { - checkUnnamed5066(o.errorEvents); + checkUnnamed4551(o.errorEvents); unittest.expect(o.nextPageToken, unittest.equals('foo')); unittest.expect(o.timeRangeBegin, unittest.equals('foo')); } buildCounterListEventsResponse--; } -buildUnnamed5067() { +buildUnnamed4552() { var o = new core.List<api.ErrorGroupStats>(); o.add(buildErrorGroupStats()); o.add(buildErrorGroupStats()); return o; } -checkUnnamed5067(core.List<api.ErrorGroupStats> o) { +checkUnnamed4552(core.List<api.ErrorGroupStats> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorGroupStats(o[0]); checkErrorGroupStats(o[1]); @@ -308,7 +308,7 @@ var o = new api.ListGroupStatsResponse(); buildCounterListGroupStatsResponse++; if (buildCounterListGroupStatsResponse < 3) { - o.errorGroupStats = buildUnnamed5067(); + o.errorGroupStats = buildUnnamed4552(); o.nextPageToken = "foo"; o.timeRangeBegin = "foo"; } @@ -319,7 +319,7 @@ checkListGroupStatsResponse(api.ListGroupStatsResponse o) { buildCounterListGroupStatsResponse++; if (buildCounterListGroupStatsResponse < 3) { - checkUnnamed5067(o.errorGroupStats); + checkUnnamed4552(o.errorGroupStats); unittest.expect(o.nextPageToken, unittest.equals('foo')); unittest.expect(o.timeRangeBegin, unittest.equals('foo')); } @@ -475,14 +475,14 @@ buildCounterTrackingIssue--; } -buildUnnamed5068() { +buildUnnamed4553() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5068(core.List<core.String> o) { +checkUnnamed4553(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -670,8 +670,8 @@ new api.ClouderrorreportingApi(mock).projects.events; var arg_projectName = "foo"; var arg_groupId = "foo"; - var arg_pageToken = "foo"; var arg_serviceFilter_service = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_serviceFilter_version = "foo"; var arg_serviceFilter_resourceType = "foo"; @@ -710,10 +710,10 @@ } unittest.expect( queryMap["groupId"].first, unittest.equals(arg_groupId)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["serviceFilter.service"].first, unittest.equals(arg_serviceFilter_service)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["serviceFilter.version"].first, @@ -733,8 +733,8 @@ res .list(arg_projectName, groupId: arg_groupId, - pageToken: arg_pageToken, serviceFilter_service: arg_serviceFilter_service, + pageToken: arg_pageToken, pageSize: arg_pageSize, serviceFilter_version: arg_serviceFilter_version, serviceFilter_resourceType: arg_serviceFilter_resourceType, @@ -808,17 +808,17 @@ api.ProjectsGroupStatsResourceApi res = new api.ClouderrorreportingApi(mock).projects.groupStats; var arg_projectName = "foo"; + var arg_timedCountDuration = "foo"; + var arg_pageToken = "foo"; var arg_timeRange_period = "foo"; var arg_alignment = "foo"; - var arg_groupId = buildUnnamed5068(); + var arg_groupId = buildUnnamed4553(); var arg_serviceFilter_service = "foo"; var arg_pageSize = 42; var arg_serviceFilter_version = "foo"; var arg_order = "foo"; var arg_serviceFilter_resourceType = "foo"; var arg_alignmentTime = "foo"; - var arg_timedCountDuration = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -851,6 +851,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["timedCountDuration"].first, + unittest.equals(arg_timedCountDuration)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["timeRange.period"].first, unittest.equals(arg_timeRange_period)); unittest.expect( @@ -867,10 +871,6 @@ unittest.equals(arg_serviceFilter_resourceType)); unittest.expect(queryMap["alignmentTime"].first, unittest.equals(arg_alignmentTime)); - unittest.expect(queryMap["timedCountDuration"].first, - unittest.equals(arg_timedCountDuration)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -881,6 +881,8 @@ }), true); res .list(arg_projectName, + timedCountDuration: arg_timedCountDuration, + pageToken: arg_pageToken, timeRange_period: arg_timeRange_period, alignment: arg_alignment, groupId: arg_groupId, @@ -890,8 +892,6 @@ order: arg_order, serviceFilter_resourceType: arg_serviceFilter_resourceType, alignmentTime: arg_alignmentTime, - timedCountDuration: arg_timedCountDuration, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListGroupStatsResponse(response);
diff --git a/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart b/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart index 1ddd086..fde1fd2 100644 --- a/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart +++ b/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
@@ -69,14 +69,14 @@ buildCounterAncestor--; } -buildUnnamed5411() { +buildUnnamed4282() { var o = new core.List<api.AuditLogConfig>(); o.add(buildAuditLogConfig()); o.add(buildAuditLogConfig()); return o; } -checkUnnamed5411(core.List<api.AuditLogConfig> o) { +checkUnnamed4282(core.List<api.AuditLogConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkAuditLogConfig(o[0]); checkAuditLogConfig(o[1]); @@ -87,7 +87,7 @@ var o = new api.AuditConfig(); buildCounterAuditConfig++; if (buildCounterAuditConfig < 3) { - o.auditLogConfigs = buildUnnamed5411(); + o.auditLogConfigs = buildUnnamed4282(); o.service = "foo"; } buildCounterAuditConfig--; @@ -97,20 +97,20 @@ checkAuditConfig(api.AuditConfig o) { buildCounterAuditConfig++; if (buildCounterAuditConfig < 3) { - checkUnnamed5411(o.auditLogConfigs); + checkUnnamed4282(o.auditLogConfigs); unittest.expect(o.service, unittest.equals('foo')); } buildCounterAuditConfig--; } -buildUnnamed5412() { +buildUnnamed4283() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5412(core.List<core.String> o) { +checkUnnamed4283(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -121,7 +121,7 @@ var o = new api.AuditLogConfig(); buildCounterAuditLogConfig++; if (buildCounterAuditLogConfig < 3) { - o.exemptedMembers = buildUnnamed5412(); + o.exemptedMembers = buildUnnamed4283(); o.logType = "foo"; } buildCounterAuditLogConfig--; @@ -131,20 +131,20 @@ checkAuditLogConfig(api.AuditLogConfig o) { buildCounterAuditLogConfig++; if (buildCounterAuditLogConfig < 3) { - checkUnnamed5412(o.exemptedMembers); + checkUnnamed4283(o.exemptedMembers); unittest.expect(o.logType, unittest.equals('foo')); } buildCounterAuditLogConfig--; } -buildUnnamed5413() { +buildUnnamed4284() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5413(core.List<core.String> o) { +checkUnnamed4284(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -156,7 +156,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5413(); + o.members = buildUnnamed4284(); o.role = "foo"; } buildCounterBinding--; @@ -167,7 +167,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5413(o.members); + checkUnnamed4284(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; @@ -272,14 +272,14 @@ buildCounterGetAncestryRequest--; } -buildUnnamed5414() { +buildUnnamed4285() { var o = new core.List<api.Ancestor>(); o.add(buildAncestor()); o.add(buildAncestor()); return o; } -checkUnnamed5414(core.List<api.Ancestor> o) { +checkUnnamed4285(core.List<api.Ancestor> o) { unittest.expect(o, unittest.hasLength(2)); checkAncestor(o[0]); checkAncestor(o[1]); @@ -290,7 +290,7 @@ var o = new api.GetAncestryResponse(); buildCounterGetAncestryResponse++; if (buildCounterGetAncestryResponse < 3) { - o.ancestor = buildUnnamed5414(); + o.ancestor = buildUnnamed4285(); } buildCounterGetAncestryResponse--; return o; @@ -299,7 +299,7 @@ checkGetAncestryResponse(api.GetAncestryResponse o) { buildCounterGetAncestryResponse++; if (buildCounterGetAncestryResponse < 3) { - checkUnnamed5414(o.ancestor); + checkUnnamed4285(o.ancestor); } buildCounterGetAncestryResponse--; } @@ -319,14 +319,14 @@ buildCounterGetIamPolicyRequest--; } -buildUnnamed5415() { +buildUnnamed4286() { var o = new core.List<api.Organization>(); o.add(buildOrganization()); o.add(buildOrganization()); return o; } -checkUnnamed5415(core.List<api.Organization> o) { +checkUnnamed4286(core.List<api.Organization> o) { unittest.expect(o, unittest.hasLength(2)); checkOrganization(o[0]); checkOrganization(o[1]); @@ -338,7 +338,7 @@ buildCounterListOrganizationsResponse++; if (buildCounterListOrganizationsResponse < 3) { o.nextPageToken = "foo"; - o.organizations = buildUnnamed5415(); + o.organizations = buildUnnamed4286(); } buildCounterListOrganizationsResponse--; return o; @@ -348,19 +348,19 @@ buildCounterListOrganizationsResponse++; if (buildCounterListOrganizationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5415(o.organizations); + checkUnnamed4286(o.organizations); } buildCounterListOrganizationsResponse--; } -buildUnnamed5416() { +buildUnnamed4287() { var o = new core.List<api.Project>(); o.add(buildProject()); o.add(buildProject()); return o; } -checkUnnamed5416(core.List<api.Project> o) { +checkUnnamed4287(core.List<api.Project> o) { unittest.expect(o, unittest.hasLength(2)); checkProject(o[0]); checkProject(o[1]); @@ -372,7 +372,7 @@ buildCounterListProjectsResponse++; if (buildCounterListProjectsResponse < 3) { o.nextPageToken = "foo"; - o.projects = buildUnnamed5416(); + o.projects = buildUnnamed4287(); } buildCounterListProjectsResponse--; return o; @@ -382,7 +382,7 @@ buildCounterListProjectsResponse++; if (buildCounterListProjectsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5416(o.projects); + checkUnnamed4287(o.projects); } buildCounterListProjectsResponse--; } @@ -435,27 +435,27 @@ buildCounterOrganizationOwner--; } -buildUnnamed5417() { +buildUnnamed4288() { var o = new core.List<api.AuditConfig>(); o.add(buildAuditConfig()); o.add(buildAuditConfig()); return o; } -checkUnnamed5417(core.List<api.AuditConfig> o) { +checkUnnamed4288(core.List<api.AuditConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkAuditConfig(o[0]); checkAuditConfig(o[1]); } -buildUnnamed5418() { +buildUnnamed4289() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5418(core.List<api.Binding> o) { +checkUnnamed4289(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -466,8 +466,8 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.auditConfigs = buildUnnamed5417(); - o.bindings = buildUnnamed5418(); + o.auditConfigs = buildUnnamed4288(); + o.bindings = buildUnnamed4289(); o.etag = "foo"; o.version = 42; } @@ -478,22 +478,22 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5417(o.auditConfigs); - checkUnnamed5418(o.bindings); + checkUnnamed4288(o.auditConfigs); + checkUnnamed4289(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } buildCounterPolicy--; } -buildUnnamed5419() { +buildUnnamed4290() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5419(core.Map<core.String, core.String> o) { +checkUnnamed4290(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -505,7 +505,7 @@ buildCounterProject++; if (buildCounterProject < 3) { o.createTime = "foo"; - o.labels = buildUnnamed5419(); + o.labels = buildUnnamed4290(); o.lifecycleState = "foo"; o.name = "foo"; o.parent = buildResourceId(); @@ -520,7 +520,7 @@ buildCounterProject++; if (buildCounterProject < 3) { unittest.expect(o.createTime, unittest.equals('foo')); - checkUnnamed5419(o.labels); + checkUnnamed4290(o.labels); unittest.expect(o.lifecycleState, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); checkResourceId(o.parent); @@ -595,14 +595,14 @@ buildCounterSetIamPolicyRequest--; } -buildUnnamed5420() { +buildUnnamed4291() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5420(core.List<core.String> o) { +checkUnnamed4291(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -613,7 +613,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5420(); + o.permissions = buildUnnamed4291(); } buildCounterTestIamPermissionsRequest--; return o; @@ -622,19 +622,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5420(o.permissions); + checkUnnamed4291(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5421() { +buildUnnamed4292() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5421(core.List<core.String> o) { +checkUnnamed4292(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -645,7 +645,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5421(); + o.permissions = buildUnnamed4292(); } buildCounterTestIamPermissionsResponse--; return o; @@ -654,7 +654,7 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5421(o.permissions); + checkUnnamed4292(o.permissions); } buildCounterTestIamPermissionsResponse--; } @@ -1502,9 +1502,9 @@ var mock = new HttpServerMock(); api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects; + var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; - var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1536,11 +1536,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1551,9 +1551,9 @@ }), true); res .list( + filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize, - filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListProjectsResponse(response);
diff --git a/generated/googleapis_beta/test/redis/v1beta1_test.dart b/generated/googleapis_beta/test/cloudscheduler/v1beta1_test.dart similarity index 62% copy from generated/googleapis_beta/test/redis/v1beta1_test.dart copy to generated/googleapis_beta/test/cloudscheduler/v1beta1_test.dart index 67cf4bd..513dc18 100644 --- a/generated/googleapis_beta/test/redis/v1beta1_test.dart +++ b/generated/googleapis_beta/test/cloudscheduler/v1beta1_test.dart
@@ -1,4 +1,4 @@ -library googleapis_beta.redis.v1beta1.test; +library googleapis_beta.cloudscheduler.v1beta1.test; import "dart:core" as core; import "dart:async" as async; @@ -7,7 +7,7 @@ import 'package:http/http.dart' as http; import 'package:test/test.dart' as unittest; -import 'package:googleapis_beta/redis/v1beta1.dart' as api; +import 'package:googleapis_beta/cloudscheduler/v1beta1.dart' as api; class HttpServerMock extends http.BaseClient { core.Function _callback; @@ -50,6 +50,71 @@ return new http.StreamedResponse(stream, status, headers: headers); } +buildUnnamed4873() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4873(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterAppEngineHttpTarget = 0; +buildAppEngineHttpTarget() { + var o = new api.AppEngineHttpTarget(); + buildCounterAppEngineHttpTarget++; + if (buildCounterAppEngineHttpTarget < 3) { + o.appEngineRouting = buildAppEngineRouting(); + o.body = "foo"; + o.headers = buildUnnamed4873(); + o.httpMethod = "foo"; + o.relativeUri = "foo"; + } + buildCounterAppEngineHttpTarget--; + return o; +} + +checkAppEngineHttpTarget(api.AppEngineHttpTarget o) { + buildCounterAppEngineHttpTarget++; + if (buildCounterAppEngineHttpTarget < 3) { + checkAppEngineRouting(o.appEngineRouting); + unittest.expect(o.body, unittest.equals('foo')); + checkUnnamed4873(o.headers); + unittest.expect(o.httpMethod, unittest.equals('foo')); + unittest.expect(o.relativeUri, unittest.equals('foo')); + } + buildCounterAppEngineHttpTarget--; +} + +core.int buildCounterAppEngineRouting = 0; +buildAppEngineRouting() { + var o = new api.AppEngineRouting(); + buildCounterAppEngineRouting++; + if (buildCounterAppEngineRouting < 3) { + o.host = "foo"; + o.instance = "foo"; + o.service = "foo"; + o.version = "foo"; + } + buildCounterAppEngineRouting--; + return o; +} + +checkAppEngineRouting(api.AppEngineRouting o) { + buildCounterAppEngineRouting++; + if (buildCounterAppEngineRouting < 3) { + unittest.expect(o.host, unittest.equals('foo')); + unittest.expect(o.instance, unittest.equals('foo')); + unittest.expect(o.service, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals('foo')); + } + buildCounterAppEngineRouting--; +} + core.int buildCounterEmpty = 0; buildEmpty() { var o = new api.Empty(); @@ -65,207 +130,129 @@ buildCounterEmpty--; } -core.int buildCounterGoogleCloudCommonOperationMetadata = 0; -buildGoogleCloudCommonOperationMetadata() { - var o = new api.GoogleCloudCommonOperationMetadata(); - buildCounterGoogleCloudCommonOperationMetadata++; - if (buildCounterGoogleCloudCommonOperationMetadata < 3) { - o.apiVersion = "foo"; - o.cancelRequested = true; - o.createTime = "foo"; - o.endTime = "foo"; - o.statusDetail = "foo"; - o.target = "foo"; - o.verb = "foo"; - } - buildCounterGoogleCloudCommonOperationMetadata--; - return o; -} - -checkGoogleCloudCommonOperationMetadata( - api.GoogleCloudCommonOperationMetadata o) { - buildCounterGoogleCloudCommonOperationMetadata++; - if (buildCounterGoogleCloudCommonOperationMetadata < 3) { - unittest.expect(o.apiVersion, unittest.equals('foo')); - unittest.expect(o.cancelRequested, unittest.isTrue); - unittest.expect(o.createTime, unittest.equals('foo')); - unittest.expect(o.endTime, unittest.equals('foo')); - unittest.expect(o.statusDetail, unittest.equals('foo')); - unittest.expect(o.target, unittest.equals('foo')); - unittest.expect(o.verb, unittest.equals('foo')); - } - buildCounterGoogleCloudCommonOperationMetadata--; -} - -buildUnnamed5359() { - var o = new core.Map<core.String, api.GoogleCloudRedisV1beta1ZoneMetadata>(); - o["x"] = buildGoogleCloudRedisV1beta1ZoneMetadata(); - o["y"] = buildGoogleCloudRedisV1beta1ZoneMetadata(); - return o; -} - -checkUnnamed5359( - core.Map<core.String, api.GoogleCloudRedisV1beta1ZoneMetadata> o) { - unittest.expect(o, unittest.hasLength(2)); - checkGoogleCloudRedisV1beta1ZoneMetadata(o["x"]); - checkGoogleCloudRedisV1beta1ZoneMetadata(o["y"]); -} - -core.int buildCounterGoogleCloudRedisV1beta1LocationMetadata = 0; -buildGoogleCloudRedisV1beta1LocationMetadata() { - var o = new api.GoogleCloudRedisV1beta1LocationMetadata(); - buildCounterGoogleCloudRedisV1beta1LocationMetadata++; - if (buildCounterGoogleCloudRedisV1beta1LocationMetadata < 3) { - o.availableZones = buildUnnamed5359(); - } - buildCounterGoogleCloudRedisV1beta1LocationMetadata--; - return o; -} - -checkGoogleCloudRedisV1beta1LocationMetadata( - api.GoogleCloudRedisV1beta1LocationMetadata o) { - buildCounterGoogleCloudRedisV1beta1LocationMetadata++; - if (buildCounterGoogleCloudRedisV1beta1LocationMetadata < 3) { - checkUnnamed5359(o.availableZones); - } - buildCounterGoogleCloudRedisV1beta1LocationMetadata--; -} - -core.int buildCounterGoogleCloudRedisV1beta1ZoneMetadata = 0; -buildGoogleCloudRedisV1beta1ZoneMetadata() { - var o = new api.GoogleCloudRedisV1beta1ZoneMetadata(); - buildCounterGoogleCloudRedisV1beta1ZoneMetadata++; - if (buildCounterGoogleCloudRedisV1beta1ZoneMetadata < 3) {} - buildCounterGoogleCloudRedisV1beta1ZoneMetadata--; - return o; -} - -checkGoogleCloudRedisV1beta1ZoneMetadata( - api.GoogleCloudRedisV1beta1ZoneMetadata o) { - buildCounterGoogleCloudRedisV1beta1ZoneMetadata++; - if (buildCounterGoogleCloudRedisV1beta1ZoneMetadata < 3) {} - buildCounterGoogleCloudRedisV1beta1ZoneMetadata--; -} - -buildUnnamed5360() { +buildUnnamed4874() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5360(core.Map<core.String, core.String> o) { +checkUnnamed4874(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5361() { - var o = new core.Map<core.String, core.String>(); - o["x"] = "foo"; - o["y"] = "foo"; +core.int buildCounterHttpTarget = 0; +buildHttpTarget() { + var o = new api.HttpTarget(); + buildCounterHttpTarget++; + if (buildCounterHttpTarget < 3) { + o.body = "foo"; + o.headers = buildUnnamed4874(); + o.httpMethod = "foo"; + o.uri = "foo"; + } + buildCounterHttpTarget--; return o; } -checkUnnamed5361(core.Map<core.String, core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o["x"], unittest.equals('foo')); - unittest.expect(o["y"], unittest.equals('foo')); +checkHttpTarget(api.HttpTarget o) { + buildCounterHttpTarget++; + if (buildCounterHttpTarget < 3) { + unittest.expect(o.body, unittest.equals('foo')); + checkUnnamed4874(o.headers); + unittest.expect(o.httpMethod, unittest.equals('foo')); + unittest.expect(o.uri, unittest.equals('foo')); + } + buildCounterHttpTarget--; } -core.int buildCounterInstance = 0; -buildInstance() { - var o = new api.Instance(); - buildCounterInstance++; - if (buildCounterInstance < 3) { - o.alternativeLocationId = "foo"; - o.authorizedNetwork = "foo"; - o.createTime = "foo"; - o.currentLocationId = "foo"; - o.displayName = "foo"; - o.host = "foo"; - o.labels = buildUnnamed5360(); - o.locationId = "foo"; - o.memorySizeGb = 42; +core.int buildCounterJob = 0; +buildJob() { + var o = new api.Job(); + buildCounterJob++; + if (buildCounterJob < 3) { + o.appEngineHttpTarget = buildAppEngineHttpTarget(); + o.description = "foo"; + o.httpTarget = buildHttpTarget(); + o.lastAttemptTime = "foo"; o.name = "foo"; - o.port = 42; - o.redisConfigs = buildUnnamed5361(); - o.redisVersion = "foo"; - o.reservedIpRange = "foo"; + o.pubsubTarget = buildPubsubTarget(); + o.retryConfig = buildRetryConfig(); + o.schedule = "foo"; + o.scheduleTime = "foo"; o.state = "foo"; - o.statusMessage = "foo"; - o.tier = "foo"; + o.status = buildStatus(); + o.timeZone = "foo"; + o.userUpdateTime = "foo"; } - buildCounterInstance--; + buildCounterJob--; return o; } -checkInstance(api.Instance o) { - buildCounterInstance++; - if (buildCounterInstance < 3) { - unittest.expect(o.alternativeLocationId, unittest.equals('foo')); - unittest.expect(o.authorizedNetwork, unittest.equals('foo')); - unittest.expect(o.createTime, unittest.equals('foo')); - unittest.expect(o.currentLocationId, unittest.equals('foo')); - unittest.expect(o.displayName, unittest.equals('foo')); - unittest.expect(o.host, unittest.equals('foo')); - checkUnnamed5360(o.labels); - unittest.expect(o.locationId, unittest.equals('foo')); - unittest.expect(o.memorySizeGb, unittest.equals(42)); +checkJob(api.Job o) { + buildCounterJob++; + if (buildCounterJob < 3) { + checkAppEngineHttpTarget(o.appEngineHttpTarget); + unittest.expect(o.description, unittest.equals('foo')); + checkHttpTarget(o.httpTarget); + unittest.expect(o.lastAttemptTime, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.port, unittest.equals(42)); - checkUnnamed5361(o.redisConfigs); - unittest.expect(o.redisVersion, unittest.equals('foo')); - unittest.expect(o.reservedIpRange, unittest.equals('foo')); + checkPubsubTarget(o.pubsubTarget); + checkRetryConfig(o.retryConfig); + unittest.expect(o.schedule, unittest.equals('foo')); + unittest.expect(o.scheduleTime, unittest.equals('foo')); unittest.expect(o.state, unittest.equals('foo')); - unittest.expect(o.statusMessage, unittest.equals('foo')); - unittest.expect(o.tier, unittest.equals('foo')); + checkStatus(o.status); + unittest.expect(o.timeZone, unittest.equals('foo')); + unittest.expect(o.userUpdateTime, unittest.equals('foo')); } - buildCounterInstance--; + buildCounterJob--; } -buildUnnamed5362() { - var o = new core.List<api.Instance>(); - o.add(buildInstance()); - o.add(buildInstance()); +buildUnnamed4875() { + var o = new core.List<api.Job>(); + o.add(buildJob()); + o.add(buildJob()); return o; } -checkUnnamed5362(core.List<api.Instance> o) { +checkUnnamed4875(core.List<api.Job> o) { unittest.expect(o, unittest.hasLength(2)); - checkInstance(o[0]); - checkInstance(o[1]); + checkJob(o[0]); + checkJob(o[1]); } -core.int buildCounterListInstancesResponse = 0; -buildListInstancesResponse() { - var o = new api.ListInstancesResponse(); - buildCounterListInstancesResponse++; - if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5362(); +core.int buildCounterListJobsResponse = 0; +buildListJobsResponse() { + var o = new api.ListJobsResponse(); + buildCounterListJobsResponse++; + if (buildCounterListJobsResponse < 3) { + o.jobs = buildUnnamed4875(); o.nextPageToken = "foo"; } - buildCounterListInstancesResponse--; + buildCounterListJobsResponse--; return o; } -checkListInstancesResponse(api.ListInstancesResponse o) { - buildCounterListInstancesResponse++; - if (buildCounterListInstancesResponse < 3) { - checkUnnamed5362(o.instances); +checkListJobsResponse(api.ListJobsResponse o) { + buildCounterListJobsResponse++; + if (buildCounterListJobsResponse < 3) { + checkUnnamed4875(o.jobs); unittest.expect(o.nextPageToken, unittest.equals('foo')); } - buildCounterListInstancesResponse--; + buildCounterListJobsResponse--; } -buildUnnamed5363() { +buildUnnamed4876() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5363(core.List<api.Location> o) { +checkUnnamed4876(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -276,7 +263,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5363(); + o.locations = buildUnnamed4876(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -286,60 +273,26 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5363(o.locations); + checkUnnamed4876(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5364() { - var o = new core.List<api.Operation>(); - o.add(buildOperation()); - o.add(buildOperation()); - return o; -} - -checkUnnamed5364(core.List<api.Operation> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperation(o[0]); - checkOperation(o[1]); -} - -core.int buildCounterListOperationsResponse = 0; -buildListOperationsResponse() { - var o = new api.ListOperationsResponse(); - buildCounterListOperationsResponse++; - if (buildCounterListOperationsResponse < 3) { - o.nextPageToken = "foo"; - o.operations = buildUnnamed5364(); - } - buildCounterListOperationsResponse--; - return o; -} - -checkListOperationsResponse(api.ListOperationsResponse o) { - buildCounterListOperationsResponse++; - if (buildCounterListOperationsResponse < 3) { - unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5364(o.operations); - } - buildCounterListOperationsResponse--; -} - -buildUnnamed5365() { +buildUnnamed4877() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5365(core.Map<core.String, core.String> o) { +checkUnnamed4877(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5366() { +buildUnnamed4878() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -354,7 +307,7 @@ return o; } -checkUnnamed5366(core.Map<core.String, core.Object> o) { +checkUnnamed4878(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -374,9 +327,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5365(); + o.labels = buildUnnamed4877(); o.locationId = "foo"; - o.metadata = buildUnnamed5366(); + o.metadata = buildUnnamed4878(); o.name = "foo"; } buildCounterLocation--; @@ -387,15 +340,161 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5365(o.labels); + checkUnnamed4877(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5366(o.metadata); + checkUnnamed4878(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; } -buildUnnamed5367() { +core.int buildCounterPauseJobRequest = 0; +buildPauseJobRequest() { + var o = new api.PauseJobRequest(); + buildCounterPauseJobRequest++; + if (buildCounterPauseJobRequest < 3) {} + buildCounterPauseJobRequest--; + return o; +} + +checkPauseJobRequest(api.PauseJobRequest o) { + buildCounterPauseJobRequest++; + if (buildCounterPauseJobRequest < 3) {} + buildCounterPauseJobRequest--; +} + +buildUnnamed4879() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4879(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterPubsubMessage = 0; +buildPubsubMessage() { + var o = new api.PubsubMessage(); + buildCounterPubsubMessage++; + if (buildCounterPubsubMessage < 3) { + o.attributes = buildUnnamed4879(); + o.data = "foo"; + o.messageId = "foo"; + o.publishTime = "foo"; + } + buildCounterPubsubMessage--; + return o; +} + +checkPubsubMessage(api.PubsubMessage o) { + buildCounterPubsubMessage++; + if (buildCounterPubsubMessage < 3) { + checkUnnamed4879(o.attributes); + unittest.expect(o.data, unittest.equals('foo')); + unittest.expect(o.messageId, unittest.equals('foo')); + unittest.expect(o.publishTime, unittest.equals('foo')); + } + buildCounterPubsubMessage--; +} + +buildUnnamed4880() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4880(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterPubsubTarget = 0; +buildPubsubTarget() { + var o = new api.PubsubTarget(); + buildCounterPubsubTarget++; + if (buildCounterPubsubTarget < 3) { + o.attributes = buildUnnamed4880(); + o.data = "foo"; + o.topicName = "foo"; + } + buildCounterPubsubTarget--; + return o; +} + +checkPubsubTarget(api.PubsubTarget o) { + buildCounterPubsubTarget++; + if (buildCounterPubsubTarget < 3) { + checkUnnamed4880(o.attributes); + unittest.expect(o.data, unittest.equals('foo')); + unittest.expect(o.topicName, unittest.equals('foo')); + } + buildCounterPubsubTarget--; +} + +core.int buildCounterResumeJobRequest = 0; +buildResumeJobRequest() { + var o = new api.ResumeJobRequest(); + buildCounterResumeJobRequest++; + if (buildCounterResumeJobRequest < 3) {} + buildCounterResumeJobRequest--; + return o; +} + +checkResumeJobRequest(api.ResumeJobRequest o) { + buildCounterResumeJobRequest++; + if (buildCounterResumeJobRequest < 3) {} + buildCounterResumeJobRequest--; +} + +core.int buildCounterRetryConfig = 0; +buildRetryConfig() { + var o = new api.RetryConfig(); + buildCounterRetryConfig++; + if (buildCounterRetryConfig < 3) { + o.maxBackoffDuration = "foo"; + o.maxDoublings = 42; + o.maxRetryDuration = "foo"; + o.minBackoffDuration = "foo"; + o.retryCount = 42; + } + buildCounterRetryConfig--; + return o; +} + +checkRetryConfig(api.RetryConfig o) { + buildCounterRetryConfig++; + if (buildCounterRetryConfig < 3) { + unittest.expect(o.maxBackoffDuration, unittest.equals('foo')); + unittest.expect(o.maxDoublings, unittest.equals(42)); + unittest.expect(o.maxRetryDuration, unittest.equals('foo')); + unittest.expect(o.minBackoffDuration, unittest.equals('foo')); + unittest.expect(o.retryCount, unittest.equals(42)); + } + buildCounterRetryConfig--; +} + +core.int buildCounterRunJobRequest = 0; +buildRunJobRequest() { + var o = new api.RunJobRequest(); + buildCounterRunJobRequest++; + if (buildCounterRunJobRequest < 3) {} + buildCounterRunJobRequest--; + return o; +} + +checkRunJobRequest(api.RunJobRequest o) { + buildCounterRunJobRequest++; + if (buildCounterRunJobRequest < 3) {} + buildCounterRunJobRequest--; +} + +buildUnnamed4881() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -410,7 +509,7 @@ return o; } -checkUnnamed5367(core.Map<core.String, core.Object> o) { +checkUnnamed4881(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -424,102 +523,17 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5368() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5368(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted5 = (o["x"]) as core.Map; - unittest.expect(casted5, unittest.hasLength(3)); - unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted5["bool"], unittest.equals(true)); - unittest.expect(casted5["string"], unittest.equals('foo')); - var casted6 = (o["y"]) as core.Map; - unittest.expect(casted6, unittest.hasLength(3)); - unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted6["bool"], unittest.equals(true)); - unittest.expect(casted6["string"], unittest.equals('foo')); -} - -core.int buildCounterOperation = 0; -buildOperation() { - var o = new api.Operation(); - buildCounterOperation++; - if (buildCounterOperation < 3) { - o.done = true; - o.error = buildStatus(); - o.metadata = buildUnnamed5367(); - o.name = "foo"; - o.response = buildUnnamed5368(); - } - buildCounterOperation--; - return o; -} - -checkOperation(api.Operation o) { - buildCounterOperation++; - if (buildCounterOperation < 3) { - unittest.expect(o.done, unittest.isTrue); - checkStatus(o.error); - checkUnnamed5367(o.metadata); - unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5368(o.response); - } - buildCounterOperation--; -} - -buildUnnamed5369() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5369(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted7 = (o["x"]) as core.Map; - unittest.expect(casted7, unittest.hasLength(3)); - unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted7["bool"], unittest.equals(true)); - unittest.expect(casted7["string"], unittest.equals('foo')); - var casted8 = (o["y"]) as core.Map; - unittest.expect(casted8, unittest.hasLength(3)); - unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted8["bool"], unittest.equals(true)); - unittest.expect(casted8["string"], unittest.equals('foo')); -} - -buildUnnamed5370() { +buildUnnamed4882() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5369()); - o.add(buildUnnamed5369()); + o.add(buildUnnamed4881()); + o.add(buildUnnamed4881()); return o; } -checkUnnamed5370(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4882(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5369(o[0]); - checkUnnamed5369(o[1]); + checkUnnamed4881(o[0]); + checkUnnamed4881(o[1]); } core.int buildCounterStatus = 0; @@ -528,7 +542,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5370(); + o.details = buildUnnamed4882(); o.message = "foo"; } buildCounterStatus--; @@ -539,13 +553,29 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5370(o.details); + checkUnnamed4882(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } main() { + unittest.group("obj-schema-AppEngineHttpTarget", () { + unittest.test("to-json--from-json", () { + var o = buildAppEngineHttpTarget(); + var od = new api.AppEngineHttpTarget.fromJson(o.toJson()); + checkAppEngineHttpTarget(od); + }); + }); + + unittest.group("obj-schema-AppEngineRouting", () { + unittest.test("to-json--from-json", () { + var o = buildAppEngineRouting(); + var od = new api.AppEngineRouting.fromJson(o.toJson()); + checkAppEngineRouting(od); + }); + }); + unittest.group("obj-schema-Empty", () { unittest.test("to-json--from-json", () { var o = buildEmpty(); @@ -554,44 +584,27 @@ }); }); - unittest.group("obj-schema-GoogleCloudCommonOperationMetadata", () { + unittest.group("obj-schema-HttpTarget", () { unittest.test("to-json--from-json", () { - var o = buildGoogleCloudCommonOperationMetadata(); - var od = new api.GoogleCloudCommonOperationMetadata.fromJson(o.toJson()); - checkGoogleCloudCommonOperationMetadata(od); + var o = buildHttpTarget(); + var od = new api.HttpTarget.fromJson(o.toJson()); + checkHttpTarget(od); }); }); - unittest.group("obj-schema-GoogleCloudRedisV1beta1LocationMetadata", () { + unittest.group("obj-schema-Job", () { unittest.test("to-json--from-json", () { - var o = buildGoogleCloudRedisV1beta1LocationMetadata(); - var od = - new api.GoogleCloudRedisV1beta1LocationMetadata.fromJson(o.toJson()); - checkGoogleCloudRedisV1beta1LocationMetadata(od); + var o = buildJob(); + var od = new api.Job.fromJson(o.toJson()); + checkJob(od); }); }); - unittest.group("obj-schema-GoogleCloudRedisV1beta1ZoneMetadata", () { + unittest.group("obj-schema-ListJobsResponse", () { unittest.test("to-json--from-json", () { - var o = buildGoogleCloudRedisV1beta1ZoneMetadata(); - var od = new api.GoogleCloudRedisV1beta1ZoneMetadata.fromJson(o.toJson()); - checkGoogleCloudRedisV1beta1ZoneMetadata(od); - }); - }); - - unittest.group("obj-schema-Instance", () { - unittest.test("to-json--from-json", () { - var o = buildInstance(); - var od = new api.Instance.fromJson(o.toJson()); - checkInstance(od); - }); - }); - - unittest.group("obj-schema-ListInstancesResponse", () { - unittest.test("to-json--from-json", () { - var o = buildListInstancesResponse(); - var od = new api.ListInstancesResponse.fromJson(o.toJson()); - checkListInstancesResponse(od); + var o = buildListJobsResponse(); + var od = new api.ListJobsResponse.fromJson(o.toJson()); + checkListJobsResponse(od); }); }); @@ -603,14 +616,6 @@ }); }); - unittest.group("obj-schema-ListOperationsResponse", () { - unittest.test("to-json--from-json", () { - var o = buildListOperationsResponse(); - var od = new api.ListOperationsResponse.fromJson(o.toJson()); - checkListOperationsResponse(od); - }); - }); - unittest.group("obj-schema-Location", () { unittest.test("to-json--from-json", () { var o = buildLocation(); @@ -619,11 +624,51 @@ }); }); - unittest.group("obj-schema-Operation", () { + unittest.group("obj-schema-PauseJobRequest", () { unittest.test("to-json--from-json", () { - var o = buildOperation(); - var od = new api.Operation.fromJson(o.toJson()); - checkOperation(od); + var o = buildPauseJobRequest(); + var od = new api.PauseJobRequest.fromJson(o.toJson()); + checkPauseJobRequest(od); + }); + }); + + unittest.group("obj-schema-PubsubMessage", () { + unittest.test("to-json--from-json", () { + var o = buildPubsubMessage(); + var od = new api.PubsubMessage.fromJson(o.toJson()); + checkPubsubMessage(od); + }); + }); + + unittest.group("obj-schema-PubsubTarget", () { + unittest.test("to-json--from-json", () { + var o = buildPubsubTarget(); + var od = new api.PubsubTarget.fromJson(o.toJson()); + checkPubsubTarget(od); + }); + }); + + unittest.group("obj-schema-ResumeJobRequest", () { + unittest.test("to-json--from-json", () { + var o = buildResumeJobRequest(); + var od = new api.ResumeJobRequest.fromJson(o.toJson()); + checkResumeJobRequest(od); + }); + }); + + unittest.group("obj-schema-RetryConfig", () { + unittest.test("to-json--from-json", () { + var o = buildRetryConfig(); + var od = new api.RetryConfig.fromJson(o.toJson()); + checkRetryConfig(od); + }); + }); + + unittest.group("obj-schema-RunJobRequest", () { + unittest.test("to-json--from-json", () { + var o = buildRunJobRequest(); + var od = new api.RunJobRequest.fromJson(o.toJson()); + checkRunJobRequest(od); }); }); @@ -639,7 +684,7 @@ unittest.test("method--get", () { var mock = new HttpServerMock(); api.ProjectsLocationsResourceApi res = - new api.RedisApi(mock).projects.locations; + new api.CloudschedulerApi(mock).projects.locations; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -691,11 +736,11 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsResourceApi res = - new api.RedisApi(mock).projects.locations; + new api.CloudschedulerApi(mock).projects.locations; var arg_name = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -728,11 +773,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -743,9 +788,9 @@ }), true); res .list(arg_name, + pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -753,18 +798,17 @@ }); }); - unittest.group("resource-ProjectsLocationsInstancesResourceApi", () { + unittest.group("resource-ProjectsLocationsJobsResourceApi", () { unittest.test("method--create", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; - var arg_request = buildInstance(); + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildJob(); var arg_parent = "foo"; - var arg_instanceId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.Instance.fromJson(json); - checkInstance(obj); + var obj = new api.Job.fromJson(json); + checkJob(obj); var path = (req.url).path; var pathOffset = 0; @@ -796,28 +840,25 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["instanceId"].first, unittest.equals(arg_instanceId)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildOperation()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .create(arg_request, arg_parent, - instanceId: arg_instanceId, $fields: arg_$fields) + .create(arg_request, arg_parent, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkOperation(response); + checkJob(response); }))); }); unittest.test("method--delete", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -856,20 +897,20 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildOperation()); + var resp = convert.json.encode(buildEmpty()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res .delete(arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkOperation(response); + checkEmpty(response); }))); }); unittest.test("method--get", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -908,20 +949,20 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildInstance()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res .get(arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkInstance(response); + checkJob(response); }))); }); unittest.test("method--list", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; var arg_parent = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; @@ -966,7 +1007,7 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildListInstancesResponse()); + var resp = convert.json.encode(buildListJobsResponse()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res @@ -975,21 +1016,21 @@ pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkListInstancesResponse(response); + checkListJobsResponse(response); }))); }); unittest.test("method--patch", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; - var arg_request = buildInstance(); + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildJob(); var arg_name = "foo"; var arg_updateMask = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.Instance.fromJson(json); - checkInstance(obj); + var obj = new api.Job.fromJson(json); + checkJob(obj); var path = (req.url).path; var pathOffset = 0; @@ -1028,26 +1069,28 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildOperation()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res .patch(arg_request, arg_name, updateMask: arg_updateMask, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkOperation(response); + checkJob(response); }))); }); - }); - unittest.group("resource-ProjectsLocationsOperationsResourceApi", () { - unittest.test("method--cancel", () { + unittest.test("method--pause", () { var mock = new HttpServerMock(); - api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildPauseJobRequest(); var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.PauseJobRequest.fromJson(json); + checkPauseJobRequest(obj); + var path = (req.url).path; var pathOffset = 0; var index; @@ -1083,23 +1126,27 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildEmpty()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .cancel(arg_name, $fields: arg_$fields) + .pause(arg_request, arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkEmpty(response); + checkJob(response); }))); }); - unittest.test("method--delete", () { + unittest.test("method--resume", () { var mock = new HttpServerMock(); - api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildResumeJobRequest(); var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ResumeJobRequest.fromJson(json); + checkResumeJobRequest(obj); + var path = (req.url).path; var pathOffset = 0; var index; @@ -1135,23 +1182,27 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildEmpty()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .delete(arg_name, $fields: arg_$fields) + .resume(arg_request, arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkEmpty(response); + checkJob(response); }))); }); - unittest.test("method--get", () { + unittest.test("method--run", () { var mock = new HttpServerMock(); - api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildRunJobRequest(); var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.RunJobRequest.fromJson(json); + checkRunJobRequest(obj); + var path = (req.url).path; var pathOffset = 0; var index; @@ -1187,77 +1238,13 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildOperation()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .get(arg_name, $fields: arg_$fields) + .run(arg_request, arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; - var arg_name = "foo"; - var arg_filter = "foo"; - var arg_pageToken = "foo"; - var arg_pageSize = 42; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildListOperationsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_name, - filter: arg_filter, - pageToken: arg_pageToken, - pageSize: arg_pageSize, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkListOperationsResponse(response); + checkJob(response); }))); }); });
diff --git a/generated/googleapis_beta/test/cloudtasks/v2beta2_test.dart b/generated/googleapis_beta/test/cloudtasks/v2beta3_test.dart similarity index 75% rename from generated/googleapis_beta/test/cloudtasks/v2beta2_test.dart rename to generated/googleapis_beta/test/cloudtasks/v2beta3_test.dart index 1b2c1fe..6c99098 100644 --- a/generated/googleapis_beta/test/cloudtasks/v2beta2_test.dart +++ b/generated/googleapis_beta/test/cloudtasks/v2beta3_test.dart
@@ -1,4 +1,4 @@ -library googleapis_beta.cloudtasks.v2beta2.test; +library googleapis_beta.cloudtasks.v2beta3.test; import "dart:core" as core; import "dart:async" as async; @@ -7,7 +7,7 @@ import 'package:http/http.dart' as http; import 'package:test/test.dart' as unittest; -import 'package:googleapis_beta/cloudtasks/v2beta2.dart' as api; +import 'package:googleapis_beta/cloudtasks/v2beta3.dart' as api; class HttpServerMock extends http.BaseClient { core.Function _callback; @@ -50,33 +50,33 @@ return new http.StreamedResponse(stream, status, headers: headers); } -core.int buildCounterAcknowledgeTaskRequest = 0; -buildAcknowledgeTaskRequest() { - var o = new api.AcknowledgeTaskRequest(); - buildCounterAcknowledgeTaskRequest++; - if (buildCounterAcknowledgeTaskRequest < 3) { - o.scheduleTime = "foo"; +core.int buildCounterAppEngineHttpQueue = 0; +buildAppEngineHttpQueue() { + var o = new api.AppEngineHttpQueue(); + buildCounterAppEngineHttpQueue++; + if (buildCounterAppEngineHttpQueue < 3) { + o.appEngineRoutingOverride = buildAppEngineRouting(); } - buildCounterAcknowledgeTaskRequest--; + buildCounterAppEngineHttpQueue--; return o; } -checkAcknowledgeTaskRequest(api.AcknowledgeTaskRequest o) { - buildCounterAcknowledgeTaskRequest++; - if (buildCounterAcknowledgeTaskRequest < 3) { - unittest.expect(o.scheduleTime, unittest.equals('foo')); +checkAppEngineHttpQueue(api.AppEngineHttpQueue o) { + buildCounterAppEngineHttpQueue++; + if (buildCounterAppEngineHttpQueue < 3) { + checkAppEngineRouting(o.appEngineRoutingOverride); } - buildCounterAcknowledgeTaskRequest--; + buildCounterAppEngineHttpQueue--; } -buildUnnamed5384() { +buildUnnamed4684() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5384(core.Map<core.String, core.String> o) { +checkUnnamed4684(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -88,10 +88,10 @@ buildCounterAppEngineHttpRequest++; if (buildCounterAppEngineHttpRequest < 3) { o.appEngineRouting = buildAppEngineRouting(); - o.headers = buildUnnamed5384(); + o.body = "foo"; + o.headers = buildUnnamed4684(); o.httpMethod = "foo"; - o.payload = "foo"; - o.relativeUrl = "foo"; + o.relativeUri = "foo"; } buildCounterAppEngineHttpRequest--; return o; @@ -101,33 +101,14 @@ buildCounterAppEngineHttpRequest++; if (buildCounterAppEngineHttpRequest < 3) { checkAppEngineRouting(o.appEngineRouting); - checkUnnamed5384(o.headers); + unittest.expect(o.body, unittest.equals('foo')); + checkUnnamed4684(o.headers); unittest.expect(o.httpMethod, unittest.equals('foo')); - unittest.expect(o.payload, unittest.equals('foo')); - unittest.expect(o.relativeUrl, unittest.equals('foo')); + unittest.expect(o.relativeUri, unittest.equals('foo')); } buildCounterAppEngineHttpRequest--; } -core.int buildCounterAppEngineHttpTarget = 0; -buildAppEngineHttpTarget() { - var o = new api.AppEngineHttpTarget(); - buildCounterAppEngineHttpTarget++; - if (buildCounterAppEngineHttpTarget < 3) { - o.appEngineRoutingOverride = buildAppEngineRouting(); - } - buildCounterAppEngineHttpTarget--; - return o; -} - -checkAppEngineHttpTarget(api.AppEngineHttpTarget o) { - buildCounterAppEngineHttpTarget++; - if (buildCounterAppEngineHttpTarget < 3) { - checkAppEngineRouting(o.appEngineRoutingOverride); - } - buildCounterAppEngineHttpTarget--; -} - core.int buildCounterAppEngineRouting = 0; buildAppEngineRouting() { var o = new api.AppEngineRouting(); @@ -153,39 +134,39 @@ buildCounterAppEngineRouting--; } -core.int buildCounterAttemptStatus = 0; -buildAttemptStatus() { - var o = new api.AttemptStatus(); - buildCounterAttemptStatus++; - if (buildCounterAttemptStatus < 3) { +core.int buildCounterAttempt = 0; +buildAttempt() { + var o = new api.Attempt(); + buildCounterAttempt++; + if (buildCounterAttempt < 3) { o.dispatchTime = "foo"; o.responseStatus = buildStatus(); o.responseTime = "foo"; o.scheduleTime = "foo"; } - buildCounterAttemptStatus--; + buildCounterAttempt--; return o; } -checkAttemptStatus(api.AttemptStatus o) { - buildCounterAttemptStatus++; - if (buildCounterAttemptStatus < 3) { +checkAttempt(api.Attempt o) { + buildCounterAttempt++; + if (buildCounterAttempt < 3) { unittest.expect(o.dispatchTime, unittest.equals('foo')); checkStatus(o.responseStatus); unittest.expect(o.responseTime, unittest.equals('foo')); unittest.expect(o.scheduleTime, unittest.equals('foo')); } - buildCounterAttemptStatus--; + buildCounterAttempt--; } -buildUnnamed5385() { +buildUnnamed4685() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5385(core.List<core.String> o) { +checkUnnamed4685(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -197,7 +178,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5385(); + o.members = buildUnnamed4685(); o.role = "foo"; } buildCounterBinding--; @@ -208,33 +189,12 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5385(o.members); + checkUnnamed4685(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; } -core.int buildCounterCancelLeaseRequest = 0; -buildCancelLeaseRequest() { - var o = new api.CancelLeaseRequest(); - buildCounterCancelLeaseRequest++; - if (buildCounterCancelLeaseRequest < 3) { - o.responseView = "foo"; - o.scheduleTime = "foo"; - } - buildCounterCancelLeaseRequest--; - return o; -} - -checkCancelLeaseRequest(api.CancelLeaseRequest o) { - buildCounterCancelLeaseRequest++; - if (buildCounterCancelLeaseRequest < 3) { - unittest.expect(o.responseView, unittest.equals('foo')); - unittest.expect(o.scheduleTime, unittest.equals('foo')); - } - buildCounterCancelLeaseRequest--; -} - core.int buildCounterCreateTaskRequest = 0; buildCreateTaskRequest() { var o = new api.CreateTaskRequest(); @@ -311,71 +271,14 @@ buildCounterGetIamPolicyRequest--; } -core.int buildCounterLeaseTasksRequest = 0; -buildLeaseTasksRequest() { - var o = new api.LeaseTasksRequest(); - buildCounterLeaseTasksRequest++; - if (buildCounterLeaseTasksRequest < 3) { - o.filter = "foo"; - o.leaseDuration = "foo"; - o.maxTasks = 42; - o.responseView = "foo"; - } - buildCounterLeaseTasksRequest--; - return o; -} - -checkLeaseTasksRequest(api.LeaseTasksRequest o) { - buildCounterLeaseTasksRequest++; - if (buildCounterLeaseTasksRequest < 3) { - unittest.expect(o.filter, unittest.equals('foo')); - unittest.expect(o.leaseDuration, unittest.equals('foo')); - unittest.expect(o.maxTasks, unittest.equals(42)); - unittest.expect(o.responseView, unittest.equals('foo')); - } - buildCounterLeaseTasksRequest--; -} - -buildUnnamed5386() { - var o = new core.List<api.Task>(); - o.add(buildTask()); - o.add(buildTask()); - return o; -} - -checkUnnamed5386(core.List<api.Task> o) { - unittest.expect(o, unittest.hasLength(2)); - checkTask(o[0]); - checkTask(o[1]); -} - -core.int buildCounterLeaseTasksResponse = 0; -buildLeaseTasksResponse() { - var o = new api.LeaseTasksResponse(); - buildCounterLeaseTasksResponse++; - if (buildCounterLeaseTasksResponse < 3) { - o.tasks = buildUnnamed5386(); - } - buildCounterLeaseTasksResponse--; - return o; -} - -checkLeaseTasksResponse(api.LeaseTasksResponse o) { - buildCounterLeaseTasksResponse++; - if (buildCounterLeaseTasksResponse < 3) { - checkUnnamed5386(o.tasks); - } - buildCounterLeaseTasksResponse--; -} - -buildUnnamed5387() { +buildUnnamed4686() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5387(core.List<api.Location> o) { +checkUnnamed4686(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -386,7 +289,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5387(); + o.locations = buildUnnamed4686(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -396,20 +299,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5387(o.locations); + checkUnnamed4686(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5388() { +buildUnnamed4687() { var o = new core.List<api.Queue>(); o.add(buildQueue()); o.add(buildQueue()); return o; } -checkUnnamed5388(core.List<api.Queue> o) { +checkUnnamed4687(core.List<api.Queue> o) { unittest.expect(o, unittest.hasLength(2)); checkQueue(o[0]); checkQueue(o[1]); @@ -421,7 +324,7 @@ buildCounterListQueuesResponse++; if (buildCounterListQueuesResponse < 3) { o.nextPageToken = "foo"; - o.queues = buildUnnamed5388(); + o.queues = buildUnnamed4687(); } buildCounterListQueuesResponse--; return o; @@ -431,19 +334,19 @@ buildCounterListQueuesResponse++; if (buildCounterListQueuesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5388(o.queues); + checkUnnamed4687(o.queues); } buildCounterListQueuesResponse--; } -buildUnnamed5389() { +buildUnnamed4688() { var o = new core.List<api.Task>(); o.add(buildTask()); o.add(buildTask()); return o; } -checkUnnamed5389(core.List<api.Task> o) { +checkUnnamed4688(core.List<api.Task> o) { unittest.expect(o, unittest.hasLength(2)); checkTask(o[0]); checkTask(o[1]); @@ -455,7 +358,7 @@ buildCounterListTasksResponse++; if (buildCounterListTasksResponse < 3) { o.nextPageToken = "foo"; - o.tasks = buildUnnamed5389(); + o.tasks = buildUnnamed4688(); } buildCounterListTasksResponse--; return o; @@ -465,25 +368,25 @@ buildCounterListTasksResponse++; if (buildCounterListTasksResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5389(o.tasks); + checkUnnamed4688(o.tasks); } buildCounterListTasksResponse--; } -buildUnnamed5390() { +buildUnnamed4689() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5390(core.Map<core.String, core.String> o) { +checkUnnamed4689(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5391() { +buildUnnamed4690() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -498,7 +401,7 @@ return o; } -checkUnnamed5391(core.Map<core.String, core.Object> o) { +checkUnnamed4690(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -518,9 +421,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5390(); + o.labels = buildUnnamed4689(); o.locationId = "foo"; - o.metadata = buildUnnamed5391(); + o.metadata = buildUnnamed4690(); o.name = "foo"; } buildCounterLocation--; @@ -531,9 +434,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5390(o.labels); + checkUnnamed4689(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5391(o.metadata); + checkUnnamed4690(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -554,14 +457,14 @@ buildCounterPauseQueueRequest--; } -buildUnnamed5392() { +buildUnnamed4691() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5392(core.List<api.Binding> o) { +checkUnnamed4691(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -572,7 +475,7 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.bindings = buildUnnamed5392(); + o.bindings = buildUnnamed4691(); o.etag = "foo"; o.version = 42; } @@ -583,49 +486,13 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5392(o.bindings); + checkUnnamed4691(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } buildCounterPolicy--; } -core.int buildCounterPullMessage = 0; -buildPullMessage() { - var o = new api.PullMessage(); - buildCounterPullMessage++; - if (buildCounterPullMessage < 3) { - o.payload = "foo"; - o.tag = "foo"; - } - buildCounterPullMessage--; - return o; -} - -checkPullMessage(api.PullMessage o) { - buildCounterPullMessage++; - if (buildCounterPullMessage < 3) { - unittest.expect(o.payload, unittest.equals('foo')); - unittest.expect(o.tag, unittest.equals('foo')); - } - buildCounterPullMessage--; -} - -core.int buildCounterPullTarget = 0; -buildPullTarget() { - var o = new api.PullTarget(); - buildCounterPullTarget++; - if (buildCounterPullTarget < 3) {} - buildCounterPullTarget--; - return o; -} - -checkPullTarget(api.PullTarget o) { - buildCounterPullTarget++; - if (buildCounterPullTarget < 3) {} - buildCounterPullTarget--; -} - core.int buildCounterPurgeQueueRequest = 0; buildPurgeQueueRequest() { var o = new api.PurgeQueueRequest(); @@ -646,9 +513,8 @@ var o = new api.Queue(); buildCounterQueue++; if (buildCounterQueue < 3) { - o.appEngineHttpTarget = buildAppEngineHttpTarget(); + o.appEngineHttpQueue = buildAppEngineHttpQueue(); o.name = "foo"; - o.pullTarget = buildPullTarget(); o.purgeTime = "foo"; o.rateLimits = buildRateLimits(); o.retryConfig = buildRetryConfig(); @@ -661,9 +527,8 @@ checkQueue(api.Queue o) { buildCounterQueue++; if (buildCounterQueue < 3) { - checkAppEngineHttpTarget(o.appEngineHttpTarget); + checkAppEngineHttpQueue(o.appEngineHttpQueue); unittest.expect(o.name, unittest.equals('foo')); - checkPullTarget(o.pullTarget); unittest.expect(o.purgeTime, unittest.equals('foo')); checkRateLimits(o.rateLimits); checkRetryConfig(o.retryConfig); @@ -678,8 +543,8 @@ buildCounterRateLimits++; if (buildCounterRateLimits < 3) { o.maxBurstSize = 42; - o.maxConcurrentTasks = 42; - o.maxTasksDispatchedPerSecond = 42.0; + o.maxConcurrentDispatches = 42; + o.maxDispatchesPerSecond = 42.0; } buildCounterRateLimits--; return o; @@ -689,35 +554,12 @@ buildCounterRateLimits++; if (buildCounterRateLimits < 3) { unittest.expect(o.maxBurstSize, unittest.equals(42)); - unittest.expect(o.maxConcurrentTasks, unittest.equals(42)); - unittest.expect(o.maxTasksDispatchedPerSecond, unittest.equals(42.0)); + unittest.expect(o.maxConcurrentDispatches, unittest.equals(42)); + unittest.expect(o.maxDispatchesPerSecond, unittest.equals(42.0)); } buildCounterRateLimits--; } -core.int buildCounterRenewLeaseRequest = 0; -buildRenewLeaseRequest() { - var o = new api.RenewLeaseRequest(); - buildCounterRenewLeaseRequest++; - if (buildCounterRenewLeaseRequest < 3) { - o.leaseDuration = "foo"; - o.responseView = "foo"; - o.scheduleTime = "foo"; - } - buildCounterRenewLeaseRequest--; - return o; -} - -checkRenewLeaseRequest(api.RenewLeaseRequest o) { - buildCounterRenewLeaseRequest++; - if (buildCounterRenewLeaseRequest < 3) { - unittest.expect(o.leaseDuration, unittest.equals('foo')); - unittest.expect(o.responseView, unittest.equals('foo')); - unittest.expect(o.scheduleTime, unittest.equals('foo')); - } - buildCounterRenewLeaseRequest--; -} - core.int buildCounterResumeQueueRequest = 0; buildResumeQueueRequest() { var o = new api.ResumeQueueRequest(); @@ -743,7 +585,6 @@ o.maxDoublings = 42; o.maxRetryDuration = "foo"; o.minBackoff = "foo"; - o.unlimitedAttempts = true; } buildCounterRetryConfig--; return o; @@ -757,7 +598,6 @@ unittest.expect(o.maxDoublings, unittest.equals(42)); unittest.expect(o.maxRetryDuration, unittest.equals('foo')); unittest.expect(o.minBackoff, unittest.equals('foo')); - unittest.expect(o.unlimitedAttempts, unittest.isTrue); } buildCounterRetryConfig--; } @@ -800,7 +640,7 @@ buildCounterSetIamPolicyRequest--; } -buildUnnamed5393() { +buildUnnamed4692() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -815,7 +655,7 @@ return o; } -checkUnnamed5393(core.Map<core.String, core.Object> o) { +checkUnnamed4692(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -829,17 +669,17 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5394() { +buildUnnamed4693() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5393()); - o.add(buildUnnamed5393()); + o.add(buildUnnamed4692()); + o.add(buildUnnamed4692()); return o; } -checkUnnamed5394(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4693(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5393(o[0]); - checkUnnamed5393(o[1]); + checkUnnamed4692(o[0]); + checkUnnamed4692(o[1]); } core.int buildCounterStatus = 0; @@ -848,7 +688,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5394(); + o.details = buildUnnamed4693(); o.message = "foo"; } buildCounterStatus--; @@ -859,7 +699,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5394(o.details); + checkUnnamed4693(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; @@ -872,10 +712,12 @@ if (buildCounterTask < 3) { o.appEngineHttpRequest = buildAppEngineHttpRequest(); o.createTime = "foo"; + o.dispatchCount = 42; + o.firstAttempt = buildAttempt(); + o.lastAttempt = buildAttempt(); o.name = "foo"; - o.pullMessage = buildPullMessage(); + o.responseCount = 42; o.scheduleTime = "foo"; - o.status = buildTaskStatus(); o.view = "foo"; } buildCounterTask--; @@ -887,48 +729,25 @@ if (buildCounterTask < 3) { checkAppEngineHttpRequest(o.appEngineHttpRequest); unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.dispatchCount, unittest.equals(42)); + checkAttempt(o.firstAttempt); + checkAttempt(o.lastAttempt); unittest.expect(o.name, unittest.equals('foo')); - checkPullMessage(o.pullMessage); + unittest.expect(o.responseCount, unittest.equals(42)); unittest.expect(o.scheduleTime, unittest.equals('foo')); - checkTaskStatus(o.status); unittest.expect(o.view, unittest.equals('foo')); } buildCounterTask--; } -core.int buildCounterTaskStatus = 0; -buildTaskStatus() { - var o = new api.TaskStatus(); - buildCounterTaskStatus++; - if (buildCounterTaskStatus < 3) { - o.attemptDispatchCount = 42; - o.attemptResponseCount = 42; - o.firstAttemptStatus = buildAttemptStatus(); - o.lastAttemptStatus = buildAttemptStatus(); - } - buildCounterTaskStatus--; - return o; -} - -checkTaskStatus(api.TaskStatus o) { - buildCounterTaskStatus++; - if (buildCounterTaskStatus < 3) { - unittest.expect(o.attemptDispatchCount, unittest.equals(42)); - unittest.expect(o.attemptResponseCount, unittest.equals(42)); - checkAttemptStatus(o.firstAttemptStatus); - checkAttemptStatus(o.lastAttemptStatus); - } - buildCounterTaskStatus--; -} - -buildUnnamed5395() { +buildUnnamed4694() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5395(core.List<core.String> o) { +checkUnnamed4694(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -939,7 +758,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5395(); + o.permissions = buildUnnamed4694(); } buildCounterTestIamPermissionsRequest--; return o; @@ -948,19 +767,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5395(o.permissions); + checkUnnamed4694(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5396() { +buildUnnamed4695() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5396(core.List<core.String> o) { +checkUnnamed4695(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -971,7 +790,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5396(); + o.permissions = buildUnnamed4695(); } buildCounterTestIamPermissionsResponse--; return o; @@ -980,17 +799,17 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5396(o.permissions); + checkUnnamed4695(o.permissions); } buildCounterTestIamPermissionsResponse--; } main() { - unittest.group("obj-schema-AcknowledgeTaskRequest", () { + unittest.group("obj-schema-AppEngineHttpQueue", () { unittest.test("to-json--from-json", () { - var o = buildAcknowledgeTaskRequest(); - var od = new api.AcknowledgeTaskRequest.fromJson(o.toJson()); - checkAcknowledgeTaskRequest(od); + var o = buildAppEngineHttpQueue(); + var od = new api.AppEngineHttpQueue.fromJson(o.toJson()); + checkAppEngineHttpQueue(od); }); }); @@ -1002,14 +821,6 @@ }); }); - unittest.group("obj-schema-AppEngineHttpTarget", () { - unittest.test("to-json--from-json", () { - var o = buildAppEngineHttpTarget(); - var od = new api.AppEngineHttpTarget.fromJson(o.toJson()); - checkAppEngineHttpTarget(od); - }); - }); - unittest.group("obj-schema-AppEngineRouting", () { unittest.test("to-json--from-json", () { var o = buildAppEngineRouting(); @@ -1018,11 +829,11 @@ }); }); - unittest.group("obj-schema-AttemptStatus", () { + unittest.group("obj-schema-Attempt", () { unittest.test("to-json--from-json", () { - var o = buildAttemptStatus(); - var od = new api.AttemptStatus.fromJson(o.toJson()); - checkAttemptStatus(od); + var o = buildAttempt(); + var od = new api.Attempt.fromJson(o.toJson()); + checkAttempt(od); }); }); @@ -1034,14 +845,6 @@ }); }); - unittest.group("obj-schema-CancelLeaseRequest", () { - unittest.test("to-json--from-json", () { - var o = buildCancelLeaseRequest(); - var od = new api.CancelLeaseRequest.fromJson(o.toJson()); - checkCancelLeaseRequest(od); - }); - }); - unittest.group("obj-schema-CreateTaskRequest", () { unittest.test("to-json--from-json", () { var o = buildCreateTaskRequest(); @@ -1074,22 +877,6 @@ }); }); - unittest.group("obj-schema-LeaseTasksRequest", () { - unittest.test("to-json--from-json", () { - var o = buildLeaseTasksRequest(); - var od = new api.LeaseTasksRequest.fromJson(o.toJson()); - checkLeaseTasksRequest(od); - }); - }); - - unittest.group("obj-schema-LeaseTasksResponse", () { - unittest.test("to-json--from-json", () { - var o = buildLeaseTasksResponse(); - var od = new api.LeaseTasksResponse.fromJson(o.toJson()); - checkLeaseTasksResponse(od); - }); - }); - unittest.group("obj-schema-ListLocationsResponse", () { unittest.test("to-json--from-json", () { var o = buildListLocationsResponse(); @@ -1138,22 +925,6 @@ }); }); - unittest.group("obj-schema-PullMessage", () { - unittest.test("to-json--from-json", () { - var o = buildPullMessage(); - var od = new api.PullMessage.fromJson(o.toJson()); - checkPullMessage(od); - }); - }); - - unittest.group("obj-schema-PullTarget", () { - unittest.test("to-json--from-json", () { - var o = buildPullTarget(); - var od = new api.PullTarget.fromJson(o.toJson()); - checkPullTarget(od); - }); - }); - unittest.group("obj-schema-PurgeQueueRequest", () { unittest.test("to-json--from-json", () { var o = buildPurgeQueueRequest(); @@ -1178,14 +949,6 @@ }); }); - unittest.group("obj-schema-RenewLeaseRequest", () { - unittest.test("to-json--from-json", () { - var o = buildRenewLeaseRequest(); - var od = new api.RenewLeaseRequest.fromJson(o.toJson()); - checkRenewLeaseRequest(od); - }); - }); - unittest.group("obj-schema-ResumeQueueRequest", () { unittest.test("to-json--from-json", () { var o = buildResumeQueueRequest(); @@ -1234,14 +997,6 @@ }); }); - unittest.group("obj-schema-TaskStatus", () { - unittest.test("to-json--from-json", () { - var o = buildTaskStatus(); - var od = new api.TaskStatus.fromJson(o.toJson()); - checkTaskStatus(od); - }); - }); - unittest.group("obj-schema-TestIamPermissionsRequest", () { unittest.test("to-json--from-json", () { var o = buildTestIamPermissionsRequest(); @@ -1274,7 +1029,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1316,9 +1071,9 @@ api.ProjectsLocationsResourceApi res = new api.CloudtasksApi(mock).projects.locations; var arg_name = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1329,7 +1084,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1351,11 +1106,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1366,9 +1121,9 @@ }), true); res .list(arg_name, + pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -1396,7 +1151,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1448,7 +1203,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1500,7 +1255,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1556,7 +1311,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1611,7 +1366,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1677,7 +1432,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1736,7 +1491,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1792,7 +1547,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1848,7 +1603,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1904,7 +1659,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1960,7 +1715,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1999,118 +1754,6 @@ }); unittest.group("resource-ProjectsLocationsQueuesTasksResourceApi", () { - unittest.test("method--acknowledge", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsQueuesTasksResourceApi res = - new api.CloudtasksApi(mock).projects.locations.queues.tasks; - var arg_request = buildAcknowledgeTaskRequest(); - var arg_name = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.AcknowledgeTaskRequest.fromJson(json); - checkAcknowledgeTaskRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildEmpty()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .acknowledge(arg_request, arg_name, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkEmpty(response); - }))); - }); - - unittest.test("method--cancelLease", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsQueuesTasksResourceApi res = - new api.CloudtasksApi(mock).projects.locations.queues.tasks; - var arg_request = buildCancelLeaseRequest(); - var arg_name = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.CancelLeaseRequest.fromJson(json); - checkCancelLeaseRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTask()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .cancelLease(arg_request, arg_name, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTask(response); - }))); - }); - unittest.test("method--create", () { var mock = new HttpServerMock(); api.ProjectsLocationsQueuesTasksResourceApi res = @@ -2130,7 +1773,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -2182,7 +1825,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -2235,7 +1878,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -2274,70 +1917,14 @@ }))); }); - unittest.test("method--lease", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsQueuesTasksResourceApi res = - new api.CloudtasksApi(mock).projects.locations.queues.tasks; - var arg_request = buildLeaseTasksRequest(); - var arg_parent = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.LeaseTasksRequest.fromJson(json); - checkLeaseTasksRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildLeaseTasksResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .lease(arg_request, arg_parent, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkLeaseTasksResponse(response); - }))); - }); - unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsQueuesTasksResourceApi res = new api.CloudtasksApi(mock).projects.locations.queues.tasks; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_responseView = "foo"; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -2348,7 +1935,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -2370,12 +1957,12 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["responseView"].first, unittest.equals(arg_responseView)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -2386,71 +1973,15 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, responseView: arg_responseView, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListTasksResponse(response); }))); }); - unittest.test("method--renewLease", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsQueuesTasksResourceApi res = - new api.CloudtasksApi(mock).projects.locations.queues.tasks; - var arg_request = buildRenewLeaseRequest(); - var arg_name = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.RenewLeaseRequest.fromJson(json); - checkRenewLeaseRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTask()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .renewLease(arg_request, arg_name, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTask(response); - }))); - }); - unittest.test("method--run", () { var mock = new HttpServerMock(); api.ProjectsLocationsQueuesTasksResourceApi res = @@ -2470,7 +2001,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
diff --git a/generated/googleapis_beta/test/containeranalysis/v1beta1_test.dart b/generated/googleapis_beta/test/containeranalysis/v1beta1_test.dart new file mode 100644 index 0000000..1036f6f --- /dev/null +++ b/generated/googleapis_beta/test/containeranalysis/v1beta1_test.dart
@@ -0,0 +1,4232 @@ +library googleapis_beta.containeranalysis.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/containeranalysis/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAliasContext = 0; +buildAliasContext() { + var o = new api.AliasContext(); + buildCounterAliasContext++; + if (buildCounterAliasContext < 3) { + o.kind = "foo"; + o.name = "foo"; + } + buildCounterAliasContext--; + return o; +} + +checkAliasContext(api.AliasContext o) { + buildCounterAliasContext++; + if (buildCounterAliasContext < 3) { + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterAliasContext--; +} + +buildUnnamed4454() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4454(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterArtifact = 0; +buildArtifact() { + var o = new api.Artifact(); + buildCounterArtifact++; + if (buildCounterArtifact < 3) { + o.checksum = "foo"; + o.id = "foo"; + o.names = buildUnnamed4454(); + } + buildCounterArtifact--; + return o; +} + +checkArtifact(api.Artifact o) { + buildCounterArtifact++; + if (buildCounterArtifact < 3) { + unittest.expect(o.checksum, unittest.equals('foo')); + unittest.expect(o.id, unittest.equals('foo')); + checkUnnamed4454(o.names); + } + buildCounterArtifact--; +} + +core.int buildCounterAttestation = 0; +buildAttestation() { + var o = new api.Attestation(); + buildCounterAttestation++; + if (buildCounterAttestation < 3) { + o.pgpSignedAttestation = buildPgpSignedAttestation(); + } + buildCounterAttestation--; + return o; +} + +checkAttestation(api.Attestation o) { + buildCounterAttestation++; + if (buildCounterAttestation < 3) { + checkPgpSignedAttestation(o.pgpSignedAttestation); + } + buildCounterAttestation--; +} + +buildUnnamed4455() { + var o = new core.List<api.AuditLogConfig>(); + o.add(buildAuditLogConfig()); + o.add(buildAuditLogConfig()); + return o; +} + +checkUnnamed4455(core.List<api.AuditLogConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuditLogConfig(o[0]); + checkAuditLogConfig(o[1]); +} + +core.int buildCounterAuditConfig = 0; +buildAuditConfig() { + var o = new api.AuditConfig(); + buildCounterAuditConfig++; + if (buildCounterAuditConfig < 3) { + o.auditLogConfigs = buildUnnamed4455(); + o.service = "foo"; + } + buildCounterAuditConfig--; + return o; +} + +checkAuditConfig(api.AuditConfig o) { + buildCounterAuditConfig++; + if (buildCounterAuditConfig < 3) { + checkUnnamed4455(o.auditLogConfigs); + unittest.expect(o.service, unittest.equals('foo')); + } + buildCounterAuditConfig--; +} + +buildUnnamed4456() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4456(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterAuditLogConfig = 0; +buildAuditLogConfig() { + var o = new api.AuditLogConfig(); + buildCounterAuditLogConfig++; + if (buildCounterAuditLogConfig < 3) { + o.exemptedMembers = buildUnnamed4456(); + o.logType = "foo"; + } + buildCounterAuditLogConfig--; + return o; +} + +checkAuditLogConfig(api.AuditLogConfig o) { + buildCounterAuditLogConfig++; + if (buildCounterAuditLogConfig < 3) { + checkUnnamed4456(o.exemptedMembers); + unittest.expect(o.logType, unittest.equals('foo')); + } + buildCounterAuditLogConfig--; +} + +core.int buildCounterAuthority = 0; +buildAuthority() { + var o = new api.Authority(); + buildCounterAuthority++; + if (buildCounterAuthority < 3) { + o.hint = buildHint(); + } + buildCounterAuthority--; + return o; +} + +checkAuthority(api.Authority o) { + buildCounterAuthority++; + if (buildCounterAuthority < 3) { + checkHint(o.hint); + } + buildCounterAuthority--; +} + +core.int buildCounterBasis = 0; +buildBasis() { + var o = new api.Basis(); + buildCounterBasis++; + if (buildCounterBasis < 3) { + o.fingerprint = buildFingerprint(); + o.resourceUrl = "foo"; + } + buildCounterBasis--; + return o; +} + +checkBasis(api.Basis o) { + buildCounterBasis++; + if (buildCounterBasis < 3) { + checkFingerprint(o.fingerprint); + unittest.expect(o.resourceUrl, unittest.equals('foo')); + } + buildCounterBasis--; +} + +buildUnnamed4457() { + var o = new core.Map<core.String, api.Note>(); + o["x"] = buildNote(); + o["y"] = buildNote(); + return o; +} + +checkUnnamed4457(core.Map<core.String, api.Note> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNote(o["x"]); + checkNote(o["y"]); +} + +core.int buildCounterBatchCreateNotesRequest = 0; +buildBatchCreateNotesRequest() { + var o = new api.BatchCreateNotesRequest(); + buildCounterBatchCreateNotesRequest++; + if (buildCounterBatchCreateNotesRequest < 3) { + o.notes = buildUnnamed4457(); + } + buildCounterBatchCreateNotesRequest--; + return o; +} + +checkBatchCreateNotesRequest(api.BatchCreateNotesRequest o) { + buildCounterBatchCreateNotesRequest++; + if (buildCounterBatchCreateNotesRequest < 3) { + checkUnnamed4457(o.notes); + } + buildCounterBatchCreateNotesRequest--; +} + +buildUnnamed4458() { + var o = new core.List<api.Note>(); + o.add(buildNote()); + o.add(buildNote()); + return o; +} + +checkUnnamed4458(core.List<api.Note> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNote(o[0]); + checkNote(o[1]); +} + +core.int buildCounterBatchCreateNotesResponse = 0; +buildBatchCreateNotesResponse() { + var o = new api.BatchCreateNotesResponse(); + buildCounterBatchCreateNotesResponse++; + if (buildCounterBatchCreateNotesResponse < 3) { + o.notes = buildUnnamed4458(); + } + buildCounterBatchCreateNotesResponse--; + return o; +} + +checkBatchCreateNotesResponse(api.BatchCreateNotesResponse o) { + buildCounterBatchCreateNotesResponse++; + if (buildCounterBatchCreateNotesResponse < 3) { + checkUnnamed4458(o.notes); + } + buildCounterBatchCreateNotesResponse--; +} + +buildUnnamed4459() { + var o = new core.List<api.Occurrence>(); + o.add(buildOccurrence()); + o.add(buildOccurrence()); + return o; +} + +checkUnnamed4459(core.List<api.Occurrence> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOccurrence(o[0]); + checkOccurrence(o[1]); +} + +core.int buildCounterBatchCreateOccurrencesRequest = 0; +buildBatchCreateOccurrencesRequest() { + var o = new api.BatchCreateOccurrencesRequest(); + buildCounterBatchCreateOccurrencesRequest++; + if (buildCounterBatchCreateOccurrencesRequest < 3) { + o.occurrences = buildUnnamed4459(); + } + buildCounterBatchCreateOccurrencesRequest--; + return o; +} + +checkBatchCreateOccurrencesRequest(api.BatchCreateOccurrencesRequest o) { + buildCounterBatchCreateOccurrencesRequest++; + if (buildCounterBatchCreateOccurrencesRequest < 3) { + checkUnnamed4459(o.occurrences); + } + buildCounterBatchCreateOccurrencesRequest--; +} + +buildUnnamed4460() { + var o = new core.List<api.Occurrence>(); + o.add(buildOccurrence()); + o.add(buildOccurrence()); + return o; +} + +checkUnnamed4460(core.List<api.Occurrence> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOccurrence(o[0]); + checkOccurrence(o[1]); +} + +core.int buildCounterBatchCreateOccurrencesResponse = 0; +buildBatchCreateOccurrencesResponse() { + var o = new api.BatchCreateOccurrencesResponse(); + buildCounterBatchCreateOccurrencesResponse++; + if (buildCounterBatchCreateOccurrencesResponse < 3) { + o.occurrences = buildUnnamed4460(); + } + buildCounterBatchCreateOccurrencesResponse--; + return o; +} + +checkBatchCreateOccurrencesResponse(api.BatchCreateOccurrencesResponse o) { + buildCounterBatchCreateOccurrencesResponse++; + if (buildCounterBatchCreateOccurrencesResponse < 3) { + checkUnnamed4460(o.occurrences); + } + buildCounterBatchCreateOccurrencesResponse--; +} + +buildUnnamed4461() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4461(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterBinding = 0; +buildBinding() { + var o = new api.Binding(); + buildCounterBinding++; + if (buildCounterBinding < 3) { + o.condition = buildExpr(); + o.members = buildUnnamed4461(); + o.role = "foo"; + } + buildCounterBinding--; + return o; +} + +checkBinding(api.Binding o) { + buildCounterBinding++; + if (buildCounterBinding < 3) { + checkExpr(o.condition); + checkUnnamed4461(o.members); + unittest.expect(o.role, unittest.equals('foo')); + } + buildCounterBinding--; +} + +core.int buildCounterBuild = 0; +buildBuild() { + var o = new api.Build(); + buildCounterBuild++; + if (buildCounterBuild < 3) { + o.builderVersion = "foo"; + o.signature = buildBuildSignature(); + } + buildCounterBuild--; + return o; +} + +checkBuild(api.Build o) { + buildCounterBuild++; + if (buildCounterBuild < 3) { + unittest.expect(o.builderVersion, unittest.equals('foo')); + checkBuildSignature(o.signature); + } + buildCounterBuild--; +} + +buildUnnamed4462() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4462(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +buildUnnamed4463() { + var o = new core.List<api.Artifact>(); + o.add(buildArtifact()); + o.add(buildArtifact()); + return o; +} + +checkUnnamed4463(core.List<api.Artifact> o) { + unittest.expect(o, unittest.hasLength(2)); + checkArtifact(o[0]); + checkArtifact(o[1]); +} + +buildUnnamed4464() { + var o = new core.List<api.Command>(); + o.add(buildCommand()); + o.add(buildCommand()); + return o; +} + +checkUnnamed4464(core.List<api.Command> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCommand(o[0]); + checkCommand(o[1]); +} + +core.int buildCounterBuildProvenance = 0; +buildBuildProvenance() { + var o = new api.BuildProvenance(); + buildCounterBuildProvenance++; + if (buildCounterBuildProvenance < 3) { + o.buildOptions = buildUnnamed4462(); + o.builderVersion = "foo"; + o.builtArtifacts = buildUnnamed4463(); + o.commands = buildUnnamed4464(); + o.createTime = "foo"; + o.creator = "foo"; + o.endTime = "foo"; + o.id = "foo"; + o.logsUri = "foo"; + o.projectId = "foo"; + o.sourceProvenance = buildSource(); + o.startTime = "foo"; + o.triggerId = "foo"; + } + buildCounterBuildProvenance--; + return o; +} + +checkBuildProvenance(api.BuildProvenance o) { + buildCounterBuildProvenance++; + if (buildCounterBuildProvenance < 3) { + checkUnnamed4462(o.buildOptions); + unittest.expect(o.builderVersion, unittest.equals('foo')); + checkUnnamed4463(o.builtArtifacts); + checkUnnamed4464(o.commands); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.creator, unittest.equals('foo')); + unittest.expect(o.endTime, unittest.equals('foo')); + unittest.expect(o.id, unittest.equals('foo')); + unittest.expect(o.logsUri, unittest.equals('foo')); + unittest.expect(o.projectId, unittest.equals('foo')); + checkSource(o.sourceProvenance); + unittest.expect(o.startTime, unittest.equals('foo')); + unittest.expect(o.triggerId, unittest.equals('foo')); + } + buildCounterBuildProvenance--; +} + +core.int buildCounterBuildSignature = 0; +buildBuildSignature() { + var o = new api.BuildSignature(); + buildCounterBuildSignature++; + if (buildCounterBuildSignature < 3) { + o.keyId = "foo"; + o.keyType = "foo"; + o.publicKey = "foo"; + o.signature = "foo"; + } + buildCounterBuildSignature--; + return o; +} + +checkBuildSignature(api.BuildSignature o) { + buildCounterBuildSignature++; + if (buildCounterBuildSignature < 3) { + unittest.expect(o.keyId, unittest.equals('foo')); + unittest.expect(o.keyType, unittest.equals('foo')); + unittest.expect(o.publicKey, unittest.equals('foo')); + unittest.expect(o.signature, unittest.equals('foo')); + } + buildCounterBuildSignature--; +} + +core.int buildCounterCloudRepoSourceContext = 0; +buildCloudRepoSourceContext() { + var o = new api.CloudRepoSourceContext(); + buildCounterCloudRepoSourceContext++; + if (buildCounterCloudRepoSourceContext < 3) { + o.aliasContext = buildAliasContext(); + o.repoId = buildRepoId(); + o.revisionId = "foo"; + } + buildCounterCloudRepoSourceContext--; + return o; +} + +checkCloudRepoSourceContext(api.CloudRepoSourceContext o) { + buildCounterCloudRepoSourceContext++; + if (buildCounterCloudRepoSourceContext < 3) { + checkAliasContext(o.aliasContext); + checkRepoId(o.repoId); + unittest.expect(o.revisionId, unittest.equals('foo')); + } + buildCounterCloudRepoSourceContext--; +} + +buildUnnamed4465() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4465(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4466() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4466(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4467() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4467(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCommand = 0; +buildCommand() { + var o = new api.Command(); + buildCounterCommand++; + if (buildCounterCommand < 3) { + o.args = buildUnnamed4465(); + o.dir = "foo"; + o.env = buildUnnamed4466(); + o.id = "foo"; + o.name = "foo"; + o.waitFor = buildUnnamed4467(); + } + buildCounterCommand--; + return o; +} + +checkCommand(api.Command o) { + buildCounterCommand++; + if (buildCounterCommand < 3) { + checkUnnamed4465(o.args); + unittest.expect(o.dir, unittest.equals('foo')); + checkUnnamed4466(o.env); + unittest.expect(o.id, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4467(o.waitFor); + } + buildCounterCommand--; +} + +buildUnnamed4468() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4468(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterDeployable = 0; +buildDeployable() { + var o = new api.Deployable(); + buildCounterDeployable++; + if (buildCounterDeployable < 3) { + o.resourceUri = buildUnnamed4468(); + } + buildCounterDeployable--; + return o; +} + +checkDeployable(api.Deployable o) { + buildCounterDeployable++; + if (buildCounterDeployable < 3) { + checkUnnamed4468(o.resourceUri); + } + buildCounterDeployable--; +} + +buildUnnamed4469() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4469(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterDeployment = 0; +buildDeployment() { + var o = new api.Deployment(); + buildCounterDeployment++; + if (buildCounterDeployment < 3) { + o.address = "foo"; + o.config = "foo"; + o.deployTime = "foo"; + o.platform = "foo"; + o.resourceUri = buildUnnamed4469(); + o.undeployTime = "foo"; + o.userEmail = "foo"; + } + buildCounterDeployment--; + return o; +} + +checkDeployment(api.Deployment o) { + buildCounterDeployment++; + if (buildCounterDeployment < 3) { + unittest.expect(o.address, unittest.equals('foo')); + unittest.expect(o.config, unittest.equals('foo')); + unittest.expect(o.deployTime, unittest.equals('foo')); + unittest.expect(o.platform, unittest.equals('foo')); + checkUnnamed4469(o.resourceUri); + unittest.expect(o.undeployTime, unittest.equals('foo')); + unittest.expect(o.userEmail, unittest.equals('foo')); + } + buildCounterDeployment--; +} + +buildUnnamed4470() { + var o = new core.List<api.Layer>(); + o.add(buildLayer()); + o.add(buildLayer()); + return o; +} + +checkUnnamed4470(core.List<api.Layer> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLayer(o[0]); + checkLayer(o[1]); +} + +core.int buildCounterDerived = 0; +buildDerived() { + var o = new api.Derived(); + buildCounterDerived++; + if (buildCounterDerived < 3) { + o.baseResourceUrl = "foo"; + o.distance = 42; + o.fingerprint = buildFingerprint(); + o.layerInfo = buildUnnamed4470(); + } + buildCounterDerived--; + return o; +} + +checkDerived(api.Derived o) { + buildCounterDerived++; + if (buildCounterDerived < 3) { + unittest.expect(o.baseResourceUrl, unittest.equals('foo')); + unittest.expect(o.distance, unittest.equals(42)); + checkFingerprint(o.fingerprint); + checkUnnamed4470(o.layerInfo); + } + buildCounterDerived--; +} + +core.int buildCounterDetail = 0; +buildDetail() { + var o = new api.Detail(); + buildCounterDetail++; + if (buildCounterDetail < 3) { + o.cpeUri = "foo"; + o.description = "foo"; + o.fixedLocation = buildVulnerabilityLocation(); + o.isObsolete = true; + o.maxAffectedVersion = buildVersion(); + o.minAffectedVersion = buildVersion(); + o.package = "foo"; + o.packageType = "foo"; + o.severityName = "foo"; + } + buildCounterDetail--; + return o; +} + +checkDetail(api.Detail o) { + buildCounterDetail++; + if (buildCounterDetail < 3) { + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + checkVulnerabilityLocation(o.fixedLocation); + unittest.expect(o.isObsolete, unittest.isTrue); + checkVersion(o.maxAffectedVersion); + checkVersion(o.minAffectedVersion); + unittest.expect(o.package, unittest.equals('foo')); + unittest.expect(o.packageType, unittest.equals('foo')); + unittest.expect(o.severityName, unittest.equals('foo')); + } + buildCounterDetail--; +} + +core.int buildCounterDetails = 0; +buildDetails() { + var o = new api.Details(); + buildCounterDetails++; + if (buildCounterDetails < 3) { + o.attestation = buildAttestation(); + } + buildCounterDetails--; + return o; +} + +checkDetails(api.Details o) { + buildCounterDetails++; + if (buildCounterDetails < 3) { + checkAttestation(o.attestation); + } + buildCounterDetails--; +} + +core.int buildCounterDiscovered = 0; +buildDiscovered() { + var o = new api.Discovered(); + buildCounterDiscovered++; + if (buildCounterDiscovered < 3) { + o.analysisStatus = "foo"; + o.analysisStatusError = buildStatus(); + o.continuousAnalysis = "foo"; + o.lastAnalysisTime = "foo"; + } + buildCounterDiscovered--; + return o; +} + +checkDiscovered(api.Discovered o) { + buildCounterDiscovered++; + if (buildCounterDiscovered < 3) { + unittest.expect(o.analysisStatus, unittest.equals('foo')); + checkStatus(o.analysisStatusError); + unittest.expect(o.continuousAnalysis, unittest.equals('foo')); + unittest.expect(o.lastAnalysisTime, unittest.equals('foo')); + } + buildCounterDiscovered--; +} + +core.int buildCounterDiscovery = 0; +buildDiscovery() { + var o = new api.Discovery(); + buildCounterDiscovery++; + if (buildCounterDiscovery < 3) { + o.analysisKind = "foo"; + } + buildCounterDiscovery--; + return o; +} + +checkDiscovery(api.Discovery o) { + buildCounterDiscovery++; + if (buildCounterDiscovery < 3) { + unittest.expect(o.analysisKind, unittest.equals('foo')); + } + buildCounterDiscovery--; +} + +core.int buildCounterDistribution = 0; +buildDistribution() { + var o = new api.Distribution(); + buildCounterDistribution++; + if (buildCounterDistribution < 3) { + o.architecture = "foo"; + o.cpeUri = "foo"; + o.description = "foo"; + o.latestVersion = buildVersion(); + o.maintainer = "foo"; + o.url = "foo"; + } + buildCounterDistribution--; + return o; +} + +checkDistribution(api.Distribution o) { + buildCounterDistribution++; + if (buildCounterDistribution < 3) { + unittest.expect(o.architecture, unittest.equals('foo')); + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + checkVersion(o.latestVersion); + unittest.expect(o.maintainer, unittest.equals('foo')); + unittest.expect(o.url, unittest.equals('foo')); + } + buildCounterDistribution--; +} + +core.int buildCounterEmpty = 0; +buildEmpty() { + var o = new api.Empty(); + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; + return o; +} + +checkEmpty(api.Empty o) { + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; +} + +core.int buildCounterExpr = 0; +buildExpr() { + var o = new api.Expr(); + buildCounterExpr++; + if (buildCounterExpr < 3) { + o.description = "foo"; + o.expression = "foo"; + o.location = "foo"; + o.title = "foo"; + } + buildCounterExpr--; + return o; +} + +checkExpr(api.Expr o) { + buildCounterExpr++; + if (buildCounterExpr < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.expression, unittest.equals('foo')); + unittest.expect(o.location, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + } + buildCounterExpr--; +} + +buildUnnamed4471() { + var o = new core.List<api.Hash>(); + o.add(buildHash()); + o.add(buildHash()); + return o; +} + +checkUnnamed4471(core.List<api.Hash> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHash(o[0]); + checkHash(o[1]); +} + +core.int buildCounterFileHashes = 0; +buildFileHashes() { + var o = new api.FileHashes(); + buildCounterFileHashes++; + if (buildCounterFileHashes < 3) { + o.fileHash = buildUnnamed4471(); + } + buildCounterFileHashes--; + return o; +} + +checkFileHashes(api.FileHashes o) { + buildCounterFileHashes++; + if (buildCounterFileHashes < 3) { + checkUnnamed4471(o.fileHash); + } + buildCounterFileHashes--; +} + +buildUnnamed4472() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4472(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterFingerprint = 0; +buildFingerprint() { + var o = new api.Fingerprint(); + buildCounterFingerprint++; + if (buildCounterFingerprint < 3) { + o.v1Name = "foo"; + o.v2Blob = buildUnnamed4472(); + o.v2Name = "foo"; + } + buildCounterFingerprint--; + return o; +} + +checkFingerprint(api.Fingerprint o) { + buildCounterFingerprint++; + if (buildCounterFingerprint < 3) { + unittest.expect(o.v1Name, unittest.equals('foo')); + checkUnnamed4472(o.v2Blob); + unittest.expect(o.v2Name, unittest.equals('foo')); + } + buildCounterFingerprint--; +} + +core.int buildCounterFixableTotalByDigest = 0; +buildFixableTotalByDigest() { + var o = new api.FixableTotalByDigest(); + buildCounterFixableTotalByDigest++; + if (buildCounterFixableTotalByDigest < 3) { + o.fixableCount = "foo"; + o.resource = buildResource(); + o.severity = "foo"; + o.totalCount = "foo"; + } + buildCounterFixableTotalByDigest--; + return o; +} + +checkFixableTotalByDigest(api.FixableTotalByDigest o) { + buildCounterFixableTotalByDigest++; + if (buildCounterFixableTotalByDigest < 3) { + unittest.expect(o.fixableCount, unittest.equals('foo')); + checkResource(o.resource); + unittest.expect(o.severity, unittest.equals('foo')); + unittest.expect(o.totalCount, unittest.equals('foo')); + } + buildCounterFixableTotalByDigest--; +} + +core.int buildCounterGerritSourceContext = 0; +buildGerritSourceContext() { + var o = new api.GerritSourceContext(); + buildCounterGerritSourceContext++; + if (buildCounterGerritSourceContext < 3) { + o.aliasContext = buildAliasContext(); + o.gerritProject = "foo"; + o.hostUri = "foo"; + o.revisionId = "foo"; + } + buildCounterGerritSourceContext--; + return o; +} + +checkGerritSourceContext(api.GerritSourceContext o) { + buildCounterGerritSourceContext++; + if (buildCounterGerritSourceContext < 3) { + checkAliasContext(o.aliasContext); + unittest.expect(o.gerritProject, unittest.equals('foo')); + unittest.expect(o.hostUri, unittest.equals('foo')); + unittest.expect(o.revisionId, unittest.equals('foo')); + } + buildCounterGerritSourceContext--; +} + +core.int buildCounterGetIamPolicyRequest = 0; +buildGetIamPolicyRequest() { + var o = new api.GetIamPolicyRequest(); + buildCounterGetIamPolicyRequest++; + if (buildCounterGetIamPolicyRequest < 3) {} + buildCounterGetIamPolicyRequest--; + return o; +} + +checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { + buildCounterGetIamPolicyRequest++; + if (buildCounterGetIamPolicyRequest < 3) {} + buildCounterGetIamPolicyRequest--; +} + +core.int buildCounterGitSourceContext = 0; +buildGitSourceContext() { + var o = new api.GitSourceContext(); + buildCounterGitSourceContext++; + if (buildCounterGitSourceContext < 3) { + o.revisionId = "foo"; + o.url = "foo"; + } + buildCounterGitSourceContext--; + return o; +} + +checkGitSourceContext(api.GitSourceContext o) { + buildCounterGitSourceContext++; + if (buildCounterGitSourceContext < 3) { + unittest.expect(o.revisionId, unittest.equals('foo')); + unittest.expect(o.url, unittest.equals('foo')); + } + buildCounterGitSourceContext--; +} + +core.int buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata = + 0; +buildGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata() { + var o = new api.GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata(); + buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata++; + if (buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata < + 3) { + o.createTime = "foo"; + o.endTime = "foo"; + } + buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata--; + return o; +} + +checkGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata( + api.GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata o) { + buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata++; + if (buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata < + 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.endTime, unittest.equals('foo')); + } + buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata--; +} + +core.int buildCounterGrafeasV1beta1BuildDetails = 0; +buildGrafeasV1beta1BuildDetails() { + var o = new api.GrafeasV1beta1BuildDetails(); + buildCounterGrafeasV1beta1BuildDetails++; + if (buildCounterGrafeasV1beta1BuildDetails < 3) { + o.provenance = buildBuildProvenance(); + o.provenanceBytes = "foo"; + } + buildCounterGrafeasV1beta1BuildDetails--; + return o; +} + +checkGrafeasV1beta1BuildDetails(api.GrafeasV1beta1BuildDetails o) { + buildCounterGrafeasV1beta1BuildDetails++; + if (buildCounterGrafeasV1beta1BuildDetails < 3) { + checkBuildProvenance(o.provenance); + unittest.expect(o.provenanceBytes, unittest.equals('foo')); + } + buildCounterGrafeasV1beta1BuildDetails--; +} + +core.int buildCounterGrafeasV1beta1DeploymentDetails = 0; +buildGrafeasV1beta1DeploymentDetails() { + var o = new api.GrafeasV1beta1DeploymentDetails(); + buildCounterGrafeasV1beta1DeploymentDetails++; + if (buildCounterGrafeasV1beta1DeploymentDetails < 3) { + o.deployment = buildDeployment(); + } + buildCounterGrafeasV1beta1DeploymentDetails--; + return o; +} + +checkGrafeasV1beta1DeploymentDetails(api.GrafeasV1beta1DeploymentDetails o) { + buildCounterGrafeasV1beta1DeploymentDetails++; + if (buildCounterGrafeasV1beta1DeploymentDetails < 3) { + checkDeployment(o.deployment); + } + buildCounterGrafeasV1beta1DeploymentDetails--; +} + +core.int buildCounterGrafeasV1beta1DiscoveryDetails = 0; +buildGrafeasV1beta1DiscoveryDetails() { + var o = new api.GrafeasV1beta1DiscoveryDetails(); + buildCounterGrafeasV1beta1DiscoveryDetails++; + if (buildCounterGrafeasV1beta1DiscoveryDetails < 3) { + o.discovered = buildDiscovered(); + } + buildCounterGrafeasV1beta1DiscoveryDetails--; + return o; +} + +checkGrafeasV1beta1DiscoveryDetails(api.GrafeasV1beta1DiscoveryDetails o) { + buildCounterGrafeasV1beta1DiscoveryDetails++; + if (buildCounterGrafeasV1beta1DiscoveryDetails < 3) { + checkDiscovered(o.discovered); + } + buildCounterGrafeasV1beta1DiscoveryDetails--; +} + +core.int buildCounterGrafeasV1beta1ImageDetails = 0; +buildGrafeasV1beta1ImageDetails() { + var o = new api.GrafeasV1beta1ImageDetails(); + buildCounterGrafeasV1beta1ImageDetails++; + if (buildCounterGrafeasV1beta1ImageDetails < 3) { + o.derivedImage = buildDerived(); + } + buildCounterGrafeasV1beta1ImageDetails--; + return o; +} + +checkGrafeasV1beta1ImageDetails(api.GrafeasV1beta1ImageDetails o) { + buildCounterGrafeasV1beta1ImageDetails++; + if (buildCounterGrafeasV1beta1ImageDetails < 3) { + checkDerived(o.derivedImage); + } + buildCounterGrafeasV1beta1ImageDetails--; +} + +core.int buildCounterGrafeasV1beta1PackageDetails = 0; +buildGrafeasV1beta1PackageDetails() { + var o = new api.GrafeasV1beta1PackageDetails(); + buildCounterGrafeasV1beta1PackageDetails++; + if (buildCounterGrafeasV1beta1PackageDetails < 3) { + o.installation = buildInstallation(); + } + buildCounterGrafeasV1beta1PackageDetails--; + return o; +} + +checkGrafeasV1beta1PackageDetails(api.GrafeasV1beta1PackageDetails o) { + buildCounterGrafeasV1beta1PackageDetails++; + if (buildCounterGrafeasV1beta1PackageDetails < 3) { + checkInstallation(o.installation); + } + buildCounterGrafeasV1beta1PackageDetails--; +} + +buildUnnamed4473() { + var o = new core.List<api.PackageIssue>(); + o.add(buildPackageIssue()); + o.add(buildPackageIssue()); + return o; +} + +checkUnnamed4473(core.List<api.PackageIssue> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPackageIssue(o[0]); + checkPackageIssue(o[1]); +} + +buildUnnamed4474() { + var o = new core.List<api.RelatedUrl>(); + o.add(buildRelatedUrl()); + o.add(buildRelatedUrl()); + return o; +} + +checkUnnamed4474(core.List<api.RelatedUrl> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRelatedUrl(o[0]); + checkRelatedUrl(o[1]); +} + +core.int buildCounterGrafeasV1beta1VulnerabilityDetails = 0; +buildGrafeasV1beta1VulnerabilityDetails() { + var o = new api.GrafeasV1beta1VulnerabilityDetails(); + buildCounterGrafeasV1beta1VulnerabilityDetails++; + if (buildCounterGrafeasV1beta1VulnerabilityDetails < 3) { + o.cvssScore = 42.0; + o.longDescription = "foo"; + o.packageIssue = buildUnnamed4473(); + o.relatedUrls = buildUnnamed4474(); + o.severity = "foo"; + o.shortDescription = "foo"; + o.type = "foo"; + } + buildCounterGrafeasV1beta1VulnerabilityDetails--; + return o; +} + +checkGrafeasV1beta1VulnerabilityDetails( + api.GrafeasV1beta1VulnerabilityDetails o) { + buildCounterGrafeasV1beta1VulnerabilityDetails++; + if (buildCounterGrafeasV1beta1VulnerabilityDetails < 3) { + unittest.expect(o.cvssScore, unittest.equals(42.0)); + unittest.expect(o.longDescription, unittest.equals('foo')); + checkUnnamed4473(o.packageIssue); + checkUnnamed4474(o.relatedUrls); + unittest.expect(o.severity, unittest.equals('foo')); + unittest.expect(o.shortDescription, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterGrafeasV1beta1VulnerabilityDetails--; +} + +core.int buildCounterHash = 0; +buildHash() { + var o = new api.Hash(); + buildCounterHash++; + if (buildCounterHash < 3) { + o.type = "foo"; + o.value = "foo"; + } + buildCounterHash--; + return o; +} + +checkHash(api.Hash o) { + buildCounterHash++; + if (buildCounterHash < 3) { + unittest.expect(o.type, unittest.equals('foo')); + unittest.expect(o.value, unittest.equals('foo')); + } + buildCounterHash--; +} + +core.int buildCounterHint = 0; +buildHint() { + var o = new api.Hint(); + buildCounterHint++; + if (buildCounterHint < 3) { + o.humanReadableName = "foo"; + } + buildCounterHint--; + return o; +} + +checkHint(api.Hint o) { + buildCounterHint++; + if (buildCounterHint < 3) { + unittest.expect(o.humanReadableName, unittest.equals('foo')); + } + buildCounterHint--; +} + +buildUnnamed4475() { + var o = new core.List<api.Location>(); + o.add(buildLocation()); + o.add(buildLocation()); + return o; +} + +checkUnnamed4475(core.List<api.Location> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLocation(o[0]); + checkLocation(o[1]); +} + +core.int buildCounterInstallation = 0; +buildInstallation() { + var o = new api.Installation(); + buildCounterInstallation++; + if (buildCounterInstallation < 3) { + o.location = buildUnnamed4475(); + o.name = "foo"; + } + buildCounterInstallation--; + return o; +} + +checkInstallation(api.Installation o) { + buildCounterInstallation++; + if (buildCounterInstallation < 3) { + checkUnnamed4475(o.location); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterInstallation--; +} + +core.int buildCounterKnowledgeBase = 0; +buildKnowledgeBase() { + var o = new api.KnowledgeBase(); + buildCounterKnowledgeBase++; + if (buildCounterKnowledgeBase < 3) { + o.name = "foo"; + o.url = "foo"; + } + buildCounterKnowledgeBase--; + return o; +} + +checkKnowledgeBase(api.KnowledgeBase o) { + buildCounterKnowledgeBase++; + if (buildCounterKnowledgeBase < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.url, unittest.equals('foo')); + } + buildCounterKnowledgeBase--; +} + +core.int buildCounterLayer = 0; +buildLayer() { + var o = new api.Layer(); + buildCounterLayer++; + if (buildCounterLayer < 3) { + o.arguments = "foo"; + o.directive = "foo"; + } + buildCounterLayer--; + return o; +} + +checkLayer(api.Layer o) { + buildCounterLayer++; + if (buildCounterLayer < 3) { + unittest.expect(o.arguments, unittest.equals('foo')); + unittest.expect(o.directive, unittest.equals('foo')); + } + buildCounterLayer--; +} + +buildUnnamed4476() { + var o = new core.List<api.Occurrence>(); + o.add(buildOccurrence()); + o.add(buildOccurrence()); + return o; +} + +checkUnnamed4476(core.List<api.Occurrence> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOccurrence(o[0]); + checkOccurrence(o[1]); +} + +core.int buildCounterListNoteOccurrencesResponse = 0; +buildListNoteOccurrencesResponse() { + var o = new api.ListNoteOccurrencesResponse(); + buildCounterListNoteOccurrencesResponse++; + if (buildCounterListNoteOccurrencesResponse < 3) { + o.nextPageToken = "foo"; + o.occurrences = buildUnnamed4476(); + } + buildCounterListNoteOccurrencesResponse--; + return o; +} + +checkListNoteOccurrencesResponse(api.ListNoteOccurrencesResponse o) { + buildCounterListNoteOccurrencesResponse++; + if (buildCounterListNoteOccurrencesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4476(o.occurrences); + } + buildCounterListNoteOccurrencesResponse--; +} + +buildUnnamed4477() { + var o = new core.List<api.Note>(); + o.add(buildNote()); + o.add(buildNote()); + return o; +} + +checkUnnamed4477(core.List<api.Note> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNote(o[0]); + checkNote(o[1]); +} + +core.int buildCounterListNotesResponse = 0; +buildListNotesResponse() { + var o = new api.ListNotesResponse(); + buildCounterListNotesResponse++; + if (buildCounterListNotesResponse < 3) { + o.nextPageToken = "foo"; + o.notes = buildUnnamed4477(); + } + buildCounterListNotesResponse--; + return o; +} + +checkListNotesResponse(api.ListNotesResponse o) { + buildCounterListNotesResponse++; + if (buildCounterListNotesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4477(o.notes); + } + buildCounterListNotesResponse--; +} + +buildUnnamed4478() { + var o = new core.List<api.Occurrence>(); + o.add(buildOccurrence()); + o.add(buildOccurrence()); + return o; +} + +checkUnnamed4478(core.List<api.Occurrence> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOccurrence(o[0]); + checkOccurrence(o[1]); +} + +core.int buildCounterListOccurrencesResponse = 0; +buildListOccurrencesResponse() { + var o = new api.ListOccurrencesResponse(); + buildCounterListOccurrencesResponse++; + if (buildCounterListOccurrencesResponse < 3) { + o.nextPageToken = "foo"; + o.occurrences = buildUnnamed4478(); + } + buildCounterListOccurrencesResponse--; + return o; +} + +checkListOccurrencesResponse(api.ListOccurrencesResponse o) { + buildCounterListOccurrencesResponse++; + if (buildCounterListOccurrencesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4478(o.occurrences); + } + buildCounterListOccurrencesResponse--; +} + +buildUnnamed4479() { + var o = new core.List<api.ScanConfig>(); + o.add(buildScanConfig()); + o.add(buildScanConfig()); + return o; +} + +checkUnnamed4479(core.List<api.ScanConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkScanConfig(o[0]); + checkScanConfig(o[1]); +} + +core.int buildCounterListScanConfigsResponse = 0; +buildListScanConfigsResponse() { + var o = new api.ListScanConfigsResponse(); + buildCounterListScanConfigsResponse++; + if (buildCounterListScanConfigsResponse < 3) { + o.nextPageToken = "foo"; + o.scanConfigs = buildUnnamed4479(); + } + buildCounterListScanConfigsResponse--; + return o; +} + +checkListScanConfigsResponse(api.ListScanConfigsResponse o) { + buildCounterListScanConfigsResponse++; + if (buildCounterListScanConfigsResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4479(o.scanConfigs); + } + buildCounterListScanConfigsResponse--; +} + +core.int buildCounterLocation = 0; +buildLocation() { + var o = new api.Location(); + buildCounterLocation++; + if (buildCounterLocation < 3) { + o.cpeUri = "foo"; + o.path = "foo"; + o.version = buildVersion(); + } + buildCounterLocation--; + return o; +} + +checkLocation(api.Location o) { + buildCounterLocation++; + if (buildCounterLocation < 3) { + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + checkVersion(o.version); + } + buildCounterLocation--; +} + +buildUnnamed4480() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4480(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4481() { + var o = new core.List<api.RelatedUrl>(); + o.add(buildRelatedUrl()); + o.add(buildRelatedUrl()); + return o; +} + +checkUnnamed4481(core.List<api.RelatedUrl> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRelatedUrl(o[0]); + checkRelatedUrl(o[1]); +} + +core.int buildCounterNote = 0; +buildNote() { + var o = new api.Note(); + buildCounterNote++; + if (buildCounterNote < 3) { + o.attestationAuthority = buildAuthority(); + o.baseImage = buildBasis(); + o.build = buildBuild(); + o.createTime = "foo"; + o.deployable = buildDeployable(); + o.discovery = buildDiscovery(); + o.expirationTime = "foo"; + o.kind = "foo"; + o.longDescription = "foo"; + o.name = "foo"; + o.package = buildPackage(); + o.relatedNoteNames = buildUnnamed4480(); + o.relatedUrl = buildUnnamed4481(); + o.shortDescription = "foo"; + o.updateTime = "foo"; + o.vulnerability = buildVulnerability(); + } + buildCounterNote--; + return o; +} + +checkNote(api.Note o) { + buildCounterNote++; + if (buildCounterNote < 3) { + checkAuthority(o.attestationAuthority); + checkBasis(o.baseImage); + checkBuild(o.build); + unittest.expect(o.createTime, unittest.equals('foo')); + checkDeployable(o.deployable); + checkDiscovery(o.discovery); + unittest.expect(o.expirationTime, unittest.equals('foo')); + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.longDescription, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + checkPackage(o.package); + checkUnnamed4480(o.relatedNoteNames); + checkUnnamed4481(o.relatedUrl); + unittest.expect(o.shortDescription, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + checkVulnerability(o.vulnerability); + } + buildCounterNote--; +} + +core.int buildCounterOccurrence = 0; +buildOccurrence() { + var o = new api.Occurrence(); + buildCounterOccurrence++; + if (buildCounterOccurrence < 3) { + o.attestation = buildDetails(); + o.build = buildGrafeasV1beta1BuildDetails(); + o.createTime = "foo"; + o.deployment = buildGrafeasV1beta1DeploymentDetails(); + o.derivedImage = buildGrafeasV1beta1ImageDetails(); + o.discovered = buildGrafeasV1beta1DiscoveryDetails(); + o.installation = buildGrafeasV1beta1PackageDetails(); + o.kind = "foo"; + o.name = "foo"; + o.noteName = "foo"; + o.remediation = "foo"; + o.resource = buildResource(); + o.updateTime = "foo"; + o.vulnerability = buildGrafeasV1beta1VulnerabilityDetails(); + } + buildCounterOccurrence--; + return o; +} + +checkOccurrence(api.Occurrence o) { + buildCounterOccurrence++; + if (buildCounterOccurrence < 3) { + checkDetails(o.attestation); + checkGrafeasV1beta1BuildDetails(o.build); + unittest.expect(o.createTime, unittest.equals('foo')); + checkGrafeasV1beta1DeploymentDetails(o.deployment); + checkGrafeasV1beta1ImageDetails(o.derivedImage); + checkGrafeasV1beta1DiscoveryDetails(o.discovered); + checkGrafeasV1beta1PackageDetails(o.installation); + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.noteName, unittest.equals('foo')); + unittest.expect(o.remediation, unittest.equals('foo')); + checkResource(o.resource); + unittest.expect(o.updateTime, unittest.equals('foo')); + checkGrafeasV1beta1VulnerabilityDetails(o.vulnerability); + } + buildCounterOccurrence--; +} + +buildUnnamed4482() { + var o = new core.List<api.Distribution>(); + o.add(buildDistribution()); + o.add(buildDistribution()); + return o; +} + +checkUnnamed4482(core.List<api.Distribution> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDistribution(o[0]); + checkDistribution(o[1]); +} + +core.int buildCounterPackage = 0; +buildPackage() { + var o = new api.Package(); + buildCounterPackage++; + if (buildCounterPackage < 3) { + o.distribution = buildUnnamed4482(); + o.name = "foo"; + } + buildCounterPackage--; + return o; +} + +checkPackage(api.Package o) { + buildCounterPackage++; + if (buildCounterPackage < 3) { + checkUnnamed4482(o.distribution); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterPackage--; +} + +core.int buildCounterPackageIssue = 0; +buildPackageIssue() { + var o = new api.PackageIssue(); + buildCounterPackageIssue++; + if (buildCounterPackageIssue < 3) { + o.affectedLocation = buildVulnerabilityLocation(); + o.fixedLocation = buildVulnerabilityLocation(); + o.severityName = "foo"; + } + buildCounterPackageIssue--; + return o; +} + +checkPackageIssue(api.PackageIssue o) { + buildCounterPackageIssue++; + if (buildCounterPackageIssue < 3) { + checkVulnerabilityLocation(o.affectedLocation); + checkVulnerabilityLocation(o.fixedLocation); + unittest.expect(o.severityName, unittest.equals('foo')); + } + buildCounterPackageIssue--; +} + +core.int buildCounterPgpSignedAttestation = 0; +buildPgpSignedAttestation() { + var o = new api.PgpSignedAttestation(); + buildCounterPgpSignedAttestation++; + if (buildCounterPgpSignedAttestation < 3) { + o.contentType = "foo"; + o.pgpKeyId = "foo"; + o.signature = "foo"; + } + buildCounterPgpSignedAttestation--; + return o; +} + +checkPgpSignedAttestation(api.PgpSignedAttestation o) { + buildCounterPgpSignedAttestation++; + if (buildCounterPgpSignedAttestation < 3) { + unittest.expect(o.contentType, unittest.equals('foo')); + unittest.expect(o.pgpKeyId, unittest.equals('foo')); + unittest.expect(o.signature, unittest.equals('foo')); + } + buildCounterPgpSignedAttestation--; +} + +buildUnnamed4483() { + var o = new core.List<api.AuditConfig>(); + o.add(buildAuditConfig()); + o.add(buildAuditConfig()); + return o; +} + +checkUnnamed4483(core.List<api.AuditConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuditConfig(o[0]); + checkAuditConfig(o[1]); +} + +buildUnnamed4484() { + var o = new core.List<api.Binding>(); + o.add(buildBinding()); + o.add(buildBinding()); + return o; +} + +checkUnnamed4484(core.List<api.Binding> o) { + unittest.expect(o, unittest.hasLength(2)); + checkBinding(o[0]); + checkBinding(o[1]); +} + +core.int buildCounterPolicy = 0; +buildPolicy() { + var o = new api.Policy(); + buildCounterPolicy++; + if (buildCounterPolicy < 3) { + o.auditConfigs = buildUnnamed4483(); + o.bindings = buildUnnamed4484(); + o.etag = "foo"; + o.version = 42; + } + buildCounterPolicy--; + return o; +} + +checkPolicy(api.Policy o) { + buildCounterPolicy++; + if (buildCounterPolicy < 3) { + checkUnnamed4483(o.auditConfigs); + checkUnnamed4484(o.bindings); + unittest.expect(o.etag, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals(42)); + } + buildCounterPolicy--; +} + +core.int buildCounterProjectRepoId = 0; +buildProjectRepoId() { + var o = new api.ProjectRepoId(); + buildCounterProjectRepoId++; + if (buildCounterProjectRepoId < 3) { + o.projectId = "foo"; + o.repoName = "foo"; + } + buildCounterProjectRepoId--; + return o; +} + +checkProjectRepoId(api.ProjectRepoId o) { + buildCounterProjectRepoId++; + if (buildCounterProjectRepoId < 3) { + unittest.expect(o.projectId, unittest.equals('foo')); + unittest.expect(o.repoName, unittest.equals('foo')); + } + buildCounterProjectRepoId--; +} + +core.int buildCounterRelatedUrl = 0; +buildRelatedUrl() { + var o = new api.RelatedUrl(); + buildCounterRelatedUrl++; + if (buildCounterRelatedUrl < 3) { + o.label = "foo"; + o.url = "foo"; + } + buildCounterRelatedUrl--; + return o; +} + +checkRelatedUrl(api.RelatedUrl o) { + buildCounterRelatedUrl++; + if (buildCounterRelatedUrl < 3) { + unittest.expect(o.label, unittest.equals('foo')); + unittest.expect(o.url, unittest.equals('foo')); + } + buildCounterRelatedUrl--; +} + +core.int buildCounterRepoId = 0; +buildRepoId() { + var o = new api.RepoId(); + buildCounterRepoId++; + if (buildCounterRepoId < 3) { + o.projectRepoId = buildProjectRepoId(); + o.uid = "foo"; + } + buildCounterRepoId--; + return o; +} + +checkRepoId(api.RepoId o) { + buildCounterRepoId++; + if (buildCounterRepoId < 3) { + checkProjectRepoId(o.projectRepoId); + unittest.expect(o.uid, unittest.equals('foo')); + } + buildCounterRepoId--; +} + +core.int buildCounterResource = 0; +buildResource() { + var o = new api.Resource(); + buildCounterResource++; + if (buildCounterResource < 3) { + o.contentHash = buildHash(); + o.name = "foo"; + o.uri = "foo"; + } + buildCounterResource--; + return o; +} + +checkResource(api.Resource o) { + buildCounterResource++; + if (buildCounterResource < 3) { + checkHash(o.contentHash); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.uri, unittest.equals('foo')); + } + buildCounterResource--; +} + +core.int buildCounterScanConfig = 0; +buildScanConfig() { + var o = new api.ScanConfig(); + buildCounterScanConfig++; + if (buildCounterScanConfig < 3) { + o.createTime = "foo"; + o.description = "foo"; + o.enabled = true; + o.name = "foo"; + o.updateTime = "foo"; + } + buildCounterScanConfig--; + return o; +} + +checkScanConfig(api.ScanConfig o) { + buildCounterScanConfig++; + if (buildCounterScanConfig < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.enabled, unittest.isTrue); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterScanConfig--; +} + +core.int buildCounterSetIamPolicyRequest = 0; +buildSetIamPolicyRequest() { + var o = new api.SetIamPolicyRequest(); + buildCounterSetIamPolicyRequest++; + if (buildCounterSetIamPolicyRequest < 3) { + o.policy = buildPolicy(); + o.updateMask = "foo"; + } + buildCounterSetIamPolicyRequest--; + return o; +} + +checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { + buildCounterSetIamPolicyRequest++; + if (buildCounterSetIamPolicyRequest < 3) { + checkPolicy(o.policy); + unittest.expect(o.updateMask, unittest.equals('foo')); + } + buildCounterSetIamPolicyRequest--; +} + +buildUnnamed4485() { + var o = new core.List<api.SourceContext>(); + o.add(buildSourceContext()); + o.add(buildSourceContext()); + return o; +} + +checkUnnamed4485(core.List<api.SourceContext> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSourceContext(o[0]); + checkSourceContext(o[1]); +} + +buildUnnamed4486() { + var o = new core.Map<core.String, api.FileHashes>(); + o["x"] = buildFileHashes(); + o["y"] = buildFileHashes(); + return o; +} + +checkUnnamed4486(core.Map<core.String, api.FileHashes> o) { + unittest.expect(o, unittest.hasLength(2)); + checkFileHashes(o["x"]); + checkFileHashes(o["y"]); +} + +core.int buildCounterSource = 0; +buildSource() { + var o = new api.Source(); + buildCounterSource++; + if (buildCounterSource < 3) { + o.additionalContexts = buildUnnamed4485(); + o.artifactStorageSourceUri = "foo"; + o.context = buildSourceContext(); + o.fileHashes = buildUnnamed4486(); + } + buildCounterSource--; + return o; +} + +checkSource(api.Source o) { + buildCounterSource++; + if (buildCounterSource < 3) { + checkUnnamed4485(o.additionalContexts); + unittest.expect(o.artifactStorageSourceUri, unittest.equals('foo')); + checkSourceContext(o.context); + checkUnnamed4486(o.fileHashes); + } + buildCounterSource--; +} + +buildUnnamed4487() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4487(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterSourceContext = 0; +buildSourceContext() { + var o = new api.SourceContext(); + buildCounterSourceContext++; + if (buildCounterSourceContext < 3) { + o.cloudRepo = buildCloudRepoSourceContext(); + o.gerrit = buildGerritSourceContext(); + o.git = buildGitSourceContext(); + o.labels = buildUnnamed4487(); + } + buildCounterSourceContext--; + return o; +} + +checkSourceContext(api.SourceContext o) { + buildCounterSourceContext++; + if (buildCounterSourceContext < 3) { + checkCloudRepoSourceContext(o.cloudRepo); + checkGerritSourceContext(o.gerrit); + checkGitSourceContext(o.git); + checkUnnamed4487(o.labels); + } + buildCounterSourceContext--; +} + +buildUnnamed4488() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4488(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +buildUnnamed4489() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4488()); + o.add(buildUnnamed4488()); + return o; +} + +checkUnnamed4489(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4488(o[0]); + checkUnnamed4488(o[1]); +} + +core.int buildCounterStatus = 0; +buildStatus() { + var o = new api.Status(); + buildCounterStatus++; + if (buildCounterStatus < 3) { + o.code = 42; + o.details = buildUnnamed4489(); + o.message = "foo"; + } + buildCounterStatus--; + return o; +} + +checkStatus(api.Status o) { + buildCounterStatus++; + if (buildCounterStatus < 3) { + unittest.expect(o.code, unittest.equals(42)); + checkUnnamed4489(o.details); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterStatus--; +} + +buildUnnamed4490() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4490(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterTestIamPermissionsRequest = 0; +buildTestIamPermissionsRequest() { + var o = new api.TestIamPermissionsRequest(); + buildCounterTestIamPermissionsRequest++; + if (buildCounterTestIamPermissionsRequest < 3) { + o.permissions = buildUnnamed4490(); + } + buildCounterTestIamPermissionsRequest--; + return o; +} + +checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { + buildCounterTestIamPermissionsRequest++; + if (buildCounterTestIamPermissionsRequest < 3) { + checkUnnamed4490(o.permissions); + } + buildCounterTestIamPermissionsRequest--; +} + +buildUnnamed4491() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4491(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterTestIamPermissionsResponse = 0; +buildTestIamPermissionsResponse() { + var o = new api.TestIamPermissionsResponse(); + buildCounterTestIamPermissionsResponse++; + if (buildCounterTestIamPermissionsResponse < 3) { + o.permissions = buildUnnamed4491(); + } + buildCounterTestIamPermissionsResponse--; + return o; +} + +checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { + buildCounterTestIamPermissionsResponse++; + if (buildCounterTestIamPermissionsResponse < 3) { + checkUnnamed4491(o.permissions); + } + buildCounterTestIamPermissionsResponse--; +} + +core.int buildCounterVersion = 0; +buildVersion() { + var o = new api.Version(); + buildCounterVersion++; + if (buildCounterVersion < 3) { + o.epoch = 42; + o.kind = "foo"; + o.name = "foo"; + o.revision = "foo"; + } + buildCounterVersion--; + return o; +} + +checkVersion(api.Version o) { + buildCounterVersion++; + if (buildCounterVersion < 3) { + unittest.expect(o.epoch, unittest.equals(42)); + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.revision, unittest.equals('foo')); + } + buildCounterVersion--; +} + +buildUnnamed4492() { + var o = new core.List<api.Detail>(); + o.add(buildDetail()); + o.add(buildDetail()); + return o; +} + +checkUnnamed4492(core.List<api.Detail> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDetail(o[0]); + checkDetail(o[1]); +} + +buildUnnamed4493() { + var o = new core.List<api.WindowsDetail>(); + o.add(buildWindowsDetail()); + o.add(buildWindowsDetail()); + return o; +} + +checkUnnamed4493(core.List<api.WindowsDetail> o) { + unittest.expect(o, unittest.hasLength(2)); + checkWindowsDetail(o[0]); + checkWindowsDetail(o[1]); +} + +core.int buildCounterVulnerability = 0; +buildVulnerability() { + var o = new api.Vulnerability(); + buildCounterVulnerability++; + if (buildCounterVulnerability < 3) { + o.cvssScore = 42.0; + o.details = buildUnnamed4492(); + o.severity = "foo"; + o.windowsDetails = buildUnnamed4493(); + } + buildCounterVulnerability--; + return o; +} + +checkVulnerability(api.Vulnerability o) { + buildCounterVulnerability++; + if (buildCounterVulnerability < 3) { + unittest.expect(o.cvssScore, unittest.equals(42.0)); + checkUnnamed4492(o.details); + unittest.expect(o.severity, unittest.equals('foo')); + checkUnnamed4493(o.windowsDetails); + } + buildCounterVulnerability--; +} + +core.int buildCounterVulnerabilityLocation = 0; +buildVulnerabilityLocation() { + var o = new api.VulnerabilityLocation(); + buildCounterVulnerabilityLocation++; + if (buildCounterVulnerabilityLocation < 3) { + o.cpeUri = "foo"; + o.package = "foo"; + o.version = buildVersion(); + } + buildCounterVulnerabilityLocation--; + return o; +} + +checkVulnerabilityLocation(api.VulnerabilityLocation o) { + buildCounterVulnerabilityLocation++; + if (buildCounterVulnerabilityLocation < 3) { + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.package, unittest.equals('foo')); + checkVersion(o.version); + } + buildCounterVulnerabilityLocation--; +} + +buildUnnamed4494() { + var o = new core.List<api.FixableTotalByDigest>(); + o.add(buildFixableTotalByDigest()); + o.add(buildFixableTotalByDigest()); + return o; +} + +checkUnnamed4494(core.List<api.FixableTotalByDigest> o) { + unittest.expect(o, unittest.hasLength(2)); + checkFixableTotalByDigest(o[0]); + checkFixableTotalByDigest(o[1]); +} + +core.int buildCounterVulnerabilityOccurrencesSummary = 0; +buildVulnerabilityOccurrencesSummary() { + var o = new api.VulnerabilityOccurrencesSummary(); + buildCounterVulnerabilityOccurrencesSummary++; + if (buildCounterVulnerabilityOccurrencesSummary < 3) { + o.counts = buildUnnamed4494(); + } + buildCounterVulnerabilityOccurrencesSummary--; + return o; +} + +checkVulnerabilityOccurrencesSummary(api.VulnerabilityOccurrencesSummary o) { + buildCounterVulnerabilityOccurrencesSummary++; + if (buildCounterVulnerabilityOccurrencesSummary < 3) { + checkUnnamed4494(o.counts); + } + buildCounterVulnerabilityOccurrencesSummary--; +} + +buildUnnamed4495() { + var o = new core.List<api.KnowledgeBase>(); + o.add(buildKnowledgeBase()); + o.add(buildKnowledgeBase()); + return o; +} + +checkUnnamed4495(core.List<api.KnowledgeBase> o) { + unittest.expect(o, unittest.hasLength(2)); + checkKnowledgeBase(o[0]); + checkKnowledgeBase(o[1]); +} + +core.int buildCounterWindowsDetail = 0; +buildWindowsDetail() { + var o = new api.WindowsDetail(); + buildCounterWindowsDetail++; + if (buildCounterWindowsDetail < 3) { + o.cpeUri = "foo"; + o.description = "foo"; + o.fixingKbs = buildUnnamed4495(); + o.name = "foo"; + } + buildCounterWindowsDetail--; + return o; +} + +checkWindowsDetail(api.WindowsDetail o) { + buildCounterWindowsDetail++; + if (buildCounterWindowsDetail < 3) { + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + checkUnnamed4495(o.fixingKbs); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterWindowsDetail--; +} + +main() { + unittest.group("obj-schema-AliasContext", () { + unittest.test("to-json--from-json", () { + var o = buildAliasContext(); + var od = new api.AliasContext.fromJson(o.toJson()); + checkAliasContext(od); + }); + }); + + unittest.group("obj-schema-Artifact", () { + unittest.test("to-json--from-json", () { + var o = buildArtifact(); + var od = new api.Artifact.fromJson(o.toJson()); + checkArtifact(od); + }); + }); + + unittest.group("obj-schema-Attestation", () { + unittest.test("to-json--from-json", () { + var o = buildAttestation(); + var od = new api.Attestation.fromJson(o.toJson()); + checkAttestation(od); + }); + }); + + unittest.group("obj-schema-AuditConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuditConfig(); + var od = new api.AuditConfig.fromJson(o.toJson()); + checkAuditConfig(od); + }); + }); + + unittest.group("obj-schema-AuditLogConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuditLogConfig(); + var od = new api.AuditLogConfig.fromJson(o.toJson()); + checkAuditLogConfig(od); + }); + }); + + unittest.group("obj-schema-Authority", () { + unittest.test("to-json--from-json", () { + var o = buildAuthority(); + var od = new api.Authority.fromJson(o.toJson()); + checkAuthority(od); + }); + }); + + unittest.group("obj-schema-Basis", () { + unittest.test("to-json--from-json", () { + var o = buildBasis(); + var od = new api.Basis.fromJson(o.toJson()); + checkBasis(od); + }); + }); + + unittest.group("obj-schema-BatchCreateNotesRequest", () { + unittest.test("to-json--from-json", () { + var o = buildBatchCreateNotesRequest(); + var od = new api.BatchCreateNotesRequest.fromJson(o.toJson()); + checkBatchCreateNotesRequest(od); + }); + }); + + unittest.group("obj-schema-BatchCreateNotesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildBatchCreateNotesResponse(); + var od = new api.BatchCreateNotesResponse.fromJson(o.toJson()); + checkBatchCreateNotesResponse(od); + }); + }); + + unittest.group("obj-schema-BatchCreateOccurrencesRequest", () { + unittest.test("to-json--from-json", () { + var o = buildBatchCreateOccurrencesRequest(); + var od = new api.BatchCreateOccurrencesRequest.fromJson(o.toJson()); + checkBatchCreateOccurrencesRequest(od); + }); + }); + + unittest.group("obj-schema-BatchCreateOccurrencesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildBatchCreateOccurrencesResponse(); + var od = new api.BatchCreateOccurrencesResponse.fromJson(o.toJson()); + checkBatchCreateOccurrencesResponse(od); + }); + }); + + unittest.group("obj-schema-Binding", () { + unittest.test("to-json--from-json", () { + var o = buildBinding(); + var od = new api.Binding.fromJson(o.toJson()); + checkBinding(od); + }); + }); + + unittest.group("obj-schema-Build", () { + unittest.test("to-json--from-json", () { + var o = buildBuild(); + var od = new api.Build.fromJson(o.toJson()); + checkBuild(od); + }); + }); + + unittest.group("obj-schema-BuildProvenance", () { + unittest.test("to-json--from-json", () { + var o = buildBuildProvenance(); + var od = new api.BuildProvenance.fromJson(o.toJson()); + checkBuildProvenance(od); + }); + }); + + unittest.group("obj-schema-BuildSignature", () { + unittest.test("to-json--from-json", () { + var o = buildBuildSignature(); + var od = new api.BuildSignature.fromJson(o.toJson()); + checkBuildSignature(od); + }); + }); + + unittest.group("obj-schema-CloudRepoSourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildCloudRepoSourceContext(); + var od = new api.CloudRepoSourceContext.fromJson(o.toJson()); + checkCloudRepoSourceContext(od); + }); + }); + + unittest.group("obj-schema-Command", () { + unittest.test("to-json--from-json", () { + var o = buildCommand(); + var od = new api.Command.fromJson(o.toJson()); + checkCommand(od); + }); + }); + + unittest.group("obj-schema-Deployable", () { + unittest.test("to-json--from-json", () { + var o = buildDeployable(); + var od = new api.Deployable.fromJson(o.toJson()); + checkDeployable(od); + }); + }); + + unittest.group("obj-schema-Deployment", () { + unittest.test("to-json--from-json", () { + var o = buildDeployment(); + var od = new api.Deployment.fromJson(o.toJson()); + checkDeployment(od); + }); + }); + + unittest.group("obj-schema-Derived", () { + unittest.test("to-json--from-json", () { + var o = buildDerived(); + var od = new api.Derived.fromJson(o.toJson()); + checkDerived(od); + }); + }); + + unittest.group("obj-schema-Detail", () { + unittest.test("to-json--from-json", () { + var o = buildDetail(); + var od = new api.Detail.fromJson(o.toJson()); + checkDetail(od); + }); + }); + + unittest.group("obj-schema-Details", () { + unittest.test("to-json--from-json", () { + var o = buildDetails(); + var od = new api.Details.fromJson(o.toJson()); + checkDetails(od); + }); + }); + + unittest.group("obj-schema-Discovered", () { + unittest.test("to-json--from-json", () { + var o = buildDiscovered(); + var od = new api.Discovered.fromJson(o.toJson()); + checkDiscovered(od); + }); + }); + + unittest.group("obj-schema-Discovery", () { + unittest.test("to-json--from-json", () { + var o = buildDiscovery(); + var od = new api.Discovery.fromJson(o.toJson()); + checkDiscovery(od); + }); + }); + + unittest.group("obj-schema-Distribution", () { + unittest.test("to-json--from-json", () { + var o = buildDistribution(); + var od = new api.Distribution.fromJson(o.toJson()); + checkDistribution(od); + }); + }); + + unittest.group("obj-schema-Empty", () { + unittest.test("to-json--from-json", () { + var o = buildEmpty(); + var od = new api.Empty.fromJson(o.toJson()); + checkEmpty(od); + }); + }); + + unittest.group("obj-schema-Expr", () { + unittest.test("to-json--from-json", () { + var o = buildExpr(); + var od = new api.Expr.fromJson(o.toJson()); + checkExpr(od); + }); + }); + + unittest.group("obj-schema-FileHashes", () { + unittest.test("to-json--from-json", () { + var o = buildFileHashes(); + var od = new api.FileHashes.fromJson(o.toJson()); + checkFileHashes(od); + }); + }); + + unittest.group("obj-schema-Fingerprint", () { + unittest.test("to-json--from-json", () { + var o = buildFingerprint(); + var od = new api.Fingerprint.fromJson(o.toJson()); + checkFingerprint(od); + }); + }); + + unittest.group("obj-schema-FixableTotalByDigest", () { + unittest.test("to-json--from-json", () { + var o = buildFixableTotalByDigest(); + var od = new api.FixableTotalByDigest.fromJson(o.toJson()); + checkFixableTotalByDigest(od); + }); + }); + + unittest.group("obj-schema-GerritSourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildGerritSourceContext(); + var od = new api.GerritSourceContext.fromJson(o.toJson()); + checkGerritSourceContext(od); + }); + }); + + unittest.group("obj-schema-GetIamPolicyRequest", () { + unittest.test("to-json--from-json", () { + var o = buildGetIamPolicyRequest(); + var od = new api.GetIamPolicyRequest.fromJson(o.toJson()); + checkGetIamPolicyRequest(od); + }); + }); + + unittest.group("obj-schema-GitSourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildGitSourceContext(); + var od = new api.GitSourceContext.fromJson(o.toJson()); + checkGitSourceContext(od); + }); + }); + + unittest.group( + "obj-schema-GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata", + () { + unittest.test("to-json--from-json", () { + var o = buildGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata(); + var od = new api + .GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata.fromJson( + o.toJson()); + checkGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1BuildDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1BuildDetails(); + var od = new api.GrafeasV1beta1BuildDetails.fromJson(o.toJson()); + checkGrafeasV1beta1BuildDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1DeploymentDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1DeploymentDetails(); + var od = new api.GrafeasV1beta1DeploymentDetails.fromJson(o.toJson()); + checkGrafeasV1beta1DeploymentDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1DiscoveryDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1DiscoveryDetails(); + var od = new api.GrafeasV1beta1DiscoveryDetails.fromJson(o.toJson()); + checkGrafeasV1beta1DiscoveryDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1ImageDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1ImageDetails(); + var od = new api.GrafeasV1beta1ImageDetails.fromJson(o.toJson()); + checkGrafeasV1beta1ImageDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1PackageDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1PackageDetails(); + var od = new api.GrafeasV1beta1PackageDetails.fromJson(o.toJson()); + checkGrafeasV1beta1PackageDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1VulnerabilityDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1VulnerabilityDetails(); + var od = new api.GrafeasV1beta1VulnerabilityDetails.fromJson(o.toJson()); + checkGrafeasV1beta1VulnerabilityDetails(od); + }); + }); + + unittest.group("obj-schema-Hash", () { + unittest.test("to-json--from-json", () { + var o = buildHash(); + var od = new api.Hash.fromJson(o.toJson()); + checkHash(od); + }); + }); + + unittest.group("obj-schema-Hint", () { + unittest.test("to-json--from-json", () { + var o = buildHint(); + var od = new api.Hint.fromJson(o.toJson()); + checkHint(od); + }); + }); + + unittest.group("obj-schema-Installation", () { + unittest.test("to-json--from-json", () { + var o = buildInstallation(); + var od = new api.Installation.fromJson(o.toJson()); + checkInstallation(od); + }); + }); + + unittest.group("obj-schema-KnowledgeBase", () { + unittest.test("to-json--from-json", () { + var o = buildKnowledgeBase(); + var od = new api.KnowledgeBase.fromJson(o.toJson()); + checkKnowledgeBase(od); + }); + }); + + unittest.group("obj-schema-Layer", () { + unittest.test("to-json--from-json", () { + var o = buildLayer(); + var od = new api.Layer.fromJson(o.toJson()); + checkLayer(od); + }); + }); + + unittest.group("obj-schema-ListNoteOccurrencesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListNoteOccurrencesResponse(); + var od = new api.ListNoteOccurrencesResponse.fromJson(o.toJson()); + checkListNoteOccurrencesResponse(od); + }); + }); + + unittest.group("obj-schema-ListNotesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListNotesResponse(); + var od = new api.ListNotesResponse.fromJson(o.toJson()); + checkListNotesResponse(od); + }); + }); + + unittest.group("obj-schema-ListOccurrencesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListOccurrencesResponse(); + var od = new api.ListOccurrencesResponse.fromJson(o.toJson()); + checkListOccurrencesResponse(od); + }); + }); + + unittest.group("obj-schema-ListScanConfigsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListScanConfigsResponse(); + var od = new api.ListScanConfigsResponse.fromJson(o.toJson()); + checkListScanConfigsResponse(od); + }); + }); + + unittest.group("obj-schema-Location", () { + unittest.test("to-json--from-json", () { + var o = buildLocation(); + var od = new api.Location.fromJson(o.toJson()); + checkLocation(od); + }); + }); + + unittest.group("obj-schema-Note", () { + unittest.test("to-json--from-json", () { + var o = buildNote(); + var od = new api.Note.fromJson(o.toJson()); + checkNote(od); + }); + }); + + unittest.group("obj-schema-Occurrence", () { + unittest.test("to-json--from-json", () { + var o = buildOccurrence(); + var od = new api.Occurrence.fromJson(o.toJson()); + checkOccurrence(od); + }); + }); + + unittest.group("obj-schema-Package", () { + unittest.test("to-json--from-json", () { + var o = buildPackage(); + var od = new api.Package.fromJson(o.toJson()); + checkPackage(od); + }); + }); + + unittest.group("obj-schema-PackageIssue", () { + unittest.test("to-json--from-json", () { + var o = buildPackageIssue(); + var od = new api.PackageIssue.fromJson(o.toJson()); + checkPackageIssue(od); + }); + }); + + unittest.group("obj-schema-PgpSignedAttestation", () { + unittest.test("to-json--from-json", () { + var o = buildPgpSignedAttestation(); + var od = new api.PgpSignedAttestation.fromJson(o.toJson()); + checkPgpSignedAttestation(od); + }); + }); + + unittest.group("obj-schema-Policy", () { + unittest.test("to-json--from-json", () { + var o = buildPolicy(); + var od = new api.Policy.fromJson(o.toJson()); + checkPolicy(od); + }); + }); + + unittest.group("obj-schema-ProjectRepoId", () { + unittest.test("to-json--from-json", () { + var o = buildProjectRepoId(); + var od = new api.ProjectRepoId.fromJson(o.toJson()); + checkProjectRepoId(od); + }); + }); + + unittest.group("obj-schema-RelatedUrl", () { + unittest.test("to-json--from-json", () { + var o = buildRelatedUrl(); + var od = new api.RelatedUrl.fromJson(o.toJson()); + checkRelatedUrl(od); + }); + }); + + unittest.group("obj-schema-RepoId", () { + unittest.test("to-json--from-json", () { + var o = buildRepoId(); + var od = new api.RepoId.fromJson(o.toJson()); + checkRepoId(od); + }); + }); + + unittest.group("obj-schema-Resource", () { + unittest.test("to-json--from-json", () { + var o = buildResource(); + var od = new api.Resource.fromJson(o.toJson()); + checkResource(od); + }); + }); + + unittest.group("obj-schema-ScanConfig", () { + unittest.test("to-json--from-json", () { + var o = buildScanConfig(); + var od = new api.ScanConfig.fromJson(o.toJson()); + checkScanConfig(od); + }); + }); + + unittest.group("obj-schema-SetIamPolicyRequest", () { + unittest.test("to-json--from-json", () { + var o = buildSetIamPolicyRequest(); + var od = new api.SetIamPolicyRequest.fromJson(o.toJson()); + checkSetIamPolicyRequest(od); + }); + }); + + unittest.group("obj-schema-Source", () { + unittest.test("to-json--from-json", () { + var o = buildSource(); + var od = new api.Source.fromJson(o.toJson()); + checkSource(od); + }); + }); + + unittest.group("obj-schema-SourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildSourceContext(); + var od = new api.SourceContext.fromJson(o.toJson()); + checkSourceContext(od); + }); + }); + + unittest.group("obj-schema-Status", () { + unittest.test("to-json--from-json", () { + var o = buildStatus(); + var od = new api.Status.fromJson(o.toJson()); + checkStatus(od); + }); + }); + + unittest.group("obj-schema-TestIamPermissionsRequest", () { + unittest.test("to-json--from-json", () { + var o = buildTestIamPermissionsRequest(); + var od = new api.TestIamPermissionsRequest.fromJson(o.toJson()); + checkTestIamPermissionsRequest(od); + }); + }); + + unittest.group("obj-schema-TestIamPermissionsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildTestIamPermissionsResponse(); + var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); + checkTestIamPermissionsResponse(od); + }); + }); + + unittest.group("obj-schema-Version", () { + unittest.test("to-json--from-json", () { + var o = buildVersion(); + var od = new api.Version.fromJson(o.toJson()); + checkVersion(od); + }); + }); + + unittest.group("obj-schema-Vulnerability", () { + unittest.test("to-json--from-json", () { + var o = buildVulnerability(); + var od = new api.Vulnerability.fromJson(o.toJson()); + checkVulnerability(od); + }); + }); + + unittest.group("obj-schema-VulnerabilityLocation", () { + unittest.test("to-json--from-json", () { + var o = buildVulnerabilityLocation(); + var od = new api.VulnerabilityLocation.fromJson(o.toJson()); + checkVulnerabilityLocation(od); + }); + }); + + unittest.group("obj-schema-VulnerabilityOccurrencesSummary", () { + unittest.test("to-json--from-json", () { + var o = buildVulnerabilityOccurrencesSummary(); + var od = new api.VulnerabilityOccurrencesSummary.fromJson(o.toJson()); + checkVulnerabilityOccurrencesSummary(od); + }); + }); + + unittest.group("obj-schema-WindowsDetail", () { + unittest.test("to-json--from-json", () { + var o = buildWindowsDetail(); + var od = new api.WindowsDetail.fromJson(o.toJson()); + checkWindowsDetail(od); + }); + }); + + unittest.group("resource-ProjectsNotesResourceApi", () { + unittest.test("method--batchCreate", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildBatchCreateNotesRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.BatchCreateNotesRequest.fromJson(json); + checkBatchCreateNotesRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildBatchCreateNotesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .batchCreate(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkBatchCreateNotesResponse(response); + }))); + }); + + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildNote(); + var arg_parent = "foo"; + var arg_noteId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Note.fromJson(json); + checkNote(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["noteId"].first, unittest.equals(arg_noteId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, + noteId: arg_noteId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--getIamPolicy", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildGetIamPolicyRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.GetIamPolicyRequest.fromJson(json); + checkGetIamPolicyRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPolicy(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_parent = "foo"; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListNotesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + filter: arg_filter, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListNotesResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildNote(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Note.fromJson(json); + checkNote(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--setIamPolicy", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildSetIamPolicyRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SetIamPolicyRequest.fromJson(json); + checkSetIamPolicyRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPolicy(response); + }))); + }); + + unittest.test("method--testIamPermissions", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildTestIamPermissionsRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.TestIamPermissionsRequest.fromJson(json); + checkTestIamPermissionsRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildTestIamPermissionsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkTestIamPermissionsResponse(response); + }))); + }); + }); + + unittest.group("resource-ProjectsNotesOccurrencesResourceApi", () { + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ProjectsNotesOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes.occurrences; + var arg_name = "foo"; + var arg_pageSize = 42; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListNoteOccurrencesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_name, + pageSize: arg_pageSize, + filter: arg_filter, + pageToken: arg_pageToken, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListNoteOccurrencesResponse(response); + }))); + }); + }); + + unittest.group("resource-ProjectsOccurrencesResourceApi", () { + unittest.test("method--batchCreate", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildBatchCreateOccurrencesRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.BatchCreateOccurrencesRequest.fromJson(json); + checkBatchCreateOccurrencesRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildBatchCreateOccurrencesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .batchCreate(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkBatchCreateOccurrencesResponse(response); + }))); + }); + + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildOccurrence(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Occurrence.fromJson(json); + checkOccurrence(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOccurrence()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOccurrence(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOccurrence()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOccurrence(response); + }))); + }); + + unittest.test("method--getIamPolicy", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildGetIamPolicyRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.GetIamPolicyRequest.fromJson(json); + checkGetIamPolicyRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPolicy(response); + }))); + }); + + unittest.test("method--getNotes", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getNotes(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--getVulnerabilitySummary", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_parent = "foo"; + var arg_filter = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildVulnerabilityOccurrencesSummary()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getVulnerabilitySummary(arg_parent, + filter: arg_filter, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkVulnerabilityOccurrencesSummary(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_parent = "foo"; + var arg_pageSize = 42; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListOccurrencesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageSize: arg_pageSize, + filter: arg_filter, + pageToken: arg_pageToken, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListOccurrencesResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildOccurrence(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Occurrence.fromJson(json); + checkOccurrence(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOccurrence()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOccurrence(response); + }))); + }); + + unittest.test("method--setIamPolicy", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildSetIamPolicyRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SetIamPolicyRequest.fromJson(json); + checkSetIamPolicyRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPolicy(response); + }))); + }); + + unittest.test("method--testIamPermissions", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildTestIamPermissionsRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.TestIamPermissionsRequest.fromJson(json); + checkTestIamPermissionsRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildTestIamPermissionsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkTestIamPermissionsResponse(response); + }))); + }); + }); + + unittest.group("resource-ProjectsScanConfigsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ProjectsScanConfigsResourceApi res = + new api.ContaineranalysisApi(mock).projects.scanConfigs; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildScanConfig()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkScanConfig(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ProjectsScanConfigsResourceApi res = + new api.ContaineranalysisApi(mock).projects.scanConfigs; + var arg_parent = "foo"; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListScanConfigsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + filter: arg_filter, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListScanConfigsResponse(response); + }))); + }); + + unittest.test("method--update", () { + var mock = new HttpServerMock(); + api.ProjectsScanConfigsResourceApi res = + new api.ContaineranalysisApi(mock).projects.scanConfigs; + var arg_request = buildScanConfig(); + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ScanConfig.fromJson(json); + checkScanConfig(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildScanConfig()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .update(arg_request, arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkScanConfig(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/dataflow/v1b3_test.dart b/generated/googleapis_beta/test/dataflow/v1b3_test.dart index 06acb56..e2aa3b2 100644 --- a/generated/googleapis_beta/test/dataflow/v1b3_test.dart +++ b/generated/googleapis_beta/test/dataflow/v1b3_test.dart
@@ -104,6 +104,7 @@ buildCounterApproximateSplitRequest++; if (buildCounterApproximateSplitRequest < 3) { o.fractionConsumed = 42.0; + o.fractionOfRemainder = 42.0; o.position = buildPosition(); } buildCounterApproximateSplitRequest--; @@ -114,6 +115,7 @@ buildCounterApproximateSplitRequest++; if (buildCounterApproximateSplitRequest < 3) { unittest.expect(o.fractionConsumed, unittest.equals(42.0)); + unittest.expect(o.fractionOfRemainder, unittest.equals(42.0)); checkPosition(o.position); } buildCounterApproximateSplitRequest--; @@ -286,53 +288,53 @@ buildCounterComponentTransform--; } -buildUnnamed5133() { +buildUnnamed4344() { var o = new core.List<api.StreamLocation>(); o.add(buildStreamLocation()); o.add(buildStreamLocation()); return o; } -checkUnnamed5133(core.List<api.StreamLocation> o) { +checkUnnamed4344(core.List<api.StreamLocation> o) { unittest.expect(o, unittest.hasLength(2)); checkStreamLocation(o[0]); checkStreamLocation(o[1]); } -buildUnnamed5134() { +buildUnnamed4345() { var o = new core.List<api.KeyRangeLocation>(); o.add(buildKeyRangeLocation()); o.add(buildKeyRangeLocation()); return o; } -checkUnnamed5134(core.List<api.KeyRangeLocation> o) { +checkUnnamed4345(core.List<api.KeyRangeLocation> o) { unittest.expect(o, unittest.hasLength(2)); checkKeyRangeLocation(o[0]); checkKeyRangeLocation(o[1]); } -buildUnnamed5135() { +buildUnnamed4346() { var o = new core.List<api.StreamLocation>(); o.add(buildStreamLocation()); o.add(buildStreamLocation()); return o; } -checkUnnamed5135(core.List<api.StreamLocation> o) { +checkUnnamed4346(core.List<api.StreamLocation> o) { unittest.expect(o, unittest.hasLength(2)); checkStreamLocation(o[0]); checkStreamLocation(o[1]); } -buildUnnamed5136() { +buildUnnamed4347() { var o = new core.List<api.StateFamilyConfig>(); o.add(buildStateFamilyConfig()); o.add(buildStateFamilyConfig()); return o; } -checkUnnamed5136(core.List<api.StateFamilyConfig> o) { +checkUnnamed4347(core.List<api.StateFamilyConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkStateFamilyConfig(o[0]); checkStateFamilyConfig(o[1]); @@ -344,10 +346,10 @@ buildCounterComputationTopology++; if (buildCounterComputationTopology < 3) { o.computationId = "foo"; - o.inputs = buildUnnamed5133(); - o.keyRanges = buildUnnamed5134(); - o.outputs = buildUnnamed5135(); - o.stateFamilies = buildUnnamed5136(); + o.inputs = buildUnnamed4344(); + o.keyRanges = buildUnnamed4345(); + o.outputs = buildUnnamed4346(); + o.stateFamilies = buildUnnamed4347(); o.systemStageName = "foo"; } buildCounterComputationTopology--; @@ -358,10 +360,10 @@ buildCounterComputationTopology++; if (buildCounterComputationTopology < 3) { unittest.expect(o.computationId, unittest.equals('foo')); - checkUnnamed5133(o.inputs); - checkUnnamed5134(o.keyRanges); - checkUnnamed5135(o.outputs); - checkUnnamed5136(o.stateFamilies); + checkUnnamed4344(o.inputs); + checkUnnamed4345(o.keyRanges); + checkUnnamed4346(o.outputs); + checkUnnamed4347(o.stateFamilies); unittest.expect(o.systemStageName, unittest.equals('foo')); } buildCounterComputationTopology--; @@ -526,14 +528,14 @@ buildCounterCounterUpdate--; } -buildUnnamed5137() { +buildUnnamed4348() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5137(core.Map<core.String, core.String> o) { +checkUnnamed4348(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -548,7 +550,7 @@ o.gcsPath = "foo"; o.jobName = "foo"; o.location = "foo"; - o.parameters = buildUnnamed5137(); + o.parameters = buildUnnamed4348(); } buildCounterCreateJobFromTemplateRequest--; return o; @@ -561,7 +563,7 @@ unittest.expect(o.gcsPath, unittest.equals('foo')); unittest.expect(o.jobName, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); - checkUnnamed5137(o.parameters); + checkUnnamed4348(o.parameters); } buildCounterCreateJobFromTemplateRequest--; } @@ -585,14 +587,14 @@ buildCounterCustomSourceLocation--; } -buildUnnamed5138() { +buildUnnamed4349() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5138(core.List<core.String> o) { +checkUnnamed4349(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -603,7 +605,7 @@ var o = new api.DataDiskAssignment(); buildCounterDataDiskAssignment++; if (buildCounterDataDiskAssignment < 3) { - o.dataDisks = buildUnnamed5138(); + o.dataDisks = buildUnnamed4349(); o.vmInstance = "foo"; } buildCounterDataDiskAssignment--; @@ -613,7 +615,7 @@ checkDataDiskAssignment(api.DataDiskAssignment o) { buildCounterDataDiskAssignment++; if (buildCounterDataDiskAssignment < 3) { - checkUnnamed5138(o.dataDisks); + checkUnnamed4349(o.dataDisks); unittest.expect(o.vmInstance, unittest.equals('foo')); } buildCounterDataDiskAssignment--; @@ -775,20 +777,20 @@ buildCounterDynamicSourceSplit--; } -buildUnnamed5139() { +buildUnnamed4350() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5139(core.List<core.String> o) { +checkUnnamed4350(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5140() { +buildUnnamed4351() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -803,7 +805,7 @@ return o; } -checkUnnamed5140(core.Map<core.String, core.Object> o) { +checkUnnamed4351(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted2 = (o["x"]) as core.Map; unittest.expect(casted2, unittest.hasLength(3)); @@ -817,7 +819,7 @@ unittest.expect(casted3["string"], unittest.equals('foo')); } -buildUnnamed5141() { +buildUnnamed4352() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -832,7 +834,7 @@ return o; } -checkUnnamed5141(core.Map<core.String, core.Object> o) { +checkUnnamed4352(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted4 = (o["x"]) as core.Map; unittest.expect(casted4, unittest.hasLength(3)); @@ -846,7 +848,7 @@ unittest.expect(casted5["string"], unittest.equals('foo')); } -buildUnnamed5142() { +buildUnnamed4353() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -861,7 +863,7 @@ return o; } -checkUnnamed5142(core.Map<core.String, core.Object> o) { +checkUnnamed4353(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted6 = (o["x"]) as core.Map; unittest.expect(casted6, unittest.hasLength(3)); @@ -875,7 +877,7 @@ unittest.expect(casted7["string"], unittest.equals('foo')); } -buildUnnamed5143() { +buildUnnamed4354() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -890,7 +892,7 @@ return o; } -checkUnnamed5143(core.Map<core.String, core.Object> o) { +checkUnnamed4354(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted8 = (o["x"]) as core.Map; unittest.expect(casted8, unittest.hasLength(3)); @@ -904,14 +906,14 @@ unittest.expect(casted9["string"], unittest.equals('foo')); } -buildUnnamed5144() { +buildUnnamed4355() { var o = new core.List<api.WorkerPool>(); o.add(buildWorkerPool()); o.add(buildWorkerPool()); return o; } -checkUnnamed5144(core.List<api.WorkerPool> o) { +checkUnnamed4355(core.List<api.WorkerPool> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkerPool(o[0]); checkWorkerPool(o[1]); @@ -924,14 +926,14 @@ if (buildCounterEnvironment < 3) { o.clusterManagerApiService = "foo"; o.dataset = "foo"; - o.experiments = buildUnnamed5139(); - o.internalExperiments = buildUnnamed5140(); - o.sdkPipelineOptions = buildUnnamed5141(); + o.experiments = buildUnnamed4350(); + o.internalExperiments = buildUnnamed4351(); + o.sdkPipelineOptions = buildUnnamed4352(); o.serviceAccountEmail = "foo"; o.tempStoragePrefix = "foo"; - o.userAgent = buildUnnamed5142(); - o.version = buildUnnamed5143(); - o.workerPools = buildUnnamed5144(); + o.userAgent = buildUnnamed4353(); + o.version = buildUnnamed4354(); + o.workerPools = buildUnnamed4355(); } buildCounterEnvironment--; return o; @@ -942,14 +944,14 @@ if (buildCounterEnvironment < 3) { unittest.expect(o.clusterManagerApiService, unittest.equals('foo')); unittest.expect(o.dataset, unittest.equals('foo')); - checkUnnamed5139(o.experiments); - checkUnnamed5140(o.internalExperiments); - checkUnnamed5141(o.sdkPipelineOptions); + checkUnnamed4350(o.experiments); + checkUnnamed4351(o.internalExperiments); + checkUnnamed4352(o.sdkPipelineOptions); unittest.expect(o.serviceAccountEmail, unittest.equals('foo')); unittest.expect(o.tempStoragePrefix, unittest.equals('foo')); - checkUnnamed5142(o.userAgent); - checkUnnamed5143(o.version); - checkUnnamed5144(o.workerPools); + checkUnnamed4353(o.userAgent); + checkUnnamed4354(o.version); + checkUnnamed4355(o.workerPools); } buildCounterEnvironment--; } @@ -977,53 +979,53 @@ buildCounterExecutionStageState--; } -buildUnnamed5145() { +buildUnnamed4356() { var o = new core.List<api.ComponentSource>(); o.add(buildComponentSource()); o.add(buildComponentSource()); return o; } -checkUnnamed5145(core.List<api.ComponentSource> o) { +checkUnnamed4356(core.List<api.ComponentSource> o) { unittest.expect(o, unittest.hasLength(2)); checkComponentSource(o[0]); checkComponentSource(o[1]); } -buildUnnamed5146() { +buildUnnamed4357() { var o = new core.List<api.ComponentTransform>(); o.add(buildComponentTransform()); o.add(buildComponentTransform()); return o; } -checkUnnamed5146(core.List<api.ComponentTransform> o) { +checkUnnamed4357(core.List<api.ComponentTransform> o) { unittest.expect(o, unittest.hasLength(2)); checkComponentTransform(o[0]); checkComponentTransform(o[1]); } -buildUnnamed5147() { +buildUnnamed4358() { var o = new core.List<api.StageSource>(); o.add(buildStageSource()); o.add(buildStageSource()); return o; } -checkUnnamed5147(core.List<api.StageSource> o) { +checkUnnamed4358(core.List<api.StageSource> o) { unittest.expect(o, unittest.hasLength(2)); checkStageSource(o[0]); checkStageSource(o[1]); } -buildUnnamed5148() { +buildUnnamed4359() { var o = new core.List<api.StageSource>(); o.add(buildStageSource()); o.add(buildStageSource()); return o; } -checkUnnamed5148(core.List<api.StageSource> o) { +checkUnnamed4359(core.List<api.StageSource> o) { unittest.expect(o, unittest.hasLength(2)); checkStageSource(o[0]); checkStageSource(o[1]); @@ -1034,13 +1036,13 @@ var o = new api.ExecutionStageSummary(); buildCounterExecutionStageSummary++; if (buildCounterExecutionStageSummary < 3) { - o.componentSource = buildUnnamed5145(); - o.componentTransform = buildUnnamed5146(); + o.componentSource = buildUnnamed4356(); + o.componentTransform = buildUnnamed4357(); o.id = "foo"; - o.inputSource = buildUnnamed5147(); + o.inputSource = buildUnnamed4358(); o.kind = "foo"; o.name = "foo"; - o.outputSource = buildUnnamed5148(); + o.outputSource = buildUnnamed4359(); } buildCounterExecutionStageSummary--; return o; @@ -1049,13 +1051,13 @@ checkExecutionStageSummary(api.ExecutionStageSummary o) { buildCounterExecutionStageSummary++; if (buildCounterExecutionStageSummary < 3) { - checkUnnamed5145(o.componentSource); - checkUnnamed5146(o.componentTransform); + checkUnnamed4356(o.componentSource); + checkUnnamed4357(o.componentTransform); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5147(o.inputSource); + checkUnnamed4358(o.inputSource); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5148(o.outputSource); + checkUnnamed4359(o.outputSource); } buildCounterExecutionStageSummary--; } @@ -1098,14 +1100,14 @@ buildCounterFileIODetails--; } -buildUnnamed5149() { +buildUnnamed4360() { var o = new core.List<api.InstructionInput>(); o.add(buildInstructionInput()); o.add(buildInstructionInput()); return o; } -checkUnnamed5149(core.List<api.InstructionInput> o) { +checkUnnamed4360(core.List<api.InstructionInput> o) { unittest.expect(o, unittest.hasLength(2)); checkInstructionInput(o[0]); checkInstructionInput(o[1]); @@ -1116,7 +1118,7 @@ var o = new api.FlattenInstruction(); buildCounterFlattenInstruction++; if (buildCounterFlattenInstruction < 3) { - o.inputs = buildUnnamed5149(); + o.inputs = buildUnnamed4360(); } buildCounterFlattenInstruction--; return o; @@ -1125,19 +1127,19 @@ checkFlattenInstruction(api.FlattenInstruction o) { buildCounterFlattenInstruction++; if (buildCounterFlattenInstruction < 3) { - checkUnnamed5149(o.inputs); + checkUnnamed4360(o.inputs); } buildCounterFlattenInstruction--; } -buildUnnamed5150() { +buildUnnamed4361() { var o = new core.List<core.double>(); o.add(42.0); o.add(42.0); return o; } -checkUnnamed5150(core.List<core.double> o) { +checkUnnamed4361(core.List<core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42.0)); unittest.expect(o[1], unittest.equals(42.0)); @@ -1148,7 +1150,7 @@ var o = new api.FloatingPointList(); buildCounterFloatingPointList++; if (buildCounterFloatingPointList < 3) { - o.elements = buildUnnamed5150(); + o.elements = buildUnnamed4361(); } buildCounterFloatingPointList--; return o; @@ -1157,7 +1159,7 @@ checkFloatingPointList(api.FloatingPointList o) { buildCounterFloatingPointList++; if (buildCounterFloatingPointList < 3) { - checkUnnamed5150(o.elements); + checkUnnamed4361(o.elements); } buildCounterFloatingPointList--; } @@ -1246,14 +1248,14 @@ buildCounterGetTemplateResponse--; } -buildUnnamed5151() { +buildUnnamed4362() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5151(core.List<core.String> o) { +checkUnnamed4362(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1264,7 +1266,7 @@ var o = new api.Histogram(); buildCounterHistogram++; if (buildCounterHistogram < 3) { - o.bucketCounts = buildUnnamed5151(); + o.bucketCounts = buildUnnamed4362(); o.firstBucketOffset = 42; } buildCounterHistogram--; @@ -1274,7 +1276,7 @@ checkHistogram(api.Histogram o) { buildCounterHistogram++; if (buildCounterHistogram < 3) { - checkUnnamed5151(o.bucketCounts); + checkUnnamed4362(o.bucketCounts); unittest.expect(o.firstBucketOffset, unittest.equals(42)); } buildCounterHistogram--; @@ -1301,7 +1303,7 @@ buildCounterInstructionInput--; } -buildUnnamed5152() { +buildUnnamed4363() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1316,7 +1318,7 @@ return o; } -checkUnnamed5152(core.Map<core.String, core.Object> o) { +checkUnnamed4363(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted10 = (o["x"]) as core.Map; unittest.expect(casted10, unittest.hasLength(3)); @@ -1335,7 +1337,7 @@ var o = new api.InstructionOutput(); buildCounterInstructionOutput++; if (buildCounterInstructionOutput < 3) { - o.codec = buildUnnamed5152(); + o.codec = buildUnnamed4363(); o.name = "foo"; o.onlyCountKeyBytes = true; o.onlyCountValueBytes = true; @@ -1349,7 +1351,7 @@ checkInstructionOutput(api.InstructionOutput o) { buildCounterInstructionOutput++; if (buildCounterInstructionOutput < 3) { - checkUnnamed5152(o.codec); + checkUnnamed4363(o.codec); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.onlyCountKeyBytes, unittest.isTrue); unittest.expect(o.onlyCountValueBytes, unittest.isTrue); @@ -1380,14 +1382,14 @@ buildCounterIntegerGauge--; } -buildUnnamed5153() { +buildUnnamed4364() { var o = new core.List<api.SplitInt64>(); o.add(buildSplitInt64()); o.add(buildSplitInt64()); return o; } -checkUnnamed5153(core.List<api.SplitInt64> o) { +checkUnnamed4364(core.List<api.SplitInt64> o) { unittest.expect(o, unittest.hasLength(2)); checkSplitInt64(o[0]); checkSplitInt64(o[1]); @@ -1398,7 +1400,7 @@ var o = new api.IntegerList(); buildCounterIntegerList++; if (buildCounterIntegerList < 3) { - o.elements = buildUnnamed5153(); + o.elements = buildUnnamed4364(); } buildCounterIntegerList--; return o; @@ -1407,7 +1409,7 @@ checkIntegerList(api.IntegerList o) { buildCounterIntegerList++; if (buildCounterIntegerList < 3) { - checkUnnamed5153(o.elements); + checkUnnamed4364(o.elements); } buildCounterIntegerList--; } @@ -1433,66 +1435,66 @@ buildCounterIntegerMean--; } -buildUnnamed5154() { +buildUnnamed4365() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5154(core.Map<core.String, core.String> o) { +checkUnnamed4365(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5155() { +buildUnnamed4366() { var o = new core.List<api.ExecutionStageState>(); o.add(buildExecutionStageState()); o.add(buildExecutionStageState()); return o; } -checkUnnamed5155(core.List<api.ExecutionStageState> o) { +checkUnnamed4366(core.List<api.ExecutionStageState> o) { unittest.expect(o, unittest.hasLength(2)); checkExecutionStageState(o[0]); checkExecutionStageState(o[1]); } -buildUnnamed5156() { +buildUnnamed4367() { var o = new core.List<api.Step>(); o.add(buildStep()); o.add(buildStep()); return o; } -checkUnnamed5156(core.List<api.Step> o) { +checkUnnamed4367(core.List<api.Step> o) { unittest.expect(o, unittest.hasLength(2)); checkStep(o[0]); checkStep(o[1]); } -buildUnnamed5157() { +buildUnnamed4368() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5157(core.List<core.String> o) { +checkUnnamed4368(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5158() { +buildUnnamed4369() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5158(core.Map<core.String, core.String> o) { +checkUnnamed4369(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1505,13 +1507,14 @@ if (buildCounterJob < 3) { o.clientRequestId = "foo"; o.createTime = "foo"; + o.createdFromSnapshotId = "foo"; o.currentState = "foo"; o.currentStateTime = "foo"; o.environment = buildEnvironment(); o.executionInfo = buildJobExecutionInfo(); o.id = "foo"; o.jobMetadata = buildJobMetadata(); - o.labels = buildUnnamed5154(); + o.labels = buildUnnamed4365(); o.location = "foo"; o.name = "foo"; o.pipelineDescription = buildPipelineDescription(); @@ -1519,10 +1522,12 @@ o.replaceJobId = "foo"; o.replacedByJobId = "foo"; o.requestedState = "foo"; - o.stageStates = buildUnnamed5155(); - o.steps = buildUnnamed5156(); - o.tempFiles = buildUnnamed5157(); - o.transformNameMapping = buildUnnamed5158(); + o.stageStates = buildUnnamed4366(); + o.startTime = "foo"; + o.steps = buildUnnamed4367(); + o.stepsLocation = "foo"; + o.tempFiles = buildUnnamed4368(); + o.transformNameMapping = buildUnnamed4369(); o.type = "foo"; } buildCounterJob--; @@ -1534,13 +1539,14 @@ if (buildCounterJob < 3) { unittest.expect(o.clientRequestId, unittest.equals('foo')); unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.createdFromSnapshotId, unittest.equals('foo')); unittest.expect(o.currentState, unittest.equals('foo')); unittest.expect(o.currentStateTime, unittest.equals('foo')); checkEnvironment(o.environment); checkJobExecutionInfo(o.executionInfo); unittest.expect(o.id, unittest.equals('foo')); checkJobMetadata(o.jobMetadata); - checkUnnamed5154(o.labels); + checkUnnamed4365(o.labels); unittest.expect(o.location, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); checkPipelineDescription(o.pipelineDescription); @@ -1548,23 +1554,25 @@ unittest.expect(o.replaceJobId, unittest.equals('foo')); unittest.expect(o.replacedByJobId, unittest.equals('foo')); unittest.expect(o.requestedState, unittest.equals('foo')); - checkUnnamed5155(o.stageStates); - checkUnnamed5156(o.steps); - checkUnnamed5157(o.tempFiles); - checkUnnamed5158(o.transformNameMapping); + checkUnnamed4366(o.stageStates); + unittest.expect(o.startTime, unittest.equals('foo')); + checkUnnamed4367(o.steps); + unittest.expect(o.stepsLocation, unittest.equals('foo')); + checkUnnamed4368(o.tempFiles); + checkUnnamed4369(o.transformNameMapping); unittest.expect(o.type, unittest.equals('foo')); } buildCounterJob--; } -buildUnnamed5159() { +buildUnnamed4370() { var o = new core.Map<core.String, api.JobExecutionStageInfo>(); o["x"] = buildJobExecutionStageInfo(); o["y"] = buildJobExecutionStageInfo(); return o; } -checkUnnamed5159(core.Map<core.String, api.JobExecutionStageInfo> o) { +checkUnnamed4370(core.Map<core.String, api.JobExecutionStageInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkJobExecutionStageInfo(o["x"]); checkJobExecutionStageInfo(o["y"]); @@ -1575,7 +1583,7 @@ var o = new api.JobExecutionInfo(); buildCounterJobExecutionInfo++; if (buildCounterJobExecutionInfo < 3) { - o.stages = buildUnnamed5159(); + o.stages = buildUnnamed4370(); } buildCounterJobExecutionInfo--; return o; @@ -1584,19 +1592,19 @@ checkJobExecutionInfo(api.JobExecutionInfo o) { buildCounterJobExecutionInfo++; if (buildCounterJobExecutionInfo < 3) { - checkUnnamed5159(o.stages); + checkUnnamed4370(o.stages); } buildCounterJobExecutionInfo--; } -buildUnnamed5160() { +buildUnnamed4371() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5160(core.List<core.String> o) { +checkUnnamed4371(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1607,7 +1615,7 @@ var o = new api.JobExecutionStageInfo(); buildCounterJobExecutionStageInfo++; if (buildCounterJobExecutionStageInfo < 3) { - o.stepName = buildUnnamed5160(); + o.stepName = buildUnnamed4371(); } buildCounterJobExecutionStageInfo--; return o; @@ -1616,7 +1624,7 @@ checkJobExecutionStageInfo(api.JobExecutionStageInfo o) { buildCounterJobExecutionStageInfo++; if (buildCounterJobExecutionStageInfo < 3) { - checkUnnamed5160(o.stepName); + checkUnnamed4371(o.stepName); } buildCounterJobExecutionStageInfo--; } @@ -1646,79 +1654,79 @@ buildCounterJobMessage--; } -buildUnnamed5161() { +buildUnnamed4372() { var o = new core.List<api.BigTableIODetails>(); o.add(buildBigTableIODetails()); o.add(buildBigTableIODetails()); return o; } -checkUnnamed5161(core.List<api.BigTableIODetails> o) { +checkUnnamed4372(core.List<api.BigTableIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkBigTableIODetails(o[0]); checkBigTableIODetails(o[1]); } -buildUnnamed5162() { +buildUnnamed4373() { var o = new core.List<api.BigQueryIODetails>(); o.add(buildBigQueryIODetails()); o.add(buildBigQueryIODetails()); return o; } -checkUnnamed5162(core.List<api.BigQueryIODetails> o) { +checkUnnamed4373(core.List<api.BigQueryIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkBigQueryIODetails(o[0]); checkBigQueryIODetails(o[1]); } -buildUnnamed5163() { +buildUnnamed4374() { var o = new core.List<api.DatastoreIODetails>(); o.add(buildDatastoreIODetails()); o.add(buildDatastoreIODetails()); return o; } -checkUnnamed5163(core.List<api.DatastoreIODetails> o) { +checkUnnamed4374(core.List<api.DatastoreIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkDatastoreIODetails(o[0]); checkDatastoreIODetails(o[1]); } -buildUnnamed5164() { +buildUnnamed4375() { var o = new core.List<api.FileIODetails>(); o.add(buildFileIODetails()); o.add(buildFileIODetails()); return o; } -checkUnnamed5164(core.List<api.FileIODetails> o) { +checkUnnamed4375(core.List<api.FileIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkFileIODetails(o[0]); checkFileIODetails(o[1]); } -buildUnnamed5165() { +buildUnnamed4376() { var o = new core.List<api.PubSubIODetails>(); o.add(buildPubSubIODetails()); o.add(buildPubSubIODetails()); return o; } -checkUnnamed5165(core.List<api.PubSubIODetails> o) { +checkUnnamed4376(core.List<api.PubSubIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkPubSubIODetails(o[0]); checkPubSubIODetails(o[1]); } -buildUnnamed5166() { +buildUnnamed4377() { var o = new core.List<api.SpannerIODetails>(); o.add(buildSpannerIODetails()); o.add(buildSpannerIODetails()); return o; } -checkUnnamed5166(core.List<api.SpannerIODetails> o) { +checkUnnamed4377(core.List<api.SpannerIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkSpannerIODetails(o[0]); checkSpannerIODetails(o[1]); @@ -1729,13 +1737,13 @@ var o = new api.JobMetadata(); buildCounterJobMetadata++; if (buildCounterJobMetadata < 3) { - o.bigTableDetails = buildUnnamed5161(); - o.bigqueryDetails = buildUnnamed5162(); - o.datastoreDetails = buildUnnamed5163(); - o.fileDetails = buildUnnamed5164(); - o.pubsubDetails = buildUnnamed5165(); + o.bigTableDetails = buildUnnamed4372(); + o.bigqueryDetails = buildUnnamed4373(); + o.datastoreDetails = buildUnnamed4374(); + o.fileDetails = buildUnnamed4375(); + o.pubsubDetails = buildUnnamed4376(); o.sdkVersion = buildSdkVersion(); - o.spannerDetails = buildUnnamed5166(); + o.spannerDetails = buildUnnamed4377(); } buildCounterJobMetadata--; return o; @@ -1744,25 +1752,25 @@ checkJobMetadata(api.JobMetadata o) { buildCounterJobMetadata++; if (buildCounterJobMetadata < 3) { - checkUnnamed5161(o.bigTableDetails); - checkUnnamed5162(o.bigqueryDetails); - checkUnnamed5163(o.datastoreDetails); - checkUnnamed5164(o.fileDetails); - checkUnnamed5165(o.pubsubDetails); + checkUnnamed4372(o.bigTableDetails); + checkUnnamed4373(o.bigqueryDetails); + checkUnnamed4374(o.datastoreDetails); + checkUnnamed4375(o.fileDetails); + checkUnnamed4376(o.pubsubDetails); checkSdkVersion(o.sdkVersion); - checkUnnamed5166(o.spannerDetails); + checkUnnamed4377(o.spannerDetails); } buildCounterJobMetadata--; } -buildUnnamed5167() { +buildUnnamed4378() { var o = new core.List<api.MetricUpdate>(); o.add(buildMetricUpdate()); o.add(buildMetricUpdate()); return o; } -checkUnnamed5167(core.List<api.MetricUpdate> o) { +checkUnnamed4378(core.List<api.MetricUpdate> o) { unittest.expect(o, unittest.hasLength(2)); checkMetricUpdate(o[0]); checkMetricUpdate(o[1]); @@ -1774,7 +1782,7 @@ buildCounterJobMetrics++; if (buildCounterJobMetrics < 3) { o.metricTime = "foo"; - o.metrics = buildUnnamed5167(); + o.metrics = buildUnnamed4378(); } buildCounterJobMetrics--; return o; @@ -1784,7 +1792,7 @@ buildCounterJobMetrics++; if (buildCounterJobMetrics < 3) { unittest.expect(o.metricTime, unittest.equals('foo')); - checkUnnamed5167(o.metrics); + checkUnnamed4378(o.metrics); } buildCounterJobMetrics--; } @@ -1839,14 +1847,14 @@ buildCounterKeyRangeLocation--; } -buildUnnamed5168() { +buildUnnamed4379() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5168(core.Map<core.String, core.String> o) { +checkUnnamed4379(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1859,7 +1867,7 @@ if (buildCounterLaunchTemplateParameters < 3) { o.environment = buildRuntimeEnvironment(); o.jobName = "foo"; - o.parameters = buildUnnamed5168(); + o.parameters = buildUnnamed4379(); } buildCounterLaunchTemplateParameters--; return o; @@ -1870,7 +1878,7 @@ if (buildCounterLaunchTemplateParameters < 3) { checkRuntimeEnvironment(o.environment); unittest.expect(o.jobName, unittest.equals('foo')); - checkUnnamed5168(o.parameters); + checkUnnamed4379(o.parameters); } buildCounterLaunchTemplateParameters--; } @@ -1894,27 +1902,27 @@ buildCounterLaunchTemplateResponse--; } -buildUnnamed5169() { +buildUnnamed4380() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5169(core.List<core.String> o) { +checkUnnamed4380(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5170() { +buildUnnamed4381() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5170(core.List<core.String> o) { +checkUnnamed4381(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1928,8 +1936,8 @@ o.currentWorkerTime = "foo"; o.location = "foo"; o.requestedLeaseDuration = "foo"; - o.workItemTypes = buildUnnamed5169(); - o.workerCapabilities = buildUnnamed5170(); + o.workItemTypes = buildUnnamed4380(); + o.workerCapabilities = buildUnnamed4381(); o.workerId = "foo"; } buildCounterLeaseWorkItemRequest--; @@ -1942,21 +1950,21 @@ unittest.expect(o.currentWorkerTime, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); unittest.expect(o.requestedLeaseDuration, unittest.equals('foo')); - checkUnnamed5169(o.workItemTypes); - checkUnnamed5170(o.workerCapabilities); + checkUnnamed4380(o.workItemTypes); + checkUnnamed4381(o.workerCapabilities); unittest.expect(o.workerId, unittest.equals('foo')); } buildCounterLeaseWorkItemRequest--; } -buildUnnamed5171() { +buildUnnamed4382() { var o = new core.List<api.WorkItem>(); o.add(buildWorkItem()); o.add(buildWorkItem()); return o; } -checkUnnamed5171(core.List<api.WorkItem> o) { +checkUnnamed4382(core.List<api.WorkItem> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkItem(o[0]); checkWorkItem(o[1]); @@ -1967,7 +1975,7 @@ var o = new api.LeaseWorkItemResponse(); buildCounterLeaseWorkItemResponse++; if (buildCounterLeaseWorkItemResponse < 3) { - o.workItems = buildUnnamed5171(); + o.workItems = buildUnnamed4382(); } buildCounterLeaseWorkItemResponse--; return o; @@ -1976,32 +1984,32 @@ checkLeaseWorkItemResponse(api.LeaseWorkItemResponse o) { buildCounterLeaseWorkItemResponse++; if (buildCounterLeaseWorkItemResponse < 3) { - checkUnnamed5171(o.workItems); + checkUnnamed4382(o.workItems); } buildCounterLeaseWorkItemResponse--; } -buildUnnamed5172() { +buildUnnamed4383() { var o = new core.List<api.AutoscalingEvent>(); o.add(buildAutoscalingEvent()); o.add(buildAutoscalingEvent()); return o; } -checkUnnamed5172(core.List<api.AutoscalingEvent> o) { +checkUnnamed4383(core.List<api.AutoscalingEvent> o) { unittest.expect(o, unittest.hasLength(2)); checkAutoscalingEvent(o[0]); checkAutoscalingEvent(o[1]); } -buildUnnamed5173() { +buildUnnamed4384() { var o = new core.List<api.JobMessage>(); o.add(buildJobMessage()); o.add(buildJobMessage()); return o; } -checkUnnamed5173(core.List<api.JobMessage> o) { +checkUnnamed4384(core.List<api.JobMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkJobMessage(o[0]); checkJobMessage(o[1]); @@ -2012,8 +2020,8 @@ var o = new api.ListJobMessagesResponse(); buildCounterListJobMessagesResponse++; if (buildCounterListJobMessagesResponse < 3) { - o.autoscalingEvents = buildUnnamed5172(); - o.jobMessages = buildUnnamed5173(); + o.autoscalingEvents = buildUnnamed4383(); + o.jobMessages = buildUnnamed4384(); o.nextPageToken = "foo"; } buildCounterListJobMessagesResponse--; @@ -2023,34 +2031,34 @@ checkListJobMessagesResponse(api.ListJobMessagesResponse o) { buildCounterListJobMessagesResponse++; if (buildCounterListJobMessagesResponse < 3) { - checkUnnamed5172(o.autoscalingEvents); - checkUnnamed5173(o.jobMessages); + checkUnnamed4383(o.autoscalingEvents); + checkUnnamed4384(o.jobMessages); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListJobMessagesResponse--; } -buildUnnamed5174() { +buildUnnamed4385() { var o = new core.List<api.FailedLocation>(); o.add(buildFailedLocation()); o.add(buildFailedLocation()); return o; } -checkUnnamed5174(core.List<api.FailedLocation> o) { +checkUnnamed4385(core.List<api.FailedLocation> o) { unittest.expect(o, unittest.hasLength(2)); checkFailedLocation(o[0]); checkFailedLocation(o[1]); } -buildUnnamed5175() { +buildUnnamed4386() { var o = new core.List<api.Job>(); o.add(buildJob()); o.add(buildJob()); return o; } -checkUnnamed5175(core.List<api.Job> o) { +checkUnnamed4386(core.List<api.Job> o) { unittest.expect(o, unittest.hasLength(2)); checkJob(o[0]); checkJob(o[1]); @@ -2061,8 +2069,8 @@ var o = new api.ListJobsResponse(); buildCounterListJobsResponse++; if (buildCounterListJobsResponse < 3) { - o.failedLocation = buildUnnamed5174(); - o.jobs = buildUnnamed5175(); + o.failedLocation = buildUnnamed4385(); + o.jobs = buildUnnamed4386(); o.nextPageToken = "foo"; } buildCounterListJobsResponse--; @@ -2072,21 +2080,21 @@ checkListJobsResponse(api.ListJobsResponse o) { buildCounterListJobsResponse++; if (buildCounterListJobsResponse < 3) { - checkUnnamed5174(o.failedLocation); - checkUnnamed5175(o.jobs); + checkUnnamed4385(o.failedLocation); + checkUnnamed4386(o.jobs); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListJobsResponse--; } -buildUnnamed5176() { +buildUnnamed4387() { var o = new core.List<api.ParallelInstruction>(); o.add(buildParallelInstruction()); o.add(buildParallelInstruction()); return o; } -checkUnnamed5176(core.List<api.ParallelInstruction> o) { +checkUnnamed4387(core.List<api.ParallelInstruction> o) { unittest.expect(o, unittest.hasLength(2)); checkParallelInstruction(o[0]); checkParallelInstruction(o[1]); @@ -2097,7 +2105,8 @@ var o = new api.MapTask(); buildCounterMapTask++; if (buildCounterMapTask < 3) { - o.instructions = buildUnnamed5176(); + o.counterPrefix = "foo"; + o.instructions = buildUnnamed4387(); o.stageName = "foo"; o.systemName = "foo"; } @@ -2108,7 +2117,8 @@ checkMapTask(api.MapTask o) { buildCounterMapTask++; if (buildCounterMapTask < 3) { - checkUnnamed5176(o.instructions); + unittest.expect(o.counterPrefix, unittest.equals('foo')); + checkUnnamed4387(o.instructions); unittest.expect(o.stageName, unittest.equals('foo')); unittest.expect(o.systemName, unittest.equals('foo')); } @@ -2136,14 +2146,14 @@ buildCounterMetricShortId--; } -buildUnnamed5177() { +buildUnnamed4388() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5177(core.Map<core.String, core.String> o) { +checkUnnamed4388(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -2154,7 +2164,7 @@ var o = new api.MetricStructuredName(); buildCounterMetricStructuredName++; if (buildCounterMetricStructuredName < 3) { - o.context = buildUnnamed5177(); + o.context = buildUnnamed4388(); o.name = "foo"; o.origin = "foo"; } @@ -2165,7 +2175,7 @@ checkMetricStructuredName(api.MetricStructuredName o) { buildCounterMetricStructuredName++; if (buildCounterMetricStructuredName < 3) { - checkUnnamed5177(o.context); + checkUnnamed4388(o.context); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.origin, unittest.equals('foo')); } @@ -2347,33 +2357,33 @@ buildCounterPackage--; } -buildUnnamed5178() { +buildUnnamed4389() { var o = new core.List<api.MultiOutputInfo>(); o.add(buildMultiOutputInfo()); o.add(buildMultiOutputInfo()); return o; } -checkUnnamed5178(core.List<api.MultiOutputInfo> o) { +checkUnnamed4389(core.List<api.MultiOutputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkMultiOutputInfo(o[0]); checkMultiOutputInfo(o[1]); } -buildUnnamed5179() { +buildUnnamed4390() { var o = new core.List<api.SideInputInfo>(); o.add(buildSideInputInfo()); o.add(buildSideInputInfo()); return o; } -checkUnnamed5179(core.List<api.SideInputInfo> o) { +checkUnnamed4390(core.List<api.SideInputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkSideInputInfo(o[0]); checkSideInputInfo(o[1]); } -buildUnnamed5180() { +buildUnnamed4391() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2388,7 +2398,7 @@ return o; } -checkUnnamed5180(core.Map<core.String, core.Object> o) { +checkUnnamed4391(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted19 = (o["x"]) as core.Map; unittest.expect(casted19, unittest.hasLength(3)); @@ -2408,10 +2418,10 @@ buildCounterParDoInstruction++; if (buildCounterParDoInstruction < 3) { o.input = buildInstructionInput(); - o.multiOutputInfos = buildUnnamed5178(); + o.multiOutputInfos = buildUnnamed4389(); o.numOutputs = 42; - o.sideInputs = buildUnnamed5179(); - o.userFn = buildUnnamed5180(); + o.sideInputs = buildUnnamed4390(); + o.userFn = buildUnnamed4391(); } buildCounterParDoInstruction--; return o; @@ -2421,22 +2431,22 @@ buildCounterParDoInstruction++; if (buildCounterParDoInstruction < 3) { checkInstructionInput(o.input); - checkUnnamed5178(o.multiOutputInfos); + checkUnnamed4389(o.multiOutputInfos); unittest.expect(o.numOutputs, unittest.equals(42)); - checkUnnamed5179(o.sideInputs); - checkUnnamed5180(o.userFn); + checkUnnamed4390(o.sideInputs); + checkUnnamed4391(o.userFn); } buildCounterParDoInstruction--; } -buildUnnamed5181() { +buildUnnamed4392() { var o = new core.List<api.InstructionOutput>(); o.add(buildInstructionOutput()); o.add(buildInstructionOutput()); return o; } -checkUnnamed5181(core.List<api.InstructionOutput> o) { +checkUnnamed4392(core.List<api.InstructionOutput> o) { unittest.expect(o, unittest.hasLength(2)); checkInstructionOutput(o[0]); checkInstructionOutput(o[1]); @@ -2450,7 +2460,7 @@ o.flatten = buildFlattenInstruction(); o.name = "foo"; o.originalName = "foo"; - o.outputs = buildUnnamed5181(); + o.outputs = buildUnnamed4392(); o.parDo = buildParDoInstruction(); o.partialGroupByKey = buildPartialGroupByKeyInstruction(); o.read = buildReadInstruction(); @@ -2467,7 +2477,7 @@ checkFlattenInstruction(o.flatten); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.originalName, unittest.equals('foo')); - checkUnnamed5181(o.outputs); + checkUnnamed4392(o.outputs); checkParDoInstruction(o.parDo); checkPartialGroupByKeyInstruction(o.partialGroupByKey); checkReadInstruction(o.read); @@ -2506,14 +2516,14 @@ buildCounterParameter--; } -buildUnnamed5182() { +buildUnnamed4393() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5182(core.List<core.String> o) { +checkUnnamed4393(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2528,7 +2538,7 @@ o.isOptional = true; o.label = "foo"; o.name = "foo"; - o.regexes = buildUnnamed5182(); + o.regexes = buildUnnamed4393(); } buildCounterParameterMetadata--; return o; @@ -2541,12 +2551,12 @@ unittest.expect(o.isOptional, unittest.isTrue); unittest.expect(o.label, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5182(o.regexes); + checkUnnamed4393(o.regexes); } buildCounterParameterMetadata--; } -buildUnnamed5183() { +buildUnnamed4394() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2561,7 +2571,7 @@ return o; } -checkUnnamed5183(core.Map<core.String, core.Object> o) { +checkUnnamed4394(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted22 = (o["x"]) as core.Map; unittest.expect(casted22, unittest.hasLength(3)); @@ -2575,20 +2585,20 @@ unittest.expect(casted23["string"], unittest.equals('foo')); } -buildUnnamed5184() { +buildUnnamed4395() { var o = new core.List<api.SideInputInfo>(); o.add(buildSideInputInfo()); o.add(buildSideInputInfo()); return o; } -checkUnnamed5184(core.List<api.SideInputInfo> o) { +checkUnnamed4395(core.List<api.SideInputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkSideInputInfo(o[0]); checkSideInputInfo(o[1]); } -buildUnnamed5185() { +buildUnnamed4396() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2603,7 +2613,7 @@ return o; } -checkUnnamed5185(core.Map<core.String, core.Object> o) { +checkUnnamed4396(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted24 = (o["x"]) as core.Map; unittest.expect(casted24, unittest.hasLength(3)); @@ -2623,11 +2633,11 @@ buildCounterPartialGroupByKeyInstruction++; if (buildCounterPartialGroupByKeyInstruction < 3) { o.input = buildInstructionInput(); - o.inputElementCodec = buildUnnamed5183(); + o.inputElementCodec = buildUnnamed4394(); o.originalCombineValuesInputStoreName = "foo"; o.originalCombineValuesStepName = "foo"; - o.sideInputs = buildUnnamed5184(); - o.valueCombiningFn = buildUnnamed5185(); + o.sideInputs = buildUnnamed4395(); + o.valueCombiningFn = buildUnnamed4396(); } buildCounterPartialGroupByKeyInstruction--; return o; @@ -2637,50 +2647,50 @@ buildCounterPartialGroupByKeyInstruction++; if (buildCounterPartialGroupByKeyInstruction < 3) { checkInstructionInput(o.input); - checkUnnamed5183(o.inputElementCodec); + checkUnnamed4394(o.inputElementCodec); unittest.expect( o.originalCombineValuesInputStoreName, unittest.equals('foo')); unittest.expect(o.originalCombineValuesStepName, unittest.equals('foo')); - checkUnnamed5184(o.sideInputs); - checkUnnamed5185(o.valueCombiningFn); + checkUnnamed4395(o.sideInputs); + checkUnnamed4396(o.valueCombiningFn); } buildCounterPartialGroupByKeyInstruction--; } -buildUnnamed5186() { +buildUnnamed4397() { var o = new core.List<api.DisplayData>(); o.add(buildDisplayData()); o.add(buildDisplayData()); return o; } -checkUnnamed5186(core.List<api.DisplayData> o) { +checkUnnamed4397(core.List<api.DisplayData> o) { unittest.expect(o, unittest.hasLength(2)); checkDisplayData(o[0]); checkDisplayData(o[1]); } -buildUnnamed5187() { +buildUnnamed4398() { var o = new core.List<api.ExecutionStageSummary>(); o.add(buildExecutionStageSummary()); o.add(buildExecutionStageSummary()); return o; } -checkUnnamed5187(core.List<api.ExecutionStageSummary> o) { +checkUnnamed4398(core.List<api.ExecutionStageSummary> o) { unittest.expect(o, unittest.hasLength(2)); checkExecutionStageSummary(o[0]); checkExecutionStageSummary(o[1]); } -buildUnnamed5188() { +buildUnnamed4399() { var o = new core.List<api.TransformSummary>(); o.add(buildTransformSummary()); o.add(buildTransformSummary()); return o; } -checkUnnamed5188(core.List<api.TransformSummary> o) { +checkUnnamed4399(core.List<api.TransformSummary> o) { unittest.expect(o, unittest.hasLength(2)); checkTransformSummary(o[0]); checkTransformSummary(o[1]); @@ -2691,9 +2701,9 @@ var o = new api.PipelineDescription(); buildCounterPipelineDescription++; if (buildCounterPipelineDescription < 3) { - o.displayData = buildUnnamed5186(); - o.executionPipelineStage = buildUnnamed5187(); - o.originalPipelineTransform = buildUnnamed5188(); + o.displayData = buildUnnamed4397(); + o.executionPipelineStage = buildUnnamed4398(); + o.originalPipelineTransform = buildUnnamed4399(); } buildCounterPipelineDescription--; return o; @@ -2702,9 +2712,9 @@ checkPipelineDescription(api.PipelineDescription o) { buildCounterPipelineDescription++; if (buildCounterPipelineDescription < 3) { - checkUnnamed5186(o.displayData); - checkUnnamed5187(o.executionPipelineStage); - checkUnnamed5188(o.originalPipelineTransform); + checkUnnamed4397(o.displayData); + checkUnnamed4398(o.executionPipelineStage); + checkUnnamed4399(o.originalPipelineTransform); } buildCounterPipelineDescription--; } @@ -2809,14 +2819,14 @@ buildCounterReadInstruction--; } -buildUnnamed5189() { +buildUnnamed4400() { var o = new core.List<api.WorkItemStatus>(); o.add(buildWorkItemStatus()); o.add(buildWorkItemStatus()); return o; } -checkUnnamed5189(core.List<api.WorkItemStatus> o) { +checkUnnamed4400(core.List<api.WorkItemStatus> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkItemStatus(o[0]); checkWorkItemStatus(o[1]); @@ -2829,7 +2839,7 @@ if (buildCounterReportWorkItemStatusRequest < 3) { o.currentWorkerTime = "foo"; o.location = "foo"; - o.workItemStatuses = buildUnnamed5189(); + o.workItemStatuses = buildUnnamed4400(); o.workerId = "foo"; } buildCounterReportWorkItemStatusRequest--; @@ -2841,20 +2851,20 @@ if (buildCounterReportWorkItemStatusRequest < 3) { unittest.expect(o.currentWorkerTime, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); - checkUnnamed5189(o.workItemStatuses); + checkUnnamed4400(o.workItemStatuses); unittest.expect(o.workerId, unittest.equals('foo')); } buildCounterReportWorkItemStatusRequest--; } -buildUnnamed5190() { +buildUnnamed4401() { var o = new core.List<api.WorkItemServiceState>(); o.add(buildWorkItemServiceState()); o.add(buildWorkItemServiceState()); return o; } -checkUnnamed5190(core.List<api.WorkItemServiceState> o) { +checkUnnamed4401(core.List<api.WorkItemServiceState> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkItemServiceState(o[0]); checkWorkItemServiceState(o[1]); @@ -2865,7 +2875,7 @@ var o = new api.ReportWorkItemStatusResponse(); buildCounterReportWorkItemStatusResponse++; if (buildCounterReportWorkItemStatusResponse < 3) { - o.workItemServiceStates = buildUnnamed5190(); + o.workItemServiceStates = buildUnnamed4401(); } buildCounterReportWorkItemStatusResponse--; return o; @@ -2874,7 +2884,7 @@ checkReportWorkItemStatusResponse(api.ReportWorkItemStatusResponse o) { buildCounterReportWorkItemStatusResponse++; if (buildCounterReportWorkItemStatusResponse < 3) { - checkUnnamed5190(o.workItemServiceStates); + checkUnnamed4401(o.workItemServiceStates); } buildCounterReportWorkItemStatusResponse--; } @@ -2900,14 +2910,14 @@ buildCounterReportedParallelism--; } -buildUnnamed5191() { +buildUnnamed4402() { var o = new core.List<api.CPUTime>(); o.add(buildCPUTime()); o.add(buildCPUTime()); return o; } -checkUnnamed5191(core.List<api.CPUTime> o) { +checkUnnamed4402(core.List<api.CPUTime> o) { unittest.expect(o, unittest.hasLength(2)); checkCPUTime(o[0]); checkCPUTime(o[1]); @@ -2918,7 +2928,7 @@ var o = new api.ResourceUtilizationReport(); buildCounterResourceUtilizationReport++; if (buildCounterResourceUtilizationReport < 3) { - o.cpuTime = buildUnnamed5191(); + o.cpuTime = buildUnnamed4402(); } buildCounterResourceUtilizationReport--; return o; @@ -2927,7 +2937,7 @@ checkResourceUtilizationReport(api.ResourceUtilizationReport o) { buildCounterResourceUtilizationReport++; if (buildCounterResourceUtilizationReport < 3) { - checkUnnamed5191(o.cpuTime); + checkUnnamed4402(o.cpuTime); } buildCounterResourceUtilizationReport--; } @@ -2948,29 +2958,44 @@ buildCounterResourceUtilizationReportResponse--; } -buildUnnamed5192() { +buildUnnamed4403() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5192(core.List<core.String> o) { +checkUnnamed4403(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } +buildUnnamed4404() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4404(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + core.int buildCounterRuntimeEnvironment = 0; buildRuntimeEnvironment() { var o = new api.RuntimeEnvironment(); buildCounterRuntimeEnvironment++; if (buildCounterRuntimeEnvironment < 3) { - o.additionalExperiments = buildUnnamed5192(); + o.additionalExperiments = buildUnnamed4403(); + o.additionalUserLabels = buildUnnamed4404(); o.bypassTempDirValidation = true; o.machineType = "foo"; o.maxWorkers = 42; o.network = "foo"; + o.numWorkers = 42; o.serviceAccountEmail = "foo"; o.subnetwork = "foo"; o.tempLocation = "foo"; @@ -2983,11 +3008,13 @@ checkRuntimeEnvironment(api.RuntimeEnvironment o) { buildCounterRuntimeEnvironment++; if (buildCounterRuntimeEnvironment < 3) { - checkUnnamed5192(o.additionalExperiments); + checkUnnamed4403(o.additionalExperiments); + checkUnnamed4404(o.additionalUserLabels); unittest.expect(o.bypassTempDirValidation, unittest.isTrue); unittest.expect(o.machineType, unittest.equals('foo')); unittest.expect(o.maxWorkers, unittest.equals(42)); unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.numWorkers, unittest.equals(42)); unittest.expect(o.serviceAccountEmail, unittest.equals('foo')); unittest.expect(o.subnetwork, unittest.equals('foo')); unittest.expect(o.tempLocation, unittest.equals('foo')); @@ -3059,14 +3086,14 @@ buildCounterSendDebugCaptureResponse--; } -buildUnnamed5193() { +buildUnnamed4405() { var o = new core.List<api.WorkerMessage>(); o.add(buildWorkerMessage()); o.add(buildWorkerMessage()); return o; } -checkUnnamed5193(core.List<api.WorkerMessage> o) { +checkUnnamed4405(core.List<api.WorkerMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkerMessage(o[0]); checkWorkerMessage(o[1]); @@ -3078,7 +3105,7 @@ buildCounterSendWorkerMessagesRequest++; if (buildCounterSendWorkerMessagesRequest < 3) { o.location = "foo"; - o.workerMessages = buildUnnamed5193(); + o.workerMessages = buildUnnamed4405(); } buildCounterSendWorkerMessagesRequest--; return o; @@ -3088,19 +3115,19 @@ buildCounterSendWorkerMessagesRequest++; if (buildCounterSendWorkerMessagesRequest < 3) { unittest.expect(o.location, unittest.equals('foo')); - checkUnnamed5193(o.workerMessages); + checkUnnamed4405(o.workerMessages); } buildCounterSendWorkerMessagesRequest--; } -buildUnnamed5194() { +buildUnnamed4406() { var o = new core.List<api.WorkerMessageResponse>(); o.add(buildWorkerMessageResponse()); o.add(buildWorkerMessageResponse()); return o; } -checkUnnamed5194(core.List<api.WorkerMessageResponse> o) { +checkUnnamed4406(core.List<api.WorkerMessageResponse> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkerMessageResponse(o[0]); checkWorkerMessageResponse(o[1]); @@ -3111,7 +3138,7 @@ var o = new api.SendWorkerMessagesResponse(); buildCounterSendWorkerMessagesResponse++; if (buildCounterSendWorkerMessagesResponse < 3) { - o.workerMessageResponses = buildUnnamed5194(); + o.workerMessageResponses = buildUnnamed4406(); } buildCounterSendWorkerMessagesResponse--; return o; @@ -3120,38 +3147,38 @@ checkSendWorkerMessagesResponse(api.SendWorkerMessagesResponse o) { buildCounterSendWorkerMessagesResponse++; if (buildCounterSendWorkerMessagesResponse < 3) { - checkUnnamed5194(o.workerMessageResponses); + checkUnnamed4406(o.workerMessageResponses); } buildCounterSendWorkerMessagesResponse--; } -buildUnnamed5195() { +buildUnnamed4407() { var o = new core.List<api.SideInputInfo>(); o.add(buildSideInputInfo()); o.add(buildSideInputInfo()); return o; } -checkUnnamed5195(core.List<api.SideInputInfo> o) { +checkUnnamed4407(core.List<api.SideInputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkSideInputInfo(o[0]); checkSideInputInfo(o[1]); } -buildUnnamed5196() { +buildUnnamed4408() { var o = new core.List<api.SeqMapTaskOutputInfo>(); o.add(buildSeqMapTaskOutputInfo()); o.add(buildSeqMapTaskOutputInfo()); return o; } -checkUnnamed5196(core.List<api.SeqMapTaskOutputInfo> o) { +checkUnnamed4408(core.List<api.SeqMapTaskOutputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkSeqMapTaskOutputInfo(o[0]); checkSeqMapTaskOutputInfo(o[1]); } -buildUnnamed5197() { +buildUnnamed4409() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3166,7 +3193,7 @@ return o; } -checkUnnamed5197(core.Map<core.String, core.Object> o) { +checkUnnamed4409(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted26 = (o["x"]) as core.Map; unittest.expect(casted26, unittest.hasLength(3)); @@ -3185,12 +3212,12 @@ var o = new api.SeqMapTask(); buildCounterSeqMapTask++; if (buildCounterSeqMapTask < 3) { - o.inputs = buildUnnamed5195(); + o.inputs = buildUnnamed4407(); o.name = "foo"; - o.outputInfos = buildUnnamed5196(); + o.outputInfos = buildUnnamed4408(); o.stageName = "foo"; o.systemName = "foo"; - o.userFn = buildUnnamed5197(); + o.userFn = buildUnnamed4409(); } buildCounterSeqMapTask--; return o; @@ -3199,12 +3226,12 @@ checkSeqMapTask(api.SeqMapTask o) { buildCounterSeqMapTask++; if (buildCounterSeqMapTask < 3) { - checkUnnamed5195(o.inputs); + checkUnnamed4407(o.inputs); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5196(o.outputInfos); + checkUnnamed4408(o.outputInfos); unittest.expect(o.stageName, unittest.equals('foo')); unittest.expect(o.systemName, unittest.equals('foo')); - checkUnnamed5197(o.userFn); + checkUnnamed4409(o.userFn); } buildCounterSeqMapTask--; } @@ -3251,7 +3278,7 @@ buildCounterShellTask--; } -buildUnnamed5198() { +buildUnnamed4410() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3266,7 +3293,7 @@ return o; } -checkUnnamed5198(core.Map<core.String, core.Object> o) { +checkUnnamed4410(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted28 = (o["x"]) as core.Map; unittest.expect(casted28, unittest.hasLength(3)); @@ -3280,14 +3307,14 @@ unittest.expect(casted29["string"], unittest.equals('foo')); } -buildUnnamed5199() { +buildUnnamed4411() { var o = new core.List<api.Source>(); o.add(buildSource()); o.add(buildSource()); return o; } -checkUnnamed5199(core.List<api.Source> o) { +checkUnnamed4411(core.List<api.Source> o) { unittest.expect(o, unittest.hasLength(2)); checkSource(o[0]); checkSource(o[1]); @@ -3298,8 +3325,8 @@ var o = new api.SideInputInfo(); buildCounterSideInputInfo++; if (buildCounterSideInputInfo < 3) { - o.kind = buildUnnamed5198(); - o.sources = buildUnnamed5199(); + o.kind = buildUnnamed4410(); + o.sources = buildUnnamed4411(); o.tag = "foo"; } buildCounterSideInputInfo--; @@ -3309,14 +3336,14 @@ checkSideInputInfo(api.SideInputInfo o) { buildCounterSideInputInfo++; if (buildCounterSideInputInfo < 3) { - checkUnnamed5198(o.kind); - checkUnnamed5199(o.sources); + checkUnnamed4410(o.kind); + checkUnnamed4411(o.sources); unittest.expect(o.tag, unittest.equals('foo')); } buildCounterSideInputInfo--; } -buildUnnamed5200() { +buildUnnamed4412() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3331,7 +3358,7 @@ return o; } -checkUnnamed5200(core.Map<core.String, core.Object> o) { +checkUnnamed4412(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted30 = (o["x"]) as core.Map; unittest.expect(casted30, unittest.hasLength(3)); @@ -3345,7 +3372,7 @@ unittest.expect(casted31["string"], unittest.equals('foo')); } -buildUnnamed5201() { +buildUnnamed4413() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3360,7 +3387,7 @@ return o; } -checkUnnamed5201(core.Map<core.String, core.Object> o) { +checkUnnamed4413(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted32 = (o["x"]) as core.Map; unittest.expect(casted32, unittest.hasLength(3)); @@ -3379,8 +3406,8 @@ var o = new api.Sink(); buildCounterSink++; if (buildCounterSink < 3) { - o.codec = buildUnnamed5200(); - o.spec = buildUnnamed5201(); + o.codec = buildUnnamed4412(); + o.spec = buildUnnamed4413(); } buildCounterSink--; return o; @@ -3389,13 +3416,61 @@ checkSink(api.Sink o) { buildCounterSink++; if (buildCounterSink < 3) { - checkUnnamed5200(o.codec); - checkUnnamed5201(o.spec); + checkUnnamed4412(o.codec); + checkUnnamed4413(o.spec); } buildCounterSink--; } -buildUnnamed5202() { +core.int buildCounterSnapshot = 0; +buildSnapshot() { + var o = new api.Snapshot(); + buildCounterSnapshot++; + if (buildCounterSnapshot < 3) { + o.creationTime = "foo"; + o.id = "foo"; + o.projectId = "foo"; + o.sourceJobId = "foo"; + o.ttl = "foo"; + } + buildCounterSnapshot--; + return o; +} + +checkSnapshot(api.Snapshot o) { + buildCounterSnapshot++; + if (buildCounterSnapshot < 3) { + unittest.expect(o.creationTime, unittest.equals('foo')); + unittest.expect(o.id, unittest.equals('foo')); + unittest.expect(o.projectId, unittest.equals('foo')); + unittest.expect(o.sourceJobId, unittest.equals('foo')); + unittest.expect(o.ttl, unittest.equals('foo')); + } + buildCounterSnapshot--; +} + +core.int buildCounterSnapshotJobRequest = 0; +buildSnapshotJobRequest() { + var o = new api.SnapshotJobRequest(); + buildCounterSnapshotJobRequest++; + if (buildCounterSnapshotJobRequest < 3) { + o.location = "foo"; + o.ttl = "foo"; + } + buildCounterSnapshotJobRequest--; + return o; +} + +checkSnapshotJobRequest(api.SnapshotJobRequest o) { + buildCounterSnapshotJobRequest++; + if (buildCounterSnapshotJobRequest < 3) { + unittest.expect(o.location, unittest.equals('foo')); + unittest.expect(o.ttl, unittest.equals('foo')); + } + buildCounterSnapshotJobRequest--; +} + +buildUnnamed4414() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3410,7 +3485,7 @@ return o; } -checkUnnamed5202(core.Map<core.String, core.Object> o) { +checkUnnamed4414(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted34 = (o["x"]) as core.Map; unittest.expect(casted34, unittest.hasLength(3)); @@ -3424,20 +3499,20 @@ unittest.expect(casted35["string"], unittest.equals('foo')); } -buildUnnamed5203() { +buildUnnamed4415() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5202()); - o.add(buildUnnamed5202()); + o.add(buildUnnamed4414()); + o.add(buildUnnamed4414()); return o; } -checkUnnamed5203(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4415(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5202(o[0]); - checkUnnamed5202(o[1]); + checkUnnamed4414(o[0]); + checkUnnamed4414(o[1]); } -buildUnnamed5204() { +buildUnnamed4416() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3452,7 +3527,7 @@ return o; } -checkUnnamed5204(core.Map<core.String, core.Object> o) { +checkUnnamed4416(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted36 = (o["x"]) as core.Map; unittest.expect(casted36, unittest.hasLength(3)); @@ -3466,7 +3541,7 @@ unittest.expect(casted37["string"], unittest.equals('foo')); } -buildUnnamed5205() { +buildUnnamed4417() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3481,7 +3556,7 @@ return o; } -checkUnnamed5205(core.Map<core.String, core.Object> o) { +checkUnnamed4417(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted38 = (o["x"]) as core.Map; unittest.expect(casted38, unittest.hasLength(3)); @@ -3500,11 +3575,11 @@ var o = new api.Source(); buildCounterSource++; if (buildCounterSource < 3) { - o.baseSpecs = buildUnnamed5203(); - o.codec = buildUnnamed5204(); + o.baseSpecs = buildUnnamed4415(); + o.codec = buildUnnamed4416(); o.doesNotNeedSplitting = true; o.metadata = buildSourceMetadata(); - o.spec = buildUnnamed5205(); + o.spec = buildUnnamed4417(); } buildCounterSource--; return o; @@ -3513,11 +3588,11 @@ checkSource(api.Source o) { buildCounterSource++; if (buildCounterSource < 3) { - checkUnnamed5203(o.baseSpecs); - checkUnnamed5204(o.codec); + checkUnnamed4415(o.baseSpecs); + checkUnnamed4416(o.codec); unittest.expect(o.doesNotNeedSplitting, unittest.isTrue); checkSourceMetadata(o.metadata); - checkUnnamed5205(o.spec); + checkUnnamed4417(o.spec); } buildCounterSource--; } @@ -3700,27 +3775,27 @@ buildCounterSourceSplitRequest--; } -buildUnnamed5206() { +buildUnnamed4418() { var o = new core.List<api.DerivedSource>(); o.add(buildDerivedSource()); o.add(buildDerivedSource()); return o; } -checkUnnamed5206(core.List<api.DerivedSource> o) { +checkUnnamed4418(core.List<api.DerivedSource> o) { unittest.expect(o, unittest.hasLength(2)); checkDerivedSource(o[0]); checkDerivedSource(o[1]); } -buildUnnamed5207() { +buildUnnamed4419() { var o = new core.List<api.SourceSplitShard>(); o.add(buildSourceSplitShard()); o.add(buildSourceSplitShard()); return o; } -checkUnnamed5207(core.List<api.SourceSplitShard> o) { +checkUnnamed4419(core.List<api.SourceSplitShard> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceSplitShard(o[0]); checkSourceSplitShard(o[1]); @@ -3731,9 +3806,9 @@ var o = new api.SourceSplitResponse(); buildCounterSourceSplitResponse++; if (buildCounterSourceSplitResponse < 3) { - o.bundles = buildUnnamed5206(); + o.bundles = buildUnnamed4418(); o.outcome = "foo"; - o.shards = buildUnnamed5207(); + o.shards = buildUnnamed4419(); } buildCounterSourceSplitResponse--; return o; @@ -3742,9 +3817,9 @@ checkSourceSplitResponse(api.SourceSplitResponse o) { buildCounterSourceSplitResponse++; if (buildCounterSourceSplitResponse < 3) { - checkUnnamed5206(o.bundles); + checkUnnamed4418(o.bundles); unittest.expect(o.outcome, unittest.equals('foo')); - checkUnnamed5207(o.shards); + checkUnnamed4419(o.shards); } buildCounterSourceSplitResponse--; } @@ -3860,7 +3935,7 @@ buildCounterStateFamilyConfig--; } -buildUnnamed5208() { +buildUnnamed4420() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3875,7 +3950,7 @@ return o; } -checkUnnamed5208(core.Map<core.String, core.Object> o) { +checkUnnamed4420(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted40 = (o["x"]) as core.Map; unittest.expect(casted40, unittest.hasLength(3)); @@ -3889,17 +3964,17 @@ unittest.expect(casted41["string"], unittest.equals('foo')); } -buildUnnamed5209() { +buildUnnamed4421() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5208()); - o.add(buildUnnamed5208()); + o.add(buildUnnamed4420()); + o.add(buildUnnamed4420()); return o; } -checkUnnamed5209(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4421(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5208(o[0]); - checkUnnamed5208(o[1]); + checkUnnamed4420(o[0]); + checkUnnamed4420(o[1]); } core.int buildCounterStatus = 0; @@ -3908,7 +3983,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5209(); + o.details = buildUnnamed4421(); o.message = "foo"; } buildCounterStatus--; @@ -3919,13 +3994,13 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5209(o.details); + checkUnnamed4421(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5210() { +buildUnnamed4422() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3940,7 +4015,7 @@ return o; } -checkUnnamed5210(core.Map<core.String, core.Object> o) { +checkUnnamed4422(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted42 = (o["x"]) as core.Map; unittest.expect(casted42, unittest.hasLength(3)); @@ -3961,7 +4036,7 @@ if (buildCounterStep < 3) { o.kind = "foo"; o.name = "foo"; - o.properties = buildUnnamed5210(); + o.properties = buildUnnamed4422(); } buildCounterStep--; return o; @@ -3972,7 +4047,7 @@ if (buildCounterStep < 3) { unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5210(o.properties); + checkUnnamed4422(o.properties); } buildCounterStep--; } @@ -4002,14 +4077,35 @@ buildCounterStreamLocation--; } -buildUnnamed5211() { +core.int buildCounterStreamingApplianceSnapshotConfig = 0; +buildStreamingApplianceSnapshotConfig() { + var o = new api.StreamingApplianceSnapshotConfig(); + buildCounterStreamingApplianceSnapshotConfig++; + if (buildCounterStreamingApplianceSnapshotConfig < 3) { + o.importStateEndpoint = "foo"; + o.snapshotId = "foo"; + } + buildCounterStreamingApplianceSnapshotConfig--; + return o; +} + +checkStreamingApplianceSnapshotConfig(api.StreamingApplianceSnapshotConfig o) { + buildCounterStreamingApplianceSnapshotConfig++; + if (buildCounterStreamingApplianceSnapshotConfig < 3) { + unittest.expect(o.importStateEndpoint, unittest.equals('foo')); + unittest.expect(o.snapshotId, unittest.equals('foo')); + } + buildCounterStreamingApplianceSnapshotConfig--; +} + +buildUnnamed4423() { var o = new core.List<api.ParallelInstruction>(); o.add(buildParallelInstruction()); o.add(buildParallelInstruction()); return o; } -checkUnnamed5211(core.List<api.ParallelInstruction> o) { +checkUnnamed4423(core.List<api.ParallelInstruction> o) { unittest.expect(o, unittest.hasLength(2)); checkParallelInstruction(o[0]); checkParallelInstruction(o[1]); @@ -4021,7 +4117,7 @@ buildCounterStreamingComputationConfig++; if (buildCounterStreamingComputationConfig < 3) { o.computationId = "foo"; - o.instructions = buildUnnamed5211(); + o.instructions = buildUnnamed4423(); o.stageName = "foo"; o.systemName = "foo"; } @@ -4033,21 +4129,21 @@ buildCounterStreamingComputationConfig++; if (buildCounterStreamingComputationConfig < 3) { unittest.expect(o.computationId, unittest.equals('foo')); - checkUnnamed5211(o.instructions); + checkUnnamed4423(o.instructions); unittest.expect(o.stageName, unittest.equals('foo')); unittest.expect(o.systemName, unittest.equals('foo')); } buildCounterStreamingComputationConfig--; } -buildUnnamed5212() { +buildUnnamed4424() { var o = new core.List<api.KeyRangeDataDiskAssignment>(); o.add(buildKeyRangeDataDiskAssignment()); o.add(buildKeyRangeDataDiskAssignment()); return o; } -checkUnnamed5212(core.List<api.KeyRangeDataDiskAssignment> o) { +checkUnnamed4424(core.List<api.KeyRangeDataDiskAssignment> o) { unittest.expect(o, unittest.hasLength(2)); checkKeyRangeDataDiskAssignment(o[0]); checkKeyRangeDataDiskAssignment(o[1]); @@ -4059,7 +4155,7 @@ buildCounterStreamingComputationRanges++; if (buildCounterStreamingComputationRanges < 3) { o.computationId = "foo"; - o.rangeAssignments = buildUnnamed5212(); + o.rangeAssignments = buildUnnamed4424(); } buildCounterStreamingComputationRanges--; return o; @@ -4069,32 +4165,32 @@ buildCounterStreamingComputationRanges++; if (buildCounterStreamingComputationRanges < 3) { unittest.expect(o.computationId, unittest.equals('foo')); - checkUnnamed5212(o.rangeAssignments); + checkUnnamed4424(o.rangeAssignments); } buildCounterStreamingComputationRanges--; } -buildUnnamed5213() { +buildUnnamed4425() { var o = new core.List<api.StreamingComputationRanges>(); o.add(buildStreamingComputationRanges()); o.add(buildStreamingComputationRanges()); return o; } -checkUnnamed5213(core.List<api.StreamingComputationRanges> o) { +checkUnnamed4425(core.List<api.StreamingComputationRanges> o) { unittest.expect(o, unittest.hasLength(2)); checkStreamingComputationRanges(o[0]); checkStreamingComputationRanges(o[1]); } -buildUnnamed5214() { +buildUnnamed4426() { var o = new core.List<api.MountedDataDisk>(); o.add(buildMountedDataDisk()); o.add(buildMountedDataDisk()); return o; } -checkUnnamed5214(core.List<api.MountedDataDisk> o) { +checkUnnamed4426(core.List<api.MountedDataDisk> o) { unittest.expect(o, unittest.hasLength(2)); checkMountedDataDisk(o[0]); checkMountedDataDisk(o[1]); @@ -4105,8 +4201,8 @@ var o = new api.StreamingComputationTask(); buildCounterStreamingComputationTask++; if (buildCounterStreamingComputationTask < 3) { - o.computationRanges = buildUnnamed5213(); - o.dataDisks = buildUnnamed5214(); + o.computationRanges = buildUnnamed4425(); + o.dataDisks = buildUnnamed4426(); o.taskType = "foo"; } buildCounterStreamingComputationTask--; @@ -4116,34 +4212,34 @@ checkStreamingComputationTask(api.StreamingComputationTask o) { buildCounterStreamingComputationTask++; if (buildCounterStreamingComputationTask < 3) { - checkUnnamed5213(o.computationRanges); - checkUnnamed5214(o.dataDisks); + checkUnnamed4425(o.computationRanges); + checkUnnamed4426(o.dataDisks); unittest.expect(o.taskType, unittest.equals('foo')); } buildCounterStreamingComputationTask--; } -buildUnnamed5215() { +buildUnnamed4427() { var o = new core.List<api.StreamingComputationConfig>(); o.add(buildStreamingComputationConfig()); o.add(buildStreamingComputationConfig()); return o; } -checkUnnamed5215(core.List<api.StreamingComputationConfig> o) { +checkUnnamed4427(core.List<api.StreamingComputationConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkStreamingComputationConfig(o[0]); checkStreamingComputationConfig(o[1]); } -buildUnnamed5216() { +buildUnnamed4428() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5216(core.Map<core.String, core.String> o) { +checkUnnamed4428(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -4154,8 +4250,8 @@ var o = new api.StreamingConfigTask(); buildCounterStreamingConfigTask++; if (buildCounterStreamingConfigTask < 3) { - o.streamingComputationConfigs = buildUnnamed5215(); - o.userStepToStateFamilyNameMap = buildUnnamed5216(); + o.streamingComputationConfigs = buildUnnamed4427(); + o.userStepToStateFamilyNameMap = buildUnnamed4428(); o.windmillServiceEndpoint = "foo"; o.windmillServicePort = "foo"; } @@ -4166,8 +4262,8 @@ checkStreamingConfigTask(api.StreamingConfigTask o) { buildCounterStreamingConfigTask++; if (buildCounterStreamingConfigTask < 3) { - checkUnnamed5215(o.streamingComputationConfigs); - checkUnnamed5216(o.userStepToStateFamilyNameMap); + checkUnnamed4427(o.streamingComputationConfigs); + checkUnnamed4428(o.userStepToStateFamilyNameMap); unittest.expect(o.windmillServiceEndpoint, unittest.equals('foo')); unittest.expect(o.windmillServicePort, unittest.equals('foo')); } @@ -4181,6 +4277,7 @@ if (buildCounterStreamingSetupTask < 3) { o.drain = true; o.receiveWorkPort = 42; + o.snapshotConfig = buildStreamingApplianceSnapshotConfig(); o.streamingComputationTopology = buildTopologyConfig(); o.workerHarnessPort = 42; } @@ -4193,6 +4290,7 @@ if (buildCounterStreamingSetupTask < 3) { unittest.expect(o.drain, unittest.isTrue); unittest.expect(o.receiveWorkPort, unittest.equals(42)); + checkStreamingApplianceSnapshotConfig(o.snapshotConfig); checkTopologyConfig(o.streamingComputationTopology); unittest.expect(o.workerHarnessPort, unittest.equals(42)); } @@ -4239,14 +4337,14 @@ buildCounterStreamingStageLocation--; } -buildUnnamed5217() { +buildUnnamed4429() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5217(core.List<core.String> o) { +checkUnnamed4429(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -4257,7 +4355,7 @@ var o = new api.StringList(); buildCounterStringList++; if (buildCounterStringList < 3) { - o.elements = buildUnnamed5217(); + o.elements = buildUnnamed4429(); } buildCounterStringList--; return o; @@ -4266,19 +4364,19 @@ checkStringList(api.StringList o) { buildCounterStringList++; if (buildCounterStringList < 3) { - checkUnnamed5217(o.elements); + checkUnnamed4429(o.elements); } buildCounterStringList--; } -buildUnnamed5218() { +buildUnnamed4430() { var o = new core.List<api.Parameter>(); o.add(buildParameter()); o.add(buildParameter()); return o; } -checkUnnamed5218(core.List<api.Parameter> o) { +checkUnnamed4430(core.List<api.Parameter> o) { unittest.expect(o, unittest.hasLength(2)); checkParameter(o[0]); checkParameter(o[1]); @@ -4291,7 +4389,7 @@ if (buildCounterStructuredMessage < 3) { o.messageKey = "foo"; o.messageText = "foo"; - o.parameters = buildUnnamed5218(); + o.parameters = buildUnnamed4430(); } buildCounterStructuredMessage--; return o; @@ -4302,19 +4400,19 @@ if (buildCounterStructuredMessage < 3) { unittest.expect(o.messageKey, unittest.equals('foo')); unittest.expect(o.messageText, unittest.equals('foo')); - checkUnnamed5218(o.parameters); + checkUnnamed4430(o.parameters); } buildCounterStructuredMessage--; } -buildUnnamed5219() { +buildUnnamed4431() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5219(core.List<core.String> o) { +checkUnnamed4431(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -4336,7 +4434,7 @@ o.logDir = "foo"; o.logToSerialconsole = true; o.logUploadLocation = "foo"; - o.oauthScopes = buildUnnamed5219(); + o.oauthScopes = buildUnnamed4431(); o.parallelWorkerSettings = buildWorkerSettings(); o.streamingWorkerMainClass = "foo"; o.taskGroup = "foo"; @@ -4363,7 +4461,7 @@ unittest.expect(o.logDir, unittest.equals('foo')); unittest.expect(o.logToSerialconsole, unittest.isTrue); unittest.expect(o.logUploadLocation, unittest.equals('foo')); - checkUnnamed5219(o.oauthScopes); + checkUnnamed4431(o.oauthScopes); checkWorkerSettings(o.parallelWorkerSettings); unittest.expect(o.streamingWorkerMainClass, unittest.equals('foo')); unittest.expect(o.taskGroup, unittest.equals('foo')); @@ -4375,14 +4473,14 @@ buildCounterTaskRunnerSettings--; } -buildUnnamed5220() { +buildUnnamed4432() { var o = new core.List<api.ParameterMetadata>(); o.add(buildParameterMetadata()); o.add(buildParameterMetadata()); return o; } -checkUnnamed5220(core.List<api.ParameterMetadata> o) { +checkUnnamed4432(core.List<api.ParameterMetadata> o) { unittest.expect(o, unittest.hasLength(2)); checkParameterMetadata(o[0]); checkParameterMetadata(o[1]); @@ -4395,7 +4493,7 @@ if (buildCounterTemplateMetadata < 3) { o.description = "foo"; o.name = "foo"; - o.parameters = buildUnnamed5220(); + o.parameters = buildUnnamed4432(); } buildCounterTemplateMetadata--; return o; @@ -4406,45 +4504,45 @@ if (buildCounterTemplateMetadata < 3) { unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5220(o.parameters); + checkUnnamed4432(o.parameters); } buildCounterTemplateMetadata--; } -buildUnnamed5221() { +buildUnnamed4433() { var o = new core.List<api.ComputationTopology>(); o.add(buildComputationTopology()); o.add(buildComputationTopology()); return o; } -checkUnnamed5221(core.List<api.ComputationTopology> o) { +checkUnnamed4433(core.List<api.ComputationTopology> o) { unittest.expect(o, unittest.hasLength(2)); checkComputationTopology(o[0]); checkComputationTopology(o[1]); } -buildUnnamed5222() { +buildUnnamed4434() { var o = new core.List<api.DataDiskAssignment>(); o.add(buildDataDiskAssignment()); o.add(buildDataDiskAssignment()); return o; } -checkUnnamed5222(core.List<api.DataDiskAssignment> o) { +checkUnnamed4434(core.List<api.DataDiskAssignment> o) { unittest.expect(o, unittest.hasLength(2)); checkDataDiskAssignment(o[0]); checkDataDiskAssignment(o[1]); } -buildUnnamed5223() { +buildUnnamed4435() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5223(core.Map<core.String, core.String> o) { +checkUnnamed4435(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -4455,11 +4553,11 @@ var o = new api.TopologyConfig(); buildCounterTopologyConfig++; if (buildCounterTopologyConfig < 3) { - o.computations = buildUnnamed5221(); - o.dataDiskAssignments = buildUnnamed5222(); + o.computations = buildUnnamed4433(); + o.dataDiskAssignments = buildUnnamed4434(); o.forwardingKeyBits = 42; o.persistentStateVersion = 42; - o.userStageToComputationNameMap = buildUnnamed5223(); + o.userStageToComputationNameMap = buildUnnamed4435(); } buildCounterTopologyConfig--; return o; @@ -4468,49 +4566,49 @@ checkTopologyConfig(api.TopologyConfig o) { buildCounterTopologyConfig++; if (buildCounterTopologyConfig < 3) { - checkUnnamed5221(o.computations); - checkUnnamed5222(o.dataDiskAssignments); + checkUnnamed4433(o.computations); + checkUnnamed4434(o.dataDiskAssignments); unittest.expect(o.forwardingKeyBits, unittest.equals(42)); unittest.expect(o.persistentStateVersion, unittest.equals(42)); - checkUnnamed5223(o.userStageToComputationNameMap); + checkUnnamed4435(o.userStageToComputationNameMap); } buildCounterTopologyConfig--; } -buildUnnamed5224() { +buildUnnamed4436() { var o = new core.List<api.DisplayData>(); o.add(buildDisplayData()); o.add(buildDisplayData()); return o; } -checkUnnamed5224(core.List<api.DisplayData> o) { +checkUnnamed4436(core.List<api.DisplayData> o) { unittest.expect(o, unittest.hasLength(2)); checkDisplayData(o[0]); checkDisplayData(o[1]); } -buildUnnamed5225() { +buildUnnamed4437() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5225(core.List<core.String> o) { +checkUnnamed4437(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5226() { +buildUnnamed4438() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5226(core.List<core.String> o) { +checkUnnamed4438(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -4521,12 +4619,12 @@ var o = new api.TransformSummary(); buildCounterTransformSummary++; if (buildCounterTransformSummary < 3) { - o.displayData = buildUnnamed5224(); + o.displayData = buildUnnamed4436(); o.id = "foo"; - o.inputCollectionName = buildUnnamed5225(); + o.inputCollectionName = buildUnnamed4437(); o.kind = "foo"; o.name = "foo"; - o.outputCollectionName = buildUnnamed5226(); + o.outputCollectionName = buildUnnamed4438(); } buildCounterTransformSummary--; return o; @@ -4535,24 +4633,24 @@ checkTransformSummary(api.TransformSummary o) { buildCounterTransformSummary++; if (buildCounterTransformSummary < 3) { - checkUnnamed5224(o.displayData); + checkUnnamed4436(o.displayData); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5225(o.inputCollectionName); + checkUnnamed4437(o.inputCollectionName); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5226(o.outputCollectionName); + checkUnnamed4438(o.outputCollectionName); } buildCounterTransformSummary--; } -buildUnnamed5227() { +buildUnnamed4439() { var o = new core.List<api.Package>(); o.add(buildPackage()); o.add(buildPackage()); return o; } -checkUnnamed5227(core.List<api.Package> o) { +checkUnnamed4439(core.List<api.Package> o) { unittest.expect(o, unittest.hasLength(2)); checkPackage(o[0]); checkPackage(o[1]); @@ -4569,7 +4667,7 @@ o.jobId = "foo"; o.leaseExpireTime = "foo"; o.mapTask = buildMapTask(); - o.packages = buildUnnamed5227(); + o.packages = buildUnnamed4439(); o.projectId = "foo"; o.reportStatusInterval = "foo"; o.seqMapTask = buildSeqMapTask(); @@ -4592,7 +4690,7 @@ unittest.expect(o.jobId, unittest.equals('foo')); unittest.expect(o.leaseExpireTime, unittest.equals('foo')); checkMapTask(o.mapTask); - checkUnnamed5227(o.packages); + checkUnnamed4439(o.packages); unittest.expect(o.projectId, unittest.equals('foo')); unittest.expect(o.reportStatusInterval, unittest.equals('foo')); checkSeqMapTask(o.seqMapTask); @@ -4605,7 +4703,7 @@ buildCounterWorkItem--; } -buildUnnamed5228() { +buildUnnamed4440() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4620,7 +4718,7 @@ return o; } -checkUnnamed5228(core.Map<core.String, core.Object> o) { +checkUnnamed4440(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted44 = (o["x"]) as core.Map; unittest.expect(casted44, unittest.hasLength(3)); @@ -4634,14 +4732,14 @@ unittest.expect(casted45["string"], unittest.equals('foo')); } -buildUnnamed5229() { +buildUnnamed4441() { var o = new core.List<api.MetricShortId>(); o.add(buildMetricShortId()); o.add(buildMetricShortId()); return o; } -checkUnnamed5229(core.List<api.MetricShortId> o) { +checkUnnamed4441(core.List<api.MetricShortId> o) { unittest.expect(o, unittest.hasLength(2)); checkMetricShortId(o[0]); checkMetricShortId(o[1]); @@ -4652,9 +4750,9 @@ var o = new api.WorkItemServiceState(); buildCounterWorkItemServiceState++; if (buildCounterWorkItemServiceState < 3) { - o.harnessData = buildUnnamed5228(); + o.harnessData = buildUnnamed4440(); o.leaseExpireTime = "foo"; - o.metricShortId = buildUnnamed5229(); + o.metricShortId = buildUnnamed4441(); o.nextReportIndex = "foo"; o.reportStatusInterval = "foo"; o.splitRequest = buildApproximateSplitRequest(); @@ -4668,9 +4766,9 @@ checkWorkItemServiceState(api.WorkItemServiceState o) { buildCounterWorkItemServiceState++; if (buildCounterWorkItemServiceState < 3) { - checkUnnamed5228(o.harnessData); + checkUnnamed4440(o.harnessData); unittest.expect(o.leaseExpireTime, unittest.equals('foo')); - checkUnnamed5229(o.metricShortId); + checkUnnamed4441(o.metricShortId); unittest.expect(o.nextReportIndex, unittest.equals('foo')); unittest.expect(o.reportStatusInterval, unittest.equals('foo')); checkApproximateSplitRequest(o.splitRequest); @@ -4680,40 +4778,40 @@ buildCounterWorkItemServiceState--; } -buildUnnamed5230() { +buildUnnamed4442() { var o = new core.List<api.CounterUpdate>(); o.add(buildCounterUpdate()); o.add(buildCounterUpdate()); return o; } -checkUnnamed5230(core.List<api.CounterUpdate> o) { +checkUnnamed4442(core.List<api.CounterUpdate> o) { unittest.expect(o, unittest.hasLength(2)); checkCounterUpdate(o[0]); checkCounterUpdate(o[1]); } -buildUnnamed5231() { +buildUnnamed4443() { var o = new core.List<api.Status>(); o.add(buildStatus()); o.add(buildStatus()); return o; } -checkUnnamed5231(core.List<api.Status> o) { +checkUnnamed4443(core.List<api.Status> o) { unittest.expect(o, unittest.hasLength(2)); checkStatus(o[0]); checkStatus(o[1]); } -buildUnnamed5232() { +buildUnnamed4444() { var o = new core.List<api.MetricUpdate>(); o.add(buildMetricUpdate()); o.add(buildMetricUpdate()); return o; } -checkUnnamed5232(core.List<api.MetricUpdate> o) { +checkUnnamed4444(core.List<api.MetricUpdate> o) { unittest.expect(o, unittest.hasLength(2)); checkMetricUpdate(o[0]); checkMetricUpdate(o[1]); @@ -4725,10 +4823,10 @@ buildCounterWorkItemStatus++; if (buildCounterWorkItemStatus < 3) { o.completed = true; - o.counterUpdates = buildUnnamed5230(); + o.counterUpdates = buildUnnamed4442(); o.dynamicSourceSplit = buildDynamicSourceSplit(); - o.errors = buildUnnamed5231(); - o.metricUpdates = buildUnnamed5232(); + o.errors = buildUnnamed4443(); + o.metricUpdates = buildUnnamed4444(); o.progress = buildApproximateProgress(); o.reportIndex = "foo"; o.reportedProgress = buildApproximateReportedProgress(); @@ -4747,10 +4845,10 @@ buildCounterWorkItemStatus++; if (buildCounterWorkItemStatus < 3) { unittest.expect(o.completed, unittest.isTrue); - checkUnnamed5230(o.counterUpdates); + checkUnnamed4442(o.counterUpdates); checkDynamicSourceSplit(o.dynamicSourceSplit); - checkUnnamed5231(o.errors); - checkUnnamed5232(o.metricUpdates); + checkUnnamed4443(o.errors); + checkUnnamed4444(o.metricUpdates); checkApproximateProgress(o.progress); unittest.expect(o.reportIndex, unittest.equals('foo')); checkApproximateReportedProgress(o.reportedProgress); @@ -4764,7 +4862,7 @@ buildCounterWorkItemStatus--; } -buildUnnamed5233() { +buildUnnamed4445() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4779,7 +4877,7 @@ return o; } -checkUnnamed5233(core.Map<core.String, core.Object> o) { +checkUnnamed4445(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted46 = (o["x"]) as core.Map; unittest.expect(casted46, unittest.hasLength(3)); @@ -4793,17 +4891,17 @@ unittest.expect(casted47["string"], unittest.equals('foo')); } -buildUnnamed5234() { +buildUnnamed4446() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5233()); - o.add(buildUnnamed5233()); + o.add(buildUnnamed4445()); + o.add(buildUnnamed4445()); return o; } -checkUnnamed5234(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4446(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5233(o[0]); - checkUnnamed5233(o[1]); + checkUnnamed4445(o[0]); + checkUnnamed4445(o[1]); } core.int buildCounterWorkerHealthReport = 0; @@ -4811,7 +4909,7 @@ var o = new api.WorkerHealthReport(); buildCounterWorkerHealthReport++; if (buildCounterWorkerHealthReport < 3) { - o.pods = buildUnnamed5234(); + o.pods = buildUnnamed4446(); o.reportInterval = "foo"; o.vmIsHealthy = true; o.vmStartupTime = "foo"; @@ -4823,7 +4921,7 @@ checkWorkerHealthReport(api.WorkerHealthReport o) { buildCounterWorkerHealthReport++; if (buildCounterWorkerHealthReport < 3) { - checkUnnamed5234(o.pods); + checkUnnamed4446(o.pods); unittest.expect(o.reportInterval, unittest.equals('foo')); unittest.expect(o.vmIsHealthy, unittest.isTrue); unittest.expect(o.vmStartupTime, unittest.equals('foo')); @@ -4850,14 +4948,14 @@ buildCounterWorkerHealthReportResponse--; } -buildUnnamed5235() { +buildUnnamed4447() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5235(core.Map<core.String, core.String> o) { +checkUnnamed4447(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -4870,7 +4968,7 @@ if (buildCounterWorkerLifecycleEvent < 3) { o.containerStartTime = "foo"; o.event = "foo"; - o.metadata = buildUnnamed5235(); + o.metadata = buildUnnamed4447(); } buildCounterWorkerLifecycleEvent--; return o; @@ -4881,19 +4979,19 @@ if (buildCounterWorkerLifecycleEvent < 3) { unittest.expect(o.containerStartTime, unittest.equals('foo')); unittest.expect(o.event, unittest.equals('foo')); - checkUnnamed5235(o.metadata); + checkUnnamed4447(o.metadata); } buildCounterWorkerLifecycleEvent--; } -buildUnnamed5236() { +buildUnnamed4448() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5236(core.Map<core.String, core.String> o) { +checkUnnamed4448(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -4904,7 +5002,7 @@ var o = new api.WorkerMessage(); buildCounterWorkerMessage++; if (buildCounterWorkerMessage < 3) { - o.labels = buildUnnamed5236(); + o.labels = buildUnnamed4448(); o.time = "foo"; o.workerHealthReport = buildWorkerHealthReport(); o.workerLifecycleEvent = buildWorkerLifecycleEvent(); @@ -4919,7 +5017,7 @@ checkWorkerMessage(api.WorkerMessage o) { buildCounterWorkerMessage++; if (buildCounterWorkerMessage < 3) { - checkUnnamed5236(o.labels); + checkUnnamed4448(o.labels); unittest.expect(o.time, unittest.equals('foo')); checkWorkerHealthReport(o.workerHealthReport); checkWorkerLifecycleEvent(o.workerLifecycleEvent); @@ -4930,7 +5028,7 @@ buildCounterWorkerMessage--; } -buildUnnamed5237() { +buildUnnamed4449() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4945,7 +5043,7 @@ return o; } -checkUnnamed5237(core.Map<core.String, core.Object> o) { +checkUnnamed4449(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted48 = (o["x"]) as core.Map; unittest.expect(casted48, unittest.hasLength(3)); @@ -4965,7 +5063,7 @@ buildCounterWorkerMessageCode++; if (buildCounterWorkerMessageCode < 3) { o.code = "foo"; - o.parameters = buildUnnamed5237(); + o.parameters = buildUnnamed4449(); } buildCounterWorkerMessageCode--; return o; @@ -4975,7 +5073,7 @@ buildCounterWorkerMessageCode++; if (buildCounterWorkerMessageCode < 3) { unittest.expect(o.code, unittest.equals('foo')); - checkUnnamed5237(o.parameters); + checkUnnamed4449(o.parameters); } buildCounterWorkerMessageCode--; } @@ -5003,46 +5101,46 @@ buildCounterWorkerMessageResponse--; } -buildUnnamed5238() { +buildUnnamed4450() { var o = new core.List<api.Disk>(); o.add(buildDisk()); o.add(buildDisk()); return o; } -checkUnnamed5238(core.List<api.Disk> o) { +checkUnnamed4450(core.List<api.Disk> o) { unittest.expect(o, unittest.hasLength(2)); checkDisk(o[0]); checkDisk(o[1]); } -buildUnnamed5239() { +buildUnnamed4451() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5239(core.Map<core.String, core.String> o) { +checkUnnamed4451(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5240() { +buildUnnamed4452() { var o = new core.List<api.Package>(); o.add(buildPackage()); o.add(buildPackage()); return o; } -checkUnnamed5240(core.List<api.Package> o) { +checkUnnamed4452(core.List<api.Package> o) { unittest.expect(o, unittest.hasLength(2)); checkPackage(o[0]); checkPackage(o[1]); } -buildUnnamed5241() { +buildUnnamed4453() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -5057,7 +5155,7 @@ return o; } -checkUnnamed5241(core.Map<core.String, core.Object> o) { +checkUnnamed4453(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted50 = (o["x"]) as core.Map; unittest.expect(casted50, unittest.hasLength(3)); @@ -5077,7 +5175,7 @@ buildCounterWorkerPool++; if (buildCounterWorkerPool < 3) { o.autoscalingSettings = buildAutoscalingSettings(); - o.dataDisks = buildUnnamed5238(); + o.dataDisks = buildUnnamed4450(); o.defaultPackageSet = "foo"; o.diskSizeGb = 42; o.diskSourceImage = "foo"; @@ -5085,13 +5183,13 @@ o.ipConfiguration = "foo"; o.kind = "foo"; o.machineType = "foo"; - o.metadata = buildUnnamed5239(); + o.metadata = buildUnnamed4451(); o.network = "foo"; o.numThreadsPerWorker = 42; o.numWorkers = 42; o.onHostMaintenance = "foo"; - o.packages = buildUnnamed5240(); - o.poolArgs = buildUnnamed5241(); + o.packages = buildUnnamed4452(); + o.poolArgs = buildUnnamed4453(); o.subnetwork = "foo"; o.taskrunnerSettings = buildTaskRunnerSettings(); o.teardownPolicy = "foo"; @@ -5106,7 +5204,7 @@ buildCounterWorkerPool++; if (buildCounterWorkerPool < 3) { checkAutoscalingSettings(o.autoscalingSettings); - checkUnnamed5238(o.dataDisks); + checkUnnamed4450(o.dataDisks); unittest.expect(o.defaultPackageSet, unittest.equals('foo')); unittest.expect(o.diskSizeGb, unittest.equals(42)); unittest.expect(o.diskSourceImage, unittest.equals('foo')); @@ -5114,13 +5212,13 @@ unittest.expect(o.ipConfiguration, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.machineType, unittest.equals('foo')); - checkUnnamed5239(o.metadata); + checkUnnamed4451(o.metadata); unittest.expect(o.network, unittest.equals('foo')); unittest.expect(o.numThreadsPerWorker, unittest.equals(42)); unittest.expect(o.numWorkers, unittest.equals(42)); unittest.expect(o.onHostMaintenance, unittest.equals('foo')); - checkUnnamed5240(o.packages); - checkUnnamed5241(o.poolArgs); + checkUnnamed4452(o.packages); + checkUnnamed4453(o.poolArgs); unittest.expect(o.subnetwork, unittest.equals('foo')); checkTaskRunnerSettings(o.taskrunnerSettings); unittest.expect(o.teardownPolicy, unittest.equals('foo')); @@ -5935,6 +6033,22 @@ }); }); + unittest.group("obj-schema-Snapshot", () { + unittest.test("to-json--from-json", () { + var o = buildSnapshot(); + var od = new api.Snapshot.fromJson(o.toJson()); + checkSnapshot(od); + }); + }); + + unittest.group("obj-schema-SnapshotJobRequest", () { + unittest.test("to-json--from-json", () { + var o = buildSnapshotJobRequest(); + var od = new api.SnapshotJobRequest.fromJson(o.toJson()); + checkSnapshotJobRequest(od); + }); + }); + unittest.group("obj-schema-Source", () { unittest.test("to-json--from-json", () { var o = buildSource(); @@ -6079,6 +6193,14 @@ }); }); + unittest.group("obj-schema-StreamingApplianceSnapshotConfig", () { + unittest.test("to-json--from-json", () { + var o = buildStreamingApplianceSnapshotConfig(); + var od = new api.StreamingApplianceSnapshotConfig.fromJson(o.toJson()); + checkStreamingApplianceSnapshotConfig(od); + }); + }); + unittest.group("obj-schema-StreamingComputationConfig", () { unittest.test("to-json--from-json", () { var o = buildStreamingComputationConfig(); @@ -6365,11 +6487,11 @@ var mock = new HttpServerMock(); api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; var arg_projectId = "foo"; - var arg_pageSize = 42; - var arg_view = "foo"; var arg_filter = "foo"; var arg_location = "foo"; var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_view = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -6410,14 +6532,14 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -6428,11 +6550,11 @@ }), true); res .aggregated(arg_projectId, - pageSize: arg_pageSize, - view: arg_view, filter: arg_filter, location: arg_location, pageToken: arg_pageToken, + pageSize: arg_pageSize, + view: arg_view, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListJobsResponse(response); @@ -6444,9 +6566,9 @@ api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; var arg_request = buildJob(); var arg_projectId = "foo"; - var arg_view = "foo"; var arg_location = "foo"; var arg_replaceJobId = "foo"; + var arg_view = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.Job.fromJson(json); @@ -6490,11 +6612,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect( queryMap["replaceJobId"].first, unittest.equals(arg_replaceJobId)); + unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -6505,9 +6627,9 @@ }), true); res .create(arg_request, arg_projectId, - view: arg_view, location: arg_location, replaceJobId: arg_replaceJobId, + view: arg_view, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkJob(response); @@ -6665,11 +6787,11 @@ var mock = new HttpServerMock(); api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; var arg_projectId = "foo"; - var arg_pageSize = 42; - var arg_view = "foo"; var arg_filter = "foo"; var arg_location = "foo"; var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_view = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -6710,14 +6832,14 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -6728,17 +6850,90 @@ }), true); res .list(arg_projectId, - pageSize: arg_pageSize, - view: arg_view, filter: arg_filter, location: arg_location, pageToken: arg_pageToken, + pageSize: arg_pageSize, + view: arg_view, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListJobsResponse(response); }))); }); + unittest.test("method--snapshot", () { + var mock = new HttpServerMock(); + api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; + var arg_request = buildSnapshotJobRequest(); + var arg_projectId = "foo"; + var arg_jobId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SnapshotJobRequest.fromJson(json); + checkSnapshotJobRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 14), + unittest.equals("v1b3/projects/")); + pathOffset += 14; + index = path.indexOf("/jobs/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_projectId")); + unittest.expect(path.substring(pathOffset, pathOffset + 6), + unittest.equals("/jobs/")); + pathOffset += 6; + index = path.indexOf(":snapshot", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_jobId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals(":snapshot")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSnapshot()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .snapshot(arg_request, arg_projectId, arg_jobId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSnapshot(response); + }))); + }); + unittest.test("method--update", () { var mock = new HttpServerMock(); api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; @@ -6970,8 +7165,8 @@ new api.DataflowApi(mock).projects.jobs.messages; var arg_projectId = "foo"; var arg_jobId = "foo"; - var arg_endTime = "foo"; var arg_location = "foo"; + var arg_endTime = "foo"; var arg_pageToken = "foo"; var arg_startTime = "foo"; var arg_pageSize = 42; @@ -7026,10 +7221,10 @@ } } unittest.expect( - queryMap["endTime"].first, unittest.equals(arg_endTime)); - unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect( + queryMap["endTime"].first, unittest.equals(arg_endTime)); + unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect( queryMap["startTime"].first, unittest.equals(arg_startTime)); @@ -7047,8 +7242,8 @@ }), true); res .list(arg_projectId, arg_jobId, - endTime: arg_endTime, location: arg_location, + endTime: arg_endTime, pageToken: arg_pageToken, startTime: arg_startTime, pageSize: arg_pageSize, @@ -7296,8 +7491,8 @@ var arg_request = buildJob(); var arg_projectId = "foo"; var arg_location = "foo"; - var arg_replaceJobId = "foo"; var arg_view = "foo"; + var arg_replaceJobId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.Job.fromJson(json); @@ -7350,9 +7545,9 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect( queryMap["replaceJobId"].first, unittest.equals(arg_replaceJobId)); - unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -7363,8 +7558,8 @@ }), true); res .create(arg_request, arg_projectId, arg_location, - replaceJobId: arg_replaceJobId, view: arg_view, + replaceJobId: arg_replaceJobId, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkJob(response); @@ -7617,6 +7812,91 @@ }))); }); + unittest.test("method--snapshot", () { + var mock = new HttpServerMock(); + api.ProjectsLocationsJobsResourceApi res = + new api.DataflowApi(mock).projects.locations.jobs; + var arg_request = buildSnapshotJobRequest(); + var arg_projectId = "foo"; + var arg_location = "foo"; + var arg_jobId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SnapshotJobRequest.fromJson(json); + checkSnapshotJobRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 14), + unittest.equals("v1b3/projects/")); + pathOffset += 14; + index = path.indexOf("/locations/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_projectId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/locations/")); + pathOffset += 11; + index = path.indexOf("/jobs/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_location")); + unittest.expect(path.substring(pathOffset, pathOffset + 6), + unittest.equals("/jobs/")); + pathOffset += 6; + index = path.indexOf(":snapshot", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_jobId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals(":snapshot")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSnapshot()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .snapshot(arg_request, arg_projectId, arg_location, arg_jobId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSnapshot(response); + }))); + }); + unittest.test("method--update", () { var mock = new HttpServerMock(); api.ProjectsLocationsJobsResourceApi res = @@ -8305,6 +8585,8 @@ var arg_location = "foo"; var arg_validateOnly = true; var arg_gcsPath = "foo"; + var arg_dynamicTemplate_gcsPath = "foo"; + var arg_dynamicTemplate_stagingLocation = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.LaunchTemplateParameters.fromJson(json); @@ -8361,6 +8643,10 @@ unittest.equals("$arg_validateOnly")); unittest.expect( queryMap["gcsPath"].first, unittest.equals(arg_gcsPath)); + unittest.expect(queryMap["dynamicTemplate.gcsPath"].first, + unittest.equals(arg_dynamicTemplate_gcsPath)); + unittest.expect(queryMap["dynamicTemplate.stagingLocation"].first, + unittest.equals(arg_dynamicTemplate_stagingLocation)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8373,6 +8659,9 @@ .launch(arg_request, arg_projectId, arg_location, validateOnly: arg_validateOnly, gcsPath: arg_gcsPath, + dynamicTemplate_gcsPath: arg_dynamicTemplate_gcsPath, + dynamicTemplate_stagingLocation: + arg_dynamicTemplate_stagingLocation, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkLaunchTemplateResponse(response); @@ -8450,9 +8739,9 @@ api.ProjectsTemplatesResourceApi res = new api.DataflowApi(mock).projects.templates; var arg_projectId = "foo"; - var arg_gcsPath = "foo"; var arg_location = "foo"; var arg_view = "foo"; + var arg_gcsPath = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -8494,10 +8783,10 @@ } } unittest.expect( - queryMap["gcsPath"].first, unittest.equals(arg_gcsPath)); - unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); + unittest.expect( + queryMap["gcsPath"].first, unittest.equals(arg_gcsPath)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8508,9 +8797,9 @@ }), true); res .get(arg_projectId, - gcsPath: arg_gcsPath, location: arg_location, view: arg_view, + gcsPath: arg_gcsPath, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGetTemplateResponse(response); @@ -8523,9 +8812,11 @@ new api.DataflowApi(mock).projects.templates; var arg_request = buildLaunchTemplateParameters(); var arg_projectId = "foo"; - var arg_location = "foo"; + var arg_dynamicTemplate_gcsPath = "foo"; + var arg_dynamicTemplate_stagingLocation = "foo"; var arg_validateOnly = true; var arg_gcsPath = "foo"; + var arg_location = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.LaunchTemplateParameters.fromJson(json); @@ -8569,12 +8860,16 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["location"].first, unittest.equals(arg_location)); + unittest.expect(queryMap["dynamicTemplate.gcsPath"].first, + unittest.equals(arg_dynamicTemplate_gcsPath)); + unittest.expect(queryMap["dynamicTemplate.stagingLocation"].first, + unittest.equals(arg_dynamicTemplate_stagingLocation)); unittest.expect(queryMap["validateOnly"].first, unittest.equals("$arg_validateOnly")); unittest.expect( queryMap["gcsPath"].first, unittest.equals(arg_gcsPath)); + unittest.expect( + queryMap["location"].first, unittest.equals(arg_location)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8585,9 +8880,12 @@ }), true); res .launch(arg_request, arg_projectId, - location: arg_location, + dynamicTemplate_gcsPath: arg_dynamicTemplate_gcsPath, + dynamicTemplate_stagingLocation: + arg_dynamicTemplate_stagingLocation, validateOnly: arg_validateOnly, gcsPath: arg_gcsPath, + location: arg_location, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkLaunchTemplateResponse(response);
diff --git a/generated/googleapis_beta/test/dialogflow/v2beta1_test.dart b/generated/googleapis_beta/test/dialogflow/v2beta1_test.dart index 58509fd..c91eb1e 100644 --- a/generated/googleapis_beta/test/dialogflow/v2beta1_test.dart +++ b/generated/googleapis_beta/test/dialogflow/v2beta1_test.dart
@@ -50,14 +50,14 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5471() { +buildUnnamed4883() { var o = new core.List<api.GoogleCloudDialogflowV2EntityType>(); o.add(buildGoogleCloudDialogflowV2EntityType()); o.add(buildGoogleCloudDialogflowV2EntityType()); return o; } -checkUnnamed5471(core.List<api.GoogleCloudDialogflowV2EntityType> o) { +checkUnnamed4883(core.List<api.GoogleCloudDialogflowV2EntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2EntityType(o[0]); checkGoogleCloudDialogflowV2EntityType(o[1]); @@ -68,7 +68,7 @@ var o = new api.GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse(); buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse < 3) { - o.entityTypes = buildUnnamed5471(); + o.entityTypes = buildUnnamed4883(); } buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse--; return o; @@ -78,19 +78,19 @@ api.GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse o) { buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse < 3) { - checkUnnamed5471(o.entityTypes); + checkUnnamed4883(o.entityTypes); } buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse--; } -buildUnnamed5472() { +buildUnnamed4884() { var o = new core.List<api.GoogleCloudDialogflowV2Intent>(); o.add(buildGoogleCloudDialogflowV2Intent()); o.add(buildGoogleCloudDialogflowV2Intent()); return o; } -checkUnnamed5472(core.List<api.GoogleCloudDialogflowV2Intent> o) { +checkUnnamed4884(core.List<api.GoogleCloudDialogflowV2Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2Intent(o[0]); checkGoogleCloudDialogflowV2Intent(o[1]); @@ -101,7 +101,7 @@ var o = new api.GoogleCloudDialogflowV2BatchUpdateIntentsResponse(); buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse < 3) { - o.intents = buildUnnamed5472(); + o.intents = buildUnnamed4884(); } buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse--; return o; @@ -111,12 +111,12 @@ api.GoogleCloudDialogflowV2BatchUpdateIntentsResponse o) { buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse < 3) { - checkUnnamed5472(o.intents); + checkUnnamed4884(o.intents); } buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse--; } -buildUnnamed5473() { +buildUnnamed4885() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -131,7 +131,7 @@ return o; } -checkUnnamed5473(core.Map<core.String, core.Object> o) { +checkUnnamed4885(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -152,7 +152,7 @@ if (buildCounterGoogleCloudDialogflowV2Context < 3) { o.lifespanCount = 42; o.name = "foo"; - o.parameters = buildUnnamed5473(); + o.parameters = buildUnnamed4885(); } buildCounterGoogleCloudDialogflowV2Context--; return o; @@ -163,19 +163,19 @@ if (buildCounterGoogleCloudDialogflowV2Context < 3) { unittest.expect(o.lifespanCount, unittest.equals(42)); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5473(o.parameters); + checkUnnamed4885(o.parameters); } buildCounterGoogleCloudDialogflowV2Context--; } -buildUnnamed5474() { +buildUnnamed4886() { var o = new core.List<api.GoogleCloudDialogflowV2EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2EntityTypeEntity()); return o; } -checkUnnamed5474(core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> o) { +checkUnnamed4886(core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2EntityTypeEntity(o[0]); checkGoogleCloudDialogflowV2EntityTypeEntity(o[1]); @@ -188,7 +188,7 @@ if (buildCounterGoogleCloudDialogflowV2EntityType < 3) { o.autoExpansionMode = "foo"; o.displayName = "foo"; - o.entities = buildUnnamed5474(); + o.entities = buildUnnamed4886(); o.kind = "foo"; o.name = "foo"; } @@ -202,21 +202,21 @@ if (buildCounterGoogleCloudDialogflowV2EntityType < 3) { unittest.expect(o.autoExpansionMode, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5474(o.entities); + checkUnnamed4886(o.entities); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2EntityType--; } -buildUnnamed5475() { +buildUnnamed4887() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5475(core.List<core.String> o) { +checkUnnamed4887(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -227,7 +227,7 @@ var o = new api.GoogleCloudDialogflowV2EntityTypeEntity(); buildCounterGoogleCloudDialogflowV2EntityTypeEntity++; if (buildCounterGoogleCloudDialogflowV2EntityTypeEntity < 3) { - o.synonyms = buildUnnamed5475(); + o.synonyms = buildUnnamed4887(); o.value = "foo"; } buildCounterGoogleCloudDialogflowV2EntityTypeEntity--; @@ -238,13 +238,13 @@ api.GoogleCloudDialogflowV2EntityTypeEntity o) { buildCounterGoogleCloudDialogflowV2EntityTypeEntity++; if (buildCounterGoogleCloudDialogflowV2EntityTypeEntity < 3) { - checkUnnamed5475(o.synonyms); + checkUnnamed4887(o.synonyms); unittest.expect(o.value, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2EntityTypeEntity--; } -buildUnnamed5476() { +buildUnnamed4888() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -259,7 +259,7 @@ return o; } -checkUnnamed5476(core.Map<core.String, core.Object> o) { +checkUnnamed4888(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -280,7 +280,7 @@ if (buildCounterGoogleCloudDialogflowV2EventInput < 3) { o.languageCode = "foo"; o.name = "foo"; - o.parameters = buildUnnamed5476(); + o.parameters = buildUnnamed4888(); } buildCounterGoogleCloudDialogflowV2EventInput--; return o; @@ -292,7 +292,7 @@ if (buildCounterGoogleCloudDialogflowV2EventInput < 3) { unittest.expect(o.languageCode, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5476(o.parameters); + checkUnnamed4888(o.parameters); } buildCounterGoogleCloudDialogflowV2EventInput--; } @@ -319,106 +319,106 @@ buildCounterGoogleCloudDialogflowV2ExportAgentResponse--; } -buildUnnamed5477() { +buildUnnamed4889() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5477(core.List<core.String> o) { +checkUnnamed4889(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5478() { +buildUnnamed4890() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5478(core.List<core.String> o) { +checkUnnamed4890(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5479() { +buildUnnamed4891() { var o = new core.List<api.GoogleCloudDialogflowV2IntentFollowupIntentInfo>(); o.add(buildGoogleCloudDialogflowV2IntentFollowupIntentInfo()); o.add(buildGoogleCloudDialogflowV2IntentFollowupIntentInfo()); return o; } -checkUnnamed5479( +checkUnnamed4891( core.List<api.GoogleCloudDialogflowV2IntentFollowupIntentInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentFollowupIntentInfo(o[0]); checkGoogleCloudDialogflowV2IntentFollowupIntentInfo(o[1]); } -buildUnnamed5480() { +buildUnnamed4892() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5480(core.List<core.String> o) { +checkUnnamed4892(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5481() { +buildUnnamed4893() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessage>(); o.add(buildGoogleCloudDialogflowV2IntentMessage()); o.add(buildGoogleCloudDialogflowV2IntentMessage()); return o; } -checkUnnamed5481(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { +checkUnnamed4893(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessage(o[0]); checkGoogleCloudDialogflowV2IntentMessage(o[1]); } -buildUnnamed5482() { +buildUnnamed4894() { var o = new core.List<api.GoogleCloudDialogflowV2Context>(); o.add(buildGoogleCloudDialogflowV2Context()); o.add(buildGoogleCloudDialogflowV2Context()); return o; } -checkUnnamed5482(core.List<api.GoogleCloudDialogflowV2Context> o) { +checkUnnamed4894(core.List<api.GoogleCloudDialogflowV2Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2Context(o[0]); checkGoogleCloudDialogflowV2Context(o[1]); } -buildUnnamed5483() { +buildUnnamed4895() { var o = new core.List<api.GoogleCloudDialogflowV2IntentParameter>(); o.add(buildGoogleCloudDialogflowV2IntentParameter()); o.add(buildGoogleCloudDialogflowV2IntentParameter()); return o; } -checkUnnamed5483(core.List<api.GoogleCloudDialogflowV2IntentParameter> o) { +checkUnnamed4895(core.List<api.GoogleCloudDialogflowV2IntentParameter> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentParameter(o[0]); checkGoogleCloudDialogflowV2IntentParameter(o[1]); } -buildUnnamed5484() { +buildUnnamed4896() { var o = new core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrase>(); o.add(buildGoogleCloudDialogflowV2IntentTrainingPhrase()); o.add(buildGoogleCloudDialogflowV2IntentTrainingPhrase()); return o; } -checkUnnamed5484(core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrase> o) { +checkUnnamed4896(core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrase> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentTrainingPhrase(o[0]); checkGoogleCloudDialogflowV2IntentTrainingPhrase(o[1]); @@ -430,22 +430,22 @@ buildCounterGoogleCloudDialogflowV2Intent++; if (buildCounterGoogleCloudDialogflowV2Intent < 3) { o.action = "foo"; - o.defaultResponsePlatforms = buildUnnamed5477(); + o.defaultResponsePlatforms = buildUnnamed4889(); o.displayName = "foo"; - o.events = buildUnnamed5478(); - o.followupIntentInfo = buildUnnamed5479(); - o.inputContextNames = buildUnnamed5480(); + o.events = buildUnnamed4890(); + o.followupIntentInfo = buildUnnamed4891(); + o.inputContextNames = buildUnnamed4892(); o.isFallback = true; - o.messages = buildUnnamed5481(); + o.messages = buildUnnamed4893(); o.mlDisabled = true; o.name = "foo"; - o.outputContexts = buildUnnamed5482(); - o.parameters = buildUnnamed5483(); + o.outputContexts = buildUnnamed4894(); + o.parameters = buildUnnamed4895(); o.parentFollowupIntentName = "foo"; o.priority = 42; o.resetContexts = true; o.rootFollowupIntentName = "foo"; - o.trainingPhrases = buildUnnamed5484(); + o.trainingPhrases = buildUnnamed4896(); o.webhookState = "foo"; } buildCounterGoogleCloudDialogflowV2Intent--; @@ -456,22 +456,22 @@ buildCounterGoogleCloudDialogflowV2Intent++; if (buildCounterGoogleCloudDialogflowV2Intent < 3) { unittest.expect(o.action, unittest.equals('foo')); - checkUnnamed5477(o.defaultResponsePlatforms); + checkUnnamed4889(o.defaultResponsePlatforms); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5478(o.events); - checkUnnamed5479(o.followupIntentInfo); - checkUnnamed5480(o.inputContextNames); + checkUnnamed4890(o.events); + checkUnnamed4891(o.followupIntentInfo); + checkUnnamed4892(o.inputContextNames); unittest.expect(o.isFallback, unittest.isTrue); - checkUnnamed5481(o.messages); + checkUnnamed4893(o.messages); unittest.expect(o.mlDisabled, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5482(o.outputContexts); - checkUnnamed5483(o.parameters); + checkUnnamed4894(o.outputContexts); + checkUnnamed4895(o.parameters); unittest.expect(o.parentFollowupIntentName, unittest.equals('foo')); unittest.expect(o.priority, unittest.equals(42)); unittest.expect(o.resetContexts, unittest.isTrue); unittest.expect(o.rootFollowupIntentName, unittest.equals('foo')); - checkUnnamed5484(o.trainingPhrases); + checkUnnamed4896(o.trainingPhrases); unittest.expect(o.webhookState, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2Intent--; @@ -499,7 +499,7 @@ buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo--; } -buildUnnamed5485() { +buildUnnamed4897() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -514,7 +514,7 @@ return o; } -checkUnnamed5485(core.Map<core.String, core.Object> o) { +checkUnnamed4897(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -541,7 +541,7 @@ o.linkOutSuggestion = buildGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion(); o.listSelect = buildGoogleCloudDialogflowV2IntentMessageListSelect(); - o.payload = buildUnnamed5485(); + o.payload = buildUnnamed4897(); o.platform = "foo"; o.quickReplies = buildGoogleCloudDialogflowV2IntentMessageQuickReplies(); o.simpleResponses = @@ -564,7 +564,7 @@ checkGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion( o.linkOutSuggestion); checkGoogleCloudDialogflowV2IntentMessageListSelect(o.listSelect); - checkUnnamed5485(o.payload); + checkUnnamed4897(o.payload); unittest.expect(o.platform, unittest.equals('foo')); checkGoogleCloudDialogflowV2IntentMessageQuickReplies(o.quickReplies); checkGoogleCloudDialogflowV2IntentMessageSimpleResponses(o.simpleResponses); @@ -574,7 +574,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessage--; } -buildUnnamed5486() { +buildUnnamed4898() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageBasicCardButton>(); o.add(buildGoogleCloudDialogflowV2IntentMessageBasicCardButton()); @@ -582,7 +582,7 @@ return o; } -checkUnnamed5486( +checkUnnamed4898( core.List<api.GoogleCloudDialogflowV2IntentMessageBasicCardButton> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageBasicCardButton(o[0]); @@ -594,7 +594,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageBasicCard(); buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard++; if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard < 3) { - o.buttons = buildUnnamed5486(); + o.buttons = buildUnnamed4898(); o.formattedText = "foo"; o.image = buildGoogleCloudDialogflowV2IntentMessageImage(); o.subtitle = "foo"; @@ -608,7 +608,7 @@ api.GoogleCloudDialogflowV2IntentMessageBasicCard o) { buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard++; if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard < 3) { - checkUnnamed5486(o.buttons); + checkUnnamed4898(o.buttons); unittest.expect(o.formattedText, unittest.equals('foo')); checkGoogleCloudDialogflowV2IntentMessageImage(o.image); unittest.expect(o.subtitle, unittest.equals('foo')); @@ -666,14 +666,14 @@ buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction--; } -buildUnnamed5487() { +buildUnnamed4899() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageCardButton>(); o.add(buildGoogleCloudDialogflowV2IntentMessageCardButton()); o.add(buildGoogleCloudDialogflowV2IntentMessageCardButton()); return o; } -checkUnnamed5487( +checkUnnamed4899( core.List<api.GoogleCloudDialogflowV2IntentMessageCardButton> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageCardButton(o[0]); @@ -685,7 +685,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageCard(); buildCounterGoogleCloudDialogflowV2IntentMessageCard++; if (buildCounterGoogleCloudDialogflowV2IntentMessageCard < 3) { - o.buttons = buildUnnamed5487(); + o.buttons = buildUnnamed4899(); o.imageUri = "foo"; o.subtitle = "foo"; o.title = "foo"; @@ -698,7 +698,7 @@ api.GoogleCloudDialogflowV2IntentMessageCard o) { buildCounterGoogleCloudDialogflowV2IntentMessageCard++; if (buildCounterGoogleCloudDialogflowV2IntentMessageCard < 3) { - checkUnnamed5487(o.buttons); + checkUnnamed4899(o.buttons); unittest.expect(o.imageUri, unittest.equals('foo')); unittest.expect(o.subtitle, unittest.equals('foo')); unittest.expect(o.title, unittest.equals('foo')); @@ -728,7 +728,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageCardButton--; } -buildUnnamed5488() { +buildUnnamed4900() { var o = new core .List<api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem>(); o.add(buildGoogleCloudDialogflowV2IntentMessageCarouselSelectItem()); @@ -736,7 +736,7 @@ return o; } -checkUnnamed5488( +checkUnnamed4900( core.List<api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageCarouselSelectItem(o[0]); @@ -748,7 +748,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageCarouselSelect(); buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect++; if (buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect < 3) { - o.items = buildUnnamed5488(); + o.items = buildUnnamed4900(); } buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect--; return o; @@ -758,7 +758,7 @@ api.GoogleCloudDialogflowV2IntentMessageCarouselSelect o) { buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect++; if (buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect < 3) { - checkUnnamed5488(o.items); + checkUnnamed4900(o.items); } buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect--; } @@ -833,7 +833,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion--; } -buildUnnamed5489() { +buildUnnamed4901() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageListSelectItem>(); o.add(buildGoogleCloudDialogflowV2IntentMessageListSelectItem()); @@ -841,7 +841,7 @@ return o; } -checkUnnamed5489( +checkUnnamed4901( core.List<api.GoogleCloudDialogflowV2IntentMessageListSelectItem> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageListSelectItem(o[0]); @@ -853,7 +853,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageListSelect(); buildCounterGoogleCloudDialogflowV2IntentMessageListSelect++; if (buildCounterGoogleCloudDialogflowV2IntentMessageListSelect < 3) { - o.items = buildUnnamed5489(); + o.items = buildUnnamed4901(); o.title = "foo"; } buildCounterGoogleCloudDialogflowV2IntentMessageListSelect--; @@ -864,7 +864,7 @@ api.GoogleCloudDialogflowV2IntentMessageListSelect o) { buildCounterGoogleCloudDialogflowV2IntentMessageListSelect++; if (buildCounterGoogleCloudDialogflowV2IntentMessageListSelect < 3) { - checkUnnamed5489(o.items); + checkUnnamed4901(o.items); unittest.expect(o.title, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2IntentMessageListSelect--; @@ -896,14 +896,14 @@ buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem--; } -buildUnnamed5490() { +buildUnnamed4902() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5490(core.List<core.String> o) { +checkUnnamed4902(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -914,7 +914,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageQuickReplies(); buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies++; if (buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies < 3) { - o.quickReplies = buildUnnamed5490(); + o.quickReplies = buildUnnamed4902(); o.title = "foo"; } buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies--; @@ -925,20 +925,20 @@ api.GoogleCloudDialogflowV2IntentMessageQuickReplies o) { buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies++; if (buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies < 3) { - checkUnnamed5490(o.quickReplies); + checkUnnamed4902(o.quickReplies); unittest.expect(o.title, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies--; } -buildUnnamed5491() { +buildUnnamed4903() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5491(core.List<core.String> o) { +checkUnnamed4903(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -950,7 +950,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo < 3) { o.key = "foo"; - o.synonyms = buildUnnamed5491(); + o.synonyms = buildUnnamed4903(); } buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo--; return o; @@ -961,7 +961,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo < 3) { unittest.expect(o.key, unittest.equals('foo')); - checkUnnamed5491(o.synonyms); + checkUnnamed4903(o.synonyms); } buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo--; } @@ -990,7 +990,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse--; } -buildUnnamed5492() { +buildUnnamed4904() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageSimpleResponse>(); o.add(buildGoogleCloudDialogflowV2IntentMessageSimpleResponse()); @@ -998,7 +998,7 @@ return o; } -checkUnnamed5492( +checkUnnamed4904( core.List<api.GoogleCloudDialogflowV2IntentMessageSimpleResponse> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageSimpleResponse(o[0]); @@ -1010,7 +1010,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageSimpleResponses(); buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses < 3) { - o.simpleResponses = buildUnnamed5492(); + o.simpleResponses = buildUnnamed4904(); } buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses--; return o; @@ -1020,7 +1020,7 @@ api.GoogleCloudDialogflowV2IntentMessageSimpleResponses o) { buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses < 3) { - checkUnnamed5492(o.simpleResponses); + checkUnnamed4904(o.simpleResponses); } buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses--; } @@ -1045,14 +1045,14 @@ buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion--; } -buildUnnamed5493() { +buildUnnamed4905() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageSuggestion>(); o.add(buildGoogleCloudDialogflowV2IntentMessageSuggestion()); o.add(buildGoogleCloudDialogflowV2IntentMessageSuggestion()); return o; } -checkUnnamed5493( +checkUnnamed4905( core.List<api.GoogleCloudDialogflowV2IntentMessageSuggestion> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageSuggestion(o[0]); @@ -1064,7 +1064,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageSuggestions(); buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions < 3) { - o.suggestions = buildUnnamed5493(); + o.suggestions = buildUnnamed4905(); } buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions--; return o; @@ -1074,19 +1074,19 @@ api.GoogleCloudDialogflowV2IntentMessageSuggestions o) { buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions < 3) { - checkUnnamed5493(o.suggestions); + checkUnnamed4905(o.suggestions); } buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions--; } -buildUnnamed5494() { +buildUnnamed4906() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5494(core.List<core.String> o) { +checkUnnamed4906(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1097,7 +1097,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageText(); buildCounterGoogleCloudDialogflowV2IntentMessageText++; if (buildCounterGoogleCloudDialogflowV2IntentMessageText < 3) { - o.text = buildUnnamed5494(); + o.text = buildUnnamed4906(); } buildCounterGoogleCloudDialogflowV2IntentMessageText--; return o; @@ -1107,19 +1107,19 @@ api.GoogleCloudDialogflowV2IntentMessageText o) { buildCounterGoogleCloudDialogflowV2IntentMessageText++; if (buildCounterGoogleCloudDialogflowV2IntentMessageText < 3) { - checkUnnamed5494(o.text); + checkUnnamed4906(o.text); } buildCounterGoogleCloudDialogflowV2IntentMessageText--; } -buildUnnamed5495() { +buildUnnamed4907() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5495(core.List<core.String> o) { +checkUnnamed4907(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1136,7 +1136,7 @@ o.isList = true; o.mandatory = true; o.name = "foo"; - o.prompts = buildUnnamed5495(); + o.prompts = buildUnnamed4907(); o.value = "foo"; } buildCounterGoogleCloudDialogflowV2IntentParameter--; @@ -1153,20 +1153,20 @@ unittest.expect(o.isList, unittest.isTrue); unittest.expect(o.mandatory, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5495(o.prompts); + checkUnnamed4907(o.prompts); unittest.expect(o.value, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2IntentParameter--; } -buildUnnamed5496() { +buildUnnamed4908() { var o = new core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrasePart>(); o.add(buildGoogleCloudDialogflowV2IntentTrainingPhrasePart()); o.add(buildGoogleCloudDialogflowV2IntentTrainingPhrasePart()); return o; } -checkUnnamed5496( +checkUnnamed4908( core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrasePart> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentTrainingPhrasePart(o[0]); @@ -1179,7 +1179,7 @@ buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase++; if (buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase < 3) { o.name = "foo"; - o.parts = buildUnnamed5496(); + o.parts = buildUnnamed4908(); o.timesAddedCount = 42; o.type = "foo"; } @@ -1192,7 +1192,7 @@ buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase++; if (buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase < 3) { unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5496(o.parts); + checkUnnamed4908(o.parts); unittest.expect(o.timesAddedCount, unittest.equals(42)); unittest.expect(o.type, unittest.equals('foo')); } @@ -1225,7 +1225,7 @@ buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart--; } -buildUnnamed5497() { +buildUnnamed4909() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1240,7 +1240,7 @@ return o; } -checkUnnamed5497(core.Map<core.String, core.Object> o) { +checkUnnamed4909(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -1259,7 +1259,7 @@ var o = new api.GoogleCloudDialogflowV2OriginalDetectIntentRequest(); buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest++; if (buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest < 3) { - o.payload = buildUnnamed5497(); + o.payload = buildUnnamed4909(); o.source = "foo"; o.version = "foo"; } @@ -1271,14 +1271,14 @@ api.GoogleCloudDialogflowV2OriginalDetectIntentRequest o) { buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest++; if (buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest < 3) { - checkUnnamed5497(o.payload); + checkUnnamed4909(o.payload); unittest.expect(o.source, unittest.equals('foo')); unittest.expect(o.version, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest--; } -buildUnnamed5498() { +buildUnnamed4910() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1293,7 +1293,7 @@ return o; } -checkUnnamed5498(core.Map<core.String, core.Object> o) { +checkUnnamed4910(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLength(3)); @@ -1307,33 +1307,33 @@ unittest.expect(casted10["string"], unittest.equals('foo')); } -buildUnnamed5499() { +buildUnnamed4911() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessage>(); o.add(buildGoogleCloudDialogflowV2IntentMessage()); o.add(buildGoogleCloudDialogflowV2IntentMessage()); return o; } -checkUnnamed5499(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { +checkUnnamed4911(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessage(o[0]); checkGoogleCloudDialogflowV2IntentMessage(o[1]); } -buildUnnamed5500() { +buildUnnamed4912() { var o = new core.List<api.GoogleCloudDialogflowV2Context>(); o.add(buildGoogleCloudDialogflowV2Context()); o.add(buildGoogleCloudDialogflowV2Context()); return o; } -checkUnnamed5500(core.List<api.GoogleCloudDialogflowV2Context> o) { +checkUnnamed4912(core.List<api.GoogleCloudDialogflowV2Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2Context(o[0]); checkGoogleCloudDialogflowV2Context(o[1]); } -buildUnnamed5501() { +buildUnnamed4913() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1348,7 +1348,7 @@ return o; } -checkUnnamed5501(core.Map<core.String, core.Object> o) { +checkUnnamed4913(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted11 = (o["x"]) as core.Map; unittest.expect(casted11, unittest.hasLength(3)); @@ -1362,7 +1362,7 @@ unittest.expect(casted12["string"], unittest.equals('foo')); } -buildUnnamed5502() { +buildUnnamed4914() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1377,7 +1377,7 @@ return o; } -checkUnnamed5502(core.Map<core.String, core.Object> o) { +checkUnnamed4914(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted13 = (o["x"]) as core.Map; unittest.expect(casted13, unittest.hasLength(3)); @@ -1398,17 +1398,17 @@ if (buildCounterGoogleCloudDialogflowV2QueryResult < 3) { o.action = "foo"; o.allRequiredParamsPresent = true; - o.diagnosticInfo = buildUnnamed5498(); - o.fulfillmentMessages = buildUnnamed5499(); + o.diagnosticInfo = buildUnnamed4910(); + o.fulfillmentMessages = buildUnnamed4911(); o.fulfillmentText = "foo"; o.intent = buildGoogleCloudDialogflowV2Intent(); o.intentDetectionConfidence = 42.0; o.languageCode = "foo"; - o.outputContexts = buildUnnamed5500(); - o.parameters = buildUnnamed5501(); + o.outputContexts = buildUnnamed4912(); + o.parameters = buildUnnamed4913(); o.queryText = "foo"; o.speechRecognitionConfidence = 42.0; - o.webhookPayload = buildUnnamed5502(); + o.webhookPayload = buildUnnamed4914(); o.webhookSource = "foo"; } buildCounterGoogleCloudDialogflowV2QueryResult--; @@ -1421,17 +1421,17 @@ if (buildCounterGoogleCloudDialogflowV2QueryResult < 3) { unittest.expect(o.action, unittest.equals('foo')); unittest.expect(o.allRequiredParamsPresent, unittest.isTrue); - checkUnnamed5498(o.diagnosticInfo); - checkUnnamed5499(o.fulfillmentMessages); + checkUnnamed4910(o.diagnosticInfo); + checkUnnamed4911(o.fulfillmentMessages); unittest.expect(o.fulfillmentText, unittest.equals('foo')); checkGoogleCloudDialogflowV2Intent(o.intent); unittest.expect(o.intentDetectionConfidence, unittest.equals(42.0)); unittest.expect(o.languageCode, unittest.equals('foo')); - checkUnnamed5500(o.outputContexts); - checkUnnamed5501(o.parameters); + checkUnnamed4912(o.outputContexts); + checkUnnamed4913(o.parameters); unittest.expect(o.queryText, unittest.equals('foo')); unittest.expect(o.speechRecognitionConfidence, unittest.equals(42.0)); - checkUnnamed5502(o.webhookPayload); + checkUnnamed4914(o.webhookPayload); unittest.expect(o.webhookSource, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2QueryResult--; @@ -1465,33 +1465,33 @@ buildCounterGoogleCloudDialogflowV2WebhookRequest--; } -buildUnnamed5503() { +buildUnnamed4915() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessage>(); o.add(buildGoogleCloudDialogflowV2IntentMessage()); o.add(buildGoogleCloudDialogflowV2IntentMessage()); return o; } -checkUnnamed5503(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { +checkUnnamed4915(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessage(o[0]); checkGoogleCloudDialogflowV2IntentMessage(o[1]); } -buildUnnamed5504() { +buildUnnamed4916() { var o = new core.List<api.GoogleCloudDialogflowV2Context>(); o.add(buildGoogleCloudDialogflowV2Context()); o.add(buildGoogleCloudDialogflowV2Context()); return o; } -checkUnnamed5504(core.List<api.GoogleCloudDialogflowV2Context> o) { +checkUnnamed4916(core.List<api.GoogleCloudDialogflowV2Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2Context(o[0]); checkGoogleCloudDialogflowV2Context(o[1]); } -buildUnnamed5505() { +buildUnnamed4917() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1506,7 +1506,7 @@ return o; } -checkUnnamed5505(core.Map<core.String, core.Object> o) { +checkUnnamed4917(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted15 = (o["x"]) as core.Map; unittest.expect(casted15, unittest.hasLength(3)); @@ -1526,10 +1526,10 @@ buildCounterGoogleCloudDialogflowV2WebhookResponse++; if (buildCounterGoogleCloudDialogflowV2WebhookResponse < 3) { o.followupEventInput = buildGoogleCloudDialogflowV2EventInput(); - o.fulfillmentMessages = buildUnnamed5503(); + o.fulfillmentMessages = buildUnnamed4915(); o.fulfillmentText = "foo"; - o.outputContexts = buildUnnamed5504(); - o.payload = buildUnnamed5505(); + o.outputContexts = buildUnnamed4916(); + o.payload = buildUnnamed4917(); o.source = "foo"; } buildCounterGoogleCloudDialogflowV2WebhookResponse--; @@ -1541,23 +1541,23 @@ buildCounterGoogleCloudDialogflowV2WebhookResponse++; if (buildCounterGoogleCloudDialogflowV2WebhookResponse < 3) { checkGoogleCloudDialogflowV2EventInput(o.followupEventInput); - checkUnnamed5503(o.fulfillmentMessages); + checkUnnamed4915(o.fulfillmentMessages); unittest.expect(o.fulfillmentText, unittest.equals('foo')); - checkUnnamed5504(o.outputContexts); - checkUnnamed5505(o.payload); + checkUnnamed4916(o.outputContexts); + checkUnnamed4917(o.payload); unittest.expect(o.source, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2WebhookResponse--; } -buildUnnamed5506() { +buildUnnamed4918() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5506(core.List<core.String> o) { +checkUnnamed4918(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1576,7 +1576,7 @@ o.enableLogging = true; o.matchMode = "foo"; o.parent = "foo"; - o.supportedLanguageCodes = buildUnnamed5506(); + o.supportedLanguageCodes = buildUnnamed4918(); o.timeZone = "foo"; } buildCounterGoogleCloudDialogflowV2beta1Agent--; @@ -1595,20 +1595,20 @@ unittest.expect(o.enableLogging, unittest.isTrue); unittest.expect(o.matchMode, unittest.equals('foo')); unittest.expect(o.parent, unittest.equals('foo')); - checkUnnamed5506(o.supportedLanguageCodes); + checkUnnamed4918(o.supportedLanguageCodes); unittest.expect(o.timeZone, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1Agent--; } -buildUnnamed5507() { +buildUnnamed4919() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); return o; } -checkUnnamed5507( +checkUnnamed4919( core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityTypeEntity(o[0]); @@ -1620,7 +1620,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest(); buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest < 3) { - o.entities = buildUnnamed5507(); + o.entities = buildUnnamed4919(); o.languageCode = "foo"; } buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest--; @@ -1631,20 +1631,20 @@ api.GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest o) { buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest < 3) { - checkUnnamed5507(o.entities); + checkUnnamed4919(o.entities); unittest.expect(o.languageCode, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest--; } -buildUnnamed5508() { +buildUnnamed4920() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5508(core.List<core.String> o) { +checkUnnamed4920(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1655,7 +1655,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest(); buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest < 3) { - o.entityValues = buildUnnamed5508(); + o.entityValues = buildUnnamed4920(); o.languageCode = "foo"; } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest--; @@ -1666,20 +1666,20 @@ api.GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest o) { buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest < 3) { - checkUnnamed5508(o.entityValues); + checkUnnamed4920(o.entityValues); unittest.expect(o.languageCode, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest--; } -buildUnnamed5509() { +buildUnnamed4921() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5509(core.List<core.String> o) { +checkUnnamed4921(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1692,7 +1692,7 @@ buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest < 3) { - o.entityTypeNames = buildUnnamed5509(); + o.entityTypeNames = buildUnnamed4921(); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest--; return o; @@ -1703,19 +1703,19 @@ buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest < 3) { - checkUnnamed5509(o.entityTypeNames); + checkUnnamed4921(o.entityTypeNames); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest--; } -buildUnnamed5510() { +buildUnnamed4922() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Intent>(); o.add(buildGoogleCloudDialogflowV2beta1Intent()); o.add(buildGoogleCloudDialogflowV2beta1Intent()); return o; } -checkUnnamed5510(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { +checkUnnamed4922(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Intent(o[0]); checkGoogleCloudDialogflowV2beta1Intent(o[1]); @@ -1726,7 +1726,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest(); buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest < 3) { - o.intents = buildUnnamed5510(); + o.intents = buildUnnamed4922(); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest--; return o; @@ -1736,19 +1736,19 @@ api.GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest o) { buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest < 3) { - checkUnnamed5510(o.intents); + checkUnnamed4922(o.intents); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest--; } -buildUnnamed5511() { +buildUnnamed4923() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); return o; } -checkUnnamed5511( +checkUnnamed4923( core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityTypeEntity(o[0]); @@ -1760,7 +1760,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest(); buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest < 3) { - o.entities = buildUnnamed5511(); + o.entities = buildUnnamed4923(); o.languageCode = "foo"; o.updateMask = "foo"; } @@ -1772,7 +1772,7 @@ api.GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest o) { buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest < 3) { - checkUnnamed5511(o.entities); + checkUnnamed4923(o.entities); unittest.expect(o.languageCode, unittest.equals('foo')); unittest.expect(o.updateMask, unittest.equals('foo')); } @@ -1809,14 +1809,14 @@ buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest--; } -buildUnnamed5512() { +buildUnnamed4924() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityType>(); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); return o; } -checkUnnamed5512(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { +checkUnnamed4924(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityType(o[0]); checkGoogleCloudDialogflowV2beta1EntityType(o[1]); @@ -1829,7 +1829,7 @@ buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse < 3) { - o.entityTypes = buildUnnamed5512(); + o.entityTypes = buildUnnamed4924(); } buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse--; return o; @@ -1840,7 +1840,7 @@ buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse < 3) { - checkUnnamed5512(o.entityTypes); + checkUnnamed4924(o.entityTypes); } buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse--; } @@ -1873,14 +1873,14 @@ buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest--; } -buildUnnamed5513() { +buildUnnamed4925() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Intent>(); o.add(buildGoogleCloudDialogflowV2beta1Intent()); o.add(buildGoogleCloudDialogflowV2beta1Intent()); return o; } -checkUnnamed5513(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { +checkUnnamed4925(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Intent(o[0]); checkGoogleCloudDialogflowV2beta1Intent(o[1]); @@ -1891,7 +1891,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse(); buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse < 3) { - o.intents = buildUnnamed5513(); + o.intents = buildUnnamed4925(); } buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse--; return o; @@ -1901,12 +1901,12 @@ api.GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse o) { buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse < 3) { - checkUnnamed5513(o.intents); + checkUnnamed4925(o.intents); } buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse--; } -buildUnnamed5514() { +buildUnnamed4926() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1921,7 +1921,7 @@ return o; } -checkUnnamed5514(core.Map<core.String, core.Object> o) { +checkUnnamed4926(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted17 = (o["x"]) as core.Map; unittest.expect(casted17, unittest.hasLength(3)); @@ -1942,7 +1942,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1Context < 3) { o.lifespanCount = 42; o.name = "foo"; - o.parameters = buildUnnamed5514(); + o.parameters = buildUnnamed4926(); } buildCounterGoogleCloudDialogflowV2beta1Context--; return o; @@ -1954,7 +1954,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1Context < 3) { unittest.expect(o.lifespanCount, unittest.equals(42)); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5514(o.parameters); + checkUnnamed4926(o.parameters); } buildCounterGoogleCloudDialogflowV2beta1Context--; } @@ -1985,14 +1985,14 @@ buildCounterGoogleCloudDialogflowV2beta1DetectIntentRequest--; } -buildUnnamed5515() { +buildUnnamed4927() { var o = new core.List<api.GoogleCloudDialogflowV2beta1QueryResult>(); o.add(buildGoogleCloudDialogflowV2beta1QueryResult()); o.add(buildGoogleCloudDialogflowV2beta1QueryResult()); return o; } -checkUnnamed5515(core.List<api.GoogleCloudDialogflowV2beta1QueryResult> o) { +checkUnnamed4927(core.List<api.GoogleCloudDialogflowV2beta1QueryResult> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1QueryResult(o[0]); checkGoogleCloudDialogflowV2beta1QueryResult(o[1]); @@ -2003,7 +2003,7 @@ var o = new api.GoogleCloudDialogflowV2beta1DetectIntentResponse(); buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse++; if (buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse < 3) { - o.alternativeQueryResults = buildUnnamed5515(); + o.alternativeQueryResults = buildUnnamed4927(); o.outputAudio = "foo"; o.outputAudioConfig = buildGoogleCloudDialogflowV2beta1OutputAudioConfig(); o.queryResult = buildGoogleCloudDialogflowV2beta1QueryResult(); @@ -2018,7 +2018,7 @@ api.GoogleCloudDialogflowV2beta1DetectIntentResponse o) { buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse++; if (buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse < 3) { - checkUnnamed5515(o.alternativeQueryResults); + checkUnnamed4927(o.alternativeQueryResults); unittest.expect(o.outputAudio, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1OutputAudioConfig(o.outputAudioConfig); checkGoogleCloudDialogflowV2beta1QueryResult(o.queryResult); @@ -2028,14 +2028,14 @@ buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse--; } -buildUnnamed5516() { +buildUnnamed4928() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5516(core.List<core.String> o) { +checkUnnamed4928(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2049,7 +2049,7 @@ o.content = "foo"; o.contentUri = "foo"; o.displayName = "foo"; - o.knowledgeTypes = buildUnnamed5516(); + o.knowledgeTypes = buildUnnamed4928(); o.mimeType = "foo"; o.name = "foo"; o.rawContent = "foo"; @@ -2065,7 +2065,7 @@ unittest.expect(o.content, unittest.equals('foo')); unittest.expect(o.contentUri, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5516(o.knowledgeTypes); + checkUnnamed4928(o.knowledgeTypes); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.rawContent, unittest.equals('foo')); @@ -2073,14 +2073,14 @@ buildCounterGoogleCloudDialogflowV2beta1Document--; } -buildUnnamed5517() { +buildUnnamed4929() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); return o; } -checkUnnamed5517( +checkUnnamed4929( core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityTypeEntity(o[0]); @@ -2094,7 +2094,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1EntityType < 3) { o.autoExpansionMode = "foo"; o.displayName = "foo"; - o.entities = buildUnnamed5517(); + o.entities = buildUnnamed4929(); o.kind = "foo"; o.name = "foo"; } @@ -2108,21 +2108,21 @@ if (buildCounterGoogleCloudDialogflowV2beta1EntityType < 3) { unittest.expect(o.autoExpansionMode, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5517(o.entities); + checkUnnamed4929(o.entities); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1EntityType--; } -buildUnnamed5518() { +buildUnnamed4930() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityType>(); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); return o; } -checkUnnamed5518(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { +checkUnnamed4930(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityType(o[0]); checkGoogleCloudDialogflowV2beta1EntityType(o[1]); @@ -2133,7 +2133,7 @@ var o = new api.GoogleCloudDialogflowV2beta1EntityTypeBatch(); buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch++; if (buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch < 3) { - o.entityTypes = buildUnnamed5518(); + o.entityTypes = buildUnnamed4930(); } buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch--; return o; @@ -2143,19 +2143,19 @@ api.GoogleCloudDialogflowV2beta1EntityTypeBatch o) { buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch++; if (buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch < 3) { - checkUnnamed5518(o.entityTypes); + checkUnnamed4930(o.entityTypes); } buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch--; } -buildUnnamed5519() { +buildUnnamed4931() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5519(core.List<core.String> o) { +checkUnnamed4931(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2166,7 +2166,7 @@ var o = new api.GoogleCloudDialogflowV2beta1EntityTypeEntity(); buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity++; if (buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity < 3) { - o.synonyms = buildUnnamed5519(); + o.synonyms = buildUnnamed4931(); o.value = "foo"; } buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity--; @@ -2177,13 +2177,13 @@ api.GoogleCloudDialogflowV2beta1EntityTypeEntity o) { buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity++; if (buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity < 3) { - checkUnnamed5519(o.synonyms); + checkUnnamed4931(o.synonyms); unittest.expect(o.value, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity--; } -buildUnnamed5520() { +buildUnnamed4932() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2198,7 +2198,7 @@ return o; } -checkUnnamed5520(core.Map<core.String, core.Object> o) { +checkUnnamed4932(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted19 = (o["x"]) as core.Map; unittest.expect(casted19, unittest.hasLength(3)); @@ -2219,7 +2219,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1EventInput < 3) { o.languageCode = "foo"; o.name = "foo"; - o.parameters = buildUnnamed5520(); + o.parameters = buildUnnamed4932(); } buildCounterGoogleCloudDialogflowV2beta1EventInput--; return o; @@ -2231,7 +2231,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1EventInput < 3) { unittest.expect(o.languageCode, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5520(o.parameters); + checkUnnamed4932(o.parameters); } buildCounterGoogleCloudDialogflowV2beta1EventInput--; } @@ -2300,14 +2300,14 @@ buildCounterGoogleCloudDialogflowV2beta1ImportAgentRequest--; } -buildUnnamed5521() { +buildUnnamed4933() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5521(core.List<core.String> o) { +checkUnnamed4933(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2321,7 +2321,7 @@ o.audioEncoding = "foo"; o.languageCode = "foo"; o.model = "foo"; - o.phraseHints = buildUnnamed5521(); + o.phraseHints = buildUnnamed4933(); o.sampleRateHertz = 42; } buildCounterGoogleCloudDialogflowV2beta1InputAudioConfig--; @@ -2335,39 +2335,39 @@ unittest.expect(o.audioEncoding, unittest.equals('foo')); unittest.expect(o.languageCode, unittest.equals('foo')); unittest.expect(o.model, unittest.equals('foo')); - checkUnnamed5521(o.phraseHints); + checkUnnamed4933(o.phraseHints); unittest.expect(o.sampleRateHertz, unittest.equals(42)); } buildCounterGoogleCloudDialogflowV2beta1InputAudioConfig--; } -buildUnnamed5522() { +buildUnnamed4934() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5522(core.List<core.String> o) { +checkUnnamed4934(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5523() { +buildUnnamed4935() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5523(core.List<core.String> o) { +checkUnnamed4935(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5524() { +buildUnnamed4936() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo>(); o.add(buildGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo()); @@ -2375,73 +2375,73 @@ return o; } -checkUnnamed5524( +checkUnnamed4936( core.List<api.GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo(o[0]); checkGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo(o[1]); } -buildUnnamed5525() { +buildUnnamed4937() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5525(core.List<core.String> o) { +checkUnnamed4937(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5526() { +buildUnnamed4938() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessage>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); return o; } -checkUnnamed5526(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { +checkUnnamed4938(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessage(o[0]); checkGoogleCloudDialogflowV2beta1IntentMessage(o[1]); } -buildUnnamed5527() { +buildUnnamed4939() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5527(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4939(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); } -buildUnnamed5528() { +buildUnnamed4940() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentParameter>(); o.add(buildGoogleCloudDialogflowV2beta1IntentParameter()); o.add(buildGoogleCloudDialogflowV2beta1IntentParameter()); return o; } -checkUnnamed5528(core.List<api.GoogleCloudDialogflowV2beta1IntentParameter> o) { +checkUnnamed4940(core.List<api.GoogleCloudDialogflowV2beta1IntentParameter> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentParameter(o[0]); checkGoogleCloudDialogflowV2beta1IntentParameter(o[1]); } -buildUnnamed5529() { +buildUnnamed4941() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentTrainingPhrase>(); o.add(buildGoogleCloudDialogflowV2beta1IntentTrainingPhrase()); o.add(buildGoogleCloudDialogflowV2beta1IntentTrainingPhrase()); return o; } -checkUnnamed5529( +checkUnnamed4941( core.List<api.GoogleCloudDialogflowV2beta1IntentTrainingPhrase> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentTrainingPhrase(o[0]); @@ -2454,24 +2454,24 @@ buildCounterGoogleCloudDialogflowV2beta1Intent++; if (buildCounterGoogleCloudDialogflowV2beta1Intent < 3) { o.action = "foo"; - o.defaultResponsePlatforms = buildUnnamed5522(); + o.defaultResponsePlatforms = buildUnnamed4934(); o.displayName = "foo"; o.endInteraction = true; - o.events = buildUnnamed5523(); - o.followupIntentInfo = buildUnnamed5524(); - o.inputContextNames = buildUnnamed5525(); + o.events = buildUnnamed4935(); + o.followupIntentInfo = buildUnnamed4936(); + o.inputContextNames = buildUnnamed4937(); o.isFallback = true; - o.messages = buildUnnamed5526(); + o.messages = buildUnnamed4938(); o.mlDisabled = true; o.mlEnabled = true; o.name = "foo"; - o.outputContexts = buildUnnamed5527(); - o.parameters = buildUnnamed5528(); + o.outputContexts = buildUnnamed4939(); + o.parameters = buildUnnamed4940(); o.parentFollowupIntentName = "foo"; o.priority = 42; o.resetContexts = true; o.rootFollowupIntentName = "foo"; - o.trainingPhrases = buildUnnamed5529(); + o.trainingPhrases = buildUnnamed4941(); o.webhookState = "foo"; } buildCounterGoogleCloudDialogflowV2beta1Intent--; @@ -2483,37 +2483,37 @@ buildCounterGoogleCloudDialogflowV2beta1Intent++; if (buildCounterGoogleCloudDialogflowV2beta1Intent < 3) { unittest.expect(o.action, unittest.equals('foo')); - checkUnnamed5522(o.defaultResponsePlatforms); + checkUnnamed4934(o.defaultResponsePlatforms); unittest.expect(o.displayName, unittest.equals('foo')); unittest.expect(o.endInteraction, unittest.isTrue); - checkUnnamed5523(o.events); - checkUnnamed5524(o.followupIntentInfo); - checkUnnamed5525(o.inputContextNames); + checkUnnamed4935(o.events); + checkUnnamed4936(o.followupIntentInfo); + checkUnnamed4937(o.inputContextNames); unittest.expect(o.isFallback, unittest.isTrue); - checkUnnamed5526(o.messages); + checkUnnamed4938(o.messages); unittest.expect(o.mlDisabled, unittest.isTrue); unittest.expect(o.mlEnabled, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5527(o.outputContexts); - checkUnnamed5528(o.parameters); + checkUnnamed4939(o.outputContexts); + checkUnnamed4940(o.parameters); unittest.expect(o.parentFollowupIntentName, unittest.equals('foo')); unittest.expect(o.priority, unittest.equals(42)); unittest.expect(o.resetContexts, unittest.isTrue); unittest.expect(o.rootFollowupIntentName, unittest.equals('foo')); - checkUnnamed5529(o.trainingPhrases); + checkUnnamed4941(o.trainingPhrases); unittest.expect(o.webhookState, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1Intent--; } -buildUnnamed5530() { +buildUnnamed4942() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Intent>(); o.add(buildGoogleCloudDialogflowV2beta1Intent()); o.add(buildGoogleCloudDialogflowV2beta1Intent()); return o; } -checkUnnamed5530(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { +checkUnnamed4942(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Intent(o[0]); checkGoogleCloudDialogflowV2beta1Intent(o[1]); @@ -2524,7 +2524,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentBatch(); buildCounterGoogleCloudDialogflowV2beta1IntentBatch++; if (buildCounterGoogleCloudDialogflowV2beta1IntentBatch < 3) { - o.intents = buildUnnamed5530(); + o.intents = buildUnnamed4942(); } buildCounterGoogleCloudDialogflowV2beta1IntentBatch--; return o; @@ -2534,7 +2534,7 @@ api.GoogleCloudDialogflowV2beta1IntentBatch o) { buildCounterGoogleCloudDialogflowV2beta1IntentBatch++; if (buildCounterGoogleCloudDialogflowV2beta1IntentBatch < 3) { - checkUnnamed5530(o.intents); + checkUnnamed4942(o.intents); } buildCounterGoogleCloudDialogflowV2beta1IntentBatch--; } @@ -2561,7 +2561,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo--; } -buildUnnamed5531() { +buildUnnamed4943() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2576,7 +2576,7 @@ return o; } -checkUnnamed5531(core.Map<core.String, core.Object> o) { +checkUnnamed4943(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted21 = (o["x"]) as core.Map; unittest.expect(casted21, unittest.hasLength(3)); @@ -2603,7 +2603,7 @@ o.linkOutSuggestion = buildGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion(); o.listSelect = buildGoogleCloudDialogflowV2beta1IntentMessageListSelect(); - o.payload = buildUnnamed5531(); + o.payload = buildUnnamed4943(); o.platform = "foo"; o.quickReplies = buildGoogleCloudDialogflowV2beta1IntentMessageQuickReplies(); @@ -2634,7 +2634,7 @@ checkGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion( o.linkOutSuggestion); checkGoogleCloudDialogflowV2beta1IntentMessageListSelect(o.listSelect); - checkUnnamed5531(o.payload); + checkUnnamed4943(o.payload); unittest.expect(o.platform, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1IntentMessageQuickReplies(o.quickReplies); checkGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses( @@ -2651,7 +2651,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessage--; } -buildUnnamed5532() { +buildUnnamed4944() { var o = new core .List<api.GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageBasicCardButton()); @@ -2659,7 +2659,7 @@ return o; } -checkUnnamed5532( +checkUnnamed4944( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageBasicCardButton(o[0]); @@ -2671,7 +2671,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageBasicCard(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCard++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCard < 3) { - o.buttons = buildUnnamed5532(); + o.buttons = buildUnnamed4944(); o.formattedText = "foo"; o.image = buildGoogleCloudDialogflowV2beta1IntentMessageImage(); o.subtitle = "foo"; @@ -2685,7 +2685,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageBasicCard o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCard++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCard < 3) { - checkUnnamed5532(o.buttons); + checkUnnamed4944(o.buttons); unittest.expect(o.formattedText, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1IntentMessageImage(o.image); unittest.expect(o.subtitle, unittest.equals('foo')); @@ -2747,7 +2747,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction--; } -buildUnnamed5533() { +buildUnnamed4945() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessageCardButton>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageCardButton()); @@ -2755,7 +2755,7 @@ return o; } -checkUnnamed5533( +checkUnnamed4945( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageCardButton> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageCardButton(o[0]); @@ -2767,7 +2767,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageCard(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageCard++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageCard < 3) { - o.buttons = buildUnnamed5533(); + o.buttons = buildUnnamed4945(); o.imageUri = "foo"; o.subtitle = "foo"; o.title = "foo"; @@ -2780,7 +2780,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageCard o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageCard++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageCard < 3) { - checkUnnamed5533(o.buttons); + checkUnnamed4945(o.buttons); unittest.expect(o.imageUri, unittest.equals('foo')); unittest.expect(o.subtitle, unittest.equals('foo')); unittest.expect(o.title, unittest.equals('foo')); @@ -2810,7 +2810,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageCardButton--; } -buildUnnamed5534() { +buildUnnamed4946() { var o = new core .List<api.GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem()); @@ -2818,7 +2818,7 @@ return o; } -checkUnnamed5534( +checkUnnamed4946( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem> o) { unittest.expect(o, unittest.hasLength(2)); @@ -2832,7 +2832,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect < 3) { - o.items = buildUnnamed5534(); + o.items = buildUnnamed4946(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect--; return o; @@ -2842,7 +2842,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect < 3) { - checkUnnamed5534(o.items); + checkUnnamed4946(o.items); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect--; } @@ -2923,7 +2923,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion--; } -buildUnnamed5535() { +buildUnnamed4947() { var o = new core .List<api.GoogleCloudDialogflowV2beta1IntentMessageListSelectItem>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageListSelectItem()); @@ -2931,7 +2931,7 @@ return o; } -checkUnnamed5535( +checkUnnamed4947( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageListSelectItem> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageListSelectItem(o[0]); @@ -2943,7 +2943,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageListSelect(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect < 3) { - o.items = buildUnnamed5535(); + o.items = buildUnnamed4947(); o.title = "foo"; } buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect--; @@ -2954,7 +2954,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageListSelect o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect < 3) { - checkUnnamed5535(o.items); + checkUnnamed4947(o.items); unittest.expect(o.title, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect--; @@ -2987,14 +2987,14 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelectItem--; } -buildUnnamed5536() { +buildUnnamed4948() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5536(core.List<core.String> o) { +checkUnnamed4948(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3005,7 +3005,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageQuickReplies(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies < 3) { - o.quickReplies = buildUnnamed5536(); + o.quickReplies = buildUnnamed4948(); o.title = "foo"; } buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies--; @@ -3016,20 +3016,20 @@ api.GoogleCloudDialogflowV2beta1IntentMessageQuickReplies o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies < 3) { - checkUnnamed5536(o.quickReplies); + checkUnnamed4948(o.quickReplies); unittest.expect(o.title, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies--; } -buildUnnamed5537() { +buildUnnamed4949() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5537(core.List<core.String> o) { +checkUnnamed4949(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3042,7 +3042,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo < 3) { o.key = "foo"; - o.synonyms = buildUnnamed5537(); + o.synonyms = buildUnnamed4949(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo--; return o; @@ -3053,7 +3053,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo < 3) { unittest.expect(o.key, unittest.equals('foo')); - checkUnnamed5537(o.synonyms); + checkUnnamed4949(o.synonyms); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo--; } @@ -3083,7 +3083,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse--; } -buildUnnamed5538() { +buildUnnamed4950() { var o = new core .List<api.GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse()); @@ -3091,7 +3091,7 @@ return o; } -checkUnnamed5538( +checkUnnamed4950( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse(o[0]); @@ -3105,7 +3105,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses < 3) { - o.simpleResponses = buildUnnamed5538(); + o.simpleResponses = buildUnnamed4950(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses--; return o; @@ -3116,7 +3116,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses < 3) { - checkUnnamed5538(o.simpleResponses); + checkUnnamed4950(o.simpleResponses); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses--; } @@ -3141,7 +3141,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestion--; } -buildUnnamed5539() { +buildUnnamed4951() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessageSuggestion>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageSuggestion()); @@ -3149,7 +3149,7 @@ return o; } -checkUnnamed5539( +checkUnnamed4951( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageSuggestion> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageSuggestion(o[0]); @@ -3161,7 +3161,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageSuggestions(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions < 3) { - o.suggestions = buildUnnamed5539(); + o.suggestions = buildUnnamed4951(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions--; return o; @@ -3171,7 +3171,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageSuggestions o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions < 3) { - checkUnnamed5539(o.suggestions); + checkUnnamed4951(o.suggestions); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions--; } @@ -3251,14 +3251,14 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall--; } -buildUnnamed5540() { +buildUnnamed4952() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5540(core.List<core.String> o) { +checkUnnamed4952(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3269,7 +3269,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageText(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageText++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageText < 3) { - o.text = buildUnnamed5540(); + o.text = buildUnnamed4952(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageText--; return o; @@ -3279,19 +3279,19 @@ api.GoogleCloudDialogflowV2beta1IntentMessageText o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageText++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageText < 3) { - checkUnnamed5540(o.text); + checkUnnamed4952(o.text); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageText--; } -buildUnnamed5541() { +buildUnnamed4953() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5541(core.List<core.String> o) { +checkUnnamed4953(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3308,7 +3308,7 @@ o.isList = true; o.mandatory = true; o.name = "foo"; - o.prompts = buildUnnamed5541(); + o.prompts = buildUnnamed4953(); o.value = "foo"; } buildCounterGoogleCloudDialogflowV2beta1IntentParameter--; @@ -3325,13 +3325,13 @@ unittest.expect(o.isList, unittest.isTrue); unittest.expect(o.mandatory, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5541(o.prompts); + checkUnnamed4953(o.prompts); unittest.expect(o.value, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1IntentParameter--; } -buildUnnamed5542() { +buildUnnamed4954() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart>(); o.add(buildGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart()); @@ -3339,7 +3339,7 @@ return o; } -checkUnnamed5542( +checkUnnamed4954( core.List<api.GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart(o[0]); @@ -3352,7 +3352,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrase++; if (buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrase < 3) { o.name = "foo"; - o.parts = buildUnnamed5542(); + o.parts = buildUnnamed4954(); o.timesAddedCount = 42; o.type = "foo"; } @@ -3365,7 +3365,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrase++; if (buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrase < 3) { unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5542(o.parts); + checkUnnamed4954(o.parts); unittest.expect(o.timesAddedCount, unittest.equals(42)); unittest.expect(o.type, unittest.equals('foo')); } @@ -3398,7 +3398,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart--; } -buildUnnamed5543() { +buildUnnamed4955() { var o = new core.List<api.GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer>(); o.add(buildGoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer()); @@ -3406,7 +3406,7 @@ return o; } -checkUnnamed5543( +checkUnnamed4955( core.List<api.GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer(o[0]); @@ -3418,7 +3418,7 @@ var o = new api.GoogleCloudDialogflowV2beta1KnowledgeAnswers(); buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers++; if (buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers < 3) { - o.answers = buildUnnamed5543(); + o.answers = buildUnnamed4955(); } buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers--; return o; @@ -3428,7 +3428,7 @@ api.GoogleCloudDialogflowV2beta1KnowledgeAnswers o) { buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers++; if (buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers < 3) { - checkUnnamed5543(o.answers); + checkUnnamed4955(o.answers); } buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers--; } @@ -3503,14 +3503,14 @@ buildCounterGoogleCloudDialogflowV2beta1KnowledgeOperationMetadata--; } -buildUnnamed5544() { +buildUnnamed4956() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5544(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4956(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); @@ -3521,7 +3521,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListContextsResponse(); buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse < 3) { - o.contexts = buildUnnamed5544(); + o.contexts = buildUnnamed4956(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse--; @@ -3532,20 +3532,20 @@ api.GoogleCloudDialogflowV2beta1ListContextsResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse < 3) { - checkUnnamed5544(o.contexts); + checkUnnamed4956(o.contexts); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse--; } -buildUnnamed5545() { +buildUnnamed4957() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Document>(); o.add(buildGoogleCloudDialogflowV2beta1Document()); o.add(buildGoogleCloudDialogflowV2beta1Document()); return o; } -checkUnnamed5545(core.List<api.GoogleCloudDialogflowV2beta1Document> o) { +checkUnnamed4957(core.List<api.GoogleCloudDialogflowV2beta1Document> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Document(o[0]); checkGoogleCloudDialogflowV2beta1Document(o[1]); @@ -3556,7 +3556,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListDocumentsResponse(); buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse < 3) { - o.documents = buildUnnamed5545(); + o.documents = buildUnnamed4957(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse--; @@ -3567,20 +3567,20 @@ api.GoogleCloudDialogflowV2beta1ListDocumentsResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse < 3) { - checkUnnamed5545(o.documents); + checkUnnamed4957(o.documents); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse--; } -buildUnnamed5546() { +buildUnnamed4958() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityType>(); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); return o; } -checkUnnamed5546(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { +checkUnnamed4958(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityType(o[0]); checkGoogleCloudDialogflowV2beta1EntityType(o[1]); @@ -3591,7 +3591,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListEntityTypesResponse(); buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse < 3) { - o.entityTypes = buildUnnamed5546(); + o.entityTypes = buildUnnamed4958(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse--; @@ -3602,20 +3602,20 @@ api.GoogleCloudDialogflowV2beta1ListEntityTypesResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse < 3) { - checkUnnamed5546(o.entityTypes); + checkUnnamed4958(o.entityTypes); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse--; } -buildUnnamed5547() { +buildUnnamed4959() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Intent>(); o.add(buildGoogleCloudDialogflowV2beta1Intent()); o.add(buildGoogleCloudDialogflowV2beta1Intent()); return o; } -checkUnnamed5547(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { +checkUnnamed4959(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Intent(o[0]); checkGoogleCloudDialogflowV2beta1Intent(o[1]); @@ -3626,7 +3626,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListIntentsResponse(); buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse < 3) { - o.intents = buildUnnamed5547(); + o.intents = buildUnnamed4959(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse--; @@ -3637,20 +3637,20 @@ api.GoogleCloudDialogflowV2beta1ListIntentsResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse < 3) { - checkUnnamed5547(o.intents); + checkUnnamed4959(o.intents); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse--; } -buildUnnamed5548() { +buildUnnamed4960() { var o = new core.List<api.GoogleCloudDialogflowV2beta1KnowledgeBase>(); o.add(buildGoogleCloudDialogflowV2beta1KnowledgeBase()); o.add(buildGoogleCloudDialogflowV2beta1KnowledgeBase()); return o; } -checkUnnamed5548(core.List<api.GoogleCloudDialogflowV2beta1KnowledgeBase> o) { +checkUnnamed4960(core.List<api.GoogleCloudDialogflowV2beta1KnowledgeBase> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1KnowledgeBase(o[0]); checkGoogleCloudDialogflowV2beta1KnowledgeBase(o[1]); @@ -3661,7 +3661,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse(); buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse < 3) { - o.knowledgeBases = buildUnnamed5548(); + o.knowledgeBases = buildUnnamed4960(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse--; @@ -3672,20 +3672,20 @@ api.GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse < 3) { - checkUnnamed5548(o.knowledgeBases); + checkUnnamed4960(o.knowledgeBases); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse--; } -buildUnnamed5549() { +buildUnnamed4961() { var o = new core.List<api.GoogleCloudDialogflowV2beta1SessionEntityType>(); o.add(buildGoogleCloudDialogflowV2beta1SessionEntityType()); o.add(buildGoogleCloudDialogflowV2beta1SessionEntityType()); return o; } -checkUnnamed5549( +checkUnnamed4961( core.List<api.GoogleCloudDialogflowV2beta1SessionEntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1SessionEntityType(o[0]); @@ -3700,7 +3700,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse < 3) { o.nextPageToken = "foo"; - o.sessionEntityTypes = buildUnnamed5549(); + o.sessionEntityTypes = buildUnnamed4961(); } buildCounterGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse--; return o; @@ -3712,12 +3712,12 @@ if (buildCounterGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5549(o.sessionEntityTypes); + checkUnnamed4961(o.sessionEntityTypes); } buildCounterGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse--; } -buildUnnamed5550() { +buildUnnamed4962() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3732,7 +3732,7 @@ return o; } -checkUnnamed5550(core.Map<core.String, core.Object> o) { +checkUnnamed4962(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted23 = (o["x"]) as core.Map; unittest.expect(casted23, unittest.hasLength(3)); @@ -3752,7 +3752,7 @@ var o = new api.GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest(); buildCounterGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest++; if (buildCounterGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest < 3) { - o.payload = buildUnnamed5550(); + o.payload = buildUnnamed4962(); o.source = "foo"; o.version = "foo"; } @@ -3764,7 +3764,7 @@ api.GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest o) { buildCounterGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest++; if (buildCounterGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest < 3) { - checkUnnamed5550(o.payload); + checkUnnamed4962(o.payload); unittest.expect(o.source, unittest.equals('foo')); unittest.expect(o.version, unittest.equals('foo')); } @@ -3821,33 +3821,33 @@ buildCounterGoogleCloudDialogflowV2beta1QueryInput--; } -buildUnnamed5551() { +buildUnnamed4963() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5551(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4963(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); } -buildUnnamed5552() { +buildUnnamed4964() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5552(core.List<core.String> o) { +checkUnnamed4964(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5553() { +buildUnnamed4965() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3862,7 +3862,7 @@ return o; } -checkUnnamed5553(core.Map<core.String, core.Object> o) { +checkUnnamed4965(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted25 = (o["x"]) as core.Map; unittest.expect(casted25, unittest.hasLength(3)); @@ -3876,14 +3876,14 @@ unittest.expect(casted26["string"], unittest.equals('foo')); } -buildUnnamed5554() { +buildUnnamed4966() { var o = new core.List<api.GoogleCloudDialogflowV2beta1SessionEntityType>(); o.add(buildGoogleCloudDialogflowV2beta1SessionEntityType()); o.add(buildGoogleCloudDialogflowV2beta1SessionEntityType()); return o; } -checkUnnamed5554( +checkUnnamed4966( core.List<api.GoogleCloudDialogflowV2beta1SessionEntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1SessionEntityType(o[0]); @@ -3895,14 +3895,14 @@ var o = new api.GoogleCloudDialogflowV2beta1QueryParameters(); buildCounterGoogleCloudDialogflowV2beta1QueryParameters++; if (buildCounterGoogleCloudDialogflowV2beta1QueryParameters < 3) { - o.contexts = buildUnnamed5551(); + o.contexts = buildUnnamed4963(); o.geoLocation = buildGoogleTypeLatLng(); - o.knowledgeBaseNames = buildUnnamed5552(); - o.payload = buildUnnamed5553(); + o.knowledgeBaseNames = buildUnnamed4964(); + o.payload = buildUnnamed4965(); o.resetContexts = true; o.sentimentAnalysisRequestConfig = buildGoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig(); - o.sessionEntityTypes = buildUnnamed5554(); + o.sessionEntityTypes = buildUnnamed4966(); o.timeZone = "foo"; } buildCounterGoogleCloudDialogflowV2beta1QueryParameters--; @@ -3913,20 +3913,20 @@ api.GoogleCloudDialogflowV2beta1QueryParameters o) { buildCounterGoogleCloudDialogflowV2beta1QueryParameters++; if (buildCounterGoogleCloudDialogflowV2beta1QueryParameters < 3) { - checkUnnamed5551(o.contexts); + checkUnnamed4963(o.contexts); checkGoogleTypeLatLng(o.geoLocation); - checkUnnamed5552(o.knowledgeBaseNames); - checkUnnamed5553(o.payload); + checkUnnamed4964(o.knowledgeBaseNames); + checkUnnamed4965(o.payload); unittest.expect(o.resetContexts, unittest.isTrue); checkGoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig( o.sentimentAnalysisRequestConfig); - checkUnnamed5554(o.sessionEntityTypes); + checkUnnamed4966(o.sessionEntityTypes); unittest.expect(o.timeZone, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1QueryParameters--; } -buildUnnamed5555() { +buildUnnamed4967() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3941,7 +3941,7 @@ return o; } -checkUnnamed5555(core.Map<core.String, core.Object> o) { +checkUnnamed4967(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted27 = (o["x"]) as core.Map; unittest.expect(casted27, unittest.hasLength(3)); @@ -3955,33 +3955,33 @@ unittest.expect(casted28["string"], unittest.equals('foo')); } -buildUnnamed5556() { +buildUnnamed4968() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessage>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); return o; } -checkUnnamed5556(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { +checkUnnamed4968(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessage(o[0]); checkGoogleCloudDialogflowV2beta1IntentMessage(o[1]); } -buildUnnamed5557() { +buildUnnamed4969() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5557(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4969(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); } -buildUnnamed5558() { +buildUnnamed4970() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3996,7 +3996,7 @@ return o; } -checkUnnamed5558(core.Map<core.String, core.Object> o) { +checkUnnamed4970(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted29 = (o["x"]) as core.Map; unittest.expect(casted29, unittest.hasLength(3)); @@ -4010,7 +4010,7 @@ unittest.expect(casted30["string"], unittest.equals('foo')); } -buildUnnamed5559() { +buildUnnamed4971() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4025,7 +4025,7 @@ return o; } -checkUnnamed5559(core.Map<core.String, core.Object> o) { +checkUnnamed4971(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted31 = (o["x"]) as core.Map; unittest.expect(casted31, unittest.hasLength(3)); @@ -4046,20 +4046,20 @@ if (buildCounterGoogleCloudDialogflowV2beta1QueryResult < 3) { o.action = "foo"; o.allRequiredParamsPresent = true; - o.diagnosticInfo = buildUnnamed5555(); - o.fulfillmentMessages = buildUnnamed5556(); + o.diagnosticInfo = buildUnnamed4967(); + o.fulfillmentMessages = buildUnnamed4968(); o.fulfillmentText = "foo"; o.intent = buildGoogleCloudDialogflowV2beta1Intent(); o.intentDetectionConfidence = 42.0; o.knowledgeAnswers = buildGoogleCloudDialogflowV2beta1KnowledgeAnswers(); o.languageCode = "foo"; - o.outputContexts = buildUnnamed5557(); - o.parameters = buildUnnamed5558(); + o.outputContexts = buildUnnamed4969(); + o.parameters = buildUnnamed4970(); o.queryText = "foo"; o.sentimentAnalysisResult = buildGoogleCloudDialogflowV2beta1SentimentAnalysisResult(); o.speechRecognitionConfidence = 42.0; - o.webhookPayload = buildUnnamed5559(); + o.webhookPayload = buildUnnamed4971(); o.webhookSource = "foo"; } buildCounterGoogleCloudDialogflowV2beta1QueryResult--; @@ -4072,25 +4072,41 @@ if (buildCounterGoogleCloudDialogflowV2beta1QueryResult < 3) { unittest.expect(o.action, unittest.equals('foo')); unittest.expect(o.allRequiredParamsPresent, unittest.isTrue); - checkUnnamed5555(o.diagnosticInfo); - checkUnnamed5556(o.fulfillmentMessages); + checkUnnamed4967(o.diagnosticInfo); + checkUnnamed4968(o.fulfillmentMessages); unittest.expect(o.fulfillmentText, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1Intent(o.intent); unittest.expect(o.intentDetectionConfidence, unittest.equals(42.0)); checkGoogleCloudDialogflowV2beta1KnowledgeAnswers(o.knowledgeAnswers); unittest.expect(o.languageCode, unittest.equals('foo')); - checkUnnamed5557(o.outputContexts); - checkUnnamed5558(o.parameters); + checkUnnamed4969(o.outputContexts); + checkUnnamed4970(o.parameters); unittest.expect(o.queryText, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1SentimentAnalysisResult( o.sentimentAnalysisResult); unittest.expect(o.speechRecognitionConfidence, unittest.equals(42.0)); - checkUnnamed5559(o.webhookPayload); + checkUnnamed4971(o.webhookPayload); unittest.expect(o.webhookSource, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1QueryResult--; } +core.int buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest = 0; +buildGoogleCloudDialogflowV2beta1ReloadDocumentRequest() { + var o = new api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest++; + if (buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest < 3) {} + buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest--; + return o; +} + +checkGoogleCloudDialogflowV2beta1ReloadDocumentRequest( + api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest o) { + buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest++; + if (buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest < 3) {} + buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest--; +} + core.int buildCounterGoogleCloudDialogflowV2beta1RestoreAgentRequest = 0; buildGoogleCloudDialogflowV2beta1RestoreAgentRequest() { var o = new api.GoogleCloudDialogflowV2beta1RestoreAgentRequest(); @@ -4113,14 +4129,14 @@ buildCounterGoogleCloudDialogflowV2beta1RestoreAgentRequest--; } -buildUnnamed5560() { +buildUnnamed4972() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Agent>(); o.add(buildGoogleCloudDialogflowV2beta1Agent()); o.add(buildGoogleCloudDialogflowV2beta1Agent()); return o; } -checkUnnamed5560(core.List<api.GoogleCloudDialogflowV2beta1Agent> o) { +checkUnnamed4972(core.List<api.GoogleCloudDialogflowV2beta1Agent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Agent(o[0]); checkGoogleCloudDialogflowV2beta1Agent(o[1]); @@ -4131,7 +4147,7 @@ var o = new api.GoogleCloudDialogflowV2beta1SearchAgentsResponse(); buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse < 3) { - o.agents = buildUnnamed5560(); + o.agents = buildUnnamed4972(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse--; @@ -4142,7 +4158,7 @@ api.GoogleCloudDialogflowV2beta1SearchAgentsResponse o) { buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse < 3) { - checkUnnamed5560(o.agents); + checkUnnamed4972(o.agents); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse--; @@ -4213,14 +4229,14 @@ buildCounterGoogleCloudDialogflowV2beta1SentimentAnalysisResult--; } -buildUnnamed5561() { +buildUnnamed4973() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); return o; } -checkUnnamed5561( +checkUnnamed4973( core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityTypeEntity(o[0]); @@ -4232,7 +4248,7 @@ var o = new api.GoogleCloudDialogflowV2beta1SessionEntityType(); buildCounterGoogleCloudDialogflowV2beta1SessionEntityType++; if (buildCounterGoogleCloudDialogflowV2beta1SessionEntityType < 3) { - o.entities = buildUnnamed5561(); + o.entities = buildUnnamed4973(); o.entityOverrideMode = "foo"; o.name = "foo"; } @@ -4244,21 +4260,21 @@ api.GoogleCloudDialogflowV2beta1SessionEntityType o) { buildCounterGoogleCloudDialogflowV2beta1SessionEntityType++; if (buildCounterGoogleCloudDialogflowV2beta1SessionEntityType < 3) { - checkUnnamed5561(o.entities); + checkUnnamed4973(o.entities); unittest.expect(o.entityOverrideMode, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1SessionEntityType--; } -buildUnnamed5562() { +buildUnnamed4974() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5562(core.List<core.String> o) { +checkUnnamed4974(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -4269,7 +4285,7 @@ var o = new api.GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig(); buildCounterGoogleCloudDialogflowV2beta1SynthesizeSpeechConfig++; if (buildCounterGoogleCloudDialogflowV2beta1SynthesizeSpeechConfig < 3) { - o.effectsProfileId = buildUnnamed5562(); + o.effectsProfileId = buildUnnamed4974(); o.pitch = 42.0; o.speakingRate = 42.0; o.voice = buildGoogleCloudDialogflowV2beta1VoiceSelectionParams(); @@ -4283,7 +4299,7 @@ api.GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig o) { buildCounterGoogleCloudDialogflowV2beta1SynthesizeSpeechConfig++; if (buildCounterGoogleCloudDialogflowV2beta1SynthesizeSpeechConfig < 3) { - checkUnnamed5562(o.effectsProfileId); + checkUnnamed4974(o.effectsProfileId); unittest.expect(o.pitch, unittest.equals(42.0)); unittest.expect(o.speakingRate, unittest.equals(42.0)); checkGoogleCloudDialogflowV2beta1VoiceSelectionParams(o.voice); @@ -4352,14 +4368,14 @@ buildCounterGoogleCloudDialogflowV2beta1VoiceSelectionParams--; } -buildUnnamed5563() { +buildUnnamed4975() { var o = new core.List<api.GoogleCloudDialogflowV2beta1QueryResult>(); o.add(buildGoogleCloudDialogflowV2beta1QueryResult()); o.add(buildGoogleCloudDialogflowV2beta1QueryResult()); return o; } -checkUnnamed5563(core.List<api.GoogleCloudDialogflowV2beta1QueryResult> o) { +checkUnnamed4975(core.List<api.GoogleCloudDialogflowV2beta1QueryResult> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1QueryResult(o[0]); checkGoogleCloudDialogflowV2beta1QueryResult(o[1]); @@ -4370,7 +4386,7 @@ var o = new api.GoogleCloudDialogflowV2beta1WebhookRequest(); buildCounterGoogleCloudDialogflowV2beta1WebhookRequest++; if (buildCounterGoogleCloudDialogflowV2beta1WebhookRequest < 3) { - o.alternativeQueryResults = buildUnnamed5563(); + o.alternativeQueryResults = buildUnnamed4975(); o.originalDetectIntentRequest = buildGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest(); o.queryResult = buildGoogleCloudDialogflowV2beta1QueryResult(); @@ -4385,7 +4401,7 @@ api.GoogleCloudDialogflowV2beta1WebhookRequest o) { buildCounterGoogleCloudDialogflowV2beta1WebhookRequest++; if (buildCounterGoogleCloudDialogflowV2beta1WebhookRequest < 3) { - checkUnnamed5563(o.alternativeQueryResults); + checkUnnamed4975(o.alternativeQueryResults); checkGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest( o.originalDetectIntentRequest); checkGoogleCloudDialogflowV2beta1QueryResult(o.queryResult); @@ -4395,33 +4411,33 @@ buildCounterGoogleCloudDialogflowV2beta1WebhookRequest--; } -buildUnnamed5564() { +buildUnnamed4976() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessage>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); return o; } -checkUnnamed5564(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { +checkUnnamed4976(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessage(o[0]); checkGoogleCloudDialogflowV2beta1IntentMessage(o[1]); } -buildUnnamed5565() { +buildUnnamed4977() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5565(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4977(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); } -buildUnnamed5566() { +buildUnnamed4978() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4436,7 +4452,7 @@ return o; } -checkUnnamed5566(core.Map<core.String, core.Object> o) { +checkUnnamed4978(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted33 = (o["x"]) as core.Map; unittest.expect(casted33, unittest.hasLength(3)); @@ -4457,10 +4473,10 @@ if (buildCounterGoogleCloudDialogflowV2beta1WebhookResponse < 3) { o.endInteraction = true; o.followupEventInput = buildGoogleCloudDialogflowV2beta1EventInput(); - o.fulfillmentMessages = buildUnnamed5564(); + o.fulfillmentMessages = buildUnnamed4976(); o.fulfillmentText = "foo"; - o.outputContexts = buildUnnamed5565(); - o.payload = buildUnnamed5566(); + o.outputContexts = buildUnnamed4977(); + o.payload = buildUnnamed4978(); o.source = "foo"; } buildCounterGoogleCloudDialogflowV2beta1WebhookResponse--; @@ -4473,16 +4489,16 @@ if (buildCounterGoogleCloudDialogflowV2beta1WebhookResponse < 3) { unittest.expect(o.endInteraction, unittest.isTrue); checkGoogleCloudDialogflowV2beta1EventInput(o.followupEventInput); - checkUnnamed5564(o.fulfillmentMessages); + checkUnnamed4976(o.fulfillmentMessages); unittest.expect(o.fulfillmentText, unittest.equals('foo')); - checkUnnamed5565(o.outputContexts); - checkUnnamed5566(o.payload); + checkUnnamed4977(o.outputContexts); + checkUnnamed4978(o.payload); unittest.expect(o.source, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1WebhookResponse--; } -buildUnnamed5567() { +buildUnnamed4979() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4497,7 +4513,7 @@ return o; } -checkUnnamed5567(core.Map<core.String, core.Object> o) { +checkUnnamed4979(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted35 = (o["x"]) as core.Map; unittest.expect(casted35, unittest.hasLength(3)); @@ -4511,7 +4527,7 @@ unittest.expect(casted36["string"], unittest.equals('foo')); } -buildUnnamed5568() { +buildUnnamed4980() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4526,7 +4542,7 @@ return o; } -checkUnnamed5568(core.Map<core.String, core.Object> o) { +checkUnnamed4980(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted37 = (o["x"]) as core.Map; unittest.expect(casted37, unittest.hasLength(3)); @@ -4547,9 +4563,9 @@ if (buildCounterGoogleLongrunningOperation < 3) { o.done = true; o.error = buildGoogleRpcStatus(); - o.metadata = buildUnnamed5567(); + o.metadata = buildUnnamed4979(); o.name = "foo"; - o.response = buildUnnamed5568(); + o.response = buildUnnamed4980(); } buildCounterGoogleLongrunningOperation--; return o; @@ -4560,9 +4576,9 @@ if (buildCounterGoogleLongrunningOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkGoogleRpcStatus(o.error); - checkUnnamed5567(o.metadata); + checkUnnamed4979(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5568(o.response); + checkUnnamed4980(o.response); } buildCounterGoogleLongrunningOperation--; } @@ -4582,7 +4598,7 @@ buildCounterGoogleProtobufEmpty--; } -buildUnnamed5569() { +buildUnnamed4981() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4597,7 +4613,7 @@ return o; } -checkUnnamed5569(core.Map<core.String, core.Object> o) { +checkUnnamed4981(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted39 = (o["x"]) as core.Map; unittest.expect(casted39, unittest.hasLength(3)); @@ -4611,17 +4627,17 @@ unittest.expect(casted40["string"], unittest.equals('foo')); } -buildUnnamed5570() { +buildUnnamed4982() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5569()); - o.add(buildUnnamed5569()); + o.add(buildUnnamed4981()); + o.add(buildUnnamed4981()); return o; } -checkUnnamed5570(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4982(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5569(o[0]); - checkUnnamed5569(o[1]); + checkUnnamed4981(o[0]); + checkUnnamed4981(o[1]); } core.int buildCounterGoogleRpcStatus = 0; @@ -4630,7 +4646,7 @@ buildCounterGoogleRpcStatus++; if (buildCounterGoogleRpcStatus < 3) { o.code = 42; - o.details = buildUnnamed5570(); + o.details = buildUnnamed4982(); o.message = "foo"; } buildCounterGoogleRpcStatus--; @@ -4641,7 +4657,7 @@ buildCounterGoogleRpcStatus++; if (buildCounterGoogleRpcStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5570(o.details); + checkUnnamed4982(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterGoogleRpcStatus--; @@ -5702,6 +5718,17 @@ }); }); + unittest.group("obj-schema-GoogleCloudDialogflowV2beta1ReloadDocumentRequest", + () { + unittest.test("to-json--from-json", () { + var o = buildGoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + var od = + new api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest.fromJson( + o.toJson()); + checkGoogleCloudDialogflowV2beta1ReloadDocumentRequest(od); + }); + }); + unittest.group("obj-schema-GoogleCloudDialogflowV2beta1RestoreAgentRequest", () { unittest.test("to-json--from-json", () { @@ -6499,9 +6526,9 @@ api.ProjectsAgentEntityTypesResourceApi res = new api.DialogflowApi(mock).projects.agent.entityTypes; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_languageCode = "foo"; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -6534,12 +6561,12 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["languageCode"].first, unittest.equals(arg_languageCode)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -6551,9 +6578,9 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, languageCode: arg_languageCode, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1ListEntityTypesResponse(response); @@ -7444,8 +7471,8 @@ .sessions .entityTypes; var arg_parent = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -7478,10 +7505,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -7493,8 +7520,8 @@ }), true); res .list(arg_parent, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse( @@ -7697,8 +7724,8 @@ new api.DialogflowApi(mock).projects.agent.intents; var arg_request = buildGoogleCloudDialogflowV2beta1Intent(); var arg_parent = "foo"; - var arg_languageCode = "foo"; var arg_intentView = "foo"; + var arg_languageCode = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.GoogleCloudDialogflowV2beta1Intent.fromJson(json); @@ -7735,9 +7762,9 @@ } } unittest.expect( - queryMap["languageCode"].first, unittest.equals(arg_languageCode)); - unittest.expect( queryMap["intentView"].first, unittest.equals(arg_intentView)); + unittest.expect( + queryMap["languageCode"].first, unittest.equals(arg_languageCode)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -7749,8 +7776,8 @@ }), true); res .create(arg_request, arg_parent, - languageCode: arg_languageCode, intentView: arg_intentView, + languageCode: arg_languageCode, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1Intent(response); @@ -7947,9 +7974,9 @@ new api.DialogflowApi(mock).projects.agent.intents; var arg_request = buildGoogleCloudDialogflowV2beta1Intent(); var arg_name = "foo"; + var arg_intentView = "foo"; var arg_languageCode = "foo"; var arg_updateMask = "foo"; - var arg_intentView = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.GoogleCloudDialogflowV2beta1Intent.fromJson(json); @@ -7986,11 +8013,11 @@ } } unittest.expect( + queryMap["intentView"].first, unittest.equals(arg_intentView)); + unittest.expect( queryMap["languageCode"].first, unittest.equals(arg_languageCode)); unittest.expect( queryMap["updateMask"].first, unittest.equals(arg_updateMask)); - unittest.expect( - queryMap["intentView"].first, unittest.equals(arg_intentView)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8002,9 +8029,9 @@ }), true); res .patch(arg_request, arg_name, + intentView: arg_intentView, languageCode: arg_languageCode, updateMask: arg_updateMask, - intentView: arg_intentView, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1Intent(response); @@ -8239,6 +8266,68 @@ checkGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse(response); }))); }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsAgentKnowledgeBasesResourceApi res = + new api.DialogflowApi(mock).projects.agent.knowledgeBases; + var arg_request = buildGoogleCloudDialogflowV2beta1KnowledgeBase(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = + new api.GoogleCloudDialogflowV2beta1KnowledgeBase.fromJson(json); + checkGoogleCloudDialogflowV2beta1KnowledgeBase(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json + .encode(buildGoogleCloudDialogflowV2beta1KnowledgeBase()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleCloudDialogflowV2beta1KnowledgeBase(response); + }))); + }); }); unittest.group("resource-ProjectsAgentKnowledgeBasesDocumentsResourceApi", @@ -8465,6 +8554,125 @@ checkGoogleCloudDialogflowV2beta1ListDocumentsResponse(response); }))); }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsAgentKnowledgeBasesDocumentsResourceApi res = + new api.DialogflowApi(mock).projects.agent.knowledgeBases.documents; + var arg_request = buildGoogleCloudDialogflowV2beta1Document(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.GoogleCloudDialogflowV2beta1Document.fromJson(json); + checkGoogleCloudDialogflowV2beta1Document(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildGoogleLongrunningOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleLongrunningOperation(response); + }))); + }); + + unittest.test("method--reload", () { + var mock = new HttpServerMock(); + api.ProjectsAgentKnowledgeBasesDocumentsResourceApi res = + new api.DialogflowApi(mock).projects.agent.knowledgeBases.documents; + var arg_request = + buildGoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = + new api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest.fromJson( + json); + checkGoogleCloudDialogflowV2beta1ReloadDocumentRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildGoogleLongrunningOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .reload(arg_request, arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleLongrunningOperation(response); + }))); + }); }); unittest.group("resource-ProjectsAgentSessionsResourceApi", () { @@ -8748,8 +8956,8 @@ api.ProjectsAgentSessionsContextsResourceApi res = new api.DialogflowApi(mock).projects.agent.sessions.contexts; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -8782,10 +8990,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8797,8 +9005,8 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1ListContextsResponse(response); @@ -9386,6 +9594,68 @@ checkGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse(response); }))); }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsKnowledgeBasesResourceApi res = + new api.DialogflowApi(mock).projects.knowledgeBases; + var arg_request = buildGoogleCloudDialogflowV2beta1KnowledgeBase(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = + new api.GoogleCloudDialogflowV2beta1KnowledgeBase.fromJson(json); + checkGoogleCloudDialogflowV2beta1KnowledgeBase(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json + .encode(buildGoogleCloudDialogflowV2beta1KnowledgeBase()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleCloudDialogflowV2beta1KnowledgeBase(response); + }))); + }); }); unittest.group("resource-ProjectsKnowledgeBasesDocumentsResourceApi", () { @@ -9555,8 +9825,8 @@ api.ProjectsKnowledgeBasesDocumentsResourceApi res = new api.DialogflowApi(mock).projects.knowledgeBases.documents; var arg_parent = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -9589,10 +9859,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -9604,13 +9874,132 @@ }), true); res .list(arg_parent, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1ListDocumentsResponse(response); }))); }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsKnowledgeBasesDocumentsResourceApi res = + new api.DialogflowApi(mock).projects.knowledgeBases.documents; + var arg_request = buildGoogleCloudDialogflowV2beta1Document(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.GoogleCloudDialogflowV2beta1Document.fromJson(json); + checkGoogleCloudDialogflowV2beta1Document(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildGoogleLongrunningOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleLongrunningOperation(response); + }))); + }); + + unittest.test("method--reload", () { + var mock = new HttpServerMock(); + api.ProjectsKnowledgeBasesDocumentsResourceApi res = + new api.DialogflowApi(mock).projects.knowledgeBases.documents; + var arg_request = + buildGoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = + new api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest.fromJson( + json); + checkGoogleCloudDialogflowV2beta1ReloadDocumentRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildGoogleLongrunningOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .reload(arg_request, arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleLongrunningOperation(response); + }))); + }); }); unittest.group("resource-ProjectsOperationsResourceApi", () {
diff --git a/generated/googleapis_beta/test/dns/v2beta1_test.dart b/generated/googleapis_beta/test/dns/v2beta1_test.dart index 4e324b6..5134497 100644 --- a/generated/googleapis_beta/test/dns/v2beta1_test.dart +++ b/generated/googleapis_beta/test/dns/v2beta1_test.dart
@@ -50,27 +50,27 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5610() { +buildUnnamed4734() { var o = new core.List<api.ResourceRecordSet>(); o.add(buildResourceRecordSet()); o.add(buildResourceRecordSet()); return o; } -checkUnnamed5610(core.List<api.ResourceRecordSet> o) { +checkUnnamed4734(core.List<api.ResourceRecordSet> o) { unittest.expect(o, unittest.hasLength(2)); checkResourceRecordSet(o[0]); checkResourceRecordSet(o[1]); } -buildUnnamed5611() { +buildUnnamed4735() { var o = new core.List<api.ResourceRecordSet>(); o.add(buildResourceRecordSet()); o.add(buildResourceRecordSet()); return o; } -checkUnnamed5611(core.List<api.ResourceRecordSet> o) { +checkUnnamed4735(core.List<api.ResourceRecordSet> o) { unittest.expect(o, unittest.hasLength(2)); checkResourceRecordSet(o[0]); checkResourceRecordSet(o[1]); @@ -81,8 +81,8 @@ var o = new api.Change(); buildCounterChange++; if (buildCounterChange < 3) { - o.additions = buildUnnamed5610(); - o.deletions = buildUnnamed5611(); + o.additions = buildUnnamed4734(); + o.deletions = buildUnnamed4735(); o.id = "foo"; o.isServing = true; o.kind = "foo"; @@ -96,8 +96,8 @@ checkChange(api.Change o) { buildCounterChange++; if (buildCounterChange < 3) { - checkUnnamed5610(o.additions); - checkUnnamed5611(o.deletions); + checkUnnamed4734(o.additions); + checkUnnamed4735(o.deletions); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.isServing, unittest.isTrue); unittest.expect(o.kind, unittest.equals('foo')); @@ -107,14 +107,14 @@ buildCounterChange--; } -buildUnnamed5612() { +buildUnnamed4736() { var o = new core.List<api.Change>(); o.add(buildChange()); o.add(buildChange()); return o; } -checkUnnamed5612(core.List<api.Change> o) { +checkUnnamed4736(core.List<api.Change> o) { unittest.expect(o, unittest.hasLength(2)); checkChange(o[0]); checkChange(o[1]); @@ -125,7 +125,7 @@ var o = new api.ChangesListResponse(); buildCounterChangesListResponse++; if (buildCounterChangesListResponse < 3) { - o.changes = buildUnnamed5612(); + o.changes = buildUnnamed4736(); o.header = buildResponseHeader(); o.kind = "foo"; o.nextPageToken = "foo"; @@ -137,7 +137,7 @@ checkChangesListResponse(api.ChangesListResponse o) { buildCounterChangesListResponse++; if (buildCounterChangesListResponse < 3) { - checkUnnamed5612(o.changes); + checkUnnamed4736(o.changes); checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); @@ -145,14 +145,14 @@ buildCounterChangesListResponse--; } -buildUnnamed5613() { +buildUnnamed4737() { var o = new core.List<api.DnsKeyDigest>(); o.add(buildDnsKeyDigest()); o.add(buildDnsKeyDigest()); return o; } -checkUnnamed5613(core.List<api.DnsKeyDigest> o) { +checkUnnamed4737(core.List<api.DnsKeyDigest> o) { unittest.expect(o, unittest.hasLength(2)); checkDnsKeyDigest(o[0]); checkDnsKeyDigest(o[1]); @@ -166,7 +166,7 @@ o.algorithm = "foo"; o.creationTime = "foo"; o.description = "foo"; - o.digests = buildUnnamed5613(); + o.digests = buildUnnamed4737(); o.id = "foo"; o.isActive = true; o.keyLength = 42; @@ -185,7 +185,7 @@ unittest.expect(o.algorithm, unittest.equals('foo')); unittest.expect(o.creationTime, unittest.equals('foo')); unittest.expect(o.description, unittest.equals('foo')); - checkUnnamed5613(o.digests); + checkUnnamed4737(o.digests); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.isActive, unittest.isTrue); unittest.expect(o.keyLength, unittest.equals(42)); @@ -243,14 +243,14 @@ buildCounterDnsKeySpec--; } -buildUnnamed5614() { +buildUnnamed4738() { var o = new core.List<api.DnsKey>(); o.add(buildDnsKey()); o.add(buildDnsKey()); return o; } -checkUnnamed5614(core.List<api.DnsKey> o) { +checkUnnamed4738(core.List<api.DnsKey> o) { unittest.expect(o, unittest.hasLength(2)); checkDnsKey(o[0]); checkDnsKey(o[1]); @@ -261,7 +261,7 @@ var o = new api.DnsKeysListResponse(); buildCounterDnsKeysListResponse++; if (buildCounterDnsKeysListResponse < 3) { - o.dnsKeys = buildUnnamed5614(); + o.dnsKeys = buildUnnamed4738(); o.header = buildResponseHeader(); o.kind = "foo"; o.nextPageToken = "foo"; @@ -273,7 +273,7 @@ checkDnsKeysListResponse(api.DnsKeysListResponse o) { buildCounterDnsKeysListResponse++; if (buildCounterDnsKeysListResponse < 3) { - checkUnnamed5614(o.dnsKeys); + checkUnnamed4738(o.dnsKeys); checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); @@ -281,27 +281,27 @@ buildCounterDnsKeysListResponse--; } -buildUnnamed5615() { +buildUnnamed4739() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5615(core.Map<core.String, core.String> o) { +checkUnnamed4739(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5616() { +buildUnnamed4740() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5616(core.List<core.String> o) { +checkUnnamed4740(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -318,10 +318,10 @@ o.dnssecConfig = buildManagedZoneDnsSecConfig(); o.id = "foo"; o.kind = "foo"; - o.labels = buildUnnamed5615(); + o.labels = buildUnnamed4739(); o.name = "foo"; o.nameServerSet = "foo"; - o.nameServers = buildUnnamed5616(); + o.nameServers = buildUnnamed4740(); } buildCounterManagedZone--; return o; @@ -336,22 +336,22 @@ checkManagedZoneDnsSecConfig(o.dnssecConfig); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5615(o.labels); + checkUnnamed4739(o.labels); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.nameServerSet, unittest.equals('foo')); - checkUnnamed5616(o.nameServers); + checkUnnamed4740(o.nameServers); } buildCounterManagedZone--; } -buildUnnamed5617() { +buildUnnamed4741() { var o = new core.List<api.DnsKeySpec>(); o.add(buildDnsKeySpec()); o.add(buildDnsKeySpec()); return o; } -checkUnnamed5617(core.List<api.DnsKeySpec> o) { +checkUnnamed4741(core.List<api.DnsKeySpec> o) { unittest.expect(o, unittest.hasLength(2)); checkDnsKeySpec(o[0]); checkDnsKeySpec(o[1]); @@ -362,7 +362,7 @@ var o = new api.ManagedZoneDnsSecConfig(); buildCounterManagedZoneDnsSecConfig++; if (buildCounterManagedZoneDnsSecConfig < 3) { - o.defaultKeySpecs = buildUnnamed5617(); + o.defaultKeySpecs = buildUnnamed4741(); o.kind = "foo"; o.nonExistence = "foo"; o.state = "foo"; @@ -374,7 +374,7 @@ checkManagedZoneDnsSecConfig(api.ManagedZoneDnsSecConfig o) { buildCounterManagedZoneDnsSecConfig++; if (buildCounterManagedZoneDnsSecConfig < 3) { - checkUnnamed5617(o.defaultKeySpecs); + checkUnnamed4741(o.defaultKeySpecs); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nonExistence, unittest.equals('foo')); unittest.expect(o.state, unittest.equals('foo')); @@ -382,14 +382,14 @@ buildCounterManagedZoneDnsSecConfig--; } -buildUnnamed5618() { +buildUnnamed4742() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5618(core.List<api.Operation> o) { +checkUnnamed4742(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -403,7 +403,7 @@ o.header = buildResponseHeader(); o.kind = "foo"; o.nextPageToken = "foo"; - o.operations = buildUnnamed5618(); + o.operations = buildUnnamed4742(); } buildCounterManagedZoneOperationsListResponse--; return o; @@ -416,19 +416,19 @@ checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5618(o.operations); + checkUnnamed4742(o.operations); } buildCounterManagedZoneOperationsListResponse--; } -buildUnnamed5619() { +buildUnnamed4743() { var o = new core.List<api.ManagedZone>(); o.add(buildManagedZone()); o.add(buildManagedZone()); return o; } -checkUnnamed5619(core.List<api.ManagedZone> o) { +checkUnnamed4743(core.List<api.ManagedZone> o) { unittest.expect(o, unittest.hasLength(2)); checkManagedZone(o[0]); checkManagedZone(o[1]); @@ -441,7 +441,7 @@ if (buildCounterManagedZonesListResponse < 3) { o.header = buildResponseHeader(); o.kind = "foo"; - o.managedZones = buildUnnamed5619(); + o.managedZones = buildUnnamed4743(); o.nextPageToken = "foo"; } buildCounterManagedZonesListResponse--; @@ -453,7 +453,7 @@ if (buildCounterManagedZonesListResponse < 3) { checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5619(o.managedZones); + checkUnnamed4743(o.managedZones); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterManagedZonesListResponse--; @@ -559,14 +559,14 @@ buildCounterProject--; } -buildUnnamed5620() { +buildUnnamed4744() { var o = new core.List<api.DnsKeySpec>(); o.add(buildDnsKeySpec()); o.add(buildDnsKeySpec()); return o; } -checkUnnamed5620(core.List<api.DnsKeySpec> o) { +checkUnnamed4744(core.List<api.DnsKeySpec> o) { unittest.expect(o, unittest.hasLength(2)); checkDnsKeySpec(o[0]); checkDnsKeySpec(o[1]); @@ -585,7 +585,7 @@ o.rrsetDeletionsPerChange = 42; o.rrsetsPerManagedZone = 42; o.totalRrdataSizePerChange = 42; - o.whitelistedKeySpecs = buildUnnamed5620(); + o.whitelistedKeySpecs = buildUnnamed4744(); } buildCounterQuota--; return o; @@ -602,32 +602,32 @@ unittest.expect(o.rrsetDeletionsPerChange, unittest.equals(42)); unittest.expect(o.rrsetsPerManagedZone, unittest.equals(42)); unittest.expect(o.totalRrdataSizePerChange, unittest.equals(42)); - checkUnnamed5620(o.whitelistedKeySpecs); + checkUnnamed4744(o.whitelistedKeySpecs); } buildCounterQuota--; } -buildUnnamed5621() { +buildUnnamed4745() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5621(core.List<core.String> o) { +checkUnnamed4745(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5622() { +buildUnnamed4746() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5622(core.List<core.String> o) { +checkUnnamed4746(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -640,8 +640,8 @@ if (buildCounterResourceRecordSet < 3) { o.kind = "foo"; o.name = "foo"; - o.rrdatas = buildUnnamed5621(); - o.signatureRrdatas = buildUnnamed5622(); + o.rrdatas = buildUnnamed4745(); + o.signatureRrdatas = buildUnnamed4746(); o.ttl = 42; o.type = "foo"; } @@ -654,22 +654,22 @@ if (buildCounterResourceRecordSet < 3) { unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5621(o.rrdatas); - checkUnnamed5622(o.signatureRrdatas); + checkUnnamed4745(o.rrdatas); + checkUnnamed4746(o.signatureRrdatas); unittest.expect(o.ttl, unittest.equals(42)); unittest.expect(o.type, unittest.equals('foo')); } buildCounterResourceRecordSet--; } -buildUnnamed5623() { +buildUnnamed4747() { var o = new core.List<api.ResourceRecordSet>(); o.add(buildResourceRecordSet()); o.add(buildResourceRecordSet()); return o; } -checkUnnamed5623(core.List<api.ResourceRecordSet> o) { +checkUnnamed4747(core.List<api.ResourceRecordSet> o) { unittest.expect(o, unittest.hasLength(2)); checkResourceRecordSet(o[0]); checkResourceRecordSet(o[1]); @@ -683,7 +683,7 @@ o.header = buildResponseHeader(); o.kind = "foo"; o.nextPageToken = "foo"; - o.rrsets = buildUnnamed5623(); + o.rrsets = buildUnnamed4747(); } buildCounterResourceRecordSetsListResponse--; return o; @@ -695,7 +695,7 @@ checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5623(o.rrsets); + checkUnnamed4747(o.rrsets); } buildCounterResourceRecordSetsListResponse--; }
diff --git a/generated/googleapis_beta/test/redis/v1beta1_test.dart b/generated/googleapis_beta/test/file/v1beta1_test.dart similarity index 83% rename from generated/googleapis_beta/test/redis/v1beta1_test.dart rename to generated/googleapis_beta/test/file/v1beta1_test.dart index 67cf4bd..6c1c645 100644 --- a/generated/googleapis_beta/test/redis/v1beta1_test.dart +++ b/generated/googleapis_beta/test/file/v1beta1_test.dart
@@ -1,4 +1,4 @@ -library googleapis_beta.redis.v1beta1.test; +library googleapis_beta.file.v1beta1.test; import "dart:core" as core; import "dart:async" as async; @@ -7,7 +7,7 @@ import 'package:http/http.dart' as http; import 'package:test/test.dart' as unittest; -import 'package:googleapis_beta/redis/v1beta1.dart' as api; +import 'package:googleapis_beta/file/v1beta1.dart' as api; class HttpServerMock extends http.BaseClient { core.Function _callback; @@ -50,6 +50,21 @@ return new http.StreamedResponse(stream, status, headers: headers); } +core.int buildCounterCancelOperationRequest = 0; +buildCancelOperationRequest() { + var o = new api.CancelOperationRequest(); + buildCounterCancelOperationRequest++; + if (buildCounterCancelOperationRequest < 3) {} + buildCounterCancelOperationRequest--; + return o; +} + +checkCancelOperationRequest(api.CancelOperationRequest o) { + buildCounterCancelOperationRequest++; + if (buildCounterCancelOperationRequest < 3) {} + buildCounterCancelOperationRequest--; +} + core.int buildCounterEmpty = 0; buildEmpty() { var o = new api.Empty(); @@ -65,112 +80,64 @@ buildCounterEmpty--; } -core.int buildCounterGoogleCloudCommonOperationMetadata = 0; -buildGoogleCloudCommonOperationMetadata() { - var o = new api.GoogleCloudCommonOperationMetadata(); - buildCounterGoogleCloudCommonOperationMetadata++; - if (buildCounterGoogleCloudCommonOperationMetadata < 3) { - o.apiVersion = "foo"; - o.cancelRequested = true; - o.createTime = "foo"; - o.endTime = "foo"; - o.statusDetail = "foo"; - o.target = "foo"; - o.verb = "foo"; +core.int buildCounterFileShareConfig = 0; +buildFileShareConfig() { + var o = new api.FileShareConfig(); + buildCounterFileShareConfig++; + if (buildCounterFileShareConfig < 3) { + o.capacityGb = "foo"; + o.name = "foo"; } - buildCounterGoogleCloudCommonOperationMetadata--; + buildCounterFileShareConfig--; return o; } -checkGoogleCloudCommonOperationMetadata( - api.GoogleCloudCommonOperationMetadata o) { - buildCounterGoogleCloudCommonOperationMetadata++; - if (buildCounterGoogleCloudCommonOperationMetadata < 3) { - unittest.expect(o.apiVersion, unittest.equals('foo')); - unittest.expect(o.cancelRequested, unittest.isTrue); - unittest.expect(o.createTime, unittest.equals('foo')); - unittest.expect(o.endTime, unittest.equals('foo')); - unittest.expect(o.statusDetail, unittest.equals('foo')); - unittest.expect(o.target, unittest.equals('foo')); - unittest.expect(o.verb, unittest.equals('foo')); +checkFileShareConfig(api.FileShareConfig o) { + buildCounterFileShareConfig++; + if (buildCounterFileShareConfig < 3) { + unittest.expect(o.capacityGb, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); } - buildCounterGoogleCloudCommonOperationMetadata--; + buildCounterFileShareConfig--; } -buildUnnamed5359() { - var o = new core.Map<core.String, api.GoogleCloudRedisV1beta1ZoneMetadata>(); - o["x"] = buildGoogleCloudRedisV1beta1ZoneMetadata(); - o["y"] = buildGoogleCloudRedisV1beta1ZoneMetadata(); +buildUnnamed5059() { + var o = new core.List<api.FileShareConfig>(); + o.add(buildFileShareConfig()); + o.add(buildFileShareConfig()); return o; } -checkUnnamed5359( - core.Map<core.String, api.GoogleCloudRedisV1beta1ZoneMetadata> o) { +checkUnnamed5059(core.List<api.FileShareConfig> o) { unittest.expect(o, unittest.hasLength(2)); - checkGoogleCloudRedisV1beta1ZoneMetadata(o["x"]); - checkGoogleCloudRedisV1beta1ZoneMetadata(o["y"]); + checkFileShareConfig(o[0]); + checkFileShareConfig(o[1]); } -core.int buildCounterGoogleCloudRedisV1beta1LocationMetadata = 0; -buildGoogleCloudRedisV1beta1LocationMetadata() { - var o = new api.GoogleCloudRedisV1beta1LocationMetadata(); - buildCounterGoogleCloudRedisV1beta1LocationMetadata++; - if (buildCounterGoogleCloudRedisV1beta1LocationMetadata < 3) { - o.availableZones = buildUnnamed5359(); - } - buildCounterGoogleCloudRedisV1beta1LocationMetadata--; - return o; -} - -checkGoogleCloudRedisV1beta1LocationMetadata( - api.GoogleCloudRedisV1beta1LocationMetadata o) { - buildCounterGoogleCloudRedisV1beta1LocationMetadata++; - if (buildCounterGoogleCloudRedisV1beta1LocationMetadata < 3) { - checkUnnamed5359(o.availableZones); - } - buildCounterGoogleCloudRedisV1beta1LocationMetadata--; -} - -core.int buildCounterGoogleCloudRedisV1beta1ZoneMetadata = 0; -buildGoogleCloudRedisV1beta1ZoneMetadata() { - var o = new api.GoogleCloudRedisV1beta1ZoneMetadata(); - buildCounterGoogleCloudRedisV1beta1ZoneMetadata++; - if (buildCounterGoogleCloudRedisV1beta1ZoneMetadata < 3) {} - buildCounterGoogleCloudRedisV1beta1ZoneMetadata--; - return o; -} - -checkGoogleCloudRedisV1beta1ZoneMetadata( - api.GoogleCloudRedisV1beta1ZoneMetadata o) { - buildCounterGoogleCloudRedisV1beta1ZoneMetadata++; - if (buildCounterGoogleCloudRedisV1beta1ZoneMetadata < 3) {} - buildCounterGoogleCloudRedisV1beta1ZoneMetadata--; -} - -buildUnnamed5360() { +buildUnnamed5060() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5360(core.Map<core.String, core.String> o) { +checkUnnamed5060(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5361() { - var o = new core.Map<core.String, core.String>(); - o["x"] = "foo"; - o["y"] = "foo"; +buildUnnamed5061() { + var o = new core.List<api.NetworkConfig>(); + o.add(buildNetworkConfig()); + o.add(buildNetworkConfig()); return o; } -checkUnnamed5361(core.Map<core.String, core.String> o) { +checkUnnamed5061(core.List<api.NetworkConfig> o) { unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o["x"], unittest.equals('foo')); - unittest.expect(o["y"], unittest.equals('foo')); + checkNetworkConfig(o[0]); + checkNetworkConfig(o[1]); } core.int buildCounterInstance = 0; @@ -178,20 +145,13 @@ var o = new api.Instance(); buildCounterInstance++; if (buildCounterInstance < 3) { - o.alternativeLocationId = "foo"; - o.authorizedNetwork = "foo"; o.createTime = "foo"; - o.currentLocationId = "foo"; - o.displayName = "foo"; - o.host = "foo"; - o.labels = buildUnnamed5360(); - o.locationId = "foo"; - o.memorySizeGb = 42; + o.description = "foo"; + o.etag = "foo"; + o.fileShares = buildUnnamed5059(); + o.labels = buildUnnamed5060(); o.name = "foo"; - o.port = 42; - o.redisConfigs = buildUnnamed5361(); - o.redisVersion = "foo"; - o.reservedIpRange = "foo"; + o.networks = buildUnnamed5061(); o.state = "foo"; o.statusMessage = "foo"; o.tier = "foo"; @@ -203,20 +163,13 @@ checkInstance(api.Instance o) { buildCounterInstance++; if (buildCounterInstance < 3) { - unittest.expect(o.alternativeLocationId, unittest.equals('foo')); - unittest.expect(o.authorizedNetwork, unittest.equals('foo')); unittest.expect(o.createTime, unittest.equals('foo')); - unittest.expect(o.currentLocationId, unittest.equals('foo')); - unittest.expect(o.displayName, unittest.equals('foo')); - unittest.expect(o.host, unittest.equals('foo')); - checkUnnamed5360(o.labels); - unittest.expect(o.locationId, unittest.equals('foo')); - unittest.expect(o.memorySizeGb, unittest.equals(42)); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.etag, unittest.equals('foo')); + checkUnnamed5059(o.fileShares); + checkUnnamed5060(o.labels); unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.port, unittest.equals(42)); - checkUnnamed5361(o.redisConfigs); - unittest.expect(o.redisVersion, unittest.equals('foo')); - unittest.expect(o.reservedIpRange, unittest.equals('foo')); + checkUnnamed5061(o.networks); unittest.expect(o.state, unittest.equals('foo')); unittest.expect(o.statusMessage, unittest.equals('foo')); unittest.expect(o.tier, unittest.equals('foo')); @@ -224,26 +177,40 @@ buildCounterInstance--; } -buildUnnamed5362() { +buildUnnamed5062() { var o = new core.List<api.Instance>(); o.add(buildInstance()); o.add(buildInstance()); return o; } -checkUnnamed5362(core.List<api.Instance> o) { +checkUnnamed5062(core.List<api.Instance> o) { unittest.expect(o, unittest.hasLength(2)); checkInstance(o[0]); checkInstance(o[1]); } +buildUnnamed5063() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed5063(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + core.int buildCounterListInstancesResponse = 0; buildListInstancesResponse() { var o = new api.ListInstancesResponse(); buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5362(); + o.instances = buildUnnamed5062(); o.nextPageToken = "foo"; + o.unreachable = buildUnnamed5063(); } buildCounterListInstancesResponse--; return o; @@ -252,20 +219,21 @@ checkListInstancesResponse(api.ListInstancesResponse o) { buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - checkUnnamed5362(o.instances); + checkUnnamed5062(o.instances); unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed5063(o.unreachable); } buildCounterListInstancesResponse--; } -buildUnnamed5363() { +buildUnnamed5064() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5363(core.List<api.Location> o) { +checkUnnamed5064(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -276,7 +244,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5363(); + o.locations = buildUnnamed5064(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -286,20 +254,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5363(o.locations); + checkUnnamed5064(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5364() { +buildUnnamed5065() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5364(core.List<api.Operation> o) { +checkUnnamed5065(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -311,7 +279,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5364(); + o.operations = buildUnnamed5065(); } buildCounterListOperationsResponse--; return o; @@ -321,25 +289,25 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5364(o.operations); + checkUnnamed5065(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5365() { +buildUnnamed5066() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5365(core.Map<core.String, core.String> o) { +checkUnnamed5066(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5366() { +buildUnnamed5067() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -354,7 +322,7 @@ return o; } -checkUnnamed5366(core.Map<core.String, core.Object> o) { +checkUnnamed5067(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -374,9 +342,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5365(); + o.labels = buildUnnamed5066(); o.locationId = "foo"; - o.metadata = buildUnnamed5366(); + o.metadata = buildUnnamed5067(); o.name = "foo"; } buildCounterLocation--; @@ -387,15 +355,66 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5365(o.labels); + checkUnnamed5066(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5366(o.metadata); + checkUnnamed5067(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; } -buildUnnamed5367() { +buildUnnamed5068() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed5068(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed5069() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed5069(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterNetworkConfig = 0; +buildNetworkConfig() { + var o = new api.NetworkConfig(); + buildCounterNetworkConfig++; + if (buildCounterNetworkConfig < 3) { + o.ipAddresses = buildUnnamed5068(); + o.modes = buildUnnamed5069(); + o.network = "foo"; + o.reservedIpRange = "foo"; + } + buildCounterNetworkConfig--; + return o; +} + +checkNetworkConfig(api.NetworkConfig o) { + buildCounterNetworkConfig++; + if (buildCounterNetworkConfig < 3) { + checkUnnamed5068(o.ipAddresses); + checkUnnamed5069(o.modes); + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.reservedIpRange, unittest.equals('foo')); + } + buildCounterNetworkConfig--; +} + +buildUnnamed5070() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -410,7 +429,7 @@ return o; } -checkUnnamed5367(core.Map<core.String, core.Object> o) { +checkUnnamed5070(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -424,7 +443,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5368() { +buildUnnamed5071() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -439,7 +458,7 @@ return o; } -checkUnnamed5368(core.Map<core.String, core.Object> o) { +checkUnnamed5071(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -460,9 +479,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5367(); + o.metadata = buildUnnamed5070(); o.name = "foo"; - o.response = buildUnnamed5368(); + o.response = buildUnnamed5071(); } buildCounterOperation--; return o; @@ -473,14 +492,45 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5367(o.metadata); + checkUnnamed5070(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5368(o.response); + checkUnnamed5071(o.response); } buildCounterOperation--; } -buildUnnamed5369() { +core.int buildCounterOperationMetadata = 0; +buildOperationMetadata() { + var o = new api.OperationMetadata(); + buildCounterOperationMetadata++; + if (buildCounterOperationMetadata < 3) { + o.apiVersion = "foo"; + o.cancelRequested = true; + o.createTime = "foo"; + o.endTime = "foo"; + o.statusDetail = "foo"; + o.target = "foo"; + o.verb = "foo"; + } + buildCounterOperationMetadata--; + return o; +} + +checkOperationMetadata(api.OperationMetadata o) { + buildCounterOperationMetadata++; + if (buildCounterOperationMetadata < 3) { + unittest.expect(o.apiVersion, unittest.equals('foo')); + unittest.expect(o.cancelRequested, unittest.isTrue); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.endTime, unittest.equals('foo')); + unittest.expect(o.statusDetail, unittest.equals('foo')); + unittest.expect(o.target, unittest.equals('foo')); + unittest.expect(o.verb, unittest.equals('foo')); + } + buildCounterOperationMetadata--; +} + +buildUnnamed5072() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -495,7 +545,7 @@ return o; } -checkUnnamed5369(core.Map<core.String, core.Object> o) { +checkUnnamed5072(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -509,17 +559,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5370() { +buildUnnamed5073() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5369()); - o.add(buildUnnamed5369()); + o.add(buildUnnamed5072()); + o.add(buildUnnamed5072()); return o; } -checkUnnamed5370(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed5073(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5369(o[0]); - checkUnnamed5369(o[1]); + checkUnnamed5072(o[0]); + checkUnnamed5072(o[1]); } core.int buildCounterStatus = 0; @@ -528,7 +578,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5370(); + o.details = buildUnnamed5073(); o.message = "foo"; } buildCounterStatus--; @@ -539,13 +589,21 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5370(o.details); + checkUnnamed5073(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } main() { + unittest.group("obj-schema-CancelOperationRequest", () { + unittest.test("to-json--from-json", () { + var o = buildCancelOperationRequest(); + var od = new api.CancelOperationRequest.fromJson(o.toJson()); + checkCancelOperationRequest(od); + }); + }); + unittest.group("obj-schema-Empty", () { unittest.test("to-json--from-json", () { var o = buildEmpty(); @@ -554,28 +612,11 @@ }); }); - unittest.group("obj-schema-GoogleCloudCommonOperationMetadata", () { + unittest.group("obj-schema-FileShareConfig", () { unittest.test("to-json--from-json", () { - var o = buildGoogleCloudCommonOperationMetadata(); - var od = new api.GoogleCloudCommonOperationMetadata.fromJson(o.toJson()); - checkGoogleCloudCommonOperationMetadata(od); - }); - }); - - unittest.group("obj-schema-GoogleCloudRedisV1beta1LocationMetadata", () { - unittest.test("to-json--from-json", () { - var o = buildGoogleCloudRedisV1beta1LocationMetadata(); - var od = - new api.GoogleCloudRedisV1beta1LocationMetadata.fromJson(o.toJson()); - checkGoogleCloudRedisV1beta1LocationMetadata(od); - }); - }); - - unittest.group("obj-schema-GoogleCloudRedisV1beta1ZoneMetadata", () { - unittest.test("to-json--from-json", () { - var o = buildGoogleCloudRedisV1beta1ZoneMetadata(); - var od = new api.GoogleCloudRedisV1beta1ZoneMetadata.fromJson(o.toJson()); - checkGoogleCloudRedisV1beta1ZoneMetadata(od); + var o = buildFileShareConfig(); + var od = new api.FileShareConfig.fromJson(o.toJson()); + checkFileShareConfig(od); }); }); @@ -619,6 +660,14 @@ }); }); + unittest.group("obj-schema-NetworkConfig", () { + unittest.test("to-json--from-json", () { + var o = buildNetworkConfig(); + var od = new api.NetworkConfig.fromJson(o.toJson()); + checkNetworkConfig(od); + }); + }); + unittest.group("obj-schema-Operation", () { unittest.test("to-json--from-json", () { var o = buildOperation(); @@ -627,6 +676,14 @@ }); }); + unittest.group("obj-schema-OperationMetadata", () { + unittest.test("to-json--from-json", () { + var o = buildOperationMetadata(); + var od = new api.OperationMetadata.fromJson(o.toJson()); + checkOperationMetadata(od); + }); + }); + unittest.group("obj-schema-Status", () { unittest.test("to-json--from-json", () { var o = buildStatus(); @@ -639,7 +696,7 @@ unittest.test("method--get", () { var mock = new HttpServerMock(); api.ProjectsLocationsResourceApi res = - new api.RedisApi(mock).projects.locations; + new api.FileApi(mock).projects.locations; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -691,11 +748,11 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsResourceApi res = - new api.RedisApi(mock).projects.locations; + new api.FileApi(mock).projects.locations; var arg_name = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -728,11 +785,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -743,9 +800,9 @@ }), true); res .list(arg_name, + pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -757,7 +814,7 @@ unittest.test("method--create", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_request = buildInstance(); var arg_parent = "foo"; var arg_instanceId = "foo"; @@ -817,7 +874,7 @@ unittest.test("method--delete", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -869,7 +926,7 @@ unittest.test("method--get", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -921,9 +978,11 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_parent = "foo"; + var arg_filter = "foo"; var arg_pageToken = "foo"; + var arg_orderBy = "foo"; var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -957,8 +1016,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect( + queryMap["orderBy"].first, unittest.equals(arg_orderBy)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); @@ -971,7 +1033,9 @@ }), true); res .list(arg_parent, + filter: arg_filter, pageToken: arg_pageToken, + orderBy: arg_orderBy, pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { @@ -982,7 +1046,7 @@ unittest.test("method--patch", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_request = buildInstance(); var arg_name = "foo"; var arg_updateMask = "foo"; @@ -1044,10 +1108,14 @@ unittest.test("method--cancel", () { var mock = new HttpServerMock(); api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + new api.FileApi(mock).projects.locations.operations; + var arg_request = buildCancelOperationRequest(); var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.CancelOperationRequest.fromJson(json); + checkCancelOperationRequest(obj); + var path = (req.url).path; var pathOffset = 0; var index; @@ -1087,7 +1155,7 @@ return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .cancel(arg_name, $fields: arg_$fields) + .cancel(arg_request, arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkEmpty(response); }))); @@ -1096,7 +1164,7 @@ unittest.test("method--delete", () { var mock = new HttpServerMock(); api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + new api.FileApi(mock).projects.locations.operations; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -1148,7 +1216,7 @@ unittest.test("method--get", () { var mock = new HttpServerMock(); api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + new api.FileApi(mock).projects.locations.operations; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -1200,7 +1268,7 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + new api.FileApi(mock).projects.locations.operations; var arg_name = "foo"; var arg_filter = "foo"; var arg_pageToken = "foo";
diff --git a/generated/googleapis_beta/test/firebasehosting/v1beta1_test.dart b/generated/googleapis_beta/test/firebasehosting/v1beta1_test.dart new file mode 100644 index 0000000..90f9ede --- /dev/null +++ b/generated/googleapis_beta/test/firebasehosting/v1beta1_test.dart
@@ -0,0 +1,1671 @@ +library googleapis_beta.firebasehosting.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/firebasehosting/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterActingUser = 0; +buildActingUser() { + var o = new api.ActingUser(); + buildCounterActingUser++; + if (buildCounterActingUser < 3) { + o.email = "foo"; + o.imageUrl = "foo"; + } + buildCounterActingUser--; + return o; +} + +checkActingUser(api.ActingUser o) { + buildCounterActingUser++; + if (buildCounterActingUser < 3) { + unittest.expect(o.email, unittest.equals('foo')); + unittest.expect(o.imageUrl, unittest.equals('foo')); + } + buildCounterActingUser--; +} + +core.int buildCounterCertDnsChallenge = 0; +buildCertDnsChallenge() { + var o = new api.CertDnsChallenge(); + buildCounterCertDnsChallenge++; + if (buildCounterCertDnsChallenge < 3) { + o.domainName = "foo"; + o.token = "foo"; + } + buildCounterCertDnsChallenge--; + return o; +} + +checkCertDnsChallenge(api.CertDnsChallenge o) { + buildCounterCertDnsChallenge++; + if (buildCounterCertDnsChallenge < 3) { + unittest.expect(o.domainName, unittest.equals('foo')); + unittest.expect(o.token, unittest.equals('foo')); + } + buildCounterCertDnsChallenge--; +} + +core.int buildCounterCertHttpChallenge = 0; +buildCertHttpChallenge() { + var o = new api.CertHttpChallenge(); + buildCounterCertHttpChallenge++; + if (buildCounterCertHttpChallenge < 3) { + o.path = "foo"; + o.token = "foo"; + } + buildCounterCertHttpChallenge--; + return o; +} + +checkCertHttpChallenge(api.CertHttpChallenge o) { + buildCounterCertHttpChallenge++; + if (buildCounterCertHttpChallenge < 3) { + unittest.expect(o.path, unittest.equals('foo')); + unittest.expect(o.token, unittest.equals('foo')); + } + buildCounterCertHttpChallenge--; +} + +core.int buildCounterDomain = 0; +buildDomain() { + var o = new api.Domain(); + buildCounterDomain++; + if (buildCounterDomain < 3) { + o.domainName = "foo"; + o.domainRedirect = buildDomainRedirect(); + o.provisioning = buildDomainProvisioning(); + o.site = "foo"; + o.status = "foo"; + o.updateTime = "foo"; + } + buildCounterDomain--; + return o; +} + +checkDomain(api.Domain o) { + buildCounterDomain++; + if (buildCounterDomain < 3) { + unittest.expect(o.domainName, unittest.equals('foo')); + checkDomainRedirect(o.domainRedirect); + checkDomainProvisioning(o.provisioning); + unittest.expect(o.site, unittest.equals('foo')); + unittest.expect(o.status, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterDomain--; +} + +buildUnnamed4657() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4657(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4658() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4658(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4659() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4659(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterDomainProvisioning = 0; +buildDomainProvisioning() { + var o = new api.DomainProvisioning(); + buildCounterDomainProvisioning++; + if (buildCounterDomainProvisioning < 3) { + o.certChallengeDiscoveredTxt = buildUnnamed4657(); + o.certChallengeDns = buildCertDnsChallenge(); + o.certChallengeHttp = buildCertHttpChallenge(); + o.certStatus = "foo"; + o.discoveredIps = buildUnnamed4658(); + o.dnsFetchTime = "foo"; + o.dnsStatus = "foo"; + o.expectedIps = buildUnnamed4659(); + } + buildCounterDomainProvisioning--; + return o; +} + +checkDomainProvisioning(api.DomainProvisioning o) { + buildCounterDomainProvisioning++; + if (buildCounterDomainProvisioning < 3) { + checkUnnamed4657(o.certChallengeDiscoveredTxt); + checkCertDnsChallenge(o.certChallengeDns); + checkCertHttpChallenge(o.certChallengeHttp); + unittest.expect(o.certStatus, unittest.equals('foo')); + checkUnnamed4658(o.discoveredIps); + unittest.expect(o.dnsFetchTime, unittest.equals('foo')); + unittest.expect(o.dnsStatus, unittest.equals('foo')); + checkUnnamed4659(o.expectedIps); + } + buildCounterDomainProvisioning--; +} + +core.int buildCounterDomainRedirect = 0; +buildDomainRedirect() { + var o = new api.DomainRedirect(); + buildCounterDomainRedirect++; + if (buildCounterDomainRedirect < 3) { + o.domainName = "foo"; + o.type = "foo"; + } + buildCounterDomainRedirect--; + return o; +} + +checkDomainRedirect(api.DomainRedirect o) { + buildCounterDomainRedirect++; + if (buildCounterDomainRedirect < 3) { + unittest.expect(o.domainName, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterDomainRedirect--; +} + +core.int buildCounterEmpty = 0; +buildEmpty() { + var o = new api.Empty(); + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; + return o; +} + +checkEmpty(api.Empty o) { + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; +} + +buildUnnamed4660() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4660(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterHeader = 0; +buildHeader() { + var o = new api.Header(); + buildCounterHeader++; + if (buildCounterHeader < 3) { + o.glob = "foo"; + o.headers = buildUnnamed4660(); + } + buildCounterHeader--; + return o; +} + +checkHeader(api.Header o) { + buildCounterHeader++; + if (buildCounterHeader < 3) { + unittest.expect(o.glob, unittest.equals('foo')); + checkUnnamed4660(o.headers); + } + buildCounterHeader--; +} + +buildUnnamed4661() { + var o = new core.List<api.Domain>(); + o.add(buildDomain()); + o.add(buildDomain()); + return o; +} + +checkUnnamed4661(core.List<api.Domain> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDomain(o[0]); + checkDomain(o[1]); +} + +core.int buildCounterListDomainsResponse = 0; +buildListDomainsResponse() { + var o = new api.ListDomainsResponse(); + buildCounterListDomainsResponse++; + if (buildCounterListDomainsResponse < 3) { + o.domains = buildUnnamed4661(); + o.nextPageToken = "foo"; + } + buildCounterListDomainsResponse--; + return o; +} + +checkListDomainsResponse(api.ListDomainsResponse o) { + buildCounterListDomainsResponse++; + if (buildCounterListDomainsResponse < 3) { + checkUnnamed4661(o.domains); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListDomainsResponse--; +} + +buildUnnamed4662() { + var o = new core.List<api.Release>(); + o.add(buildRelease()); + o.add(buildRelease()); + return o; +} + +checkUnnamed4662(core.List<api.Release> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRelease(o[0]); + checkRelease(o[1]); +} + +core.int buildCounterListReleasesResponse = 0; +buildListReleasesResponse() { + var o = new api.ListReleasesResponse(); + buildCounterListReleasesResponse++; + if (buildCounterListReleasesResponse < 3) { + o.nextPageToken = "foo"; + o.releases = buildUnnamed4662(); + } + buildCounterListReleasesResponse--; + return o; +} + +checkListReleasesResponse(api.ListReleasesResponse o) { + buildCounterListReleasesResponse++; + if (buildCounterListReleasesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4662(o.releases); + } + buildCounterListReleasesResponse--; +} + +buildUnnamed4663() { + var o = new core.List<api.VersionFile>(); + o.add(buildVersionFile()); + o.add(buildVersionFile()); + return o; +} + +checkUnnamed4663(core.List<api.VersionFile> o) { + unittest.expect(o, unittest.hasLength(2)); + checkVersionFile(o[0]); + checkVersionFile(o[1]); +} + +core.int buildCounterListVersionFilesResponse = 0; +buildListVersionFilesResponse() { + var o = new api.ListVersionFilesResponse(); + buildCounterListVersionFilesResponse++; + if (buildCounterListVersionFilesResponse < 3) { + o.files = buildUnnamed4663(); + o.nextPageToken = "foo"; + } + buildCounterListVersionFilesResponse--; + return o; +} + +checkListVersionFilesResponse(api.ListVersionFilesResponse o) { + buildCounterListVersionFilesResponse++; + if (buildCounterListVersionFilesResponse < 3) { + checkUnnamed4663(o.files); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListVersionFilesResponse--; +} + +buildUnnamed4664() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4664(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterPopulateVersionFilesRequest = 0; +buildPopulateVersionFilesRequest() { + var o = new api.PopulateVersionFilesRequest(); + buildCounterPopulateVersionFilesRequest++; + if (buildCounterPopulateVersionFilesRequest < 3) { + o.files = buildUnnamed4664(); + } + buildCounterPopulateVersionFilesRequest--; + return o; +} + +checkPopulateVersionFilesRequest(api.PopulateVersionFilesRequest o) { + buildCounterPopulateVersionFilesRequest++; + if (buildCounterPopulateVersionFilesRequest < 3) { + checkUnnamed4664(o.files); + } + buildCounterPopulateVersionFilesRequest--; +} + +buildUnnamed4665() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4665(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPopulateVersionFilesResponse = 0; +buildPopulateVersionFilesResponse() { + var o = new api.PopulateVersionFilesResponse(); + buildCounterPopulateVersionFilesResponse++; + if (buildCounterPopulateVersionFilesResponse < 3) { + o.uploadRequiredHashes = buildUnnamed4665(); + o.uploadUrl = "foo"; + } + buildCounterPopulateVersionFilesResponse--; + return o; +} + +checkPopulateVersionFilesResponse(api.PopulateVersionFilesResponse o) { + buildCounterPopulateVersionFilesResponse++; + if (buildCounterPopulateVersionFilesResponse < 3) { + checkUnnamed4665(o.uploadRequiredHashes); + unittest.expect(o.uploadUrl, unittest.equals('foo')); + } + buildCounterPopulateVersionFilesResponse--; +} + +core.int buildCounterRedirect = 0; +buildRedirect() { + var o = new api.Redirect(); + buildCounterRedirect++; + if (buildCounterRedirect < 3) { + o.glob = "foo"; + o.location = "foo"; + o.statusCode = 42; + } + buildCounterRedirect--; + return o; +} + +checkRedirect(api.Redirect o) { + buildCounterRedirect++; + if (buildCounterRedirect < 3) { + unittest.expect(o.glob, unittest.equals('foo')); + unittest.expect(o.location, unittest.equals('foo')); + unittest.expect(o.statusCode, unittest.equals(42)); + } + buildCounterRedirect--; +} + +core.int buildCounterRelease = 0; +buildRelease() { + var o = new api.Release(); + buildCounterRelease++; + if (buildCounterRelease < 3) { + o.message = "foo"; + o.name = "foo"; + o.releaseTime = "foo"; + o.releaseUser = buildActingUser(); + o.type = "foo"; + o.version = buildVersion(); + } + buildCounterRelease--; + return o; +} + +checkRelease(api.Release o) { + buildCounterRelease++; + if (buildCounterRelease < 3) { + unittest.expect(o.message, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.releaseTime, unittest.equals('foo')); + checkActingUser(o.releaseUser); + unittest.expect(o.type, unittest.equals('foo')); + checkVersion(o.version); + } + buildCounterRelease--; +} + +core.int buildCounterRewrite = 0; +buildRewrite() { + var o = new api.Rewrite(); + buildCounterRewrite++; + if (buildCounterRewrite < 3) { + o.dynamicLinks = true; + o.function = "foo"; + o.glob = "foo"; + o.path = "foo"; + } + buildCounterRewrite--; + return o; +} + +checkRewrite(api.Rewrite o) { + buildCounterRewrite++; + if (buildCounterRewrite < 3) { + unittest.expect(o.dynamicLinks, unittest.isTrue); + unittest.expect(o.function, unittest.equals('foo')); + unittest.expect(o.glob, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + } + buildCounterRewrite--; +} + +buildUnnamed4666() { + var o = new core.List<api.Header>(); + o.add(buildHeader()); + o.add(buildHeader()); + return o; +} + +checkUnnamed4666(core.List<api.Header> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHeader(o[0]); + checkHeader(o[1]); +} + +buildUnnamed4667() { + var o = new core.List<api.Redirect>(); + o.add(buildRedirect()); + o.add(buildRedirect()); + return o; +} + +checkUnnamed4667(core.List<api.Redirect> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRedirect(o[0]); + checkRedirect(o[1]); +} + +buildUnnamed4668() { + var o = new core.List<api.Rewrite>(); + o.add(buildRewrite()); + o.add(buildRewrite()); + return o; +} + +checkUnnamed4668(core.List<api.Rewrite> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRewrite(o[0]); + checkRewrite(o[1]); +} + +core.int buildCounterServingConfig = 0; +buildServingConfig() { + var o = new api.ServingConfig(); + buildCounterServingConfig++; + if (buildCounterServingConfig < 3) { + o.appAssociation = "foo"; + o.cleanUrls = true; + o.headers = buildUnnamed4666(); + o.redirects = buildUnnamed4667(); + o.rewrites = buildUnnamed4668(); + o.trailingSlashBehavior = "foo"; + } + buildCounterServingConfig--; + return o; +} + +checkServingConfig(api.ServingConfig o) { + buildCounterServingConfig++; + if (buildCounterServingConfig < 3) { + unittest.expect(o.appAssociation, unittest.equals('foo')); + unittest.expect(o.cleanUrls, unittest.isTrue); + checkUnnamed4666(o.headers); + checkUnnamed4667(o.redirects); + checkUnnamed4668(o.rewrites); + unittest.expect(o.trailingSlashBehavior, unittest.equals('foo')); + } + buildCounterServingConfig--; +} + +core.int buildCounterSiteConfig = 0; +buildSiteConfig() { + var o = new api.SiteConfig(); + buildCounterSiteConfig++; + if (buildCounterSiteConfig < 3) { + o.maxVersions = "foo"; + } + buildCounterSiteConfig--; + return o; +} + +checkSiteConfig(api.SiteConfig o) { + buildCounterSiteConfig++; + if (buildCounterSiteConfig < 3) { + unittest.expect(o.maxVersions, unittest.equals('foo')); + } + buildCounterSiteConfig--; +} + +buildUnnamed4669() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4669(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterVersion = 0; +buildVersion() { + var o = new api.Version(); + buildCounterVersion++; + if (buildCounterVersion < 3) { + o.config = buildServingConfig(); + o.createTime = "foo"; + o.createUser = buildActingUser(); + o.deleteTime = "foo"; + o.deleteUser = buildActingUser(); + o.fileCount = "foo"; + o.finalizeTime = "foo"; + o.finalizeUser = buildActingUser(); + o.labels = buildUnnamed4669(); + o.name = "foo"; + o.status = "foo"; + o.versionBytes = "foo"; + } + buildCounterVersion--; + return o; +} + +checkVersion(api.Version o) { + buildCounterVersion++; + if (buildCounterVersion < 3) { + checkServingConfig(o.config); + unittest.expect(o.createTime, unittest.equals('foo')); + checkActingUser(o.createUser); + unittest.expect(o.deleteTime, unittest.equals('foo')); + checkActingUser(o.deleteUser); + unittest.expect(o.fileCount, unittest.equals('foo')); + unittest.expect(o.finalizeTime, unittest.equals('foo')); + checkActingUser(o.finalizeUser); + checkUnnamed4669(o.labels); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.status, unittest.equals('foo')); + unittest.expect(o.versionBytes, unittest.equals('foo')); + } + buildCounterVersion--; +} + +core.int buildCounterVersionFile = 0; +buildVersionFile() { + var o = new api.VersionFile(); + buildCounterVersionFile++; + if (buildCounterVersionFile < 3) { + o.hash = "foo"; + o.path = "foo"; + o.status = "foo"; + } + buildCounterVersionFile--; + return o; +} + +checkVersionFile(api.VersionFile o) { + buildCounterVersionFile++; + if (buildCounterVersionFile < 3) { + unittest.expect(o.hash, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + unittest.expect(o.status, unittest.equals('foo')); + } + buildCounterVersionFile--; +} + +main() { + unittest.group("obj-schema-ActingUser", () { + unittest.test("to-json--from-json", () { + var o = buildActingUser(); + var od = new api.ActingUser.fromJson(o.toJson()); + checkActingUser(od); + }); + }); + + unittest.group("obj-schema-CertDnsChallenge", () { + unittest.test("to-json--from-json", () { + var o = buildCertDnsChallenge(); + var od = new api.CertDnsChallenge.fromJson(o.toJson()); + checkCertDnsChallenge(od); + }); + }); + + unittest.group("obj-schema-CertHttpChallenge", () { + unittest.test("to-json--from-json", () { + var o = buildCertHttpChallenge(); + var od = new api.CertHttpChallenge.fromJson(o.toJson()); + checkCertHttpChallenge(od); + }); + }); + + unittest.group("obj-schema-Domain", () { + unittest.test("to-json--from-json", () { + var o = buildDomain(); + var od = new api.Domain.fromJson(o.toJson()); + checkDomain(od); + }); + }); + + unittest.group("obj-schema-DomainProvisioning", () { + unittest.test("to-json--from-json", () { + var o = buildDomainProvisioning(); + var od = new api.DomainProvisioning.fromJson(o.toJson()); + checkDomainProvisioning(od); + }); + }); + + unittest.group("obj-schema-DomainRedirect", () { + unittest.test("to-json--from-json", () { + var o = buildDomainRedirect(); + var od = new api.DomainRedirect.fromJson(o.toJson()); + checkDomainRedirect(od); + }); + }); + + unittest.group("obj-schema-Empty", () { + unittest.test("to-json--from-json", () { + var o = buildEmpty(); + var od = new api.Empty.fromJson(o.toJson()); + checkEmpty(od); + }); + }); + + unittest.group("obj-schema-Header", () { + unittest.test("to-json--from-json", () { + var o = buildHeader(); + var od = new api.Header.fromJson(o.toJson()); + checkHeader(od); + }); + }); + + unittest.group("obj-schema-ListDomainsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListDomainsResponse(); + var od = new api.ListDomainsResponse.fromJson(o.toJson()); + checkListDomainsResponse(od); + }); + }); + + unittest.group("obj-schema-ListReleasesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListReleasesResponse(); + var od = new api.ListReleasesResponse.fromJson(o.toJson()); + checkListReleasesResponse(od); + }); + }); + + unittest.group("obj-schema-ListVersionFilesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListVersionFilesResponse(); + var od = new api.ListVersionFilesResponse.fromJson(o.toJson()); + checkListVersionFilesResponse(od); + }); + }); + + unittest.group("obj-schema-PopulateVersionFilesRequest", () { + unittest.test("to-json--from-json", () { + var o = buildPopulateVersionFilesRequest(); + var od = new api.PopulateVersionFilesRequest.fromJson(o.toJson()); + checkPopulateVersionFilesRequest(od); + }); + }); + + unittest.group("obj-schema-PopulateVersionFilesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildPopulateVersionFilesResponse(); + var od = new api.PopulateVersionFilesResponse.fromJson(o.toJson()); + checkPopulateVersionFilesResponse(od); + }); + }); + + unittest.group("obj-schema-Redirect", () { + unittest.test("to-json--from-json", () { + var o = buildRedirect(); + var od = new api.Redirect.fromJson(o.toJson()); + checkRedirect(od); + }); + }); + + unittest.group("obj-schema-Release", () { + unittest.test("to-json--from-json", () { + var o = buildRelease(); + var od = new api.Release.fromJson(o.toJson()); + checkRelease(od); + }); + }); + + unittest.group("obj-schema-Rewrite", () { + unittest.test("to-json--from-json", () { + var o = buildRewrite(); + var od = new api.Rewrite.fromJson(o.toJson()); + checkRewrite(od); + }); + }); + + unittest.group("obj-schema-ServingConfig", () { + unittest.test("to-json--from-json", () { + var o = buildServingConfig(); + var od = new api.ServingConfig.fromJson(o.toJson()); + checkServingConfig(od); + }); + }); + + unittest.group("obj-schema-SiteConfig", () { + unittest.test("to-json--from-json", () { + var o = buildSiteConfig(); + var od = new api.SiteConfig.fromJson(o.toJson()); + checkSiteConfig(od); + }); + }); + + unittest.group("obj-schema-Version", () { + unittest.test("to-json--from-json", () { + var o = buildVersion(); + var od = new api.Version.fromJson(o.toJson()); + checkVersion(od); + }); + }); + + unittest.group("obj-schema-VersionFile", () { + unittest.test("to-json--from-json", () { + var o = buildVersionFile(); + var od = new api.VersionFile.fromJson(o.toJson()); + checkVersionFile(od); + }); + }); + + unittest.group("resource-SitesResourceApi", () { + unittest.test("method--getConfig", () { + var mock = new HttpServerMock(); + api.SitesResourceApi res = new api.FirebasehostingApi(mock).sites; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSiteConfig()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getConfig(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSiteConfig(response); + }))); + }); + + unittest.test("method--updateConfig", () { + var mock = new HttpServerMock(); + api.SitesResourceApi res = new api.FirebasehostingApi(mock).sites; + var arg_request = buildSiteConfig(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SiteConfig.fromJson(json); + checkSiteConfig(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSiteConfig()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .updateConfig(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSiteConfig(response); + }))); + }); + }); + + unittest.group("resource-SitesDomainsResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_request = buildDomain(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Domain.fromJson(json); + checkDomain(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildDomain()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkDomain(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildDomain()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkDomain(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListDomainsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListDomainsResponse(response); + }))); + }); + + unittest.test("method--update", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_request = buildDomain(); + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Domain.fromJson(json); + checkDomain(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildDomain()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .update(arg_request, arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkDomain(response); + }))); + }); + }); + + unittest.group("resource-SitesReleasesResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.SitesReleasesResourceApi res = + new api.FirebasehostingApi(mock).sites.releases; + var arg_request = buildRelease(); + var arg_parent = "foo"; + var arg_versionName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Release.fromJson(json); + checkRelease(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["versionName"].first, unittest.equals(arg_versionName)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildRelease()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, + versionName: arg_versionName, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkRelease(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.SitesReleasesResourceApi res = + new api.FirebasehostingApi(mock).sites.releases; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListReleasesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListReleasesResponse(response); + }))); + }); + }); + + unittest.group("resource-SitesVersionsResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.SitesVersionsResourceApi res = + new api.FirebasehostingApi(mock).sites.versions; + var arg_request = buildVersion(); + var arg_parent = "foo"; + var arg_sizeBytes = "foo"; + var arg_versionId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Version.fromJson(json); + checkVersion(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["sizeBytes"].first, unittest.equals(arg_sizeBytes)); + unittest.expect( + queryMap["versionId"].first, unittest.equals(arg_versionId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildVersion()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, + sizeBytes: arg_sizeBytes, + versionId: arg_versionId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkVersion(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.SitesVersionsResourceApi res = + new api.FirebasehostingApi(mock).sites.versions; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.SitesVersionsResourceApi res = + new api.FirebasehostingApi(mock).sites.versions; + var arg_request = buildVersion(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Version.fromJson(json); + checkVersion(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildVersion()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkVersion(response); + }))); + }); + + unittest.test("method--populateFiles", () { + var mock = new HttpServerMock(); + api.SitesVersionsResourceApi res = + new api.FirebasehostingApi(mock).sites.versions; + var arg_request = buildPopulateVersionFilesRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.PopulateVersionFilesRequest.fromJson(json); + checkPopulateVersionFilesRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPopulateVersionFilesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .populateFiles(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPopulateVersionFilesResponse(response); + }))); + }); + }); + + unittest.group("resource-SitesVersionsFilesResourceApi", () { + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.SitesVersionsFilesResourceApi res = + new api.FirebasehostingApi(mock).sites.versions.files; + var arg_parent = "foo"; + var arg_status = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["status"].first, unittest.equals(arg_status)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListVersionFilesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + status: arg_status, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListVersionFilesResponse(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/iap/v1beta1_test.dart b/generated/googleapis_beta/test/iap/v1beta1_test.dart deleted file mode 100644 index a002398..0000000 --- a/generated/googleapis_beta/test/iap/v1beta1_test.dart +++ /dev/null
@@ -1,912 +0,0 @@ -library googleapis_beta.iap.v1beta1.test; - -import "dart:core" as core; -import "dart:async" as async; -import "dart:convert" as convert; - -import 'package:http/http.dart' as http; -import 'package:test/test.dart' as unittest; - -import 'package:googleapis_beta/iap/v1beta1.dart' as api; - -class HttpServerMock extends http.BaseClient { - core.Function _callback; - core.bool _expectJson; - - void register(core.Function callback, core.bool expectJson) { - _callback = callback; - _expectJson = expectJson; - } - - async.Future<http.StreamedResponse> send(http.BaseRequest request) { - if (_expectJson) { - return request - .finalize() - .transform(convert.utf8.decoder) - .join('') - .then((core.String jsonString) { - if (jsonString.isEmpty) { - return _callback(request, null); - } else { - return _callback(request, convert.json.decode(jsonString)); - } - }); - } else { - var stream = request.finalize(); - if (stream == null) { - return _callback(request, []); - } else { - return stream.toBytes().then((data) { - return _callback(request, data); - }); - } - } - } -} - -http.StreamedResponse stringResponse(core.int status, - core.Map<core.String, core.String> headers, core.String body) { - var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); - return new http.StreamedResponse(stream, status, headers: headers); -} - -buildUnnamed5464() { - var o = new core.List<api.AuditLogConfig>(); - o.add(buildAuditLogConfig()); - o.add(buildAuditLogConfig()); - return o; -} - -checkUnnamed5464(core.List<api.AuditLogConfig> o) { - unittest.expect(o, unittest.hasLength(2)); - checkAuditLogConfig(o[0]); - checkAuditLogConfig(o[1]); -} - -core.int buildCounterAuditConfig = 0; -buildAuditConfig() { - var o = new api.AuditConfig(); - buildCounterAuditConfig++; - if (buildCounterAuditConfig < 3) { - o.auditLogConfigs = buildUnnamed5464(); - o.service = "foo"; - } - buildCounterAuditConfig--; - return o; -} - -checkAuditConfig(api.AuditConfig o) { - buildCounterAuditConfig++; - if (buildCounterAuditConfig < 3) { - checkUnnamed5464(o.auditLogConfigs); - unittest.expect(o.service, unittest.equals('foo')); - } - buildCounterAuditConfig--; -} - -buildUnnamed5465() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5465(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterAuditLogConfig = 0; -buildAuditLogConfig() { - var o = new api.AuditLogConfig(); - buildCounterAuditLogConfig++; - if (buildCounterAuditLogConfig < 3) { - o.exemptedMembers = buildUnnamed5465(); - o.logType = "foo"; - } - buildCounterAuditLogConfig--; - return o; -} - -checkAuditLogConfig(api.AuditLogConfig o) { - buildCounterAuditLogConfig++; - if (buildCounterAuditLogConfig < 3) { - checkUnnamed5465(o.exemptedMembers); - unittest.expect(o.logType, unittest.equals('foo')); - } - buildCounterAuditLogConfig--; -} - -buildUnnamed5466() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5466(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterBinding = 0; -buildBinding() { - var o = new api.Binding(); - buildCounterBinding++; - if (buildCounterBinding < 3) { - o.condition = buildExpr(); - o.members = buildUnnamed5466(); - o.role = "foo"; - } - buildCounterBinding--; - return o; -} - -checkBinding(api.Binding o) { - buildCounterBinding++; - if (buildCounterBinding < 3) { - checkExpr(o.condition); - checkUnnamed5466(o.members); - unittest.expect(o.role, unittest.equals('foo')); - } - buildCounterBinding--; -} - -core.int buildCounterExpr = 0; -buildExpr() { - var o = new api.Expr(); - buildCounterExpr++; - if (buildCounterExpr < 3) { - o.description = "foo"; - o.expression = "foo"; - o.location = "foo"; - o.title = "foo"; - } - buildCounterExpr--; - return o; -} - -checkExpr(api.Expr o) { - buildCounterExpr++; - if (buildCounterExpr < 3) { - unittest.expect(o.description, unittest.equals('foo')); - unittest.expect(o.expression, unittest.equals('foo')); - unittest.expect(o.location, unittest.equals('foo')); - unittest.expect(o.title, unittest.equals('foo')); - } - buildCounterExpr--; -} - -core.int buildCounterGetIamPolicyRequest = 0; -buildGetIamPolicyRequest() { - var o = new api.GetIamPolicyRequest(); - buildCounterGetIamPolicyRequest++; - if (buildCounterGetIamPolicyRequest < 3) {} - buildCounterGetIamPolicyRequest--; - return o; -} - -checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { - buildCounterGetIamPolicyRequest++; - if (buildCounterGetIamPolicyRequest < 3) {} - buildCounterGetIamPolicyRequest--; -} - -buildUnnamed5467() { - var o = new core.List<api.AuditConfig>(); - o.add(buildAuditConfig()); - o.add(buildAuditConfig()); - return o; -} - -checkUnnamed5467(core.List<api.AuditConfig> o) { - unittest.expect(o, unittest.hasLength(2)); - checkAuditConfig(o[0]); - checkAuditConfig(o[1]); -} - -buildUnnamed5468() { - var o = new core.List<api.Binding>(); - o.add(buildBinding()); - o.add(buildBinding()); - return o; -} - -checkUnnamed5468(core.List<api.Binding> o) { - unittest.expect(o, unittest.hasLength(2)); - checkBinding(o[0]); - checkBinding(o[1]); -} - -core.int buildCounterPolicy = 0; -buildPolicy() { - var o = new api.Policy(); - buildCounterPolicy++; - if (buildCounterPolicy < 3) { - o.auditConfigs = buildUnnamed5467(); - o.bindings = buildUnnamed5468(); - o.etag = "foo"; - o.version = 42; - } - buildCounterPolicy--; - return o; -} - -checkPolicy(api.Policy o) { - buildCounterPolicy++; - if (buildCounterPolicy < 3) { - checkUnnamed5467(o.auditConfigs); - checkUnnamed5468(o.bindings); - unittest.expect(o.etag, unittest.equals('foo')); - unittest.expect(o.version, unittest.equals(42)); - } - buildCounterPolicy--; -} - -core.int buildCounterSetIamPolicyRequest = 0; -buildSetIamPolicyRequest() { - var o = new api.SetIamPolicyRequest(); - buildCounterSetIamPolicyRequest++; - if (buildCounterSetIamPolicyRequest < 3) { - o.policy = buildPolicy(); - o.updateMask = "foo"; - } - buildCounterSetIamPolicyRequest--; - return o; -} - -checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { - buildCounterSetIamPolicyRequest++; - if (buildCounterSetIamPolicyRequest < 3) { - checkPolicy(o.policy); - unittest.expect(o.updateMask, unittest.equals('foo')); - } - buildCounterSetIamPolicyRequest--; -} - -buildUnnamed5469() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5469(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterTestIamPermissionsRequest = 0; -buildTestIamPermissionsRequest() { - var o = new api.TestIamPermissionsRequest(); - buildCounterTestIamPermissionsRequest++; - if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5469(); - } - buildCounterTestIamPermissionsRequest--; - return o; -} - -checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { - buildCounterTestIamPermissionsRequest++; - if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5469(o.permissions); - } - buildCounterTestIamPermissionsRequest--; -} - -buildUnnamed5470() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5470(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterTestIamPermissionsResponse = 0; -buildTestIamPermissionsResponse() { - var o = new api.TestIamPermissionsResponse(); - buildCounterTestIamPermissionsResponse++; - if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5470(); - } - buildCounterTestIamPermissionsResponse--; - return o; -} - -checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { - buildCounterTestIamPermissionsResponse++; - if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5470(o.permissions); - } - buildCounterTestIamPermissionsResponse--; -} - -main() { - unittest.group("obj-schema-AuditConfig", () { - unittest.test("to-json--from-json", () { - var o = buildAuditConfig(); - var od = new api.AuditConfig.fromJson(o.toJson()); - checkAuditConfig(od); - }); - }); - - unittest.group("obj-schema-AuditLogConfig", () { - unittest.test("to-json--from-json", () { - var o = buildAuditLogConfig(); - var od = new api.AuditLogConfig.fromJson(o.toJson()); - checkAuditLogConfig(od); - }); - }); - - unittest.group("obj-schema-Binding", () { - unittest.test("to-json--from-json", () { - var o = buildBinding(); - var od = new api.Binding.fromJson(o.toJson()); - checkBinding(od); - }); - }); - - unittest.group("obj-schema-Expr", () { - unittest.test("to-json--from-json", () { - var o = buildExpr(); - var od = new api.Expr.fromJson(o.toJson()); - checkExpr(od); - }); - }); - - unittest.group("obj-schema-GetIamPolicyRequest", () { - unittest.test("to-json--from-json", () { - var o = buildGetIamPolicyRequest(); - var od = new api.GetIamPolicyRequest.fromJson(o.toJson()); - checkGetIamPolicyRequest(od); - }); - }); - - unittest.group("obj-schema-Policy", () { - unittest.test("to-json--from-json", () { - var o = buildPolicy(); - var od = new api.Policy.fromJson(o.toJson()); - checkPolicy(od); - }); - }); - - unittest.group("obj-schema-SetIamPolicyRequest", () { - unittest.test("to-json--from-json", () { - var o = buildSetIamPolicyRequest(); - var od = new api.SetIamPolicyRequest.fromJson(o.toJson()); - checkSetIamPolicyRequest(od); - }); - }); - - unittest.group("obj-schema-TestIamPermissionsRequest", () { - unittest.test("to-json--from-json", () { - var o = buildTestIamPermissionsRequest(); - var od = new api.TestIamPermissionsRequest.fromJson(o.toJson()); - checkTestIamPermissionsRequest(od); - }); - }); - - unittest.group("obj-schema-TestIamPermissionsResponse", () { - unittest.test("to-json--from-json", () { - var o = buildTestIamPermissionsResponse(); - var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); - checkTestIamPermissionsResponse(od); - }); - }); - - unittest.group("resource-ProjectsIapWebResourceApi", () { - unittest.test("method--getIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebResourceApi res = new api.IapApi(mock).projects.iapWeb; - var arg_request = buildGetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.GetIamPolicyRequest.fromJson(json); - checkGetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--setIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebResourceApi res = new api.IapApi(mock).projects.iapWeb; - var arg_request = buildSetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SetIamPolicyRequest.fromJson(json); - checkSetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--testIamPermissions", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebResourceApi res = new api.IapApi(mock).projects.iapWeb; - var arg_request = buildTestIamPermissionsRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.TestIamPermissionsRequest.fromJson(json); - checkTestIamPermissionsRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTestIamPermissionsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTestIamPermissionsResponse(response); - }))); - }); - }); - - unittest.group("resource-ProjectsIapWebServicesResourceApi", () { - unittest.test("method--getIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesResourceApi res = - new api.IapApi(mock).projects.iapWeb.services; - var arg_request = buildGetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.GetIamPolicyRequest.fromJson(json); - checkGetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--setIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesResourceApi res = - new api.IapApi(mock).projects.iapWeb.services; - var arg_request = buildSetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SetIamPolicyRequest.fromJson(json); - checkSetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--testIamPermissions", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesResourceApi res = - new api.IapApi(mock).projects.iapWeb.services; - var arg_request = buildTestIamPermissionsRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.TestIamPermissionsRequest.fromJson(json); - checkTestIamPermissionsRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTestIamPermissionsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTestIamPermissionsResponse(response); - }))); - }); - }); - - unittest.group("resource-ProjectsIapWebServicesVersionsResourceApi", () { - unittest.test("method--getIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesVersionsResourceApi res = - new api.IapApi(mock).projects.iapWeb.services.versions; - var arg_request = buildGetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.GetIamPolicyRequest.fromJson(json); - checkGetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--setIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesVersionsResourceApi res = - new api.IapApi(mock).projects.iapWeb.services.versions; - var arg_request = buildSetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SetIamPolicyRequest.fromJson(json); - checkSetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--testIamPermissions", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesVersionsResourceApi res = - new api.IapApi(mock).projects.iapWeb.services.versions; - var arg_request = buildTestIamPermissionsRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.TestIamPermissionsRequest.fromJson(json); - checkTestIamPermissionsRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTestIamPermissionsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTestIamPermissionsResponse(response); - }))); - }); - }); -}
diff --git a/generated/googleapis_beta/test/language/v1beta1_test.dart b/generated/googleapis_beta/test/language/v1beta1_test.dart index 75ff8c4..7d06974 100644 --- a/generated/googleapis_beta/test/language/v1beta1_test.dart +++ b/generated/googleapis_beta/test/language/v1beta1_test.dart
@@ -71,14 +71,14 @@ buildCounterAnalyzeEntitiesRequest--; } -buildUnnamed5580() { +buildUnnamed5074() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5580(core.List<api.Entity> o) { +checkUnnamed5074(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); @@ -89,7 +89,7 @@ var o = new api.AnalyzeEntitiesResponse(); buildCounterAnalyzeEntitiesResponse++; if (buildCounterAnalyzeEntitiesResponse < 3) { - o.entities = buildUnnamed5580(); + o.entities = buildUnnamed5074(); o.language = "foo"; } buildCounterAnalyzeEntitiesResponse--; @@ -99,7 +99,7 @@ checkAnalyzeEntitiesResponse(api.AnalyzeEntitiesResponse o) { buildCounterAnalyzeEntitiesResponse++; if (buildCounterAnalyzeEntitiesResponse < 3) { - checkUnnamed5580(o.entities); + checkUnnamed5074(o.entities); unittest.expect(o.language, unittest.equals('foo')); } buildCounterAnalyzeEntitiesResponse--; @@ -126,14 +126,14 @@ buildCounterAnalyzeSentimentRequest--; } -buildUnnamed5581() { +buildUnnamed5075() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5581(core.List<api.Sentence> o) { +checkUnnamed5075(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); @@ -146,7 +146,7 @@ if (buildCounterAnalyzeSentimentResponse < 3) { o.documentSentiment = buildSentiment(); o.language = "foo"; - o.sentences = buildUnnamed5581(); + o.sentences = buildUnnamed5075(); } buildCounterAnalyzeSentimentResponse--; return o; @@ -157,7 +157,7 @@ if (buildCounterAnalyzeSentimentResponse < 3) { checkSentiment(o.documentSentiment); unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5581(o.sentences); + checkUnnamed5075(o.sentences); } buildCounterAnalyzeSentimentResponse--; } @@ -183,27 +183,27 @@ buildCounterAnalyzeSyntaxRequest--; } -buildUnnamed5582() { +buildUnnamed5076() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5582(core.List<api.Sentence> o) { +checkUnnamed5076(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); } -buildUnnamed5583() { +buildUnnamed5077() { var o = new core.List<api.Token>(); o.add(buildToken()); o.add(buildToken()); return o; } -checkUnnamed5583(core.List<api.Token> o) { +checkUnnamed5077(core.List<api.Token> o) { unittest.expect(o, unittest.hasLength(2)); checkToken(o[0]); checkToken(o[1]); @@ -215,8 +215,8 @@ buildCounterAnalyzeSyntaxResponse++; if (buildCounterAnalyzeSyntaxResponse < 3) { o.language = "foo"; - o.sentences = buildUnnamed5582(); - o.tokens = buildUnnamed5583(); + o.sentences = buildUnnamed5076(); + o.tokens = buildUnnamed5077(); } buildCounterAnalyzeSyntaxResponse--; return o; @@ -226,8 +226,8 @@ buildCounterAnalyzeSyntaxResponse++; if (buildCounterAnalyzeSyntaxResponse < 3) { unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5582(o.sentences); - checkUnnamed5583(o.tokens); + checkUnnamed5076(o.sentences); + checkUnnamed5077(o.tokens); } buildCounterAnalyzeSyntaxResponse--; } @@ -255,40 +255,40 @@ buildCounterAnnotateTextRequest--; } -buildUnnamed5584() { +buildUnnamed5078() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5584(core.List<api.Entity> o) { +checkUnnamed5078(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); } -buildUnnamed5585() { +buildUnnamed5079() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5585(core.List<api.Sentence> o) { +checkUnnamed5079(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); } -buildUnnamed5586() { +buildUnnamed5080() { var o = new core.List<api.Token>(); o.add(buildToken()); o.add(buildToken()); return o; } -checkUnnamed5586(core.List<api.Token> o) { +checkUnnamed5080(core.List<api.Token> o) { unittest.expect(o, unittest.hasLength(2)); checkToken(o[0]); checkToken(o[1]); @@ -300,10 +300,10 @@ buildCounterAnnotateTextResponse++; if (buildCounterAnnotateTextResponse < 3) { o.documentSentiment = buildSentiment(); - o.entities = buildUnnamed5584(); + o.entities = buildUnnamed5078(); o.language = "foo"; - o.sentences = buildUnnamed5585(); - o.tokens = buildUnnamed5586(); + o.sentences = buildUnnamed5079(); + o.tokens = buildUnnamed5080(); } buildCounterAnnotateTextResponse--; return o; @@ -313,10 +313,10 @@ buildCounterAnnotateTextResponse++; if (buildCounterAnnotateTextResponse < 3) { checkSentiment(o.documentSentiment); - checkUnnamed5584(o.entities); + checkUnnamed5078(o.entities); unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5585(o.sentences); - checkUnnamed5586(o.tokens); + checkUnnamed5079(o.sentences); + checkUnnamed5080(o.tokens); } buildCounterAnnotateTextResponse--; } @@ -367,27 +367,27 @@ buildCounterDocument--; } -buildUnnamed5587() { +buildUnnamed5081() { var o = new core.List<api.EntityMention>(); o.add(buildEntityMention()); o.add(buildEntityMention()); return o; } -checkUnnamed5587(core.List<api.EntityMention> o) { +checkUnnamed5081(core.List<api.EntityMention> o) { unittest.expect(o, unittest.hasLength(2)); checkEntityMention(o[0]); checkEntityMention(o[1]); } -buildUnnamed5588() { +buildUnnamed5082() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5588(core.Map<core.String, core.String> o) { +checkUnnamed5082(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -398,8 +398,8 @@ var o = new api.Entity(); buildCounterEntity++; if (buildCounterEntity < 3) { - o.mentions = buildUnnamed5587(); - o.metadata = buildUnnamed5588(); + o.mentions = buildUnnamed5081(); + o.metadata = buildUnnamed5082(); o.name = "foo"; o.salience = 42.0; o.type = "foo"; @@ -411,8 +411,8 @@ checkEntity(api.Entity o) { buildCounterEntity++; if (buildCounterEntity < 3) { - checkUnnamed5587(o.mentions); - checkUnnamed5588(o.metadata); + checkUnnamed5081(o.mentions); + checkUnnamed5082(o.metadata); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.salience, unittest.equals(42.0)); unittest.expect(o.type, unittest.equals('foo')); @@ -549,7 +549,7 @@ buildCounterSentiment--; } -buildUnnamed5589() { +buildUnnamed5083() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -564,7 +564,7 @@ return o; } -checkUnnamed5589(core.Map<core.String, core.Object> o) { +checkUnnamed5083(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -578,17 +578,17 @@ unittest.expect(casted2["string"], unittest.equals('foo')); } -buildUnnamed5590() { +buildUnnamed5084() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5589()); - o.add(buildUnnamed5589()); + o.add(buildUnnamed5083()); + o.add(buildUnnamed5083()); return o; } -checkUnnamed5590(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed5084(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5589(o[0]); - checkUnnamed5589(o[1]); + checkUnnamed5083(o[0]); + checkUnnamed5083(o[1]); } core.int buildCounterStatus = 0; @@ -597,7 +597,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5590(); + o.details = buildUnnamed5084(); o.message = "foo"; } buildCounterStatus--; @@ -608,7 +608,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5590(o.details); + checkUnnamed5084(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--;
diff --git a/generated/googleapis_beta/test/language/v1beta2_test.dart b/generated/googleapis_beta/test/language/v1beta2_test.dart index e4612b6..f92ddb1 100644 --- a/generated/googleapis_beta/test/language/v1beta2_test.dart +++ b/generated/googleapis_beta/test/language/v1beta2_test.dart
@@ -71,14 +71,14 @@ buildCounterAnalyzeEntitiesRequest--; } -buildUnnamed5397() { +buildUnnamed4316() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5397(core.List<api.Entity> o) { +checkUnnamed4316(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); @@ -89,7 +89,7 @@ var o = new api.AnalyzeEntitiesResponse(); buildCounterAnalyzeEntitiesResponse++; if (buildCounterAnalyzeEntitiesResponse < 3) { - o.entities = buildUnnamed5397(); + o.entities = buildUnnamed4316(); o.language = "foo"; } buildCounterAnalyzeEntitiesResponse--; @@ -99,7 +99,7 @@ checkAnalyzeEntitiesResponse(api.AnalyzeEntitiesResponse o) { buildCounterAnalyzeEntitiesResponse++; if (buildCounterAnalyzeEntitiesResponse < 3) { - checkUnnamed5397(o.entities); + checkUnnamed4316(o.entities); unittest.expect(o.language, unittest.equals('foo')); } buildCounterAnalyzeEntitiesResponse--; @@ -126,14 +126,14 @@ buildCounterAnalyzeEntitySentimentRequest--; } -buildUnnamed5398() { +buildUnnamed4317() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5398(core.List<api.Entity> o) { +checkUnnamed4317(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); @@ -144,7 +144,7 @@ var o = new api.AnalyzeEntitySentimentResponse(); buildCounterAnalyzeEntitySentimentResponse++; if (buildCounterAnalyzeEntitySentimentResponse < 3) { - o.entities = buildUnnamed5398(); + o.entities = buildUnnamed4317(); o.language = "foo"; } buildCounterAnalyzeEntitySentimentResponse--; @@ -154,7 +154,7 @@ checkAnalyzeEntitySentimentResponse(api.AnalyzeEntitySentimentResponse o) { buildCounterAnalyzeEntitySentimentResponse++; if (buildCounterAnalyzeEntitySentimentResponse < 3) { - checkUnnamed5398(o.entities); + checkUnnamed4317(o.entities); unittest.expect(o.language, unittest.equals('foo')); } buildCounterAnalyzeEntitySentimentResponse--; @@ -181,14 +181,14 @@ buildCounterAnalyzeSentimentRequest--; } -buildUnnamed5399() { +buildUnnamed4318() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5399(core.List<api.Sentence> o) { +checkUnnamed4318(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); @@ -201,7 +201,7 @@ if (buildCounterAnalyzeSentimentResponse < 3) { o.documentSentiment = buildSentiment(); o.language = "foo"; - o.sentences = buildUnnamed5399(); + o.sentences = buildUnnamed4318(); } buildCounterAnalyzeSentimentResponse--; return o; @@ -212,7 +212,7 @@ if (buildCounterAnalyzeSentimentResponse < 3) { checkSentiment(o.documentSentiment); unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5399(o.sentences); + checkUnnamed4318(o.sentences); } buildCounterAnalyzeSentimentResponse--; } @@ -238,27 +238,27 @@ buildCounterAnalyzeSyntaxRequest--; } -buildUnnamed5400() { +buildUnnamed4319() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5400(core.List<api.Sentence> o) { +checkUnnamed4319(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); } -buildUnnamed5401() { +buildUnnamed4320() { var o = new core.List<api.Token>(); o.add(buildToken()); o.add(buildToken()); return o; } -checkUnnamed5401(core.List<api.Token> o) { +checkUnnamed4320(core.List<api.Token> o) { unittest.expect(o, unittest.hasLength(2)); checkToken(o[0]); checkToken(o[1]); @@ -270,8 +270,8 @@ buildCounterAnalyzeSyntaxResponse++; if (buildCounterAnalyzeSyntaxResponse < 3) { o.language = "foo"; - o.sentences = buildUnnamed5400(); - o.tokens = buildUnnamed5401(); + o.sentences = buildUnnamed4319(); + o.tokens = buildUnnamed4320(); } buildCounterAnalyzeSyntaxResponse--; return o; @@ -281,8 +281,8 @@ buildCounterAnalyzeSyntaxResponse++; if (buildCounterAnalyzeSyntaxResponse < 3) { unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5400(o.sentences); - checkUnnamed5401(o.tokens); + checkUnnamed4319(o.sentences); + checkUnnamed4320(o.tokens); } buildCounterAnalyzeSyntaxResponse--; } @@ -310,53 +310,53 @@ buildCounterAnnotateTextRequest--; } -buildUnnamed5402() { +buildUnnamed4321() { var o = new core.List<api.ClassificationCategory>(); o.add(buildClassificationCategory()); o.add(buildClassificationCategory()); return o; } -checkUnnamed5402(core.List<api.ClassificationCategory> o) { +checkUnnamed4321(core.List<api.ClassificationCategory> o) { unittest.expect(o, unittest.hasLength(2)); checkClassificationCategory(o[0]); checkClassificationCategory(o[1]); } -buildUnnamed5403() { +buildUnnamed4322() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5403(core.List<api.Entity> o) { +checkUnnamed4322(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); } -buildUnnamed5404() { +buildUnnamed4323() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5404(core.List<api.Sentence> o) { +checkUnnamed4323(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); } -buildUnnamed5405() { +buildUnnamed4324() { var o = new core.List<api.Token>(); o.add(buildToken()); o.add(buildToken()); return o; } -checkUnnamed5405(core.List<api.Token> o) { +checkUnnamed4324(core.List<api.Token> o) { unittest.expect(o, unittest.hasLength(2)); checkToken(o[0]); checkToken(o[1]); @@ -367,12 +367,12 @@ var o = new api.AnnotateTextResponse(); buildCounterAnnotateTextResponse++; if (buildCounterAnnotateTextResponse < 3) { - o.categories = buildUnnamed5402(); + o.categories = buildUnnamed4321(); o.documentSentiment = buildSentiment(); - o.entities = buildUnnamed5403(); + o.entities = buildUnnamed4322(); o.language = "foo"; - o.sentences = buildUnnamed5404(); - o.tokens = buildUnnamed5405(); + o.sentences = buildUnnamed4323(); + o.tokens = buildUnnamed4324(); } buildCounterAnnotateTextResponse--; return o; @@ -381,12 +381,12 @@ checkAnnotateTextResponse(api.AnnotateTextResponse o) { buildCounterAnnotateTextResponse++; if (buildCounterAnnotateTextResponse < 3) { - checkUnnamed5402(o.categories); + checkUnnamed4321(o.categories); checkSentiment(o.documentSentiment); - checkUnnamed5403(o.entities); + checkUnnamed4322(o.entities); unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5404(o.sentences); - checkUnnamed5405(o.tokens); + checkUnnamed4323(o.sentences); + checkUnnamed4324(o.tokens); } buildCounterAnnotateTextResponse--; } @@ -431,14 +431,14 @@ buildCounterClassifyTextRequest--; } -buildUnnamed5406() { +buildUnnamed4325() { var o = new core.List<api.ClassificationCategory>(); o.add(buildClassificationCategory()); o.add(buildClassificationCategory()); return o; } -checkUnnamed5406(core.List<api.ClassificationCategory> o) { +checkUnnamed4325(core.List<api.ClassificationCategory> o) { unittest.expect(o, unittest.hasLength(2)); checkClassificationCategory(o[0]); checkClassificationCategory(o[1]); @@ -449,7 +449,7 @@ var o = new api.ClassifyTextResponse(); buildCounterClassifyTextResponse++; if (buildCounterClassifyTextResponse < 3) { - o.categories = buildUnnamed5406(); + o.categories = buildUnnamed4325(); } buildCounterClassifyTextResponse--; return o; @@ -458,7 +458,7 @@ checkClassifyTextResponse(api.ClassifyTextResponse o) { buildCounterClassifyTextResponse++; if (buildCounterClassifyTextResponse < 3) { - checkUnnamed5406(o.categories); + checkUnnamed4325(o.categories); } buildCounterClassifyTextResponse--; } @@ -509,27 +509,27 @@ buildCounterDocument--; } -buildUnnamed5407() { +buildUnnamed4326() { var o = new core.List<api.EntityMention>(); o.add(buildEntityMention()); o.add(buildEntityMention()); return o; } -checkUnnamed5407(core.List<api.EntityMention> o) { +checkUnnamed4326(core.List<api.EntityMention> o) { unittest.expect(o, unittest.hasLength(2)); checkEntityMention(o[0]); checkEntityMention(o[1]); } -buildUnnamed5408() { +buildUnnamed4327() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5408(core.Map<core.String, core.String> o) { +checkUnnamed4327(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -540,8 +540,8 @@ var o = new api.Entity(); buildCounterEntity++; if (buildCounterEntity < 3) { - o.mentions = buildUnnamed5407(); - o.metadata = buildUnnamed5408(); + o.mentions = buildUnnamed4326(); + o.metadata = buildUnnamed4327(); o.name = "foo"; o.salience = 42.0; o.sentiment = buildSentiment(); @@ -554,8 +554,8 @@ checkEntity(api.Entity o) { buildCounterEntity++; if (buildCounterEntity < 3) { - checkUnnamed5407(o.mentions); - checkUnnamed5408(o.metadata); + checkUnnamed4326(o.mentions); + checkUnnamed4327(o.metadata); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.salience, unittest.equals(42.0)); checkSentiment(o.sentiment); @@ -697,7 +697,7 @@ buildCounterSentiment--; } -buildUnnamed5409() { +buildUnnamed4328() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -712,7 +712,7 @@ return o; } -checkUnnamed5409(core.Map<core.String, core.Object> o) { +checkUnnamed4328(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -726,17 +726,17 @@ unittest.expect(casted2["string"], unittest.equals('foo')); } -buildUnnamed5410() { +buildUnnamed4329() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5409()); - o.add(buildUnnamed5409()); + o.add(buildUnnamed4328()); + o.add(buildUnnamed4328()); return o; } -checkUnnamed5410(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4329(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5409(o[0]); - checkUnnamed5409(o[1]); + checkUnnamed4328(o[0]); + checkUnnamed4328(o[1]); } core.int buildCounterStatus = 0; @@ -745,7 +745,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5410(); + o.details = buildUnnamed4329(); o.message = "foo"; } buildCounterStatus--; @@ -756,7 +756,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5410(o.details); + checkUnnamed4329(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--;
diff --git a/generated/googleapis_beta/test/logging/v2beta1_test.dart b/generated/googleapis_beta/test/logging/v2beta1_test.dart index f5b078d..93fdd3c 100644 --- a/generated/googleapis_beta/test/logging/v2beta1_test.dart +++ b/generated/googleapis_beta/test/logging/v2beta1_test.dart
@@ -88,14 +88,14 @@ buildCounterEmpty--; } -buildUnnamed5101() { +buildUnnamed5015() { var o = new core.List<core.double>(); o.add(42.0); o.add(42.0); return o; } -checkUnnamed5101(core.List<core.double> o) { +checkUnnamed5015(core.List<core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42.0)); unittest.expect(o[1], unittest.equals(42.0)); @@ -106,7 +106,7 @@ var o = new api.Explicit(); buildCounterExplicit++; if (buildCounterExplicit < 3) { - o.bounds = buildUnnamed5101(); + o.bounds = buildUnnamed5015(); } buildCounterExplicit--; return o; @@ -115,7 +115,7 @@ checkExplicit(api.Explicit o) { buildCounterExplicit++; if (buildCounterExplicit < 3) { - checkUnnamed5101(o.bounds); + checkUnnamed5015(o.bounds); } buildCounterExplicit--; } @@ -236,27 +236,27 @@ buildCounterLinear--; } -buildUnnamed5102() { +buildUnnamed5016() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5102(core.List<core.String> o) { +checkUnnamed5016(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5103() { +buildUnnamed5017() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5103(core.List<core.String> o) { +checkUnnamed5017(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -271,8 +271,8 @@ o.orderBy = "foo"; o.pageSize = 42; o.pageToken = "foo"; - o.projectIds = buildUnnamed5102(); - o.resourceNames = buildUnnamed5103(); + o.projectIds = buildUnnamed5016(); + o.resourceNames = buildUnnamed5017(); } buildCounterListLogEntriesRequest--; return o; @@ -285,20 +285,20 @@ unittest.expect(o.orderBy, unittest.equals('foo')); unittest.expect(o.pageSize, unittest.equals(42)); unittest.expect(o.pageToken, unittest.equals('foo')); - checkUnnamed5102(o.projectIds); - checkUnnamed5103(o.resourceNames); + checkUnnamed5016(o.projectIds); + checkUnnamed5017(o.resourceNames); } buildCounterListLogEntriesRequest--; } -buildUnnamed5104() { +buildUnnamed5018() { var o = new core.List<api.LogEntry>(); o.add(buildLogEntry()); o.add(buildLogEntry()); return o; } -checkUnnamed5104(core.List<api.LogEntry> o) { +checkUnnamed5018(core.List<api.LogEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkLogEntry(o[0]); checkLogEntry(o[1]); @@ -309,7 +309,7 @@ var o = new api.ListLogEntriesResponse(); buildCounterListLogEntriesResponse++; if (buildCounterListLogEntriesResponse < 3) { - o.entries = buildUnnamed5104(); + o.entries = buildUnnamed5018(); o.nextPageToken = "foo"; } buildCounterListLogEntriesResponse--; @@ -319,20 +319,20 @@ checkListLogEntriesResponse(api.ListLogEntriesResponse o) { buildCounterListLogEntriesResponse++; if (buildCounterListLogEntriesResponse < 3) { - checkUnnamed5104(o.entries); + checkUnnamed5018(o.entries); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLogEntriesResponse--; } -buildUnnamed5105() { +buildUnnamed5019() { var o = new core.List<api.LogMetric>(); o.add(buildLogMetric()); o.add(buildLogMetric()); return o; } -checkUnnamed5105(core.List<api.LogMetric> o) { +checkUnnamed5019(core.List<api.LogMetric> o) { unittest.expect(o, unittest.hasLength(2)); checkLogMetric(o[0]); checkLogMetric(o[1]); @@ -343,7 +343,7 @@ var o = new api.ListLogMetricsResponse(); buildCounterListLogMetricsResponse++; if (buildCounterListLogMetricsResponse < 3) { - o.metrics = buildUnnamed5105(); + o.metrics = buildUnnamed5019(); o.nextPageToken = "foo"; } buildCounterListLogMetricsResponse--; @@ -353,54 +353,20 @@ checkListLogMetricsResponse(api.ListLogMetricsResponse o) { buildCounterListLogMetricsResponse++; if (buildCounterListLogMetricsResponse < 3) { - checkUnnamed5105(o.metrics); + checkUnnamed5019(o.metrics); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLogMetricsResponse--; } -buildUnnamed5106() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5106(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterListLogsResponse = 0; -buildListLogsResponse() { - var o = new api.ListLogsResponse(); - buildCounterListLogsResponse++; - if (buildCounterListLogsResponse < 3) { - o.logNames = buildUnnamed5106(); - o.nextPageToken = "foo"; - } - buildCounterListLogsResponse--; - return o; -} - -checkListLogsResponse(api.ListLogsResponse o) { - buildCounterListLogsResponse++; - if (buildCounterListLogsResponse < 3) { - checkUnnamed5106(o.logNames); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - } - buildCounterListLogsResponse--; -} - -buildUnnamed5107() { +buildUnnamed5020() { var o = new core.List<api.MonitoredResourceDescriptor>(); o.add(buildMonitoredResourceDescriptor()); o.add(buildMonitoredResourceDescriptor()); return o; } -checkUnnamed5107(core.List<api.MonitoredResourceDescriptor> o) { +checkUnnamed5020(core.List<api.MonitoredResourceDescriptor> o) { unittest.expect(o, unittest.hasLength(2)); checkMonitoredResourceDescriptor(o[0]); checkMonitoredResourceDescriptor(o[1]); @@ -412,7 +378,7 @@ buildCounterListMonitoredResourceDescriptorsResponse++; if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { o.nextPageToken = "foo"; - o.resourceDescriptors = buildUnnamed5107(); + o.resourceDescriptors = buildUnnamed5020(); } buildCounterListMonitoredResourceDescriptorsResponse--; return o; @@ -423,19 +389,19 @@ buildCounterListMonitoredResourceDescriptorsResponse++; if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5107(o.resourceDescriptors); + checkUnnamed5020(o.resourceDescriptors); } buildCounterListMonitoredResourceDescriptorsResponse--; } -buildUnnamed5108() { +buildUnnamed5021() { var o = new core.List<api.LogSink>(); o.add(buildLogSink()); o.add(buildLogSink()); return o; } -checkUnnamed5108(core.List<api.LogSink> o) { +checkUnnamed5021(core.List<api.LogSink> o) { unittest.expect(o, unittest.hasLength(2)); checkLogSink(o[0]); checkLogSink(o[1]); @@ -447,7 +413,7 @@ buildCounterListSinksResponse++; if (buildCounterListSinksResponse < 3) { o.nextPageToken = "foo"; - o.sinks = buildUnnamed5108(); + o.sinks = buildUnnamed5021(); } buildCounterListSinksResponse--; return o; @@ -457,12 +423,12 @@ buildCounterListSinksResponse++; if (buildCounterListSinksResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5108(o.sinks); + checkUnnamed5021(o.sinks); } buildCounterListSinksResponse--; } -buildUnnamed5109() { +buildUnnamed5022() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -477,7 +443,7 @@ return o; } -checkUnnamed5109(core.Map<core.String, core.Object> o) { +checkUnnamed5022(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -491,20 +457,20 @@ unittest.expect(casted2["string"], unittest.equals('foo')); } -buildUnnamed5110() { +buildUnnamed5023() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5110(core.Map<core.String, core.String> o) { +checkUnnamed5023(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5111() { +buildUnnamed5024() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -519,7 +485,7 @@ return o; } -checkUnnamed5111(core.Map<core.String, core.Object> o) { +checkUnnamed5024(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -540,12 +506,12 @@ if (buildCounterLogEntry < 3) { o.httpRequest = buildHttpRequest(); o.insertId = "foo"; - o.jsonPayload = buildUnnamed5109(); - o.labels = buildUnnamed5110(); + o.jsonPayload = buildUnnamed5022(); + o.labels = buildUnnamed5023(); o.logName = "foo"; o.metadata = buildMonitoredResourceMetadata(); o.operation = buildLogEntryOperation(); - o.protoPayload = buildUnnamed5111(); + o.protoPayload = buildUnnamed5024(); o.receiveTimestamp = "foo"; o.resource = buildMonitoredResource(); o.severity = "foo"; @@ -554,6 +520,7 @@ o.textPayload = "foo"; o.timestamp = "foo"; o.trace = "foo"; + o.traceSampled = true; } buildCounterLogEntry--; return o; @@ -564,12 +531,12 @@ if (buildCounterLogEntry < 3) { checkHttpRequest(o.httpRequest); unittest.expect(o.insertId, unittest.equals('foo')); - checkUnnamed5109(o.jsonPayload); - checkUnnamed5110(o.labels); + checkUnnamed5022(o.jsonPayload); + checkUnnamed5023(o.labels); unittest.expect(o.logName, unittest.equals('foo')); checkMonitoredResourceMetadata(o.metadata); checkLogEntryOperation(o.operation); - checkUnnamed5111(o.protoPayload); + checkUnnamed5024(o.protoPayload); unittest.expect(o.receiveTimestamp, unittest.equals('foo')); checkMonitoredResource(o.resource); unittest.expect(o.severity, unittest.equals('foo')); @@ -578,6 +545,7 @@ unittest.expect(o.textPayload, unittest.equals('foo')); unittest.expect(o.timestamp, unittest.equals('foo')); unittest.expect(o.trace, unittest.equals('foo')); + unittest.expect(o.traceSampled, unittest.isTrue); } buildCounterLogEntry--; } @@ -655,14 +623,14 @@ buildCounterLogLine--; } -buildUnnamed5112() { +buildUnnamed5025() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5112(core.Map<core.String, core.String> o) { +checkUnnamed5025(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -674,11 +642,13 @@ buildCounterLogMetric++; if (buildCounterLogMetric < 3) { o.bucketOptions = buildBucketOptions(); + o.createTime = "foo"; o.description = "foo"; o.filter = "foo"; - o.labelExtractors = buildUnnamed5112(); + o.labelExtractors = buildUnnamed5025(); o.metricDescriptor = buildMetricDescriptor(); o.name = "foo"; + o.updateTime = "foo"; o.valueExtractor = "foo"; o.version = "foo"; } @@ -690,11 +660,13 @@ buildCounterLogMetric++; if (buildCounterLogMetric < 3) { checkBucketOptions(o.bucketOptions); + unittest.expect(o.createTime, unittest.equals('foo')); unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.filter, unittest.equals('foo')); - checkUnnamed5112(o.labelExtractors); + checkUnnamed5025(o.labelExtractors); checkMetricDescriptor(o.metricDescriptor); unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); unittest.expect(o.valueExtractor, unittest.equals('foo')); unittest.expect(o.version, unittest.equals('foo')); } @@ -706,13 +678,13 @@ var o = new api.LogSink(); buildCounterLogSink++; if (buildCounterLogSink < 3) { + o.createTime = "foo"; o.destination = "foo"; - o.endTime = "foo"; o.filter = "foo"; o.includeChildren = true; o.name = "foo"; o.outputVersionFormat = "foo"; - o.startTime = "foo"; + o.updateTime = "foo"; o.writerIdentity = "foo"; } buildCounterLogSink--; @@ -722,26 +694,26 @@ checkLogSink(api.LogSink o) { buildCounterLogSink++; if (buildCounterLogSink < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); unittest.expect(o.destination, unittest.equals('foo')); - unittest.expect(o.endTime, unittest.equals('foo')); unittest.expect(o.filter, unittest.equals('foo')); unittest.expect(o.includeChildren, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.outputVersionFormat, unittest.equals('foo')); - unittest.expect(o.startTime, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); unittest.expect(o.writerIdentity, unittest.equals('foo')); } buildCounterLogSink--; } -buildUnnamed5113() { +buildUnnamed5026() { var o = new core.List<api.LabelDescriptor>(); o.add(buildLabelDescriptor()); o.add(buildLabelDescriptor()); return o; } -checkUnnamed5113(core.List<api.LabelDescriptor> o) { +checkUnnamed5026(core.List<api.LabelDescriptor> o) { unittest.expect(o, unittest.hasLength(2)); checkLabelDescriptor(o[0]); checkLabelDescriptor(o[1]); @@ -754,7 +726,7 @@ if (buildCounterMetricDescriptor < 3) { o.description = "foo"; o.displayName = "foo"; - o.labels = buildUnnamed5113(); + o.labels = buildUnnamed5026(); o.metadata = buildMetricDescriptorMetadata(); o.metricKind = "foo"; o.name = "foo"; @@ -771,7 +743,7 @@ if (buildCounterMetricDescriptor < 3) { unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5113(o.labels); + checkUnnamed5026(o.labels); checkMetricDescriptorMetadata(o.metadata); unittest.expect(o.metricKind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); @@ -805,14 +777,14 @@ buildCounterMetricDescriptorMetadata--; } -buildUnnamed5114() { +buildUnnamed5027() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5114(core.Map<core.String, core.String> o) { +checkUnnamed5027(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -823,7 +795,7 @@ var o = new api.MonitoredResource(); buildCounterMonitoredResource++; if (buildCounterMonitoredResource < 3) { - o.labels = buildUnnamed5114(); + o.labels = buildUnnamed5027(); o.type = "foo"; } buildCounterMonitoredResource--; @@ -833,20 +805,20 @@ checkMonitoredResource(api.MonitoredResource o) { buildCounterMonitoredResource++; if (buildCounterMonitoredResource < 3) { - checkUnnamed5114(o.labels); + checkUnnamed5027(o.labels); unittest.expect(o.type, unittest.equals('foo')); } buildCounterMonitoredResource--; } -buildUnnamed5115() { +buildUnnamed5028() { var o = new core.List<api.LabelDescriptor>(); o.add(buildLabelDescriptor()); o.add(buildLabelDescriptor()); return o; } -checkUnnamed5115(core.List<api.LabelDescriptor> o) { +checkUnnamed5028(core.List<api.LabelDescriptor> o) { unittest.expect(o, unittest.hasLength(2)); checkLabelDescriptor(o[0]); checkLabelDescriptor(o[1]); @@ -859,7 +831,7 @@ if (buildCounterMonitoredResourceDescriptor < 3) { o.description = "foo"; o.displayName = "foo"; - o.labels = buildUnnamed5115(); + o.labels = buildUnnamed5028(); o.name = "foo"; o.type = "foo"; } @@ -872,14 +844,14 @@ if (buildCounterMonitoredResourceDescriptor < 3) { unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5115(o.labels); + checkUnnamed5028(o.labels); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.type, unittest.equals('foo')); } buildCounterMonitoredResourceDescriptor--; } -buildUnnamed5116() { +buildUnnamed5029() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -894,7 +866,7 @@ return o; } -checkUnnamed5116(core.Map<core.String, core.Object> o) { +checkUnnamed5029(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -908,14 +880,14 @@ unittest.expect(casted6["string"], unittest.equals('foo')); } -buildUnnamed5117() { +buildUnnamed5030() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5117(core.Map<core.String, core.String> o) { +checkUnnamed5030(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -926,8 +898,8 @@ var o = new api.MonitoredResourceMetadata(); buildCounterMonitoredResourceMetadata++; if (buildCounterMonitoredResourceMetadata < 3) { - o.systemLabels = buildUnnamed5116(); - o.userLabels = buildUnnamed5117(); + o.systemLabels = buildUnnamed5029(); + o.userLabels = buildUnnamed5030(); } buildCounterMonitoredResourceMetadata--; return o; @@ -936,33 +908,33 @@ checkMonitoredResourceMetadata(api.MonitoredResourceMetadata o) { buildCounterMonitoredResourceMetadata++; if (buildCounterMonitoredResourceMetadata < 3) { - checkUnnamed5116(o.systemLabels); - checkUnnamed5117(o.userLabels); + checkUnnamed5029(o.systemLabels); + checkUnnamed5030(o.userLabels); } buildCounterMonitoredResourceMetadata--; } -buildUnnamed5118() { +buildUnnamed5031() { var o = new core.List<api.LogLine>(); o.add(buildLogLine()); o.add(buildLogLine()); return o; } -checkUnnamed5118(core.List<api.LogLine> o) { +checkUnnamed5031(core.List<api.LogLine> o) { unittest.expect(o, unittest.hasLength(2)); checkLogLine(o[0]); checkLogLine(o[1]); } -buildUnnamed5119() { +buildUnnamed5032() { var o = new core.List<api.SourceReference>(); o.add(buildSourceReference()); o.add(buildSourceReference()); return o; } -checkUnnamed5119(core.List<api.SourceReference> o) { +checkUnnamed5032(core.List<api.SourceReference> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceReference(o[0]); checkSourceReference(o[1]); @@ -985,7 +957,7 @@ o.instanceIndex = 42; o.ip = "foo"; o.latency = "foo"; - o.line = buildUnnamed5118(); + o.line = buildUnnamed5031(); o.megaCycles = "foo"; o.method = "foo"; o.moduleId = "foo"; @@ -995,7 +967,7 @@ o.requestId = "foo"; o.resource = "foo"; o.responseSize = "foo"; - o.sourceReference = buildUnnamed5119(); + o.sourceReference = buildUnnamed5032(); o.startTime = "foo"; o.status = 42; o.taskName = "foo"; @@ -1026,7 +998,7 @@ unittest.expect(o.instanceIndex, unittest.equals(42)); unittest.expect(o.ip, unittest.equals('foo')); unittest.expect(o.latency, unittest.equals('foo')); - checkUnnamed5118(o.line); + checkUnnamed5031(o.line); unittest.expect(o.megaCycles, unittest.equals('foo')); unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.moduleId, unittest.equals('foo')); @@ -1036,7 +1008,7 @@ unittest.expect(o.requestId, unittest.equals('foo')); unittest.expect(o.resource, unittest.equals('foo')); unittest.expect(o.responseSize, unittest.equals('foo')); - checkUnnamed5119(o.sourceReference); + checkUnnamed5032(o.sourceReference); unittest.expect(o.startTime, unittest.equals('foo')); unittest.expect(o.status, unittest.equals(42)); unittest.expect(o.taskName, unittest.equals('foo')); @@ -1095,27 +1067,27 @@ buildCounterSourceReference--; } -buildUnnamed5120() { +buildUnnamed5033() { var o = new core.List<api.LogEntry>(); o.add(buildLogEntry()); o.add(buildLogEntry()); return o; } -checkUnnamed5120(core.List<api.LogEntry> o) { +checkUnnamed5033(core.List<api.LogEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkLogEntry(o[0]); checkLogEntry(o[1]); } -buildUnnamed5121() { +buildUnnamed5034() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5121(core.Map<core.String, core.String> o) { +checkUnnamed5034(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1127,8 +1099,8 @@ buildCounterWriteLogEntriesRequest++; if (buildCounterWriteLogEntriesRequest < 3) { o.dryRun = true; - o.entries = buildUnnamed5120(); - o.labels = buildUnnamed5121(); + o.entries = buildUnnamed5033(); + o.labels = buildUnnamed5034(); o.logName = "foo"; o.partialSuccess = true; o.resource = buildMonitoredResource(); @@ -1141,8 +1113,8 @@ buildCounterWriteLogEntriesRequest++; if (buildCounterWriteLogEntriesRequest < 3) { unittest.expect(o.dryRun, unittest.isTrue); - checkUnnamed5120(o.entries); - checkUnnamed5121(o.labels); + checkUnnamed5033(o.entries); + checkUnnamed5034(o.labels); unittest.expect(o.logName, unittest.equals('foo')); unittest.expect(o.partialSuccess, unittest.isTrue); checkMonitoredResource(o.resource); @@ -1246,14 +1218,6 @@ }); }); - unittest.group("obj-schema-ListLogsResponse", () { - unittest.test("to-json--from-json", () { - var o = buildListLogsResponse(); - var od = new api.ListLogsResponse.fromJson(o.toJson()); - checkListLogsResponse(od); - }); - }); - unittest.group("obj-schema-ListMonitoredResourceDescriptorsResponse", () { unittest.test("to-json--from-json", () { var o = buildListMonitoredResourceDescriptorsResponse(); @@ -1399,121 +1363,6 @@ }); }); - unittest.group("resource-BillingAccountsLogsResourceApi", () { - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.BillingAccountsLogsResourceApi res = - new api.LoggingApi(mock).billingAccounts.logs; - var arg_logName = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildEmpty()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_logName, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkEmpty(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.BillingAccountsLogsResourceApi res = - new api.LoggingApi(mock).billingAccounts.logs; - var arg_parent = "foo"; - var arg_pageToken = "foo"; - var arg_pageSize = 42; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildListLogsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_parent, - pageToken: arg_pageToken, - pageSize: arg_pageSize, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkListLogsResponse(response); - }))); - }); - }); - unittest.group("resource-EntriesResourceApi", () { unittest.test("method--list", () { var mock = new HttpServerMock(); @@ -1627,8 +1476,8 @@ var mock = new HttpServerMock(); api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock).monitoredResourceDescriptors; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1660,10 +1509,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1675,8 +1524,8 @@ }), true); res .list( - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListMonitoredResourceDescriptorsResponse(response); @@ -1684,234 +1533,6 @@ }); }); - unittest.group("resource-OrganizationsLogsResourceApi", () { - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.OrganizationsLogsResourceApi res = - new api.LoggingApi(mock).organizations.logs; - var arg_logName = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildEmpty()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_logName, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkEmpty(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.OrganizationsLogsResourceApi res = - new api.LoggingApi(mock).organizations.logs; - var arg_parent = "foo"; - var arg_pageToken = "foo"; - var arg_pageSize = 42; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildListLogsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_parent, - pageToken: arg_pageToken, - pageSize: arg_pageSize, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkListLogsResponse(response); - }))); - }); - }); - - unittest.group("resource-ProjectsLogsResourceApi", () { - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; - var arg_logName = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildEmpty()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_logName, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkEmpty(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; - var arg_parent = "foo"; - var arg_pageToken = "foo"; - var arg_pageSize = 42; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildListLogsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_parent, - pageToken: arg_pageToken, - pageSize: arg_pageSize, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkListLogsResponse(response); - }))); - }); - }); - unittest.group("resource-ProjectsMetricsResourceApi", () { unittest.test("method--create", () { var mock = new HttpServerMock(); @@ -2078,8 +1699,8 @@ api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.metrics; var arg_parent = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -2112,10 +1733,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -2126,8 +1747,8 @@ }), true); res .list(arg_parent, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLogMetricsResponse(response);
diff --git a/generated/googleapis_beta/test/oslogin/v1alpha_test.dart b/generated/googleapis_beta/test/oslogin/v1alpha_test.dart index 72b9ba1..be105b2 100644 --- a/generated/googleapis_beta/test/oslogin/v1alpha_test.dart +++ b/generated/googleapis_beta/test/oslogin/v1alpha_test.dart
@@ -84,27 +84,27 @@ buildCounterImportSshPublicKeyResponse--; } -buildUnnamed5357() { +buildUnnamed4983() { var o = new core.List<api.PosixAccount>(); o.add(buildPosixAccount()); o.add(buildPosixAccount()); return o; } -checkUnnamed5357(core.List<api.PosixAccount> o) { +checkUnnamed4983(core.List<api.PosixAccount> o) { unittest.expect(o, unittest.hasLength(2)); checkPosixAccount(o[0]); checkPosixAccount(o[1]); } -buildUnnamed5358() { +buildUnnamed4984() { var o = new core.Map<core.String, api.SshPublicKey>(); o["x"] = buildSshPublicKey(); o["y"] = buildSshPublicKey(); return o; } -checkUnnamed5358(core.Map<core.String, api.SshPublicKey> o) { +checkUnnamed4984(core.Map<core.String, api.SshPublicKey> o) { unittest.expect(o, unittest.hasLength(2)); checkSshPublicKey(o["x"]); checkSshPublicKey(o["y"]); @@ -116,8 +116,8 @@ buildCounterLoginProfile++; if (buildCounterLoginProfile < 3) { o.name = "foo"; - o.posixAccounts = buildUnnamed5357(); - o.sshPublicKeys = buildUnnamed5358(); + o.posixAccounts = buildUnnamed4983(); + o.sshPublicKeys = buildUnnamed4984(); } buildCounterLoginProfile--; return o; @@ -127,8 +127,8 @@ buildCounterLoginProfile++; if (buildCounterLoginProfile < 3) { unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5357(o.posixAccounts); - checkUnnamed5358(o.sshPublicKeys); + checkUnnamed4983(o.posixAccounts); + checkUnnamed4984(o.sshPublicKeys); } buildCounterLoginProfile--; } @@ -239,6 +239,9 @@ var mock = new HttpServerMock(); api.UsersResourceApi res = new api.OsloginApi(mock).users; var arg_name = "foo"; + var arg_operatingSystemType = "foo"; + var arg_projectId = "foo"; + var arg_systemId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -271,6 +274,12 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["operatingSystemType"].first, + unittest.equals(arg_operatingSystemType)); + unittest.expect( + queryMap["projectId"].first, unittest.equals(arg_projectId)); + unittest.expect( + queryMap["systemId"].first, unittest.equals(arg_systemId)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -280,7 +289,11 @@ return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .getLoginProfile(arg_name, $fields: arg_$fields) + .getLoginProfile(arg_name, + operatingSystemType: arg_operatingSystemType, + projectId: arg_projectId, + systemId: arg_systemId, + $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkLoginProfile(response); })));
diff --git a/generated/googleapis_beta/test/oslogin/v1beta_test.dart b/generated/googleapis_beta/test/oslogin/v1beta_test.dart index 9758009..b5bacf3 100644 --- a/generated/googleapis_beta/test/oslogin/v1beta_test.dart +++ b/generated/googleapis_beta/test/oslogin/v1beta_test.dart
@@ -84,27 +84,27 @@ buildCounterImportSshPublicKeyResponse--; } -buildUnnamed5578() { +buildUnnamed4985() { var o = new core.List<api.PosixAccount>(); o.add(buildPosixAccount()); o.add(buildPosixAccount()); return o; } -checkUnnamed5578(core.List<api.PosixAccount> o) { +checkUnnamed4985(core.List<api.PosixAccount> o) { unittest.expect(o, unittest.hasLength(2)); checkPosixAccount(o[0]); checkPosixAccount(o[1]); } -buildUnnamed5579() { +buildUnnamed4986() { var o = new core.Map<core.String, api.SshPublicKey>(); o["x"] = buildSshPublicKey(); o["y"] = buildSshPublicKey(); return o; } -checkUnnamed5579(core.Map<core.String, api.SshPublicKey> o) { +checkUnnamed4986(core.Map<core.String, api.SshPublicKey> o) { unittest.expect(o, unittest.hasLength(2)); checkSshPublicKey(o["x"]); checkSshPublicKey(o["y"]); @@ -116,8 +116,8 @@ buildCounterLoginProfile++; if (buildCounterLoginProfile < 3) { o.name = "foo"; - o.posixAccounts = buildUnnamed5578(); - o.sshPublicKeys = buildUnnamed5579(); + o.posixAccounts = buildUnnamed4985(); + o.sshPublicKeys = buildUnnamed4986(); } buildCounterLoginProfile--; return o; @@ -127,8 +127,8 @@ buildCounterLoginProfile++; if (buildCounterLoginProfile < 3) { unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5578(o.posixAccounts); - checkUnnamed5579(o.sshPublicKeys); + checkUnnamed4985(o.posixAccounts); + checkUnnamed4986(o.sshPublicKeys); } buildCounterLoginProfile--; } @@ -239,6 +239,8 @@ var mock = new HttpServerMock(); api.UsersResourceApi res = new api.OsloginApi(mock).users; var arg_name = "foo"; + var arg_projectId = "foo"; + var arg_systemId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -271,6 +273,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["projectId"].first, unittest.equals(arg_projectId)); + unittest.expect( + queryMap["systemId"].first, unittest.equals(arg_systemId)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -280,7 +286,10 @@ return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .getLoginProfile(arg_name, $fields: arg_$fields) + .getLoginProfile(arg_name, + projectId: arg_projectId, + systemId: arg_systemId, + $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkLoginProfile(response); })));
diff --git a/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart b/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart index 0c25393..00496bd 100644 --- a/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart +++ b/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart
@@ -94,14 +94,14 @@ buildCounterAttachmentInfo--; } -buildUnnamed5624() { +buildUnnamed4620() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5624(core.Map<core.String, core.String> o) { +checkUnnamed4620(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -120,7 +120,7 @@ o.indoorLevel = buildIndoorLevel(); o.latLng = buildLatLng(); o.placeId = "foo"; - o.properties = buildUnnamed5624(); + o.properties = buildUnnamed4620(); o.provisioningKey = "foo"; o.status = "foo"; } @@ -139,7 +139,7 @@ checkIndoorLevel(o.indoorLevel); checkLatLng(o.latLng); unittest.expect(o.placeId, unittest.equals('foo')); - checkUnnamed5624(o.properties); + checkUnnamed4620(o.properties); unittest.expect(o.provisioningKey, unittest.equals('foo')); unittest.expect(o.status, unittest.equals('foo')); } @@ -173,14 +173,14 @@ buildCounterBeaconAttachment--; } -buildUnnamed5625() { +buildUnnamed4621() { var o = new core.List<api.AttachmentInfo>(); o.add(buildAttachmentInfo()); o.add(buildAttachmentInfo()); return o; } -checkUnnamed5625(core.List<api.AttachmentInfo> o) { +checkUnnamed4621(core.List<api.AttachmentInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkAttachmentInfo(o[0]); checkAttachmentInfo(o[1]); @@ -192,7 +192,7 @@ buildCounterBeaconInfo++; if (buildCounterBeaconInfo < 3) { o.advertisedId = buildAdvertisedId(); - o.attachments = buildUnnamed5625(); + o.attachments = buildUnnamed4621(); o.beaconName = "foo"; } buildCounterBeaconInfo--; @@ -203,7 +203,7 @@ buildCounterBeaconInfo++; if (buildCounterBeaconInfo < 3) { checkAdvertisedId(o.advertisedId); - checkUnnamed5625(o.attachments); + checkUnnamed4621(o.attachments); unittest.expect(o.beaconName, unittest.equals('foo')); } buildCounterBeaconInfo--; @@ -251,14 +251,14 @@ buildCounterDeleteAttachmentsResponse--; } -buildUnnamed5626() { +buildUnnamed4622() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5626(core.List<core.String> o) { +checkUnnamed4622(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -269,7 +269,7 @@ var o = new api.Diagnostics(); buildCounterDiagnostics++; if (buildCounterDiagnostics < 3) { - o.alerts = buildUnnamed5626(); + o.alerts = buildUnnamed4622(); o.beaconName = "foo"; o.estimatedLowBatteryDate = buildDate(); } @@ -280,7 +280,7 @@ checkDiagnostics(api.Diagnostics o) { buildCounterDiagnostics++; if (buildCounterDiagnostics < 3) { - checkUnnamed5626(o.alerts); + checkUnnamed4622(o.alerts); unittest.expect(o.beaconName, unittest.equals('foo')); checkDate(o.estimatedLowBatteryDate); } @@ -354,27 +354,27 @@ buildCounterEphemeralIdRegistrationParams--; } -buildUnnamed5627() { +buildUnnamed4623() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5627(core.List<core.String> o) { +checkUnnamed4623(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5628() { +buildUnnamed4624() { var o = new core.List<api.Observation>(); o.add(buildObservation()); o.add(buildObservation()); return o; } -checkUnnamed5628(core.List<api.Observation> o) { +checkUnnamed4624(core.List<api.Observation> o) { unittest.expect(o, unittest.hasLength(2)); checkObservation(o[0]); checkObservation(o[1]); @@ -385,8 +385,8 @@ var o = new api.GetInfoForObservedBeaconsRequest(); buildCounterGetInfoForObservedBeaconsRequest++; if (buildCounterGetInfoForObservedBeaconsRequest < 3) { - o.namespacedTypes = buildUnnamed5627(); - o.observations = buildUnnamed5628(); + o.namespacedTypes = buildUnnamed4623(); + o.observations = buildUnnamed4624(); } buildCounterGetInfoForObservedBeaconsRequest--; return o; @@ -395,20 +395,20 @@ checkGetInfoForObservedBeaconsRequest(api.GetInfoForObservedBeaconsRequest o) { buildCounterGetInfoForObservedBeaconsRequest++; if (buildCounterGetInfoForObservedBeaconsRequest < 3) { - checkUnnamed5627(o.namespacedTypes); - checkUnnamed5628(o.observations); + checkUnnamed4623(o.namespacedTypes); + checkUnnamed4624(o.observations); } buildCounterGetInfoForObservedBeaconsRequest--; } -buildUnnamed5629() { +buildUnnamed4625() { var o = new core.List<api.BeaconInfo>(); o.add(buildBeaconInfo()); o.add(buildBeaconInfo()); return o; } -checkUnnamed5629(core.List<api.BeaconInfo> o) { +checkUnnamed4625(core.List<api.BeaconInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkBeaconInfo(o[0]); checkBeaconInfo(o[1]); @@ -419,7 +419,7 @@ var o = new api.GetInfoForObservedBeaconsResponse(); buildCounterGetInfoForObservedBeaconsResponse++; if (buildCounterGetInfoForObservedBeaconsResponse < 3) { - o.beacons = buildUnnamed5629(); + o.beacons = buildUnnamed4625(); } buildCounterGetInfoForObservedBeaconsResponse--; return o; @@ -429,7 +429,7 @@ api.GetInfoForObservedBeaconsResponse o) { buildCounterGetInfoForObservedBeaconsResponse++; if (buildCounterGetInfoForObservedBeaconsResponse < 3) { - checkUnnamed5629(o.beacons); + checkUnnamed4625(o.beacons); } buildCounterGetInfoForObservedBeaconsResponse--; } @@ -474,14 +474,14 @@ buildCounterLatLng--; } -buildUnnamed5630() { +buildUnnamed4626() { var o = new core.List<api.BeaconAttachment>(); o.add(buildBeaconAttachment()); o.add(buildBeaconAttachment()); return o; } -checkUnnamed5630(core.List<api.BeaconAttachment> o) { +checkUnnamed4626(core.List<api.BeaconAttachment> o) { unittest.expect(o, unittest.hasLength(2)); checkBeaconAttachment(o[0]); checkBeaconAttachment(o[1]); @@ -492,7 +492,7 @@ var o = new api.ListBeaconAttachmentsResponse(); buildCounterListBeaconAttachmentsResponse++; if (buildCounterListBeaconAttachmentsResponse < 3) { - o.attachments = buildUnnamed5630(); + o.attachments = buildUnnamed4626(); } buildCounterListBeaconAttachmentsResponse--; return o; @@ -501,19 +501,19 @@ checkListBeaconAttachmentsResponse(api.ListBeaconAttachmentsResponse o) { buildCounterListBeaconAttachmentsResponse++; if (buildCounterListBeaconAttachmentsResponse < 3) { - checkUnnamed5630(o.attachments); + checkUnnamed4626(o.attachments); } buildCounterListBeaconAttachmentsResponse--; } -buildUnnamed5631() { +buildUnnamed4627() { var o = new core.List<api.Beacon>(); o.add(buildBeacon()); o.add(buildBeacon()); return o; } -checkUnnamed5631(core.List<api.Beacon> o) { +checkUnnamed4627(core.List<api.Beacon> o) { unittest.expect(o, unittest.hasLength(2)); checkBeacon(o[0]); checkBeacon(o[1]); @@ -524,7 +524,7 @@ var o = new api.ListBeaconsResponse(); buildCounterListBeaconsResponse++; if (buildCounterListBeaconsResponse < 3) { - o.beacons = buildUnnamed5631(); + o.beacons = buildUnnamed4627(); o.nextPageToken = "foo"; o.totalCount = "foo"; } @@ -535,21 +535,21 @@ checkListBeaconsResponse(api.ListBeaconsResponse o) { buildCounterListBeaconsResponse++; if (buildCounterListBeaconsResponse < 3) { - checkUnnamed5631(o.beacons); + checkUnnamed4627(o.beacons); unittest.expect(o.nextPageToken, unittest.equals('foo')); unittest.expect(o.totalCount, unittest.equals('foo')); } buildCounterListBeaconsResponse--; } -buildUnnamed5632() { +buildUnnamed4628() { var o = new core.List<api.Diagnostics>(); o.add(buildDiagnostics()); o.add(buildDiagnostics()); return o; } -checkUnnamed5632(core.List<api.Diagnostics> o) { +checkUnnamed4628(core.List<api.Diagnostics> o) { unittest.expect(o, unittest.hasLength(2)); checkDiagnostics(o[0]); checkDiagnostics(o[1]); @@ -560,7 +560,7 @@ var o = new api.ListDiagnosticsResponse(); buildCounterListDiagnosticsResponse++; if (buildCounterListDiagnosticsResponse < 3) { - o.diagnostics = buildUnnamed5632(); + o.diagnostics = buildUnnamed4628(); o.nextPageToken = "foo"; } buildCounterListDiagnosticsResponse--; @@ -570,20 +570,20 @@ checkListDiagnosticsResponse(api.ListDiagnosticsResponse o) { buildCounterListDiagnosticsResponse++; if (buildCounterListDiagnosticsResponse < 3) { - checkUnnamed5632(o.diagnostics); + checkUnnamed4628(o.diagnostics); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListDiagnosticsResponse--; } -buildUnnamed5633() { +buildUnnamed4629() { var o = new core.List<api.Namespace>(); o.add(buildNamespace()); o.add(buildNamespace()); return o; } -checkUnnamed5633(core.List<api.Namespace> o) { +checkUnnamed4629(core.List<api.Namespace> o) { unittest.expect(o, unittest.hasLength(2)); checkNamespace(o[0]); checkNamespace(o[1]); @@ -594,7 +594,7 @@ var o = new api.ListNamespacesResponse(); buildCounterListNamespacesResponse++; if (buildCounterListNamespacesResponse < 3) { - o.namespaces = buildUnnamed5633(); + o.namespaces = buildUnnamed4629(); } buildCounterListNamespacesResponse--; return o; @@ -603,7 +603,7 @@ checkListNamespacesResponse(api.ListNamespacesResponse o) { buildCounterListNamespacesResponse++; if (buildCounterListNamespacesResponse < 3) { - checkUnnamed5633(o.namespaces); + checkUnnamed4629(o.namespaces); } buildCounterListNamespacesResponse--; } @@ -1156,10 +1156,10 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; - var arg_pageToken = "foo"; var arg_q = "foo"; var arg_pageSize = 42; var arg_projectId = "foo"; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1191,13 +1191,13 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect( queryMap["projectId"].first, unittest.equals(arg_projectId)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1208,10 +1208,10 @@ }), true); res .list( - pageToken: arg_pageToken, q: arg_q, pageSize: arg_pageSize, projectId: arg_projectId, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListBeaconsResponse(response); @@ -1340,8 +1340,8 @@ api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).beacons.attachments; var arg_beaconName = "foo"; - var arg_projectId = "foo"; var arg_namespacedType = "foo"; + var arg_projectId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1374,10 +1374,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["projectId"].first, unittest.equals(arg_projectId)); unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_namespacedType)); + unittest.expect( + queryMap["projectId"].first, unittest.equals(arg_projectId)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1388,8 +1388,8 @@ }), true); res .batchDelete(arg_beaconName, - projectId: arg_projectId, namespacedType: arg_namespacedType, + projectId: arg_projectId, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkDeleteAttachmentsResponse(response); @@ -1517,8 +1517,8 @@ api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).beacons.attachments; var arg_beaconName = "foo"; - var arg_namespacedType = "foo"; var arg_projectId = "foo"; + var arg_namespacedType = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1551,10 +1551,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(queryMap["namespacedType"].first, - unittest.equals(arg_namespacedType)); unittest.expect( queryMap["projectId"].first, unittest.equals(arg_projectId)); + unittest.expect(queryMap["namespacedType"].first, + unittest.equals(arg_namespacedType)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1565,8 +1565,8 @@ }), true); res .list(arg_beaconName, - namespacedType: arg_namespacedType, projectId: arg_projectId, + namespacedType: arg_namespacedType, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListBeaconAttachmentsResponse(response);
diff --git a/generated/googleapis_beta/test/pubsub/v1beta2_test.dart b/generated/googleapis_beta/test/pubsub/v1beta2_test.dart index 2d0f82f..6a45f7b 100644 --- a/generated/googleapis_beta/test/pubsub/v1beta2_test.dart +++ b/generated/googleapis_beta/test/pubsub/v1beta2_test.dart
@@ -50,14 +50,14 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5422() { +buildUnnamed4496() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5422(core.List<core.String> o) { +checkUnnamed4496(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -68,7 +68,7 @@ var o = new api.AcknowledgeRequest(); buildCounterAcknowledgeRequest++; if (buildCounterAcknowledgeRequest < 3) { - o.ackIds = buildUnnamed5422(); + o.ackIds = buildUnnamed4496(); } buildCounterAcknowledgeRequest--; return o; @@ -77,19 +77,19 @@ checkAcknowledgeRequest(api.AcknowledgeRequest o) { buildCounterAcknowledgeRequest++; if (buildCounterAcknowledgeRequest < 3) { - checkUnnamed5422(o.ackIds); + checkUnnamed4496(o.ackIds); } buildCounterAcknowledgeRequest--; } -buildUnnamed5423() { +buildUnnamed4497() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5423(core.List<core.String> o) { +checkUnnamed4497(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -101,7 +101,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5423(); + o.members = buildUnnamed4497(); o.role = "foo"; } buildCounterBinding--; @@ -112,7 +112,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5423(o.members); + checkUnnamed4497(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; @@ -158,14 +158,14 @@ buildCounterExpr--; } -buildUnnamed5424() { +buildUnnamed4498() { var o = new core.List<api.Subscription>(); o.add(buildSubscription()); o.add(buildSubscription()); return o; } -checkUnnamed5424(core.List<api.Subscription> o) { +checkUnnamed4498(core.List<api.Subscription> o) { unittest.expect(o, unittest.hasLength(2)); checkSubscription(o[0]); checkSubscription(o[1]); @@ -177,7 +177,7 @@ buildCounterListSubscriptionsResponse++; if (buildCounterListSubscriptionsResponse < 3) { o.nextPageToken = "foo"; - o.subscriptions = buildUnnamed5424(); + o.subscriptions = buildUnnamed4498(); } buildCounterListSubscriptionsResponse--; return o; @@ -187,19 +187,19 @@ buildCounterListSubscriptionsResponse++; if (buildCounterListSubscriptionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5424(o.subscriptions); + checkUnnamed4498(o.subscriptions); } buildCounterListSubscriptionsResponse--; } -buildUnnamed5425() { +buildUnnamed4499() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5425(core.List<core.String> o) { +checkUnnamed4499(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -211,7 +211,7 @@ buildCounterListTopicSubscriptionsResponse++; if (buildCounterListTopicSubscriptionsResponse < 3) { o.nextPageToken = "foo"; - o.subscriptions = buildUnnamed5425(); + o.subscriptions = buildUnnamed4499(); } buildCounterListTopicSubscriptionsResponse--; return o; @@ -221,19 +221,19 @@ buildCounterListTopicSubscriptionsResponse++; if (buildCounterListTopicSubscriptionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5425(o.subscriptions); + checkUnnamed4499(o.subscriptions); } buildCounterListTopicSubscriptionsResponse--; } -buildUnnamed5426() { +buildUnnamed4500() { var o = new core.List<api.Topic>(); o.add(buildTopic()); o.add(buildTopic()); return o; } -checkUnnamed5426(core.List<api.Topic> o) { +checkUnnamed4500(core.List<api.Topic> o) { unittest.expect(o, unittest.hasLength(2)); checkTopic(o[0]); checkTopic(o[1]); @@ -245,7 +245,7 @@ buildCounterListTopicsResponse++; if (buildCounterListTopicsResponse < 3) { o.nextPageToken = "foo"; - o.topics = buildUnnamed5426(); + o.topics = buildUnnamed4500(); } buildCounterListTopicsResponse--; return o; @@ -255,19 +255,19 @@ buildCounterListTopicsResponse++; if (buildCounterListTopicsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5426(o.topics); + checkUnnamed4500(o.topics); } buildCounterListTopicsResponse--; } -buildUnnamed5427() { +buildUnnamed4501() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5427(core.List<core.String> o) { +checkUnnamed4501(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -280,7 +280,7 @@ if (buildCounterModifyAckDeadlineRequest < 3) { o.ackDeadlineSeconds = 42; o.ackId = "foo"; - o.ackIds = buildUnnamed5427(); + o.ackIds = buildUnnamed4501(); } buildCounterModifyAckDeadlineRequest--; return o; @@ -291,7 +291,7 @@ if (buildCounterModifyAckDeadlineRequest < 3) { unittest.expect(o.ackDeadlineSeconds, unittest.equals(42)); unittest.expect(o.ackId, unittest.equals('foo')); - checkUnnamed5427(o.ackIds); + checkUnnamed4501(o.ackIds); } buildCounterModifyAckDeadlineRequest--; } @@ -315,14 +315,14 @@ buildCounterModifyPushConfigRequest--; } -buildUnnamed5428() { +buildUnnamed4502() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5428(core.List<api.Binding> o) { +checkUnnamed4502(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -333,7 +333,7 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.bindings = buildUnnamed5428(); + o.bindings = buildUnnamed4502(); o.etag = "foo"; o.version = 42; } @@ -344,21 +344,21 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5428(o.bindings); + checkUnnamed4502(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } buildCounterPolicy--; } -buildUnnamed5429() { +buildUnnamed4503() { var o = new core.List<api.PubsubMessage>(); o.add(buildPubsubMessage()); o.add(buildPubsubMessage()); return o; } -checkUnnamed5429(core.List<api.PubsubMessage> o) { +checkUnnamed4503(core.List<api.PubsubMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkPubsubMessage(o[0]); checkPubsubMessage(o[1]); @@ -369,7 +369,7 @@ var o = new api.PublishRequest(); buildCounterPublishRequest++; if (buildCounterPublishRequest < 3) { - o.messages = buildUnnamed5429(); + o.messages = buildUnnamed4503(); } buildCounterPublishRequest--; return o; @@ -378,19 +378,19 @@ checkPublishRequest(api.PublishRequest o) { buildCounterPublishRequest++; if (buildCounterPublishRequest < 3) { - checkUnnamed5429(o.messages); + checkUnnamed4503(o.messages); } buildCounterPublishRequest--; } -buildUnnamed5430() { +buildUnnamed4504() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5430(core.List<core.String> o) { +checkUnnamed4504(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -401,7 +401,7 @@ var o = new api.PublishResponse(); buildCounterPublishResponse++; if (buildCounterPublishResponse < 3) { - o.messageIds = buildUnnamed5430(); + o.messageIds = buildUnnamed4504(); } buildCounterPublishResponse--; return o; @@ -410,19 +410,19 @@ checkPublishResponse(api.PublishResponse o) { buildCounterPublishResponse++; if (buildCounterPublishResponse < 3) { - checkUnnamed5430(o.messageIds); + checkUnnamed4504(o.messageIds); } buildCounterPublishResponse--; } -buildUnnamed5431() { +buildUnnamed4505() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5431(core.Map<core.String, core.String> o) { +checkUnnamed4505(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -433,7 +433,7 @@ var o = new api.PubsubMessage(); buildCounterPubsubMessage++; if (buildCounterPubsubMessage < 3) { - o.attributes = buildUnnamed5431(); + o.attributes = buildUnnamed4505(); o.data = "foo"; o.messageId = "foo"; o.publishTime = "foo"; @@ -445,7 +445,7 @@ checkPubsubMessage(api.PubsubMessage o) { buildCounterPubsubMessage++; if (buildCounterPubsubMessage < 3) { - checkUnnamed5431(o.attributes); + checkUnnamed4505(o.attributes); unittest.expect(o.data, unittest.equals('foo')); unittest.expect(o.messageId, unittest.equals('foo')); unittest.expect(o.publishTime, unittest.equals('foo')); @@ -474,14 +474,14 @@ buildCounterPullRequest--; } -buildUnnamed5432() { +buildUnnamed4506() { var o = new core.List<api.ReceivedMessage>(); o.add(buildReceivedMessage()); o.add(buildReceivedMessage()); return o; } -checkUnnamed5432(core.List<api.ReceivedMessage> o) { +checkUnnamed4506(core.List<api.ReceivedMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkReceivedMessage(o[0]); checkReceivedMessage(o[1]); @@ -492,7 +492,7 @@ var o = new api.PullResponse(); buildCounterPullResponse++; if (buildCounterPullResponse < 3) { - o.receivedMessages = buildUnnamed5432(); + o.receivedMessages = buildUnnamed4506(); } buildCounterPullResponse--; return o; @@ -501,19 +501,19 @@ checkPullResponse(api.PullResponse o) { buildCounterPullResponse++; if (buildCounterPullResponse < 3) { - checkUnnamed5432(o.receivedMessages); + checkUnnamed4506(o.receivedMessages); } buildCounterPullResponse--; } -buildUnnamed5433() { +buildUnnamed4507() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5433(core.Map<core.String, core.String> o) { +checkUnnamed4507(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -524,7 +524,7 @@ var o = new api.PushConfig(); buildCounterPushConfig++; if (buildCounterPushConfig < 3) { - o.attributes = buildUnnamed5433(); + o.attributes = buildUnnamed4507(); o.pushEndpoint = "foo"; } buildCounterPushConfig--; @@ -534,7 +534,7 @@ checkPushConfig(api.PushConfig o) { buildCounterPushConfig++; if (buildCounterPushConfig < 3) { - checkUnnamed5433(o.attributes); + checkUnnamed4507(o.attributes); unittest.expect(o.pushEndpoint, unittest.equals('foo')); } buildCounterPushConfig--; @@ -605,14 +605,14 @@ buildCounterSubscription--; } -buildUnnamed5434() { +buildUnnamed4508() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5434(core.List<core.String> o) { +checkUnnamed4508(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -623,7 +623,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5434(); + o.permissions = buildUnnamed4508(); } buildCounterTestIamPermissionsRequest--; return o; @@ -632,19 +632,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5434(o.permissions); + checkUnnamed4508(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5435() { +buildUnnamed4509() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5435(core.List<core.String> o) { +checkUnnamed4509(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -655,7 +655,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5435(); + o.permissions = buildUnnamed4509(); } buildCounterTestIamPermissionsResponse--; return o; @@ -664,7 +664,7 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5435(o.permissions); + checkUnnamed4509(o.permissions); } buildCounterTestIamPermissionsResponse--; } @@ -1139,8 +1139,8 @@ api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions; var arg_project = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1173,10 +1173,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1187,8 +1187,8 @@ }), true); res .list(arg_project, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListSubscriptionsResponse(response); @@ -1926,8 +1926,8 @@ api.ProjectsTopicsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.topics.subscriptions; var arg_topic = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1960,10 +1960,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1974,8 +1974,8 @@ }), true); res .list(arg_topic, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListTopicSubscriptionsResponse(response);
diff --git a/generated/googleapis_beta/test/replicapool/v1beta1_test.dart b/generated/googleapis_beta/test/replicapool/v1beta1_test.dart new file mode 100644 index 0000000..36d5cfc --- /dev/null +++ b/generated/googleapis_beta/test/replicapool/v1beta1_test.dart
@@ -0,0 +1,1569 @@ +library googleapis_beta.replicapool.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/replicapool/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAccessConfig = 0; +buildAccessConfig() { + var o = new api.AccessConfig(); + buildCounterAccessConfig++; + if (buildCounterAccessConfig < 3) { + o.name = "foo"; + o.natIp = "foo"; + o.type = "foo"; + } + buildCounterAccessConfig--; + return o; +} + +checkAccessConfig(api.AccessConfig o) { + buildCounterAccessConfig++; + if (buildCounterAccessConfig < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.natIp, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterAccessConfig--; +} + +buildUnnamed4775() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4775(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4776() { + var o = new core.List<api.EnvVariable>(); + o.add(buildEnvVariable()); + o.add(buildEnvVariable()); + return o; +} + +checkUnnamed4776(core.List<api.EnvVariable> o) { + unittest.expect(o, unittest.hasLength(2)); + checkEnvVariable(o[0]); + checkEnvVariable(o[1]); +} + +core.int buildCounterAction = 0; +buildAction() { + var o = new api.Action(); + buildCounterAction++; + if (buildCounterAction < 3) { + o.commands = buildUnnamed4775(); + o.envVariables = buildUnnamed4776(); + o.timeoutMilliSeconds = 42; + } + buildCounterAction--; + return o; +} + +checkAction(api.Action o) { + buildCounterAction++; + if (buildCounterAction < 3) { + checkUnnamed4775(o.commands); + checkUnnamed4776(o.envVariables); + unittest.expect(o.timeoutMilliSeconds, unittest.equals(42)); + } + buildCounterAction--; +} + +core.int buildCounterDiskAttachment = 0; +buildDiskAttachment() { + var o = new api.DiskAttachment(); + buildCounterDiskAttachment++; + if (buildCounterDiskAttachment < 3) { + o.deviceName = "foo"; + o.index = 42; + } + buildCounterDiskAttachment--; + return o; +} + +checkDiskAttachment(api.DiskAttachment o) { + buildCounterDiskAttachment++; + if (buildCounterDiskAttachment < 3) { + unittest.expect(o.deviceName, unittest.equals('foo')); + unittest.expect(o.index, unittest.equals(42)); + } + buildCounterDiskAttachment--; +} + +core.int buildCounterEnvVariable = 0; +buildEnvVariable() { + var o = new api.EnvVariable(); + buildCounterEnvVariable++; + if (buildCounterEnvVariable < 3) { + o.hidden = true; + o.name = "foo"; + o.value = "foo"; + } + buildCounterEnvVariable--; + return o; +} + +checkEnvVariable(api.EnvVariable o) { + buildCounterEnvVariable++; + if (buildCounterEnvVariable < 3) { + unittest.expect(o.hidden, unittest.isTrue); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.value, unittest.equals('foo')); + } + buildCounterEnvVariable--; +} + +core.int buildCounterExistingDisk = 0; +buildExistingDisk() { + var o = new api.ExistingDisk(); + buildCounterExistingDisk++; + if (buildCounterExistingDisk < 3) { + o.attachment = buildDiskAttachment(); + o.source = "foo"; + } + buildCounterExistingDisk--; + return o; +} + +checkExistingDisk(api.ExistingDisk o) { + buildCounterExistingDisk++; + if (buildCounterExistingDisk < 3) { + checkDiskAttachment(o.attachment); + unittest.expect(o.source, unittest.equals('foo')); + } + buildCounterExistingDisk--; +} + +core.int buildCounterHealthCheck = 0; +buildHealthCheck() { + var o = new api.HealthCheck(); + buildCounterHealthCheck++; + if (buildCounterHealthCheck < 3) { + o.checkIntervalSec = 42; + o.description = "foo"; + o.healthyThreshold = 42; + o.host = "foo"; + o.name = "foo"; + o.path = "foo"; + o.port = 42; + o.timeoutSec = 42; + o.unhealthyThreshold = 42; + } + buildCounterHealthCheck--; + return o; +} + +checkHealthCheck(api.HealthCheck o) { + buildCounterHealthCheck++; + if (buildCounterHealthCheck < 3) { + unittest.expect(o.checkIntervalSec, unittest.equals(42)); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.healthyThreshold, unittest.equals(42)); + unittest.expect(o.host, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + unittest.expect(o.port, unittest.equals(42)); + unittest.expect(o.timeoutSec, unittest.equals(42)); + unittest.expect(o.unhealthyThreshold, unittest.equals(42)); + } + buildCounterHealthCheck--; +} + +core.int buildCounterLabel = 0; +buildLabel() { + var o = new api.Label(); + buildCounterLabel++; + if (buildCounterLabel < 3) { + o.key = "foo"; + o.value = "foo"; + } + buildCounterLabel--; + return o; +} + +checkLabel(api.Label o) { + buildCounterLabel++; + if (buildCounterLabel < 3) { + unittest.expect(o.key, unittest.equals('foo')); + unittest.expect(o.value, unittest.equals('foo')); + } + buildCounterLabel--; +} + +buildUnnamed4777() { + var o = new core.List<api.MetadataItem>(); + o.add(buildMetadataItem()); + o.add(buildMetadataItem()); + return o; +} + +checkUnnamed4777(core.List<api.MetadataItem> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMetadataItem(o[0]); + checkMetadataItem(o[1]); +} + +core.int buildCounterMetadata = 0; +buildMetadata() { + var o = new api.Metadata(); + buildCounterMetadata++; + if (buildCounterMetadata < 3) { + o.fingerPrint = "foo"; + o.items = buildUnnamed4777(); + } + buildCounterMetadata--; + return o; +} + +checkMetadata(api.Metadata o) { + buildCounterMetadata++; + if (buildCounterMetadata < 3) { + unittest.expect(o.fingerPrint, unittest.equals('foo')); + checkUnnamed4777(o.items); + } + buildCounterMetadata--; +} + +core.int buildCounterMetadataItem = 0; +buildMetadataItem() { + var o = new api.MetadataItem(); + buildCounterMetadataItem++; + if (buildCounterMetadataItem < 3) { + o.key = "foo"; + o.value = "foo"; + } + buildCounterMetadataItem--; + return o; +} + +checkMetadataItem(api.MetadataItem o) { + buildCounterMetadataItem++; + if (buildCounterMetadataItem < 3) { + unittest.expect(o.key, unittest.equals('foo')); + unittest.expect(o.value, unittest.equals('foo')); + } + buildCounterMetadataItem--; +} + +buildUnnamed4778() { + var o = new core.List<api.AccessConfig>(); + o.add(buildAccessConfig()); + o.add(buildAccessConfig()); + return o; +} + +checkUnnamed4778(core.List<api.AccessConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAccessConfig(o[0]); + checkAccessConfig(o[1]); +} + +core.int buildCounterNetworkInterface = 0; +buildNetworkInterface() { + var o = new api.NetworkInterface(); + buildCounterNetworkInterface++; + if (buildCounterNetworkInterface < 3) { + o.accessConfigs = buildUnnamed4778(); + o.network = "foo"; + o.networkIp = "foo"; + } + buildCounterNetworkInterface--; + return o; +} + +checkNetworkInterface(api.NetworkInterface o) { + buildCounterNetworkInterface++; + if (buildCounterNetworkInterface < 3) { + checkUnnamed4778(o.accessConfigs); + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.networkIp, unittest.equals('foo')); + } + buildCounterNetworkInterface--; +} + +core.int buildCounterNewDisk = 0; +buildNewDisk() { + var o = new api.NewDisk(); + buildCounterNewDisk++; + if (buildCounterNewDisk < 3) { + o.attachment = buildDiskAttachment(); + o.autoDelete = true; + o.boot = true; + o.initializeParams = buildNewDiskInitializeParams(); + } + buildCounterNewDisk--; + return o; +} + +checkNewDisk(api.NewDisk o) { + buildCounterNewDisk++; + if (buildCounterNewDisk < 3) { + checkDiskAttachment(o.attachment); + unittest.expect(o.autoDelete, unittest.isTrue); + unittest.expect(o.boot, unittest.isTrue); + checkNewDiskInitializeParams(o.initializeParams); + } + buildCounterNewDisk--; +} + +core.int buildCounterNewDiskInitializeParams = 0; +buildNewDiskInitializeParams() { + var o = new api.NewDiskInitializeParams(); + buildCounterNewDiskInitializeParams++; + if (buildCounterNewDiskInitializeParams < 3) { + o.diskSizeGb = "foo"; + o.diskType = "foo"; + o.sourceImage = "foo"; + } + buildCounterNewDiskInitializeParams--; + return o; +} + +checkNewDiskInitializeParams(api.NewDiskInitializeParams o) { + buildCounterNewDiskInitializeParams++; + if (buildCounterNewDiskInitializeParams < 3) { + unittest.expect(o.diskSizeGb, unittest.equals('foo')); + unittest.expect(o.diskType, unittest.equals('foo')); + unittest.expect(o.sourceImage, unittest.equals('foo')); + } + buildCounterNewDiskInitializeParams--; +} + +buildUnnamed4779() { + var o = new core.List<api.HealthCheck>(); + o.add(buildHealthCheck()); + o.add(buildHealthCheck()); + return o; +} + +checkUnnamed4779(core.List<api.HealthCheck> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHealthCheck(o[0]); + checkHealthCheck(o[1]); +} + +buildUnnamed4780() { + var o = new core.List<api.Label>(); + o.add(buildLabel()); + o.add(buildLabel()); + return o; +} + +checkUnnamed4780(core.List<api.Label> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLabel(o[0]); + checkLabel(o[1]); +} + +buildUnnamed4781() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4781(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4782() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4782(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPool = 0; +buildPool() { + var o = new api.Pool(); + buildCounterPool++; + if (buildCounterPool < 3) { + o.autoRestart = true; + o.baseInstanceName = "foo"; + o.currentNumReplicas = 42; + o.description = "foo"; + o.healthChecks = buildUnnamed4779(); + o.initialNumReplicas = 42; + o.labels = buildUnnamed4780(); + o.name = "foo"; + o.numReplicas = 42; + o.resourceViews = buildUnnamed4781(); + o.selfLink = "foo"; + o.targetPool = "foo"; + o.targetPools = buildUnnamed4782(); + o.template = buildTemplate(); + o.type = "foo"; + } + buildCounterPool--; + return o; +} + +checkPool(api.Pool o) { + buildCounterPool++; + if (buildCounterPool < 3) { + unittest.expect(o.autoRestart, unittest.isTrue); + unittest.expect(o.baseInstanceName, unittest.equals('foo')); + unittest.expect(o.currentNumReplicas, unittest.equals(42)); + unittest.expect(o.description, unittest.equals('foo')); + checkUnnamed4779(o.healthChecks); + unittest.expect(o.initialNumReplicas, unittest.equals(42)); + checkUnnamed4780(o.labels); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.numReplicas, unittest.equals(42)); + checkUnnamed4781(o.resourceViews); + unittest.expect(o.selfLink, unittest.equals('foo')); + unittest.expect(o.targetPool, unittest.equals('foo')); + checkUnnamed4782(o.targetPools); + checkTemplate(o.template); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterPool--; +} + +buildUnnamed4783() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4783(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPoolsDeleteRequest = 0; +buildPoolsDeleteRequest() { + var o = new api.PoolsDeleteRequest(); + buildCounterPoolsDeleteRequest++; + if (buildCounterPoolsDeleteRequest < 3) { + o.abandonInstances = buildUnnamed4783(); + } + buildCounterPoolsDeleteRequest--; + return o; +} + +checkPoolsDeleteRequest(api.PoolsDeleteRequest o) { + buildCounterPoolsDeleteRequest++; + if (buildCounterPoolsDeleteRequest < 3) { + checkUnnamed4783(o.abandonInstances); + } + buildCounterPoolsDeleteRequest--; +} + +buildUnnamed4784() { + var o = new core.List<api.Pool>(); + o.add(buildPool()); + o.add(buildPool()); + return o; +} + +checkUnnamed4784(core.List<api.Pool> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPool(o[0]); + checkPool(o[1]); +} + +core.int buildCounterPoolsListResponse = 0; +buildPoolsListResponse() { + var o = new api.PoolsListResponse(); + buildCounterPoolsListResponse++; + if (buildCounterPoolsListResponse < 3) { + o.nextPageToken = "foo"; + o.resources = buildUnnamed4784(); + } + buildCounterPoolsListResponse--; + return o; +} + +checkPoolsListResponse(api.PoolsListResponse o) { + buildCounterPoolsListResponse++; + if (buildCounterPoolsListResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4784(o.resources); + } + buildCounterPoolsListResponse--; +} + +core.int buildCounterReplica = 0; +buildReplica() { + var o = new api.Replica(); + buildCounterReplica++; + if (buildCounterReplica < 3) { + o.name = "foo"; + o.selfLink = "foo"; + o.status = buildReplicaStatus(); + } + buildCounterReplica--; + return o; +} + +checkReplica(api.Replica o) { + buildCounterReplica++; + if (buildCounterReplica < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.selfLink, unittest.equals('foo')); + checkReplicaStatus(o.status); + } + buildCounterReplica--; +} + +core.int buildCounterReplicaStatus = 0; +buildReplicaStatus() { + var o = new api.ReplicaStatus(); + buildCounterReplicaStatus++; + if (buildCounterReplicaStatus < 3) { + o.details = "foo"; + o.state = "foo"; + o.templateVersion = "foo"; + o.vmLink = "foo"; + o.vmStartTime = "foo"; + } + buildCounterReplicaStatus--; + return o; +} + +checkReplicaStatus(api.ReplicaStatus o) { + buildCounterReplicaStatus++; + if (buildCounterReplicaStatus < 3) { + unittest.expect(o.details, unittest.equals('foo')); + unittest.expect(o.state, unittest.equals('foo')); + unittest.expect(o.templateVersion, unittest.equals('foo')); + unittest.expect(o.vmLink, unittest.equals('foo')); + unittest.expect(o.vmStartTime, unittest.equals('foo')); + } + buildCounterReplicaStatus--; +} + +core.int buildCounterReplicasDeleteRequest = 0; +buildReplicasDeleteRequest() { + var o = new api.ReplicasDeleteRequest(); + buildCounterReplicasDeleteRequest++; + if (buildCounterReplicasDeleteRequest < 3) { + o.abandonInstance = true; + } + buildCounterReplicasDeleteRequest--; + return o; +} + +checkReplicasDeleteRequest(api.ReplicasDeleteRequest o) { + buildCounterReplicasDeleteRequest++; + if (buildCounterReplicasDeleteRequest < 3) { + unittest.expect(o.abandonInstance, unittest.isTrue); + } + buildCounterReplicasDeleteRequest--; +} + +buildUnnamed4785() { + var o = new core.List<api.Replica>(); + o.add(buildReplica()); + o.add(buildReplica()); + return o; +} + +checkUnnamed4785(core.List<api.Replica> o) { + unittest.expect(o, unittest.hasLength(2)); + checkReplica(o[0]); + checkReplica(o[1]); +} + +core.int buildCounterReplicasListResponse = 0; +buildReplicasListResponse() { + var o = new api.ReplicasListResponse(); + buildCounterReplicasListResponse++; + if (buildCounterReplicasListResponse < 3) { + o.nextPageToken = "foo"; + o.resources = buildUnnamed4785(); + } + buildCounterReplicasListResponse--; + return o; +} + +checkReplicasListResponse(api.ReplicasListResponse o) { + buildCounterReplicasListResponse++; + if (buildCounterReplicasListResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4785(o.resources); + } + buildCounterReplicasListResponse--; +} + +buildUnnamed4786() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4786(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterServiceAccount = 0; +buildServiceAccount() { + var o = new api.ServiceAccount(); + buildCounterServiceAccount++; + if (buildCounterServiceAccount < 3) { + o.email = "foo"; + o.scopes = buildUnnamed4786(); + } + buildCounterServiceAccount--; + return o; +} + +checkServiceAccount(api.ServiceAccount o) { + buildCounterServiceAccount++; + if (buildCounterServiceAccount < 3) { + unittest.expect(o.email, unittest.equals('foo')); + checkUnnamed4786(o.scopes); + } + buildCounterServiceAccount--; +} + +buildUnnamed4787() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4787(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterTag = 0; +buildTag() { + var o = new api.Tag(); + buildCounterTag++; + if (buildCounterTag < 3) { + o.fingerPrint = "foo"; + o.items = buildUnnamed4787(); + } + buildCounterTag--; + return o; +} + +checkTag(api.Tag o) { + buildCounterTag++; + if (buildCounterTag < 3) { + unittest.expect(o.fingerPrint, unittest.equals('foo')); + checkUnnamed4787(o.items); + } + buildCounterTag--; +} + +buildUnnamed4788() { + var o = new core.List<api.HealthCheck>(); + o.add(buildHealthCheck()); + o.add(buildHealthCheck()); + return o; +} + +checkUnnamed4788(core.List<api.HealthCheck> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHealthCheck(o[0]); + checkHealthCheck(o[1]); +} + +core.int buildCounterTemplate = 0; +buildTemplate() { + var o = new api.Template(); + buildCounterTemplate++; + if (buildCounterTemplate < 3) { + o.action = buildAction(); + o.healthChecks = buildUnnamed4788(); + o.version = "foo"; + o.vmParams = buildVmParams(); + } + buildCounterTemplate--; + return o; +} + +checkTemplate(api.Template o) { + buildCounterTemplate++; + if (buildCounterTemplate < 3) { + checkAction(o.action); + checkUnnamed4788(o.healthChecks); + unittest.expect(o.version, unittest.equals('foo')); + checkVmParams(o.vmParams); + } + buildCounterTemplate--; +} + +buildUnnamed4789() { + var o = new core.List<api.ExistingDisk>(); + o.add(buildExistingDisk()); + o.add(buildExistingDisk()); + return o; +} + +checkUnnamed4789(core.List<api.ExistingDisk> o) { + unittest.expect(o, unittest.hasLength(2)); + checkExistingDisk(o[0]); + checkExistingDisk(o[1]); +} + +buildUnnamed4790() { + var o = new core.List<api.NewDisk>(); + o.add(buildNewDisk()); + o.add(buildNewDisk()); + return o; +} + +checkUnnamed4790(core.List<api.NewDisk> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNewDisk(o[0]); + checkNewDisk(o[1]); +} + +buildUnnamed4791() { + var o = new core.List<api.NetworkInterface>(); + o.add(buildNetworkInterface()); + o.add(buildNetworkInterface()); + return o; +} + +checkUnnamed4791(core.List<api.NetworkInterface> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNetworkInterface(o[0]); + checkNetworkInterface(o[1]); +} + +buildUnnamed4792() { + var o = new core.List<api.ServiceAccount>(); + o.add(buildServiceAccount()); + o.add(buildServiceAccount()); + return o; +} + +checkUnnamed4792(core.List<api.ServiceAccount> o) { + unittest.expect(o, unittest.hasLength(2)); + checkServiceAccount(o[0]); + checkServiceAccount(o[1]); +} + +core.int buildCounterVmParams = 0; +buildVmParams() { + var o = new api.VmParams(); + buildCounterVmParams++; + if (buildCounterVmParams < 3) { + o.baseInstanceName = "foo"; + o.canIpForward = true; + o.description = "foo"; + o.disksToAttach = buildUnnamed4789(); + o.disksToCreate = buildUnnamed4790(); + o.machineType = "foo"; + o.metadata = buildMetadata(); + o.networkInterfaces = buildUnnamed4791(); + o.onHostMaintenance = "foo"; + o.serviceAccounts = buildUnnamed4792(); + o.tags = buildTag(); + } + buildCounterVmParams--; + return o; +} + +checkVmParams(api.VmParams o) { + buildCounterVmParams++; + if (buildCounterVmParams < 3) { + unittest.expect(o.baseInstanceName, unittest.equals('foo')); + unittest.expect(o.canIpForward, unittest.isTrue); + unittest.expect(o.description, unittest.equals('foo')); + checkUnnamed4789(o.disksToAttach); + checkUnnamed4790(o.disksToCreate); + unittest.expect(o.machineType, unittest.equals('foo')); + checkMetadata(o.metadata); + checkUnnamed4791(o.networkInterfaces); + unittest.expect(o.onHostMaintenance, unittest.equals('foo')); + checkUnnamed4792(o.serviceAccounts); + checkTag(o.tags); + } + buildCounterVmParams--; +} + +main() { + unittest.group("obj-schema-AccessConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAccessConfig(); + var od = new api.AccessConfig.fromJson(o.toJson()); + checkAccessConfig(od); + }); + }); + + unittest.group("obj-schema-Action", () { + unittest.test("to-json--from-json", () { + var o = buildAction(); + var od = new api.Action.fromJson(o.toJson()); + checkAction(od); + }); + }); + + unittest.group("obj-schema-DiskAttachment", () { + unittest.test("to-json--from-json", () { + var o = buildDiskAttachment(); + var od = new api.DiskAttachment.fromJson(o.toJson()); + checkDiskAttachment(od); + }); + }); + + unittest.group("obj-schema-EnvVariable", () { + unittest.test("to-json--from-json", () { + var o = buildEnvVariable(); + var od = new api.EnvVariable.fromJson(o.toJson()); + checkEnvVariable(od); + }); + }); + + unittest.group("obj-schema-ExistingDisk", () { + unittest.test("to-json--from-json", () { + var o = buildExistingDisk(); + var od = new api.ExistingDisk.fromJson(o.toJson()); + checkExistingDisk(od); + }); + }); + + unittest.group("obj-schema-HealthCheck", () { + unittest.test("to-json--from-json", () { + var o = buildHealthCheck(); + var od = new api.HealthCheck.fromJson(o.toJson()); + checkHealthCheck(od); + }); + }); + + unittest.group("obj-schema-Label", () { + unittest.test("to-json--from-json", () { + var o = buildLabel(); + var od = new api.Label.fromJson(o.toJson()); + checkLabel(od); + }); + }); + + unittest.group("obj-schema-Metadata", () { + unittest.test("to-json--from-json", () { + var o = buildMetadata(); + var od = new api.Metadata.fromJson(o.toJson()); + checkMetadata(od); + }); + }); + + unittest.group("obj-schema-MetadataItem", () { + unittest.test("to-json--from-json", () { + var o = buildMetadataItem(); + var od = new api.MetadataItem.fromJson(o.toJson()); + checkMetadataItem(od); + }); + }); + + unittest.group("obj-schema-NetworkInterface", () { + unittest.test("to-json--from-json", () { + var o = buildNetworkInterface(); + var od = new api.NetworkInterface.fromJson(o.toJson()); + checkNetworkInterface(od); + }); + }); + + unittest.group("obj-schema-NewDisk", () { + unittest.test("to-json--from-json", () { + var o = buildNewDisk(); + var od = new api.NewDisk.fromJson(o.toJson()); + checkNewDisk(od); + }); + }); + + unittest.group("obj-schema-NewDiskInitializeParams", () { + unittest.test("to-json--from-json", () { + var o = buildNewDiskInitializeParams(); + var od = new api.NewDiskInitializeParams.fromJson(o.toJson()); + checkNewDiskInitializeParams(od); + }); + }); + + unittest.group("obj-schema-Pool", () { + unittest.test("to-json--from-json", () { + var o = buildPool(); + var od = new api.Pool.fromJson(o.toJson()); + checkPool(od); + }); + }); + + unittest.group("obj-schema-PoolsDeleteRequest", () { + unittest.test("to-json--from-json", () { + var o = buildPoolsDeleteRequest(); + var od = new api.PoolsDeleteRequest.fromJson(o.toJson()); + checkPoolsDeleteRequest(od); + }); + }); + + unittest.group("obj-schema-PoolsListResponse", () { + unittest.test("to-json--from-json", () { + var o = buildPoolsListResponse(); + var od = new api.PoolsListResponse.fromJson(o.toJson()); + checkPoolsListResponse(od); + }); + }); + + unittest.group("obj-schema-Replica", () { + unittest.test("to-json--from-json", () { + var o = buildReplica(); + var od = new api.Replica.fromJson(o.toJson()); + checkReplica(od); + }); + }); + + unittest.group("obj-schema-ReplicaStatus", () { + unittest.test("to-json--from-json", () { + var o = buildReplicaStatus(); + var od = new api.ReplicaStatus.fromJson(o.toJson()); + checkReplicaStatus(od); + }); + }); + + unittest.group("obj-schema-ReplicasDeleteRequest", () { + unittest.test("to-json--from-json", () { + var o = buildReplicasDeleteRequest(); + var od = new api.ReplicasDeleteRequest.fromJson(o.toJson()); + checkReplicasDeleteRequest(od); + }); + }); + + unittest.group("obj-schema-ReplicasListResponse", () { + unittest.test("to-json--from-json", () { + var o = buildReplicasListResponse(); + var od = new api.ReplicasListResponse.fromJson(o.toJson()); + checkReplicasListResponse(od); + }); + }); + + unittest.group("obj-schema-ServiceAccount", () { + unittest.test("to-json--from-json", () { + var o = buildServiceAccount(); + var od = new api.ServiceAccount.fromJson(o.toJson()); + checkServiceAccount(od); + }); + }); + + unittest.group("obj-schema-Tag", () { + unittest.test("to-json--from-json", () { + var o = buildTag(); + var od = new api.Tag.fromJson(o.toJson()); + checkTag(od); + }); + }); + + unittest.group("obj-schema-Template", () { + unittest.test("to-json--from-json", () { + var o = buildTemplate(); + var od = new api.Template.fromJson(o.toJson()); + checkTemplate(od); + }); + }); + + unittest.group("obj-schema-VmParams", () { + unittest.test("to-json--from-json", () { + var o = buildVmParams(); + var od = new api.VmParams.fromJson(o.toJson()); + checkVmParams(od); + }); + }); + + unittest.group("resource-PoolsResourceApi", () { + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_request = buildPoolsDeleteRequest(); + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.PoolsDeleteRequest.fromJson(json); + checkPoolsDeleteRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = ""; + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_request, arg_projectName, arg_zone, arg_poolName, + $fields: arg_$fields) + .then(unittest.expectAsync1((_) {})); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPool()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_projectName, arg_zone, arg_poolName, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPool(response); + }))); + }); + + unittest.test("method--insert", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_request = buildPool(); + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Pool.fromJson(json); + checkPool(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPool()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .insert(arg_request, arg_projectName, arg_zone, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPool(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_maxResults = 42; + var arg_pageToken = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["maxResults"].first), + unittest.equals(arg_maxResults)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPoolsListResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_projectName, arg_zone, + maxResults: arg_maxResults, + pageToken: arg_pageToken, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPoolsListResponse(response); + }))); + }); + + unittest.test("method--resize", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_numReplicas = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["numReplicas"].first), + unittest.equals(arg_numReplicas)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPool()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .resize(arg_projectName, arg_zone, arg_poolName, + numReplicas: arg_numReplicas, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPool(response); + }))); + }); + + unittest.test("method--updatetemplate", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_request = buildTemplate(); + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Template.fromJson(json); + checkTemplate(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = ""; + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .updatetemplate(arg_request, arg_projectName, arg_zone, arg_poolName, + $fields: arg_$fields) + .then(unittest.expectAsync1((_) {})); + }); + }); + + unittest.group("resource-ReplicasResourceApi", () { + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.ReplicasResourceApi res = new api.ReplicapoolApi(mock).replicas; + var arg_request = buildReplicasDeleteRequest(); + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_replicaName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ReplicasDeleteRequest.fromJson(json); + checkReplicasDeleteRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildReplica()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_request, arg_projectName, arg_zone, arg_poolName, + arg_replicaName, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkReplica(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ReplicasResourceApi res = new api.ReplicapoolApi(mock).replicas; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_replicaName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildReplica()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_projectName, arg_zone, arg_poolName, arg_replicaName, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkReplica(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ReplicasResourceApi res = new api.ReplicapoolApi(mock).replicas; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_maxResults = 42; + var arg_pageToken = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["maxResults"].first), + unittest.equals(arg_maxResults)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildReplicasListResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_projectName, arg_zone, arg_poolName, + maxResults: arg_maxResults, + pageToken: arg_pageToken, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkReplicasListResponse(response); + }))); + }); + + unittest.test("method--restart", () { + var mock = new HttpServerMock(); + api.ReplicasResourceApi res = new api.ReplicapoolApi(mock).replicas; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_replicaName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildReplica()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .restart(arg_projectName, arg_zone, arg_poolName, arg_replicaName, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkReplica(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart b/generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart deleted file mode 100644 index 0503116..0000000 --- a/generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart +++ /dev/null
@@ -1,1228 +0,0 @@ -library googleapis_beta.replicapoolupdater.v1beta1.test; - -import "dart:core" as core; -import "dart:async" as async; -import "dart:convert" as convert; - -import 'package:http/http.dart' as http; -import 'package:test/test.dart' as unittest; - -import 'package:googleapis_beta/replicapoolupdater/v1beta1.dart' as api; - -class HttpServerMock extends http.BaseClient { - core.Function _callback; - core.bool _expectJson; - - void register(core.Function callback, core.bool expectJson) { - _callback = callback; - _expectJson = expectJson; - } - - async.Future<http.StreamedResponse> send(http.BaseRequest request) { - if (_expectJson) { - return request - .finalize() - .transform(convert.utf8.decoder) - .join('') - .then((core.String jsonString) { - if (jsonString.isEmpty) { - return _callback(request, null); - } else { - return _callback(request, convert.json.decode(jsonString)); - } - }); - } else { - var stream = request.finalize(); - if (stream == null) { - return _callback(request, []); - } else { - return stream.toBytes().then((data) { - return _callback(request, data); - }); - } - } - } -} - -http.StreamedResponse stringResponse(core.int status, - core.Map<core.String, core.String> headers, core.String body) { - var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); - return new http.StreamedResponse(stream, status, headers: headers); -} - -core.int buildCounterInstanceUpdateErrorErrors = 0; -buildInstanceUpdateErrorErrors() { - var o = new api.InstanceUpdateErrorErrors(); - buildCounterInstanceUpdateErrorErrors++; - if (buildCounterInstanceUpdateErrorErrors < 3) { - o.code = "foo"; - o.location = "foo"; - o.message = "foo"; - } - buildCounterInstanceUpdateErrorErrors--; - return o; -} - -checkInstanceUpdateErrorErrors(api.InstanceUpdateErrorErrors o) { - buildCounterInstanceUpdateErrorErrors++; - if (buildCounterInstanceUpdateErrorErrors < 3) { - unittest.expect(o.code, unittest.equals('foo')); - unittest.expect(o.location, unittest.equals('foo')); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterInstanceUpdateErrorErrors--; -} - -buildUnnamed5242() { - var o = new core.List<api.InstanceUpdateErrorErrors>(); - o.add(buildInstanceUpdateErrorErrors()); - o.add(buildInstanceUpdateErrorErrors()); - return o; -} - -checkUnnamed5242(core.List<api.InstanceUpdateErrorErrors> o) { - unittest.expect(o, unittest.hasLength(2)); - checkInstanceUpdateErrorErrors(o[0]); - checkInstanceUpdateErrorErrors(o[1]); -} - -core.int buildCounterInstanceUpdateError = 0; -buildInstanceUpdateError() { - var o = new api.InstanceUpdateError(); - buildCounterInstanceUpdateError++; - if (buildCounterInstanceUpdateError < 3) { - o.errors = buildUnnamed5242(); - } - buildCounterInstanceUpdateError--; - return o; -} - -checkInstanceUpdateError(api.InstanceUpdateError o) { - buildCounterInstanceUpdateError++; - if (buildCounterInstanceUpdateError < 3) { - checkUnnamed5242(o.errors); - } - buildCounterInstanceUpdateError--; -} - -core.int buildCounterInstanceUpdate = 0; -buildInstanceUpdate() { - var o = new api.InstanceUpdate(); - buildCounterInstanceUpdate++; - if (buildCounterInstanceUpdate < 3) { - o.error = buildInstanceUpdateError(); - o.instance = "foo"; - o.status = "foo"; - } - buildCounterInstanceUpdate--; - return o; -} - -checkInstanceUpdate(api.InstanceUpdate o) { - buildCounterInstanceUpdate++; - if (buildCounterInstanceUpdate < 3) { - checkInstanceUpdateError(o.error); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.status, unittest.equals('foo')); - } - buildCounterInstanceUpdate--; -} - -buildUnnamed5243() { - var o = new core.List<api.InstanceUpdate>(); - o.add(buildInstanceUpdate()); - o.add(buildInstanceUpdate()); - return o; -} - -checkUnnamed5243(core.List<api.InstanceUpdate> o) { - unittest.expect(o, unittest.hasLength(2)); - checkInstanceUpdate(o[0]); - checkInstanceUpdate(o[1]); -} - -core.int buildCounterInstanceUpdateList = 0; -buildInstanceUpdateList() { - var o = new api.InstanceUpdateList(); - buildCounterInstanceUpdateList++; - if (buildCounterInstanceUpdateList < 3) { - o.items = buildUnnamed5243(); - o.kind = "foo"; - o.nextPageToken = "foo"; - o.selfLink = "foo"; - } - buildCounterInstanceUpdateList--; - return o; -} - -checkInstanceUpdateList(api.InstanceUpdateList o) { - buildCounterInstanceUpdateList++; - if (buildCounterInstanceUpdateList < 3) { - checkUnnamed5243(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - unittest.expect(o.selfLink, unittest.equals('foo')); - } - buildCounterInstanceUpdateList--; -} - -core.int buildCounterOperationErrorErrors = 0; -buildOperationErrorErrors() { - var o = new api.OperationErrorErrors(); - buildCounterOperationErrorErrors++; - if (buildCounterOperationErrorErrors < 3) { - o.code = "foo"; - o.location = "foo"; - o.message = "foo"; - } - buildCounterOperationErrorErrors--; - return o; -} - -checkOperationErrorErrors(api.OperationErrorErrors o) { - buildCounterOperationErrorErrors++; - if (buildCounterOperationErrorErrors < 3) { - unittest.expect(o.code, unittest.equals('foo')); - unittest.expect(o.location, unittest.equals('foo')); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterOperationErrorErrors--; -} - -buildUnnamed5244() { - var o = new core.List<api.OperationErrorErrors>(); - o.add(buildOperationErrorErrors()); - o.add(buildOperationErrorErrors()); - return o; -} - -checkUnnamed5244(core.List<api.OperationErrorErrors> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperationErrorErrors(o[0]); - checkOperationErrorErrors(o[1]); -} - -core.int buildCounterOperationError = 0; -buildOperationError() { - var o = new api.OperationError(); - buildCounterOperationError++; - if (buildCounterOperationError < 3) { - o.errors = buildUnnamed5244(); - } - buildCounterOperationError--; - return o; -} - -checkOperationError(api.OperationError o) { - buildCounterOperationError++; - if (buildCounterOperationError < 3) { - checkUnnamed5244(o.errors); - } - buildCounterOperationError--; -} - -core.int buildCounterOperationWarningsData = 0; -buildOperationWarningsData() { - var o = new api.OperationWarningsData(); - buildCounterOperationWarningsData++; - if (buildCounterOperationWarningsData < 3) { - o.key = "foo"; - o.value = "foo"; - } - buildCounterOperationWarningsData--; - return o; -} - -checkOperationWarningsData(api.OperationWarningsData o) { - buildCounterOperationWarningsData++; - if (buildCounterOperationWarningsData < 3) { - unittest.expect(o.key, unittest.equals('foo')); - unittest.expect(o.value, unittest.equals('foo')); - } - buildCounterOperationWarningsData--; -} - -buildUnnamed5245() { - var o = new core.List<api.OperationWarningsData>(); - o.add(buildOperationWarningsData()); - o.add(buildOperationWarningsData()); - return o; -} - -checkUnnamed5245(core.List<api.OperationWarningsData> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperationWarningsData(o[0]); - checkOperationWarningsData(o[1]); -} - -core.int buildCounterOperationWarnings = 0; -buildOperationWarnings() { - var o = new api.OperationWarnings(); - buildCounterOperationWarnings++; - if (buildCounterOperationWarnings < 3) { - o.code = "foo"; - o.data = buildUnnamed5245(); - o.message = "foo"; - } - buildCounterOperationWarnings--; - return o; -} - -checkOperationWarnings(api.OperationWarnings o) { - buildCounterOperationWarnings++; - if (buildCounterOperationWarnings < 3) { - unittest.expect(o.code, unittest.equals('foo')); - checkUnnamed5245(o.data); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterOperationWarnings--; -} - -buildUnnamed5246() { - var o = new core.List<api.OperationWarnings>(); - o.add(buildOperationWarnings()); - o.add(buildOperationWarnings()); - return o; -} - -checkUnnamed5246(core.List<api.OperationWarnings> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperationWarnings(o[0]); - checkOperationWarnings(o[1]); -} - -core.int buildCounterOperation = 0; -buildOperation() { - var o = new api.Operation(); - buildCounterOperation++; - if (buildCounterOperation < 3) { - o.clientOperationId = "foo"; - o.creationTimestamp = "foo"; - o.endTime = "foo"; - o.error = buildOperationError(); - o.httpErrorMessage = "foo"; - o.httpErrorStatusCode = 42; - o.id = "foo"; - o.insertTime = "foo"; - o.kind = "foo"; - o.name = "foo"; - o.operationType = "foo"; - o.progress = 42; - o.region = "foo"; - o.selfLink = "foo"; - o.startTime = "foo"; - o.status = "foo"; - o.statusMessage = "foo"; - o.targetId = "foo"; - o.targetLink = "foo"; - o.user = "foo"; - o.warnings = buildUnnamed5246(); - o.zone = "foo"; - } - buildCounterOperation--; - return o; -} - -checkOperation(api.Operation o) { - buildCounterOperation++; - if (buildCounterOperation < 3) { - unittest.expect(o.clientOperationId, unittest.equals('foo')); - unittest.expect(o.creationTimestamp, unittest.equals('foo')); - unittest.expect(o.endTime, unittest.equals('foo')); - checkOperationError(o.error); - unittest.expect(o.httpErrorMessage, unittest.equals('foo')); - unittest.expect(o.httpErrorStatusCode, unittest.equals(42)); - unittest.expect(o.id, unittest.equals('foo')); - unittest.expect(o.insertTime, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.operationType, unittest.equals('foo')); - unittest.expect(o.progress, unittest.equals(42)); - unittest.expect(o.region, unittest.equals('foo')); - unittest.expect(o.selfLink, unittest.equals('foo')); - unittest.expect(o.startTime, unittest.equals('foo')); - unittest.expect(o.status, unittest.equals('foo')); - unittest.expect(o.statusMessage, unittest.equals('foo')); - unittest.expect(o.targetId, unittest.equals('foo')); - unittest.expect(o.targetLink, unittest.equals('foo')); - unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5246(o.warnings); - unittest.expect(o.zone, unittest.equals('foo')); - } - buildCounterOperation--; -} - -buildUnnamed5247() { - var o = new core.List<api.Operation>(); - o.add(buildOperation()); - o.add(buildOperation()); - return o; -} - -checkUnnamed5247(core.List<api.Operation> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperation(o[0]); - checkOperation(o[1]); -} - -core.int buildCounterOperationList = 0; -buildOperationList() { - var o = new api.OperationList(); - buildCounterOperationList++; - if (buildCounterOperationList < 3) { - o.id = "foo"; - o.items = buildUnnamed5247(); - o.kind = "foo"; - o.nextPageToken = "foo"; - o.selfLink = "foo"; - } - buildCounterOperationList--; - return o; -} - -checkOperationList(api.OperationList o) { - buildCounterOperationList++; - if (buildCounterOperationList < 3) { - unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5247(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - unittest.expect(o.selfLink, unittest.equals('foo')); - } - buildCounterOperationList--; -} - -core.int buildCounterRollingUpdateErrorErrors = 0; -buildRollingUpdateErrorErrors() { - var o = new api.RollingUpdateErrorErrors(); - buildCounterRollingUpdateErrorErrors++; - if (buildCounterRollingUpdateErrorErrors < 3) { - o.code = "foo"; - o.location = "foo"; - o.message = "foo"; - } - buildCounterRollingUpdateErrorErrors--; - return o; -} - -checkRollingUpdateErrorErrors(api.RollingUpdateErrorErrors o) { - buildCounterRollingUpdateErrorErrors++; - if (buildCounterRollingUpdateErrorErrors < 3) { - unittest.expect(o.code, unittest.equals('foo')); - unittest.expect(o.location, unittest.equals('foo')); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterRollingUpdateErrorErrors--; -} - -buildUnnamed5248() { - var o = new core.List<api.RollingUpdateErrorErrors>(); - o.add(buildRollingUpdateErrorErrors()); - o.add(buildRollingUpdateErrorErrors()); - return o; -} - -checkUnnamed5248(core.List<api.RollingUpdateErrorErrors> o) { - unittest.expect(o, unittest.hasLength(2)); - checkRollingUpdateErrorErrors(o[0]); - checkRollingUpdateErrorErrors(o[1]); -} - -core.int buildCounterRollingUpdateError = 0; -buildRollingUpdateError() { - var o = new api.RollingUpdateError(); - buildCounterRollingUpdateError++; - if (buildCounterRollingUpdateError < 3) { - o.errors = buildUnnamed5248(); - } - buildCounterRollingUpdateError--; - return o; -} - -checkRollingUpdateError(api.RollingUpdateError o) { - buildCounterRollingUpdateError++; - if (buildCounterRollingUpdateError < 3) { - checkUnnamed5248(o.errors); - } - buildCounterRollingUpdateError--; -} - -core.int buildCounterRollingUpdatePolicy = 0; -buildRollingUpdatePolicy() { - var o = new api.RollingUpdatePolicy(); - buildCounterRollingUpdatePolicy++; - if (buildCounterRollingUpdatePolicy < 3) { - o.autoPauseAfterInstances = 42; - o.instanceStartupTimeoutSec = 42; - o.maxNumConcurrentInstances = 42; - o.maxNumFailedInstances = 42; - o.minInstanceUpdateTimeSec = 42; - } - buildCounterRollingUpdatePolicy--; - return o; -} - -checkRollingUpdatePolicy(api.RollingUpdatePolicy o) { - buildCounterRollingUpdatePolicy++; - if (buildCounterRollingUpdatePolicy < 3) { - unittest.expect(o.autoPauseAfterInstances, unittest.equals(42)); - unittest.expect(o.instanceStartupTimeoutSec, unittest.equals(42)); - unittest.expect(o.maxNumConcurrentInstances, unittest.equals(42)); - unittest.expect(o.maxNumFailedInstances, unittest.equals(42)); - unittest.expect(o.minInstanceUpdateTimeSec, unittest.equals(42)); - } - buildCounterRollingUpdatePolicy--; -} - -core.int buildCounterRollingUpdate = 0; -buildRollingUpdate() { - var o = new api.RollingUpdate(); - buildCounterRollingUpdate++; - if (buildCounterRollingUpdate < 3) { - o.actionType = "foo"; - o.creationTimestamp = "foo"; - o.description = "foo"; - o.error = buildRollingUpdateError(); - o.id = "foo"; - o.instanceGroup = "foo"; - o.instanceGroupManager = "foo"; - o.instanceTemplate = "foo"; - o.kind = "foo"; - o.oldInstanceTemplate = "foo"; - o.policy = buildRollingUpdatePolicy(); - o.progress = 42; - o.selfLink = "foo"; - o.status = "foo"; - o.statusMessage = "foo"; - o.user = "foo"; - } - buildCounterRollingUpdate--; - return o; -} - -checkRollingUpdate(api.RollingUpdate o) { - buildCounterRollingUpdate++; - if (buildCounterRollingUpdate < 3) { - unittest.expect(o.actionType, unittest.equals('foo')); - unittest.expect(o.creationTimestamp, unittest.equals('foo')); - unittest.expect(o.description, unittest.equals('foo')); - checkRollingUpdateError(o.error); - unittest.expect(o.id, unittest.equals('foo')); - unittest.expect(o.instanceGroup, unittest.equals('foo')); - unittest.expect(o.instanceGroupManager, unittest.equals('foo')); - unittest.expect(o.instanceTemplate, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.oldInstanceTemplate, unittest.equals('foo')); - checkRollingUpdatePolicy(o.policy); - unittest.expect(o.progress, unittest.equals(42)); - unittest.expect(o.selfLink, unittest.equals('foo')); - unittest.expect(o.status, unittest.equals('foo')); - unittest.expect(o.statusMessage, unittest.equals('foo')); - unittest.expect(o.user, unittest.equals('foo')); - } - buildCounterRollingUpdate--; -} - -buildUnnamed5249() { - var o = new core.List<api.RollingUpdate>(); - o.add(buildRollingUpdate()); - o.add(buildRollingUpdate()); - return o; -} - -checkUnnamed5249(core.List<api.RollingUpdate> o) { - unittest.expect(o, unittest.hasLength(2)); - checkRollingUpdate(o[0]); - checkRollingUpdate(o[1]); -} - -core.int buildCounterRollingUpdateList = 0; -buildRollingUpdateList() { - var o = new api.RollingUpdateList(); - buildCounterRollingUpdateList++; - if (buildCounterRollingUpdateList < 3) { - o.items = buildUnnamed5249(); - o.kind = "foo"; - o.nextPageToken = "foo"; - o.selfLink = "foo"; - } - buildCounterRollingUpdateList--; - return o; -} - -checkRollingUpdateList(api.RollingUpdateList o) { - buildCounterRollingUpdateList++; - if (buildCounterRollingUpdateList < 3) { - checkUnnamed5249(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - unittest.expect(o.selfLink, unittest.equals('foo')); - } - buildCounterRollingUpdateList--; -} - -main() { - unittest.group("obj-schema-InstanceUpdateErrorErrors", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceUpdateErrorErrors(); - var od = new api.InstanceUpdateErrorErrors.fromJson(o.toJson()); - checkInstanceUpdateErrorErrors(od); - }); - }); - - unittest.group("obj-schema-InstanceUpdateError", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceUpdateError(); - var od = new api.InstanceUpdateError.fromJson(o.toJson()); - checkInstanceUpdateError(od); - }); - }); - - unittest.group("obj-schema-InstanceUpdate", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceUpdate(); - var od = new api.InstanceUpdate.fromJson(o.toJson()); - checkInstanceUpdate(od); - }); - }); - - unittest.group("obj-schema-InstanceUpdateList", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceUpdateList(); - var od = new api.InstanceUpdateList.fromJson(o.toJson()); - checkInstanceUpdateList(od); - }); - }); - - unittest.group("obj-schema-OperationErrorErrors", () { - unittest.test("to-json--from-json", () { - var o = buildOperationErrorErrors(); - var od = new api.OperationErrorErrors.fromJson(o.toJson()); - checkOperationErrorErrors(od); - }); - }); - - unittest.group("obj-schema-OperationError", () { - unittest.test("to-json--from-json", () { - var o = buildOperationError(); - var od = new api.OperationError.fromJson(o.toJson()); - checkOperationError(od); - }); - }); - - unittest.group("obj-schema-OperationWarningsData", () { - unittest.test("to-json--from-json", () { - var o = buildOperationWarningsData(); - var od = new api.OperationWarningsData.fromJson(o.toJson()); - checkOperationWarningsData(od); - }); - }); - - unittest.group("obj-schema-OperationWarnings", () { - unittest.test("to-json--from-json", () { - var o = buildOperationWarnings(); - var od = new api.OperationWarnings.fromJson(o.toJson()); - checkOperationWarnings(od); - }); - }); - - unittest.group("obj-schema-Operation", () { - unittest.test("to-json--from-json", () { - var o = buildOperation(); - var od = new api.Operation.fromJson(o.toJson()); - checkOperation(od); - }); - }); - - unittest.group("obj-schema-OperationList", () { - unittest.test("to-json--from-json", () { - var o = buildOperationList(); - var od = new api.OperationList.fromJson(o.toJson()); - checkOperationList(od); - }); - }); - - unittest.group("obj-schema-RollingUpdateErrorErrors", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdateErrorErrors(); - var od = new api.RollingUpdateErrorErrors.fromJson(o.toJson()); - checkRollingUpdateErrorErrors(od); - }); - }); - - unittest.group("obj-schema-RollingUpdateError", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdateError(); - var od = new api.RollingUpdateError.fromJson(o.toJson()); - checkRollingUpdateError(od); - }); - }); - - unittest.group("obj-schema-RollingUpdatePolicy", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdatePolicy(); - var od = new api.RollingUpdatePolicy.fromJson(o.toJson()); - checkRollingUpdatePolicy(od); - }); - }); - - unittest.group("obj-schema-RollingUpdate", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdate(); - var od = new api.RollingUpdate.fromJson(o.toJson()); - checkRollingUpdate(od); - }); - }); - - unittest.group("obj-schema-RollingUpdateList", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdateList(); - var od = new api.RollingUpdateList.fromJson(o.toJson()); - checkRollingUpdateList(od); - }); - }); - - unittest.group("resource-RollingUpdatesResourceApi", () { - unittest.test("method--cancel", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .cancel(arg_project, arg_zone, arg_rollingUpdate, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildRollingUpdate()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_zone, arg_rollingUpdate, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkRollingUpdate(response); - }))); - }); - - unittest.test("method--insert", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_request = buildRollingUpdate(); - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.RollingUpdate.fromJson(json); - checkRollingUpdate(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .insert(arg_request, arg_project, arg_zone, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_filter = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildRollingUpdateList()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_zone, - filter: arg_filter, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkRollingUpdateList(response); - }))); - }); - - unittest.test("method--listInstanceUpdates", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_filter = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstanceUpdateList()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .listInstanceUpdates(arg_project, arg_zone, arg_rollingUpdate, - filter: arg_filter, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstanceUpdateList(response); - }))); - }); - - unittest.test("method--pause", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .pause(arg_project, arg_zone, arg_rollingUpdate, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--resume", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .resume(arg_project, arg_zone, arg_rollingUpdate, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--rollback", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .rollback(arg_project, arg_zone, arg_rollingUpdate, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - }); - - unittest.group("resource-ZoneOperationsResourceApi", () { - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.ZoneOperationsResourceApi res = - new api.ReplicapoolupdaterApi(mock).zoneOperations; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_operation = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_zone, arg_operation, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.ZoneOperationsResourceApi res = - new api.ReplicapoolupdaterApi(mock).zoneOperations; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_filter = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperationList()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_zone, - filter: arg_filter, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperationList(response); - }))); - }); - }); -}
diff --git a/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart b/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart index be88a39..e5995d8 100644 --- a/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart +++ b/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart
@@ -50,14 +50,14 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5122() { +buildUnnamed4723() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5122(core.List<core.String> o) { +checkUnnamed4723(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -69,7 +69,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5122(); + o.members = buildUnnamed4723(); o.role = "foo"; } buildCounterBinding--; @@ -80,7 +80,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5122(o.members); + checkUnnamed4723(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; @@ -166,14 +166,14 @@ buildCounterExpr--; } -buildUnnamed5123() { +buildUnnamed4724() { var o = new core.List<api.RuntimeConfig>(); o.add(buildRuntimeConfig()); o.add(buildRuntimeConfig()); return o; } -checkUnnamed5123(core.List<api.RuntimeConfig> o) { +checkUnnamed4724(core.List<api.RuntimeConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkRuntimeConfig(o[0]); checkRuntimeConfig(o[1]); @@ -184,7 +184,7 @@ var o = new api.ListConfigsResponse(); buildCounterListConfigsResponse++; if (buildCounterListConfigsResponse < 3) { - o.configs = buildUnnamed5123(); + o.configs = buildUnnamed4724(); o.nextPageToken = "foo"; } buildCounterListConfigsResponse--; @@ -194,20 +194,20 @@ checkListConfigsResponse(api.ListConfigsResponse o) { buildCounterListConfigsResponse++; if (buildCounterListConfigsResponse < 3) { - checkUnnamed5123(o.configs); + checkUnnamed4724(o.configs); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListConfigsResponse--; } -buildUnnamed5124() { +buildUnnamed4725() { var o = new core.List<api.Variable>(); o.add(buildVariable()); o.add(buildVariable()); return o; } -checkUnnamed5124(core.List<api.Variable> o) { +checkUnnamed4725(core.List<api.Variable> o) { unittest.expect(o, unittest.hasLength(2)); checkVariable(o[0]); checkVariable(o[1]); @@ -219,7 +219,7 @@ buildCounterListVariablesResponse++; if (buildCounterListVariablesResponse < 3) { o.nextPageToken = "foo"; - o.variables = buildUnnamed5124(); + o.variables = buildUnnamed4725(); } buildCounterListVariablesResponse--; return o; @@ -229,19 +229,19 @@ buildCounterListVariablesResponse++; if (buildCounterListVariablesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5124(o.variables); + checkUnnamed4725(o.variables); } buildCounterListVariablesResponse--; } -buildUnnamed5125() { +buildUnnamed4726() { var o = new core.List<api.Waiter>(); o.add(buildWaiter()); o.add(buildWaiter()); return o; } -checkUnnamed5125(core.List<api.Waiter> o) { +checkUnnamed4726(core.List<api.Waiter> o) { unittest.expect(o, unittest.hasLength(2)); checkWaiter(o[0]); checkWaiter(o[1]); @@ -253,7 +253,7 @@ buildCounterListWaitersResponse++; if (buildCounterListWaitersResponse < 3) { o.nextPageToken = "foo"; - o.waiters = buildUnnamed5125(); + o.waiters = buildUnnamed4726(); } buildCounterListWaitersResponse--; return o; @@ -263,12 +263,12 @@ buildCounterListWaitersResponse++; if (buildCounterListWaitersResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5125(o.waiters); + checkUnnamed4726(o.waiters); } buildCounterListWaitersResponse--; } -buildUnnamed5126() { +buildUnnamed4727() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -283,7 +283,7 @@ return o; } -checkUnnamed5126(core.Map<core.String, core.Object> o) { +checkUnnamed4727(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -297,7 +297,7 @@ unittest.expect(casted2["string"], unittest.equals('foo')); } -buildUnnamed5127() { +buildUnnamed4728() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -312,7 +312,7 @@ return o; } -checkUnnamed5127(core.Map<core.String, core.Object> o) { +checkUnnamed4728(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -333,9 +333,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5126(); + o.metadata = buildUnnamed4727(); o.name = "foo"; - o.response = buildUnnamed5127(); + o.response = buildUnnamed4728(); } buildCounterOperation--; return o; @@ -346,21 +346,21 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5126(o.metadata); + checkUnnamed4727(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5127(o.response); + checkUnnamed4728(o.response); } buildCounterOperation--; } -buildUnnamed5128() { +buildUnnamed4729() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5128(core.List<api.Binding> o) { +checkUnnamed4729(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -371,7 +371,7 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.bindings = buildUnnamed5128(); + o.bindings = buildUnnamed4729(); o.etag = "foo"; o.version = 42; } @@ -382,7 +382,7 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5128(o.bindings); + checkUnnamed4729(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } @@ -429,7 +429,7 @@ buildCounterSetIamPolicyRequest--; } -buildUnnamed5129() { +buildUnnamed4730() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -444,7 +444,7 @@ return o; } -checkUnnamed5129(core.Map<core.String, core.Object> o) { +checkUnnamed4730(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -458,17 +458,17 @@ unittest.expect(casted6["string"], unittest.equals('foo')); } -buildUnnamed5130() { +buildUnnamed4731() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5129()); - o.add(buildUnnamed5129()); + o.add(buildUnnamed4730()); + o.add(buildUnnamed4730()); return o; } -checkUnnamed5130(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4731(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5129(o[0]); - checkUnnamed5129(o[1]); + checkUnnamed4730(o[0]); + checkUnnamed4730(o[1]); } core.int buildCounterStatus = 0; @@ -477,7 +477,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5130(); + o.details = buildUnnamed4731(); o.message = "foo"; } buildCounterStatus--; @@ -488,20 +488,20 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5130(o.details); + checkUnnamed4731(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5131() { +buildUnnamed4732() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5131(core.List<core.String> o) { +checkUnnamed4732(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -512,7 +512,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5131(); + o.permissions = buildUnnamed4732(); } buildCounterTestIamPermissionsRequest--; return o; @@ -521,19 +521,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5131(o.permissions); + checkUnnamed4732(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5132() { +buildUnnamed4733() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5132(core.List<core.String> o) { +checkUnnamed4733(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -544,7 +544,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5132(); + o.permissions = buildUnnamed4733(); } buildCounterTestIamPermissionsResponse--; return o; @@ -553,7 +553,7 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5132(o.permissions); + checkUnnamed4733(o.permissions); } buildCounterTestIamPermissionsResponse--; } @@ -1510,10 +1510,10 @@ api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables; var arg_parent = "foo"; - var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_returnValues = true; var arg_pageSize = 42; + var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1546,13 +1546,13 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["returnValues"].first, unittest.equals("$arg_returnValues")); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1563,10 +1563,10 @@ }), true); res .list(arg_parent, - filter: arg_filter, pageToken: arg_pageToken, returnValues: arg_returnValues, pageSize: arg_pageSize, + filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListVariablesResponse(response);
diff --git a/generated/googleapis_beta/test/servicenetworking/v1beta_test.dart b/generated/googleapis_beta/test/servicenetworking/v1beta_test.dart new file mode 100644 index 0000000..9ca8188 --- /dev/null +++ b/generated/googleapis_beta/test/servicenetworking/v1beta_test.dart
@@ -0,0 +1,3297 @@ +library googleapis_beta.servicenetworking.v1beta.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/servicenetworking/v1beta.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +buildUnnamed4554() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4554(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterAddSubnetworkRequest = 0; +buildAddSubnetworkRequest() { + var o = new api.AddSubnetworkRequest(); + buildCounterAddSubnetworkRequest++; + if (buildCounterAddSubnetworkRequest < 3) { + o.consumer = "foo"; + o.consumerNetwork = "foo"; + o.description = "foo"; + o.ipPrefixLength = 42; + o.region = "foo"; + o.requestedAddress = "foo"; + o.subnetwork = "foo"; + o.subnetworkUsers = buildUnnamed4554(); + } + buildCounterAddSubnetworkRequest--; + return o; +} + +checkAddSubnetworkRequest(api.AddSubnetworkRequest o) { + buildCounterAddSubnetworkRequest++; + if (buildCounterAddSubnetworkRequest < 3) { + unittest.expect(o.consumer, unittest.equals('foo')); + unittest.expect(o.consumerNetwork, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.ipPrefixLength, unittest.equals(42)); + unittest.expect(o.region, unittest.equals('foo')); + unittest.expect(o.requestedAddress, unittest.equals('foo')); + unittest.expect(o.subnetwork, unittest.equals('foo')); + checkUnnamed4554(o.subnetworkUsers); + } + buildCounterAddSubnetworkRequest--; +} + +buildUnnamed4555() { + var o = new core.List<api.Method>(); + o.add(buildMethod()); + o.add(buildMethod()); + return o; +} + +checkUnnamed4555(core.List<api.Method> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMethod(o[0]); + checkMethod(o[1]); +} + +buildUnnamed4556() { + var o = new core.List<api.Mixin>(); + o.add(buildMixin()); + o.add(buildMixin()); + return o; +} + +checkUnnamed4556(core.List<api.Mixin> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMixin(o[0]); + checkMixin(o[1]); +} + +buildUnnamed4557() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4557(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterApi = 0; +buildApi() { + var o = new api.Api(); + buildCounterApi++; + if (buildCounterApi < 3) { + o.methods = buildUnnamed4555(); + o.mixins = buildUnnamed4556(); + o.name = "foo"; + o.options = buildUnnamed4557(); + o.sourceContext = buildSourceContext(); + o.syntax = "foo"; + o.version = "foo"; + } + buildCounterApi--; + return o; +} + +checkApi(api.Api o) { + buildCounterApi++; + if (buildCounterApi < 3) { + checkUnnamed4555(o.methods); + checkUnnamed4556(o.mixins); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4557(o.options); + checkSourceContext(o.sourceContext); + unittest.expect(o.syntax, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals('foo')); + } + buildCounterApi--; +} + +core.int buildCounterAuthProvider = 0; +buildAuthProvider() { + var o = new api.AuthProvider(); + buildCounterAuthProvider++; + if (buildCounterAuthProvider < 3) { + o.audiences = "foo"; + o.authorizationUrl = "foo"; + o.id = "foo"; + o.issuer = "foo"; + o.jwksUri = "foo"; + } + buildCounterAuthProvider--; + return o; +} + +checkAuthProvider(api.AuthProvider o) { + buildCounterAuthProvider++; + if (buildCounterAuthProvider < 3) { + unittest.expect(o.audiences, unittest.equals('foo')); + unittest.expect(o.authorizationUrl, unittest.equals('foo')); + unittest.expect(o.id, unittest.equals('foo')); + unittest.expect(o.issuer, unittest.equals('foo')); + unittest.expect(o.jwksUri, unittest.equals('foo')); + } + buildCounterAuthProvider--; +} + +core.int buildCounterAuthRequirement = 0; +buildAuthRequirement() { + var o = new api.AuthRequirement(); + buildCounterAuthRequirement++; + if (buildCounterAuthRequirement < 3) { + o.audiences = "foo"; + o.providerId = "foo"; + } + buildCounterAuthRequirement--; + return o; +} + +checkAuthRequirement(api.AuthRequirement o) { + buildCounterAuthRequirement++; + if (buildCounterAuthRequirement < 3) { + unittest.expect(o.audiences, unittest.equals('foo')); + unittest.expect(o.providerId, unittest.equals('foo')); + } + buildCounterAuthRequirement--; +} + +buildUnnamed4558() { + var o = new core.List<api.AuthProvider>(); + o.add(buildAuthProvider()); + o.add(buildAuthProvider()); + return o; +} + +checkUnnamed4558(core.List<api.AuthProvider> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuthProvider(o[0]); + checkAuthProvider(o[1]); +} + +buildUnnamed4559() { + var o = new core.List<api.AuthenticationRule>(); + o.add(buildAuthenticationRule()); + o.add(buildAuthenticationRule()); + return o; +} + +checkUnnamed4559(core.List<api.AuthenticationRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuthenticationRule(o[0]); + checkAuthenticationRule(o[1]); +} + +core.int buildCounterAuthentication = 0; +buildAuthentication() { + var o = new api.Authentication(); + buildCounterAuthentication++; + if (buildCounterAuthentication < 3) { + o.providers = buildUnnamed4558(); + o.rules = buildUnnamed4559(); + } + buildCounterAuthentication--; + return o; +} + +checkAuthentication(api.Authentication o) { + buildCounterAuthentication++; + if (buildCounterAuthentication < 3) { + checkUnnamed4558(o.providers); + checkUnnamed4559(o.rules); + } + buildCounterAuthentication--; +} + +buildUnnamed4560() { + var o = new core.List<api.AuthRequirement>(); + o.add(buildAuthRequirement()); + o.add(buildAuthRequirement()); + return o; +} + +checkUnnamed4560(core.List<api.AuthRequirement> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuthRequirement(o[0]); + checkAuthRequirement(o[1]); +} + +core.int buildCounterAuthenticationRule = 0; +buildAuthenticationRule() { + var o = new api.AuthenticationRule(); + buildCounterAuthenticationRule++; + if (buildCounterAuthenticationRule < 3) { + o.allowWithoutCredential = true; + o.oauth = buildOAuthRequirements(); + o.requirements = buildUnnamed4560(); + o.selector = "foo"; + } + buildCounterAuthenticationRule--; + return o; +} + +checkAuthenticationRule(api.AuthenticationRule o) { + buildCounterAuthenticationRule++; + if (buildCounterAuthenticationRule < 3) { + unittest.expect(o.allowWithoutCredential, unittest.isTrue); + checkOAuthRequirements(o.oauth); + checkUnnamed4560(o.requirements); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterAuthenticationRule--; +} + +core.int buildCounterAuthorizationConfig = 0; +buildAuthorizationConfig() { + var o = new api.AuthorizationConfig(); + buildCounterAuthorizationConfig++; + if (buildCounterAuthorizationConfig < 3) { + o.provider = "foo"; + } + buildCounterAuthorizationConfig--; + return o; +} + +checkAuthorizationConfig(api.AuthorizationConfig o) { + buildCounterAuthorizationConfig++; + if (buildCounterAuthorizationConfig < 3) { + unittest.expect(o.provider, unittest.equals('foo')); + } + buildCounterAuthorizationConfig--; +} + +buildUnnamed4561() { + var o = new core.List<api.BackendRule>(); + o.add(buildBackendRule()); + o.add(buildBackendRule()); + return o; +} + +checkUnnamed4561(core.List<api.BackendRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkBackendRule(o[0]); + checkBackendRule(o[1]); +} + +core.int buildCounterBackend = 0; +buildBackend() { + var o = new api.Backend(); + buildCounterBackend++; + if (buildCounterBackend < 3) { + o.rules = buildUnnamed4561(); + } + buildCounterBackend--; + return o; +} + +checkBackend(api.Backend o) { + buildCounterBackend++; + if (buildCounterBackend < 3) { + checkUnnamed4561(o.rules); + } + buildCounterBackend--; +} + +core.int buildCounterBackendRule = 0; +buildBackendRule() { + var o = new api.BackendRule(); + buildCounterBackendRule++; + if (buildCounterBackendRule < 3) { + o.address = "foo"; + o.deadline = 42.0; + o.jwtAudience = "foo"; + o.minDeadline = 42.0; + o.operationDeadline = 42.0; + o.pathTranslation = "foo"; + o.selector = "foo"; + } + buildCounterBackendRule--; + return o; +} + +checkBackendRule(api.BackendRule o) { + buildCounterBackendRule++; + if (buildCounterBackendRule < 3) { + unittest.expect(o.address, unittest.equals('foo')); + unittest.expect(o.deadline, unittest.equals(42.0)); + unittest.expect(o.jwtAudience, unittest.equals('foo')); + unittest.expect(o.minDeadline, unittest.equals(42.0)); + unittest.expect(o.operationDeadline, unittest.equals(42.0)); + unittest.expect(o.pathTranslation, unittest.equals('foo')); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterBackendRule--; +} + +buildUnnamed4562() { + var o = new core.List<api.BillingDestination>(); + o.add(buildBillingDestination()); + o.add(buildBillingDestination()); + return o; +} + +checkUnnamed4562(core.List<api.BillingDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkBillingDestination(o[0]); + checkBillingDestination(o[1]); +} + +core.int buildCounterBilling = 0; +buildBilling() { + var o = new api.Billing(); + buildCounterBilling++; + if (buildCounterBilling < 3) { + o.consumerDestinations = buildUnnamed4562(); + } + buildCounterBilling--; + return o; +} + +checkBilling(api.Billing o) { + buildCounterBilling++; + if (buildCounterBilling < 3) { + checkUnnamed4562(o.consumerDestinations); + } + buildCounterBilling--; +} + +buildUnnamed4563() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4563(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterBillingDestination = 0; +buildBillingDestination() { + var o = new api.BillingDestination(); + buildCounterBillingDestination++; + if (buildCounterBillingDestination < 3) { + o.metrics = buildUnnamed4563(); + o.monitoredResource = "foo"; + } + buildCounterBillingDestination--; + return o; +} + +checkBillingDestination(api.BillingDestination o) { + buildCounterBillingDestination++; + if (buildCounterBillingDestination < 3) { + checkUnnamed4563(o.metrics); + unittest.expect(o.monitoredResource, unittest.equals('foo')); + } + buildCounterBillingDestination--; +} + +buildUnnamed4564() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4564(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterConnection = 0; +buildConnection() { + var o = new api.Connection(); + buildCounterConnection++; + if (buildCounterConnection < 3) { + o.network = "foo"; + o.peering = "foo"; + o.reservedPeeringRanges = buildUnnamed4564(); + o.service = "foo"; + } + buildCounterConnection--; + return o; +} + +checkConnection(api.Connection o) { + buildCounterConnection++; + if (buildCounterConnection < 3) { + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.peering, unittest.equals('foo')); + checkUnnamed4564(o.reservedPeeringRanges); + unittest.expect(o.service, unittest.equals('foo')); + } + buildCounterConnection--; +} + +buildUnnamed4565() { + var o = new core.List<api.ContextRule>(); + o.add(buildContextRule()); + o.add(buildContextRule()); + return o; +} + +checkUnnamed4565(core.List<api.ContextRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContextRule(o[0]); + checkContextRule(o[1]); +} + +core.int buildCounterContext = 0; +buildContext() { + var o = new api.Context(); + buildCounterContext++; + if (buildCounterContext < 3) { + o.rules = buildUnnamed4565(); + } + buildCounterContext--; + return o; +} + +checkContext(api.Context o) { + buildCounterContext++; + if (buildCounterContext < 3) { + checkUnnamed4565(o.rules); + } + buildCounterContext--; +} + +buildUnnamed4566() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4566(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4567() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4567(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4568() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4568(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4569() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4569(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterContextRule = 0; +buildContextRule() { + var o = new api.ContextRule(); + buildCounterContextRule++; + if (buildCounterContextRule < 3) { + o.allowedRequestExtensions = buildUnnamed4566(); + o.allowedResponseExtensions = buildUnnamed4567(); + o.provided = buildUnnamed4568(); + o.requested = buildUnnamed4569(); + o.selector = "foo"; + } + buildCounterContextRule--; + return o; +} + +checkContextRule(api.ContextRule o) { + buildCounterContextRule++; + if (buildCounterContextRule < 3) { + checkUnnamed4566(o.allowedRequestExtensions); + checkUnnamed4567(o.allowedResponseExtensions); + checkUnnamed4568(o.provided); + checkUnnamed4569(o.requested); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterContextRule--; +} + +core.int buildCounterControl = 0; +buildControl() { + var o = new api.Control(); + buildCounterControl++; + if (buildCounterControl < 3) { + o.environment = "foo"; + } + buildCounterControl--; + return o; +} + +checkControl(api.Control o) { + buildCounterControl++; + if (buildCounterControl < 3) { + unittest.expect(o.environment, unittest.equals('foo')); + } + buildCounterControl--; +} + +buildUnnamed4570() { + var o = new core.List<api.CustomErrorRule>(); + o.add(buildCustomErrorRule()); + o.add(buildCustomErrorRule()); + return o; +} + +checkUnnamed4570(core.List<api.CustomErrorRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCustomErrorRule(o[0]); + checkCustomErrorRule(o[1]); +} + +buildUnnamed4571() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4571(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCustomError = 0; +buildCustomError() { + var o = new api.CustomError(); + buildCounterCustomError++; + if (buildCounterCustomError < 3) { + o.rules = buildUnnamed4570(); + o.types = buildUnnamed4571(); + } + buildCounterCustomError--; + return o; +} + +checkCustomError(api.CustomError o) { + buildCounterCustomError++; + if (buildCounterCustomError < 3) { + checkUnnamed4570(o.rules); + checkUnnamed4571(o.types); + } + buildCounterCustomError--; +} + +core.int buildCounterCustomErrorRule = 0; +buildCustomErrorRule() { + var o = new api.CustomErrorRule(); + buildCounterCustomErrorRule++; + if (buildCounterCustomErrorRule < 3) { + o.isErrorType = true; + o.selector = "foo"; + } + buildCounterCustomErrorRule--; + return o; +} + +checkCustomErrorRule(api.CustomErrorRule o) { + buildCounterCustomErrorRule++; + if (buildCounterCustomErrorRule < 3) { + unittest.expect(o.isErrorType, unittest.isTrue); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterCustomErrorRule--; +} + +core.int buildCounterCustomHttpPattern = 0; +buildCustomHttpPattern() { + var o = new api.CustomHttpPattern(); + buildCounterCustomHttpPattern++; + if (buildCounterCustomHttpPattern < 3) { + o.kind = "foo"; + o.path = "foo"; + } + buildCounterCustomHttpPattern--; + return o; +} + +checkCustomHttpPattern(api.CustomHttpPattern o) { + buildCounterCustomHttpPattern++; + if (buildCounterCustomHttpPattern < 3) { + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + } + buildCounterCustomHttpPattern--; +} + +buildUnnamed4572() { + var o = new core.List<api.Page>(); + o.add(buildPage()); + o.add(buildPage()); + return o; +} + +checkUnnamed4572(core.List<api.Page> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPage(o[0]); + checkPage(o[1]); +} + +buildUnnamed4573() { + var o = new core.List<api.DocumentationRule>(); + o.add(buildDocumentationRule()); + o.add(buildDocumentationRule()); + return o; +} + +checkUnnamed4573(core.List<api.DocumentationRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDocumentationRule(o[0]); + checkDocumentationRule(o[1]); +} + +core.int buildCounterDocumentation = 0; +buildDocumentation() { + var o = new api.Documentation(); + buildCounterDocumentation++; + if (buildCounterDocumentation < 3) { + o.documentationRootUrl = "foo"; + o.overview = "foo"; + o.pages = buildUnnamed4572(); + o.rules = buildUnnamed4573(); + o.summary = "foo"; + } + buildCounterDocumentation--; + return o; +} + +checkDocumentation(api.Documentation o) { + buildCounterDocumentation++; + if (buildCounterDocumentation < 3) { + unittest.expect(o.documentationRootUrl, unittest.equals('foo')); + unittest.expect(o.overview, unittest.equals('foo')); + checkUnnamed4572(o.pages); + checkUnnamed4573(o.rules); + unittest.expect(o.summary, unittest.equals('foo')); + } + buildCounterDocumentation--; +} + +core.int buildCounterDocumentationRule = 0; +buildDocumentationRule() { + var o = new api.DocumentationRule(); + buildCounterDocumentationRule++; + if (buildCounterDocumentationRule < 3) { + o.deprecationDescription = "foo"; + o.description = "foo"; + o.selector = "foo"; + } + buildCounterDocumentationRule--; + return o; +} + +checkDocumentationRule(api.DocumentationRule o) { + buildCounterDocumentationRule++; + if (buildCounterDocumentationRule < 3) { + unittest.expect(o.deprecationDescription, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterDocumentationRule--; +} + +buildUnnamed4574() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4574(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4575() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4575(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterEndpoint = 0; +buildEndpoint() { + var o = new api.Endpoint(); + buildCounterEndpoint++; + if (buildCounterEndpoint < 3) { + o.aliases = buildUnnamed4574(); + o.allowCors = true; + o.features = buildUnnamed4575(); + o.name = "foo"; + o.target = "foo"; + } + buildCounterEndpoint--; + return o; +} + +checkEndpoint(api.Endpoint o) { + buildCounterEndpoint++; + if (buildCounterEndpoint < 3) { + checkUnnamed4574(o.aliases); + unittest.expect(o.allowCors, unittest.isTrue); + checkUnnamed4575(o.features); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.target, unittest.equals('foo')); + } + buildCounterEndpoint--; +} + +buildUnnamed4576() { + var o = new core.List<api.EnumValue>(); + o.add(buildEnumValue()); + o.add(buildEnumValue()); + return o; +} + +checkUnnamed4576(core.List<api.EnumValue> o) { + unittest.expect(o, unittest.hasLength(2)); + checkEnumValue(o[0]); + checkEnumValue(o[1]); +} + +buildUnnamed4577() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4577(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterEnum = 0; +buildEnum() { + var o = new api.Enum(); + buildCounterEnum++; + if (buildCounterEnum < 3) { + o.enumvalue = buildUnnamed4576(); + o.name = "foo"; + o.options = buildUnnamed4577(); + o.sourceContext = buildSourceContext(); + o.syntax = "foo"; + } + buildCounterEnum--; + return o; +} + +checkEnum(api.Enum o) { + buildCounterEnum++; + if (buildCounterEnum < 3) { + checkUnnamed4576(o.enumvalue); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4577(o.options); + checkSourceContext(o.sourceContext); + unittest.expect(o.syntax, unittest.equals('foo')); + } + buildCounterEnum--; +} + +buildUnnamed4578() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4578(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterEnumValue = 0; +buildEnumValue() { + var o = new api.EnumValue(); + buildCounterEnumValue++; + if (buildCounterEnumValue < 3) { + o.name = "foo"; + o.number = 42; + o.options = buildUnnamed4578(); + } + buildCounterEnumValue--; + return o; +} + +checkEnumValue(api.EnumValue o) { + buildCounterEnumValue++; + if (buildCounterEnumValue < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.number, unittest.equals(42)); + checkUnnamed4578(o.options); + } + buildCounterEnumValue--; +} + +core.int buildCounterExperimental = 0; +buildExperimental() { + var o = new api.Experimental(); + buildCounterExperimental++; + if (buildCounterExperimental < 3) { + o.authorization = buildAuthorizationConfig(); + } + buildCounterExperimental--; + return o; +} + +checkExperimental(api.Experimental o) { + buildCounterExperimental++; + if (buildCounterExperimental < 3) { + checkAuthorizationConfig(o.authorization); + } + buildCounterExperimental--; +} + +buildUnnamed4579() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4579(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterField = 0; +buildField() { + var o = new api.Field(); + buildCounterField++; + if (buildCounterField < 3) { + o.cardinality = "foo"; + o.defaultValue = "foo"; + o.jsonName = "foo"; + o.kind = "foo"; + o.name = "foo"; + o.number = 42; + o.oneofIndex = 42; + o.options = buildUnnamed4579(); + o.packed = true; + o.typeUrl = "foo"; + } + buildCounterField--; + return o; +} + +checkField(api.Field o) { + buildCounterField++; + if (buildCounterField < 3) { + unittest.expect(o.cardinality, unittest.equals('foo')); + unittest.expect(o.defaultValue, unittest.equals('foo')); + unittest.expect(o.jsonName, unittest.equals('foo')); + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.number, unittest.equals(42)); + unittest.expect(o.oneofIndex, unittest.equals(42)); + checkUnnamed4579(o.options); + unittest.expect(o.packed, unittest.isTrue); + unittest.expect(o.typeUrl, unittest.equals('foo')); + } + buildCounterField--; +} + +core.int buildCounterGoogleCloudServicenetworkingV1betaSubnetwork = 0; +buildGoogleCloudServicenetworkingV1betaSubnetwork() { + var o = new api.GoogleCloudServicenetworkingV1betaSubnetwork(); + buildCounterGoogleCloudServicenetworkingV1betaSubnetwork++; + if (buildCounterGoogleCloudServicenetworkingV1betaSubnetwork < 3) { + o.ipCidrRange = "foo"; + o.name = "foo"; + o.network = "foo"; + o.outsideAllocation = true; + } + buildCounterGoogleCloudServicenetworkingV1betaSubnetwork--; + return o; +} + +checkGoogleCloudServicenetworkingV1betaSubnetwork( + api.GoogleCloudServicenetworkingV1betaSubnetwork o) { + buildCounterGoogleCloudServicenetworkingV1betaSubnetwork++; + if (buildCounterGoogleCloudServicenetworkingV1betaSubnetwork < 3) { + unittest.expect(o.ipCidrRange, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.outsideAllocation, unittest.isTrue); + } + buildCounterGoogleCloudServicenetworkingV1betaSubnetwork--; +} + +buildUnnamed4580() { + var o = new core.List<api.HttpRule>(); + o.add(buildHttpRule()); + o.add(buildHttpRule()); + return o; +} + +checkUnnamed4580(core.List<api.HttpRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHttpRule(o[0]); + checkHttpRule(o[1]); +} + +core.int buildCounterHttp = 0; +buildHttp() { + var o = new api.Http(); + buildCounterHttp++; + if (buildCounterHttp < 3) { + o.fullyDecodeReservedExpansion = true; + o.rules = buildUnnamed4580(); + } + buildCounterHttp--; + return o; +} + +checkHttp(api.Http o) { + buildCounterHttp++; + if (buildCounterHttp < 3) { + unittest.expect(o.fullyDecodeReservedExpansion, unittest.isTrue); + checkUnnamed4580(o.rules); + } + buildCounterHttp--; +} + +buildUnnamed4581() { + var o = new core.List<api.HttpRule>(); + o.add(buildHttpRule()); + o.add(buildHttpRule()); + return o; +} + +checkUnnamed4581(core.List<api.HttpRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHttpRule(o[0]); + checkHttpRule(o[1]); +} + +core.int buildCounterHttpRule = 0; +buildHttpRule() { + var o = new api.HttpRule(); + buildCounterHttpRule++; + if (buildCounterHttpRule < 3) { + o.additionalBindings = buildUnnamed4581(); + o.body = "foo"; + o.custom = buildCustomHttpPattern(); + o.delete = "foo"; + o.get = "foo"; + o.patch = "foo"; + o.post = "foo"; + o.put = "foo"; + o.responseBody = "foo"; + o.selector = "foo"; + } + buildCounterHttpRule--; + return o; +} + +checkHttpRule(api.HttpRule o) { + buildCounterHttpRule++; + if (buildCounterHttpRule < 3) { + checkUnnamed4581(o.additionalBindings); + unittest.expect(o.body, unittest.equals('foo')); + checkCustomHttpPattern(o.custom); + unittest.expect(o.delete, unittest.equals('foo')); + unittest.expect(o.get, unittest.equals('foo')); + unittest.expect(o.patch, unittest.equals('foo')); + unittest.expect(o.post, unittest.equals('foo')); + unittest.expect(o.put, unittest.equals('foo')); + unittest.expect(o.responseBody, unittest.equals('foo')); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterHttpRule--; +} + +core.int buildCounterLabelDescriptor = 0; +buildLabelDescriptor() { + var o = new api.LabelDescriptor(); + buildCounterLabelDescriptor++; + if (buildCounterLabelDescriptor < 3) { + o.description = "foo"; + o.key = "foo"; + o.valueType = "foo"; + } + buildCounterLabelDescriptor--; + return o; +} + +checkLabelDescriptor(api.LabelDescriptor o) { + buildCounterLabelDescriptor++; + if (buildCounterLabelDescriptor < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.key, unittest.equals('foo')); + unittest.expect(o.valueType, unittest.equals('foo')); + } + buildCounterLabelDescriptor--; +} + +buildUnnamed4582() { + var o = new core.List<api.Connection>(); + o.add(buildConnection()); + o.add(buildConnection()); + return o; +} + +checkUnnamed4582(core.List<api.Connection> o) { + unittest.expect(o, unittest.hasLength(2)); + checkConnection(o[0]); + checkConnection(o[1]); +} + +core.int buildCounterListConnectionsResponse = 0; +buildListConnectionsResponse() { + var o = new api.ListConnectionsResponse(); + buildCounterListConnectionsResponse++; + if (buildCounterListConnectionsResponse < 3) { + o.connections = buildUnnamed4582(); + } + buildCounterListConnectionsResponse--; + return o; +} + +checkListConnectionsResponse(api.ListConnectionsResponse o) { + buildCounterListConnectionsResponse++; + if (buildCounterListConnectionsResponse < 3) { + checkUnnamed4582(o.connections); + } + buildCounterListConnectionsResponse--; +} + +buildUnnamed4583() { + var o = new core.List<api.LabelDescriptor>(); + o.add(buildLabelDescriptor()); + o.add(buildLabelDescriptor()); + return o; +} + +checkUnnamed4583(core.List<api.LabelDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLabelDescriptor(o[0]); + checkLabelDescriptor(o[1]); +} + +core.int buildCounterLogDescriptor = 0; +buildLogDescriptor() { + var o = new api.LogDescriptor(); + buildCounterLogDescriptor++; + if (buildCounterLogDescriptor < 3) { + o.description = "foo"; + o.displayName = "foo"; + o.labels = buildUnnamed4583(); + o.name = "foo"; + } + buildCounterLogDescriptor--; + return o; +} + +checkLogDescriptor(api.LogDescriptor o) { + buildCounterLogDescriptor++; + if (buildCounterLogDescriptor < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + checkUnnamed4583(o.labels); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterLogDescriptor--; +} + +buildUnnamed4584() { + var o = new core.List<api.LoggingDestination>(); + o.add(buildLoggingDestination()); + o.add(buildLoggingDestination()); + return o; +} + +checkUnnamed4584(core.List<api.LoggingDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLoggingDestination(o[0]); + checkLoggingDestination(o[1]); +} + +buildUnnamed4585() { + var o = new core.List<api.LoggingDestination>(); + o.add(buildLoggingDestination()); + o.add(buildLoggingDestination()); + return o; +} + +checkUnnamed4585(core.List<api.LoggingDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLoggingDestination(o[0]); + checkLoggingDestination(o[1]); +} + +core.int buildCounterLogging = 0; +buildLogging() { + var o = new api.Logging(); + buildCounterLogging++; + if (buildCounterLogging < 3) { + o.consumerDestinations = buildUnnamed4584(); + o.producerDestinations = buildUnnamed4585(); + } + buildCounterLogging--; + return o; +} + +checkLogging(api.Logging o) { + buildCounterLogging++; + if (buildCounterLogging < 3) { + checkUnnamed4584(o.consumerDestinations); + checkUnnamed4585(o.producerDestinations); + } + buildCounterLogging--; +} + +buildUnnamed4586() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4586(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterLoggingDestination = 0; +buildLoggingDestination() { + var o = new api.LoggingDestination(); + buildCounterLoggingDestination++; + if (buildCounterLoggingDestination < 3) { + o.logs = buildUnnamed4586(); + o.monitoredResource = "foo"; + } + buildCounterLoggingDestination--; + return o; +} + +checkLoggingDestination(api.LoggingDestination o) { + buildCounterLoggingDestination++; + if (buildCounterLoggingDestination < 3) { + checkUnnamed4586(o.logs); + unittest.expect(o.monitoredResource, unittest.equals('foo')); + } + buildCounterLoggingDestination--; +} + +buildUnnamed4587() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4587(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterMethod = 0; +buildMethod() { + var o = new api.Method(); + buildCounterMethod++; + if (buildCounterMethod < 3) { + o.name = "foo"; + o.options = buildUnnamed4587(); + o.requestStreaming = true; + o.requestTypeUrl = "foo"; + o.responseStreaming = true; + o.responseTypeUrl = "foo"; + o.syntax = "foo"; + } + buildCounterMethod--; + return o; +} + +checkMethod(api.Method o) { + buildCounterMethod++; + if (buildCounterMethod < 3) { + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4587(o.options); + unittest.expect(o.requestStreaming, unittest.isTrue); + unittest.expect(o.requestTypeUrl, unittest.equals('foo')); + unittest.expect(o.responseStreaming, unittest.isTrue); + unittest.expect(o.responseTypeUrl, unittest.equals('foo')); + unittest.expect(o.syntax, unittest.equals('foo')); + } + buildCounterMethod--; +} + +buildUnnamed4588() { + var o = new core.List<api.LabelDescriptor>(); + o.add(buildLabelDescriptor()); + o.add(buildLabelDescriptor()); + return o; +} + +checkUnnamed4588(core.List<api.LabelDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLabelDescriptor(o[0]); + checkLabelDescriptor(o[1]); +} + +core.int buildCounterMetricDescriptor = 0; +buildMetricDescriptor() { + var o = new api.MetricDescriptor(); + buildCounterMetricDescriptor++; + if (buildCounterMetricDescriptor < 3) { + o.description = "foo"; + o.displayName = "foo"; + o.labels = buildUnnamed4588(); + o.metadata = buildMetricDescriptorMetadata(); + o.metricKind = "foo"; + o.name = "foo"; + o.type = "foo"; + o.unit = "foo"; + o.valueType = "foo"; + } + buildCounterMetricDescriptor--; + return o; +} + +checkMetricDescriptor(api.MetricDescriptor o) { + buildCounterMetricDescriptor++; + if (buildCounterMetricDescriptor < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + checkUnnamed4588(o.labels); + checkMetricDescriptorMetadata(o.metadata); + unittest.expect(o.metricKind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + unittest.expect(o.unit, unittest.equals('foo')); + unittest.expect(o.valueType, unittest.equals('foo')); + } + buildCounterMetricDescriptor--; +} + +core.int buildCounterMetricDescriptorMetadata = 0; +buildMetricDescriptorMetadata() { + var o = new api.MetricDescriptorMetadata(); + buildCounterMetricDescriptorMetadata++; + if (buildCounterMetricDescriptorMetadata < 3) { + o.ingestDelay = "foo"; + o.launchStage = "foo"; + o.samplePeriod = "foo"; + } + buildCounterMetricDescriptorMetadata--; + return o; +} + +checkMetricDescriptorMetadata(api.MetricDescriptorMetadata o) { + buildCounterMetricDescriptorMetadata++; + if (buildCounterMetricDescriptorMetadata < 3) { + unittest.expect(o.ingestDelay, unittest.equals('foo')); + unittest.expect(o.launchStage, unittest.equals('foo')); + unittest.expect(o.samplePeriod, unittest.equals('foo')); + } + buildCounterMetricDescriptorMetadata--; +} + +buildUnnamed4589() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4589(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterMetricRule = 0; +buildMetricRule() { + var o = new api.MetricRule(); + buildCounterMetricRule++; + if (buildCounterMetricRule < 3) { + o.metricCosts = buildUnnamed4589(); + o.selector = "foo"; + } + buildCounterMetricRule--; + return o; +} + +checkMetricRule(api.MetricRule o) { + buildCounterMetricRule++; + if (buildCounterMetricRule < 3) { + checkUnnamed4589(o.metricCosts); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterMetricRule--; +} + +core.int buildCounterMixin = 0; +buildMixin() { + var o = new api.Mixin(); + buildCounterMixin++; + if (buildCounterMixin < 3) { + o.name = "foo"; + o.root = "foo"; + } + buildCounterMixin--; + return o; +} + +checkMixin(api.Mixin o) { + buildCounterMixin++; + if (buildCounterMixin < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.root, unittest.equals('foo')); + } + buildCounterMixin--; +} + +buildUnnamed4590() { + var o = new core.List<api.LabelDescriptor>(); + o.add(buildLabelDescriptor()); + o.add(buildLabelDescriptor()); + return o; +} + +checkUnnamed4590(core.List<api.LabelDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLabelDescriptor(o[0]); + checkLabelDescriptor(o[1]); +} + +core.int buildCounterMonitoredResourceDescriptor = 0; +buildMonitoredResourceDescriptor() { + var o = new api.MonitoredResourceDescriptor(); + buildCounterMonitoredResourceDescriptor++; + if (buildCounterMonitoredResourceDescriptor < 3) { + o.description = "foo"; + o.displayName = "foo"; + o.labels = buildUnnamed4590(); + o.name = "foo"; + o.type = "foo"; + } + buildCounterMonitoredResourceDescriptor--; + return o; +} + +checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { + buildCounterMonitoredResourceDescriptor++; + if (buildCounterMonitoredResourceDescriptor < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + checkUnnamed4590(o.labels); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterMonitoredResourceDescriptor--; +} + +buildUnnamed4591() { + var o = new core.List<api.MonitoringDestination>(); + o.add(buildMonitoringDestination()); + o.add(buildMonitoringDestination()); + return o; +} + +checkUnnamed4591(core.List<api.MonitoringDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMonitoringDestination(o[0]); + checkMonitoringDestination(o[1]); +} + +buildUnnamed4592() { + var o = new core.List<api.MonitoringDestination>(); + o.add(buildMonitoringDestination()); + o.add(buildMonitoringDestination()); + return o; +} + +checkUnnamed4592(core.List<api.MonitoringDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMonitoringDestination(o[0]); + checkMonitoringDestination(o[1]); +} + +core.int buildCounterMonitoring = 0; +buildMonitoring() { + var o = new api.Monitoring(); + buildCounterMonitoring++; + if (buildCounterMonitoring < 3) { + o.consumerDestinations = buildUnnamed4591(); + o.producerDestinations = buildUnnamed4592(); + } + buildCounterMonitoring--; + return o; +} + +checkMonitoring(api.Monitoring o) { + buildCounterMonitoring++; + if (buildCounterMonitoring < 3) { + checkUnnamed4591(o.consumerDestinations); + checkUnnamed4592(o.producerDestinations); + } + buildCounterMonitoring--; +} + +buildUnnamed4593() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4593(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterMonitoringDestination = 0; +buildMonitoringDestination() { + var o = new api.MonitoringDestination(); + buildCounterMonitoringDestination++; + if (buildCounterMonitoringDestination < 3) { + o.metrics = buildUnnamed4593(); + o.monitoredResource = "foo"; + } + buildCounterMonitoringDestination--; + return o; +} + +checkMonitoringDestination(api.MonitoringDestination o) { + buildCounterMonitoringDestination++; + if (buildCounterMonitoringDestination < 3) { + checkUnnamed4593(o.metrics); + unittest.expect(o.monitoredResource, unittest.equals('foo')); + } + buildCounterMonitoringDestination--; +} + +core.int buildCounterOAuthRequirements = 0; +buildOAuthRequirements() { + var o = new api.OAuthRequirements(); + buildCounterOAuthRequirements++; + if (buildCounterOAuthRequirements < 3) { + o.canonicalScopes = "foo"; + } + buildCounterOAuthRequirements--; + return o; +} + +checkOAuthRequirements(api.OAuthRequirements o) { + buildCounterOAuthRequirements++; + if (buildCounterOAuthRequirements < 3) { + unittest.expect(o.canonicalScopes, unittest.equals('foo')); + } + buildCounterOAuthRequirements--; +} + +buildUnnamed4594() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4594(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +buildUnnamed4595() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4595(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted3 = (o["x"]) as core.Map; + unittest.expect(casted3, unittest.hasLength(3)); + unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted3["bool"], unittest.equals(true)); + unittest.expect(casted3["string"], unittest.equals('foo')); + var casted4 = (o["y"]) as core.Map; + unittest.expect(casted4, unittest.hasLength(3)); + unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted4["bool"], unittest.equals(true)); + unittest.expect(casted4["string"], unittest.equals('foo')); +} + +core.int buildCounterOperation = 0; +buildOperation() { + var o = new api.Operation(); + buildCounterOperation++; + if (buildCounterOperation < 3) { + o.done = true; + o.error = buildStatus(); + o.metadata = buildUnnamed4594(); + o.name = "foo"; + o.response = buildUnnamed4595(); + } + buildCounterOperation--; + return o; +} + +checkOperation(api.Operation o) { + buildCounterOperation++; + if (buildCounterOperation < 3) { + unittest.expect(o.done, unittest.isTrue); + checkStatus(o.error); + checkUnnamed4594(o.metadata); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4595(o.response); + } + buildCounterOperation--; +} + +buildUnnamed4596() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4596(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted5 = (o["x"]) as core.Map; + unittest.expect(casted5, unittest.hasLength(3)); + unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted5["bool"], unittest.equals(true)); + unittest.expect(casted5["string"], unittest.equals('foo')); + var casted6 = (o["y"]) as core.Map; + unittest.expect(casted6, unittest.hasLength(3)); + unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted6["bool"], unittest.equals(true)); + unittest.expect(casted6["string"], unittest.equals('foo')); +} + +core.int buildCounterOption = 0; +buildOption() { + var o = new api.Option(); + buildCounterOption++; + if (buildCounterOption < 3) { + o.name = "foo"; + o.value = buildUnnamed4596(); + } + buildCounterOption--; + return o; +} + +checkOption(api.Option o) { + buildCounterOption++; + if (buildCounterOption < 3) { + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4596(o.value); + } + buildCounterOption--; +} + +buildUnnamed4597() { + var o = new core.List<api.Page>(); + o.add(buildPage()); + o.add(buildPage()); + return o; +} + +checkUnnamed4597(core.List<api.Page> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPage(o[0]); + checkPage(o[1]); +} + +core.int buildCounterPage = 0; +buildPage() { + var o = new api.Page(); + buildCounterPage++; + if (buildCounterPage < 3) { + o.content = "foo"; + o.name = "foo"; + o.subpages = buildUnnamed4597(); + } + buildCounterPage--; + return o; +} + +checkPage(api.Page o) { + buildCounterPage++; + if (buildCounterPage < 3) { + unittest.expect(o.content, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4597(o.subpages); + } + buildCounterPage--; +} + +buildUnnamed4598() { + var o = new core.List<api.QuotaLimit>(); + o.add(buildQuotaLimit()); + o.add(buildQuotaLimit()); + return o; +} + +checkUnnamed4598(core.List<api.QuotaLimit> o) { + unittest.expect(o, unittest.hasLength(2)); + checkQuotaLimit(o[0]); + checkQuotaLimit(o[1]); +} + +buildUnnamed4599() { + var o = new core.List<api.MetricRule>(); + o.add(buildMetricRule()); + o.add(buildMetricRule()); + return o; +} + +checkUnnamed4599(core.List<api.MetricRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMetricRule(o[0]); + checkMetricRule(o[1]); +} + +core.int buildCounterQuota = 0; +buildQuota() { + var o = new api.Quota(); + buildCounterQuota++; + if (buildCounterQuota < 3) { + o.limits = buildUnnamed4598(); + o.metricRules = buildUnnamed4599(); + } + buildCounterQuota--; + return o; +} + +checkQuota(api.Quota o) { + buildCounterQuota++; + if (buildCounterQuota < 3) { + checkUnnamed4598(o.limits); + checkUnnamed4599(o.metricRules); + } + buildCounterQuota--; +} + +buildUnnamed4600() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4600(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterQuotaLimit = 0; +buildQuotaLimit() { + var o = new api.QuotaLimit(); + buildCounterQuotaLimit++; + if (buildCounterQuotaLimit < 3) { + o.defaultLimit = "foo"; + o.description = "foo"; + o.displayName = "foo"; + o.duration = "foo"; + o.freeTier = "foo"; + o.maxLimit = "foo"; + o.metric = "foo"; + o.name = "foo"; + o.unit = "foo"; + o.values = buildUnnamed4600(); + } + buildCounterQuotaLimit--; + return o; +} + +checkQuotaLimit(api.QuotaLimit o) { + buildCounterQuotaLimit++; + if (buildCounterQuotaLimit < 3) { + unittest.expect(o.defaultLimit, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + unittest.expect(o.duration, unittest.equals('foo')); + unittest.expect(o.freeTier, unittest.equals('foo')); + unittest.expect(o.maxLimit, unittest.equals('foo')); + unittest.expect(o.metric, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.unit, unittest.equals('foo')); + checkUnnamed4600(o.values); + } + buildCounterQuotaLimit--; +} + +core.int buildCounterRange = 0; +buildRange() { + var o = new api.Range(); + buildCounterRange++; + if (buildCounterRange < 3) { + o.ipCidrRange = "foo"; + o.network = "foo"; + } + buildCounterRange--; + return o; +} + +checkRange(api.Range o) { + buildCounterRange++; + if (buildCounterRange < 3) { + unittest.expect(o.ipCidrRange, unittest.equals('foo')); + unittest.expect(o.network, unittest.equals('foo')); + } + buildCounterRange--; +} + +core.int buildCounterSearchRangeRequest = 0; +buildSearchRangeRequest() { + var o = new api.SearchRangeRequest(); + buildCounterSearchRangeRequest++; + if (buildCounterSearchRangeRequest < 3) { + o.ipPrefixLength = 42; + o.network = "foo"; + } + buildCounterSearchRangeRequest--; + return o; +} + +checkSearchRangeRequest(api.SearchRangeRequest o) { + buildCounterSearchRangeRequest++; + if (buildCounterSearchRangeRequest < 3) { + unittest.expect(o.ipPrefixLength, unittest.equals(42)); + unittest.expect(o.network, unittest.equals('foo')); + } + buildCounterSearchRangeRequest--; +} + +buildUnnamed4601() { + var o = new core.List<api.Api>(); + o.add(buildApi()); + o.add(buildApi()); + return o; +} + +checkUnnamed4601(core.List<api.Api> o) { + unittest.expect(o, unittest.hasLength(2)); + checkApi(o[0]); + checkApi(o[1]); +} + +buildUnnamed4602() { + var o = new core.List<api.Endpoint>(); + o.add(buildEndpoint()); + o.add(buildEndpoint()); + return o; +} + +checkUnnamed4602(core.List<api.Endpoint> o) { + unittest.expect(o, unittest.hasLength(2)); + checkEndpoint(o[0]); + checkEndpoint(o[1]); +} + +buildUnnamed4603() { + var o = new core.List<api.Enum>(); + o.add(buildEnum()); + o.add(buildEnum()); + return o; +} + +checkUnnamed4603(core.List<api.Enum> o) { + unittest.expect(o, unittest.hasLength(2)); + checkEnum(o[0]); + checkEnum(o[1]); +} + +buildUnnamed4604() { + var o = new core.List<api.LogDescriptor>(); + o.add(buildLogDescriptor()); + o.add(buildLogDescriptor()); + return o; +} + +checkUnnamed4604(core.List<api.LogDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLogDescriptor(o[0]); + checkLogDescriptor(o[1]); +} + +buildUnnamed4605() { + var o = new core.List<api.MetricDescriptor>(); + o.add(buildMetricDescriptor()); + o.add(buildMetricDescriptor()); + return o; +} + +checkUnnamed4605(core.List<api.MetricDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMetricDescriptor(o[0]); + checkMetricDescriptor(o[1]); +} + +buildUnnamed4606() { + var o = new core.List<api.MonitoredResourceDescriptor>(); + o.add(buildMonitoredResourceDescriptor()); + o.add(buildMonitoredResourceDescriptor()); + return o; +} + +checkUnnamed4606(core.List<api.MonitoredResourceDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMonitoredResourceDescriptor(o[0]); + checkMonitoredResourceDescriptor(o[1]); +} + +buildUnnamed4607() { + var o = new core.List<api.Type>(); + o.add(buildType()); + o.add(buildType()); + return o; +} + +checkUnnamed4607(core.List<api.Type> o) { + unittest.expect(o, unittest.hasLength(2)); + checkType(o[0]); + checkType(o[1]); +} + +buildUnnamed4608() { + var o = new core.List<api.Type>(); + o.add(buildType()); + o.add(buildType()); + return o; +} + +checkUnnamed4608(core.List<api.Type> o) { + unittest.expect(o, unittest.hasLength(2)); + checkType(o[0]); + checkType(o[1]); +} + +core.int buildCounterService = 0; +buildService() { + var o = new api.Service(); + buildCounterService++; + if (buildCounterService < 3) { + o.apis = buildUnnamed4601(); + o.authentication = buildAuthentication(); + o.backend = buildBackend(); + o.billing = buildBilling(); + o.configVersion = 42; + o.context = buildContext(); + o.control = buildControl(); + o.customError = buildCustomError(); + o.documentation = buildDocumentation(); + o.endpoints = buildUnnamed4602(); + o.enums = buildUnnamed4603(); + o.experimental = buildExperimental(); + o.http = buildHttp(); + o.id = "foo"; + o.logging = buildLogging(); + o.logs = buildUnnamed4604(); + o.metrics = buildUnnamed4605(); + o.monitoredResources = buildUnnamed4606(); + o.monitoring = buildMonitoring(); + o.name = "foo"; + o.producerProjectId = "foo"; + o.quota = buildQuota(); + o.sourceInfo = buildSourceInfo(); + o.systemParameters = buildSystemParameters(); + o.systemTypes = buildUnnamed4607(); + o.title = "foo"; + o.types = buildUnnamed4608(); + o.usage = buildUsage(); + } + buildCounterService--; + return o; +} + +checkService(api.Service o) { + buildCounterService++; + if (buildCounterService < 3) { + checkUnnamed4601(o.apis); + checkAuthentication(o.authentication); + checkBackend(o.backend); + checkBilling(o.billing); + unittest.expect(o.configVersion, unittest.equals(42)); + checkContext(o.context); + checkControl(o.control); + checkCustomError(o.customError); + checkDocumentation(o.documentation); + checkUnnamed4602(o.endpoints); + checkUnnamed4603(o.enums); + checkExperimental(o.experimental); + checkHttp(o.http); + unittest.expect(o.id, unittest.equals('foo')); + checkLogging(o.logging); + checkUnnamed4604(o.logs); + checkUnnamed4605(o.metrics); + checkUnnamed4606(o.monitoredResources); + checkMonitoring(o.monitoring); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.producerProjectId, unittest.equals('foo')); + checkQuota(o.quota); + checkSourceInfo(o.sourceInfo); + checkSystemParameters(o.systemParameters); + checkUnnamed4607(o.systemTypes); + unittest.expect(o.title, unittest.equals('foo')); + checkUnnamed4608(o.types); + checkUsage(o.usage); + } + buildCounterService--; +} + +core.int buildCounterSourceContext = 0; +buildSourceContext() { + var o = new api.SourceContext(); + buildCounterSourceContext++; + if (buildCounterSourceContext < 3) { + o.fileName = "foo"; + } + buildCounterSourceContext--; + return o; +} + +checkSourceContext(api.SourceContext o) { + buildCounterSourceContext++; + if (buildCounterSourceContext < 3) { + unittest.expect(o.fileName, unittest.equals('foo')); + } + buildCounterSourceContext--; +} + +buildUnnamed4609() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4609(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted7 = (o["x"]) as core.Map; + unittest.expect(casted7, unittest.hasLength(3)); + unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted7["bool"], unittest.equals(true)); + unittest.expect(casted7["string"], unittest.equals('foo')); + var casted8 = (o["y"]) as core.Map; + unittest.expect(casted8, unittest.hasLength(3)); + unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted8["bool"], unittest.equals(true)); + unittest.expect(casted8["string"], unittest.equals('foo')); +} + +buildUnnamed4610() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4609()); + o.add(buildUnnamed4609()); + return o; +} + +checkUnnamed4610(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4609(o[0]); + checkUnnamed4609(o[1]); +} + +core.int buildCounterSourceInfo = 0; +buildSourceInfo() { + var o = new api.SourceInfo(); + buildCounterSourceInfo++; + if (buildCounterSourceInfo < 3) { + o.sourceFiles = buildUnnamed4610(); + } + buildCounterSourceInfo--; + return o; +} + +checkSourceInfo(api.SourceInfo o) { + buildCounterSourceInfo++; + if (buildCounterSourceInfo < 3) { + checkUnnamed4610(o.sourceFiles); + } + buildCounterSourceInfo--; +} + +buildUnnamed4611() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4611(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted9 = (o["x"]) as core.Map; + unittest.expect(casted9, unittest.hasLength(3)); + unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted9["bool"], unittest.equals(true)); + unittest.expect(casted9["string"], unittest.equals('foo')); + var casted10 = (o["y"]) as core.Map; + unittest.expect(casted10, unittest.hasLength(3)); + unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted10["bool"], unittest.equals(true)); + unittest.expect(casted10["string"], unittest.equals('foo')); +} + +buildUnnamed4612() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4611()); + o.add(buildUnnamed4611()); + return o; +} + +checkUnnamed4612(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4611(o[0]); + checkUnnamed4611(o[1]); +} + +core.int buildCounterStatus = 0; +buildStatus() { + var o = new api.Status(); + buildCounterStatus++; + if (buildCounterStatus < 3) { + o.code = 42; + o.details = buildUnnamed4612(); + o.message = "foo"; + } + buildCounterStatus--; + return o; +} + +checkStatus(api.Status o) { + buildCounterStatus++; + if (buildCounterStatus < 3) { + unittest.expect(o.code, unittest.equals(42)); + checkUnnamed4612(o.details); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterStatus--; +} + +core.int buildCounterSubnetwork = 0; +buildSubnetwork() { + var o = new api.Subnetwork(); + buildCounterSubnetwork++; + if (buildCounterSubnetwork < 3) { + o.ipCidrRange = "foo"; + o.name = "foo"; + o.network = "foo"; + o.outsideAllocation = true; + } + buildCounterSubnetwork--; + return o; +} + +checkSubnetwork(api.Subnetwork o) { + buildCounterSubnetwork++; + if (buildCounterSubnetwork < 3) { + unittest.expect(o.ipCidrRange, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.outsideAllocation, unittest.isTrue); + } + buildCounterSubnetwork--; +} + +core.int buildCounterSystemParameter = 0; +buildSystemParameter() { + var o = new api.SystemParameter(); + buildCounterSystemParameter++; + if (buildCounterSystemParameter < 3) { + o.httpHeader = "foo"; + o.name = "foo"; + o.urlQueryParameter = "foo"; + } + buildCounterSystemParameter--; + return o; +} + +checkSystemParameter(api.SystemParameter o) { + buildCounterSystemParameter++; + if (buildCounterSystemParameter < 3) { + unittest.expect(o.httpHeader, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.urlQueryParameter, unittest.equals('foo')); + } + buildCounterSystemParameter--; +} + +buildUnnamed4613() { + var o = new core.List<api.SystemParameter>(); + o.add(buildSystemParameter()); + o.add(buildSystemParameter()); + return o; +} + +checkUnnamed4613(core.List<api.SystemParameter> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSystemParameter(o[0]); + checkSystemParameter(o[1]); +} + +core.int buildCounterSystemParameterRule = 0; +buildSystemParameterRule() { + var o = new api.SystemParameterRule(); + buildCounterSystemParameterRule++; + if (buildCounterSystemParameterRule < 3) { + o.parameters = buildUnnamed4613(); + o.selector = "foo"; + } + buildCounterSystemParameterRule--; + return o; +} + +checkSystemParameterRule(api.SystemParameterRule o) { + buildCounterSystemParameterRule++; + if (buildCounterSystemParameterRule < 3) { + checkUnnamed4613(o.parameters); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterSystemParameterRule--; +} + +buildUnnamed4614() { + var o = new core.List<api.SystemParameterRule>(); + o.add(buildSystemParameterRule()); + o.add(buildSystemParameterRule()); + return o; +} + +checkUnnamed4614(core.List<api.SystemParameterRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSystemParameterRule(o[0]); + checkSystemParameterRule(o[1]); +} + +core.int buildCounterSystemParameters = 0; +buildSystemParameters() { + var o = new api.SystemParameters(); + buildCounterSystemParameters++; + if (buildCounterSystemParameters < 3) { + o.rules = buildUnnamed4614(); + } + buildCounterSystemParameters--; + return o; +} + +checkSystemParameters(api.SystemParameters o) { + buildCounterSystemParameters++; + if (buildCounterSystemParameters < 3) { + checkUnnamed4614(o.rules); + } + buildCounterSystemParameters--; +} + +buildUnnamed4615() { + var o = new core.List<api.Field>(); + o.add(buildField()); + o.add(buildField()); + return o; +} + +checkUnnamed4615(core.List<api.Field> o) { + unittest.expect(o, unittest.hasLength(2)); + checkField(o[0]); + checkField(o[1]); +} + +buildUnnamed4616() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4616(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4617() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4617(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterType = 0; +buildType() { + var o = new api.Type(); + buildCounterType++; + if (buildCounterType < 3) { + o.fields = buildUnnamed4615(); + o.name = "foo"; + o.oneofs = buildUnnamed4616(); + o.options = buildUnnamed4617(); + o.sourceContext = buildSourceContext(); + o.syntax = "foo"; + } + buildCounterType--; + return o; +} + +checkType(api.Type o) { + buildCounterType++; + if (buildCounterType < 3) { + checkUnnamed4615(o.fields); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4616(o.oneofs); + checkUnnamed4617(o.options); + checkSourceContext(o.sourceContext); + unittest.expect(o.syntax, unittest.equals('foo')); + } + buildCounterType--; +} + +buildUnnamed4618() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4618(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4619() { + var o = new core.List<api.UsageRule>(); + o.add(buildUsageRule()); + o.add(buildUsageRule()); + return o; +} + +checkUnnamed4619(core.List<api.UsageRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUsageRule(o[0]); + checkUsageRule(o[1]); +} + +core.int buildCounterUsage = 0; +buildUsage() { + var o = new api.Usage(); + buildCounterUsage++; + if (buildCounterUsage < 3) { + o.producerNotificationChannel = "foo"; + o.requirements = buildUnnamed4618(); + o.rules = buildUnnamed4619(); + } + buildCounterUsage--; + return o; +} + +checkUsage(api.Usage o) { + buildCounterUsage++; + if (buildCounterUsage < 3) { + unittest.expect(o.producerNotificationChannel, unittest.equals('foo')); + checkUnnamed4618(o.requirements); + checkUnnamed4619(o.rules); + } + buildCounterUsage--; +} + +core.int buildCounterUsageRule = 0; +buildUsageRule() { + var o = new api.UsageRule(); + buildCounterUsageRule++; + if (buildCounterUsageRule < 3) { + o.allowUnregisteredCalls = true; + o.selector = "foo"; + o.skipServiceControl = true; + } + buildCounterUsageRule--; + return o; +} + +checkUsageRule(api.UsageRule o) { + buildCounterUsageRule++; + if (buildCounterUsageRule < 3) { + unittest.expect(o.allowUnregisteredCalls, unittest.isTrue); + unittest.expect(o.selector, unittest.equals('foo')); + unittest.expect(o.skipServiceControl, unittest.isTrue); + } + buildCounterUsageRule--; +} + +main() { + unittest.group("obj-schema-AddSubnetworkRequest", () { + unittest.test("to-json--from-json", () { + var o = buildAddSubnetworkRequest(); + var od = new api.AddSubnetworkRequest.fromJson(o.toJson()); + checkAddSubnetworkRequest(od); + }); + }); + + unittest.group("obj-schema-Api", () { + unittest.test("to-json--from-json", () { + var o = buildApi(); + var od = new api.Api.fromJson(o.toJson()); + checkApi(od); + }); + }); + + unittest.group("obj-schema-AuthProvider", () { + unittest.test("to-json--from-json", () { + var o = buildAuthProvider(); + var od = new api.AuthProvider.fromJson(o.toJson()); + checkAuthProvider(od); + }); + }); + + unittest.group("obj-schema-AuthRequirement", () { + unittest.test("to-json--from-json", () { + var o = buildAuthRequirement(); + var od = new api.AuthRequirement.fromJson(o.toJson()); + checkAuthRequirement(od); + }); + }); + + unittest.group("obj-schema-Authentication", () { + unittest.test("to-json--from-json", () { + var o = buildAuthentication(); + var od = new api.Authentication.fromJson(o.toJson()); + checkAuthentication(od); + }); + }); + + unittest.group("obj-schema-AuthenticationRule", () { + unittest.test("to-json--from-json", () { + var o = buildAuthenticationRule(); + var od = new api.AuthenticationRule.fromJson(o.toJson()); + checkAuthenticationRule(od); + }); + }); + + unittest.group("obj-schema-AuthorizationConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuthorizationConfig(); + var od = new api.AuthorizationConfig.fromJson(o.toJson()); + checkAuthorizationConfig(od); + }); + }); + + unittest.group("obj-schema-Backend", () { + unittest.test("to-json--from-json", () { + var o = buildBackend(); + var od = new api.Backend.fromJson(o.toJson()); + checkBackend(od); + }); + }); + + unittest.group("obj-schema-BackendRule", () { + unittest.test("to-json--from-json", () { + var o = buildBackendRule(); + var od = new api.BackendRule.fromJson(o.toJson()); + checkBackendRule(od); + }); + }); + + unittest.group("obj-schema-Billing", () { + unittest.test("to-json--from-json", () { + var o = buildBilling(); + var od = new api.Billing.fromJson(o.toJson()); + checkBilling(od); + }); + }); + + unittest.group("obj-schema-BillingDestination", () { + unittest.test("to-json--from-json", () { + var o = buildBillingDestination(); + var od = new api.BillingDestination.fromJson(o.toJson()); + checkBillingDestination(od); + }); + }); + + unittest.group("obj-schema-Connection", () { + unittest.test("to-json--from-json", () { + var o = buildConnection(); + var od = new api.Connection.fromJson(o.toJson()); + checkConnection(od); + }); + }); + + unittest.group("obj-schema-Context", () { + unittest.test("to-json--from-json", () { + var o = buildContext(); + var od = new api.Context.fromJson(o.toJson()); + checkContext(od); + }); + }); + + unittest.group("obj-schema-ContextRule", () { + unittest.test("to-json--from-json", () { + var o = buildContextRule(); + var od = new api.ContextRule.fromJson(o.toJson()); + checkContextRule(od); + }); + }); + + unittest.group("obj-schema-Control", () { + unittest.test("to-json--from-json", () { + var o = buildControl(); + var od = new api.Control.fromJson(o.toJson()); + checkControl(od); + }); + }); + + unittest.group("obj-schema-CustomError", () { + unittest.test("to-json--from-json", () { + var o = buildCustomError(); + var od = new api.CustomError.fromJson(o.toJson()); + checkCustomError(od); + }); + }); + + unittest.group("obj-schema-CustomErrorRule", () { + unittest.test("to-json--from-json", () { + var o = buildCustomErrorRule(); + var od = new api.CustomErrorRule.fromJson(o.toJson()); + checkCustomErrorRule(od); + }); + }); + + unittest.group("obj-schema-CustomHttpPattern", () { + unittest.test("to-json--from-json", () { + var o = buildCustomHttpPattern(); + var od = new api.CustomHttpPattern.fromJson(o.toJson()); + checkCustomHttpPattern(od); + }); + }); + + unittest.group("obj-schema-Documentation", () { + unittest.test("to-json--from-json", () { + var o = buildDocumentation(); + var od = new api.Documentation.fromJson(o.toJson()); + checkDocumentation(od); + }); + }); + + unittest.group("obj-schema-DocumentationRule", () { + unittest.test("to-json--from-json", () { + var o = buildDocumentationRule(); + var od = new api.DocumentationRule.fromJson(o.toJson()); + checkDocumentationRule(od); + }); + }); + + unittest.group("obj-schema-Endpoint", () { + unittest.test("to-json--from-json", () { + var o = buildEndpoint(); + var od = new api.Endpoint.fromJson(o.toJson()); + checkEndpoint(od); + }); + }); + + unittest.group("obj-schema-Enum", () { + unittest.test("to-json--from-json", () { + var o = buildEnum(); + var od = new api.Enum.fromJson(o.toJson()); + checkEnum(od); + }); + }); + + unittest.group("obj-schema-EnumValue", () { + unittest.test("to-json--from-json", () { + var o = buildEnumValue(); + var od = new api.EnumValue.fromJson(o.toJson()); + checkEnumValue(od); + }); + }); + + unittest.group("obj-schema-Experimental", () { + unittest.test("to-json--from-json", () { + var o = buildExperimental(); + var od = new api.Experimental.fromJson(o.toJson()); + checkExperimental(od); + }); + }); + + unittest.group("obj-schema-Field", () { + unittest.test("to-json--from-json", () { + var o = buildField(); + var od = new api.Field.fromJson(o.toJson()); + checkField(od); + }); + }); + + unittest.group("obj-schema-GoogleCloudServicenetworkingV1betaSubnetwork", () { + unittest.test("to-json--from-json", () { + var o = buildGoogleCloudServicenetworkingV1betaSubnetwork(); + var od = new api.GoogleCloudServicenetworkingV1betaSubnetwork.fromJson( + o.toJson()); + checkGoogleCloudServicenetworkingV1betaSubnetwork(od); + }); + }); + + unittest.group("obj-schema-Http", () { + unittest.test("to-json--from-json", () { + var o = buildHttp(); + var od = new api.Http.fromJson(o.toJson()); + checkHttp(od); + }); + }); + + unittest.group("obj-schema-HttpRule", () { + unittest.test("to-json--from-json", () { + var o = buildHttpRule(); + var od = new api.HttpRule.fromJson(o.toJson()); + checkHttpRule(od); + }); + }); + + unittest.group("obj-schema-LabelDescriptor", () { + unittest.test("to-json--from-json", () { + var o = buildLabelDescriptor(); + var od = new api.LabelDescriptor.fromJson(o.toJson()); + checkLabelDescriptor(od); + }); + }); + + unittest.group("obj-schema-ListConnectionsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListConnectionsResponse(); + var od = new api.ListConnectionsResponse.fromJson(o.toJson()); + checkListConnectionsResponse(od); + }); + }); + + unittest.group("obj-schema-LogDescriptor", () { + unittest.test("to-json--from-json", () { + var o = buildLogDescriptor(); + var od = new api.LogDescriptor.fromJson(o.toJson()); + checkLogDescriptor(od); + }); + }); + + unittest.group("obj-schema-Logging", () { + unittest.test("to-json--from-json", () { + var o = buildLogging(); + var od = new api.Logging.fromJson(o.toJson()); + checkLogging(od); + }); + }); + + unittest.group("obj-schema-LoggingDestination", () { + unittest.test("to-json--from-json", () { + var o = buildLoggingDestination(); + var od = new api.LoggingDestination.fromJson(o.toJson()); + checkLoggingDestination(od); + }); + }); + + unittest.group("obj-schema-Method", () { + unittest.test("to-json--from-json", () { + var o = buildMethod(); + var od = new api.Method.fromJson(o.toJson()); + checkMethod(od); + }); + }); + + unittest.group("obj-schema-MetricDescriptor", () { + unittest.test("to-json--from-json", () { + var o = buildMetricDescriptor(); + var od = new api.MetricDescriptor.fromJson(o.toJson()); + checkMetricDescriptor(od); + }); + }); + + unittest.group("obj-schema-MetricDescriptorMetadata", () { + unittest.test("to-json--from-json", () { + var o = buildMetricDescriptorMetadata(); + var od = new api.MetricDescriptorMetadata.fromJson(o.toJson()); + checkMetricDescriptorMetadata(od); + }); + }); + + unittest.group("obj-schema-MetricRule", () { + unittest.test("to-json--from-json", () { + var o = buildMetricRule(); + var od = new api.MetricRule.fromJson(o.toJson()); + checkMetricRule(od); + }); + }); + + unittest.group("obj-schema-Mixin", () { + unittest.test("to-json--from-json", () { + var o = buildMixin(); + var od = new api.Mixin.fromJson(o.toJson()); + checkMixin(od); + }); + }); + + unittest.group("obj-schema-MonitoredResourceDescriptor", () { + unittest.test("to-json--from-json", () { + var o = buildMonitoredResourceDescriptor(); + var od = new api.MonitoredResourceDescriptor.fromJson(o.toJson()); + checkMonitoredResourceDescriptor(od); + }); + }); + + unittest.group("obj-schema-Monitoring", () { + unittest.test("to-json--from-json", () { + var o = buildMonitoring(); + var od = new api.Monitoring.fromJson(o.toJson()); + checkMonitoring(od); + }); + }); + + unittest.group("obj-schema-MonitoringDestination", () { + unittest.test("to-json--from-json", () { + var o = buildMonitoringDestination(); + var od = new api.MonitoringDestination.fromJson(o.toJson()); + checkMonitoringDestination(od); + }); + }); + + unittest.group("obj-schema-OAuthRequirements", () { + unittest.test("to-json--from-json", () { + var o = buildOAuthRequirements(); + var od = new api.OAuthRequirements.fromJson(o.toJson()); + checkOAuthRequirements(od); + }); + }); + + unittest.group("obj-schema-Operation", () { + unittest.test("to-json--from-json", () { + var o = buildOperation(); + var od = new api.Operation.fromJson(o.toJson()); + checkOperation(od); + }); + }); + + unittest.group("obj-schema-Option", () { + unittest.test("to-json--from-json", () { + var o = buildOption(); + var od = new api.Option.fromJson(o.toJson()); + checkOption(od); + }); + }); + + unittest.group("obj-schema-Page", () { + unittest.test("to-json--from-json", () { + var o = buildPage(); + var od = new api.Page.fromJson(o.toJson()); + checkPage(od); + }); + }); + + unittest.group("obj-schema-Quota", () { + unittest.test("to-json--from-json", () { + var o = buildQuota(); + var od = new api.Quota.fromJson(o.toJson()); + checkQuota(od); + }); + }); + + unittest.group("obj-schema-QuotaLimit", () { + unittest.test("to-json--from-json", () { + var o = buildQuotaLimit(); + var od = new api.QuotaLimit.fromJson(o.toJson()); + checkQuotaLimit(od); + }); + }); + + unittest.group("obj-schema-Range", () { + unittest.test("to-json--from-json", () { + var o = buildRange(); + var od = new api.Range.fromJson(o.toJson()); + checkRange(od); + }); + }); + + unittest.group("obj-schema-SearchRangeRequest", () { + unittest.test("to-json--from-json", () { + var o = buildSearchRangeRequest(); + var od = new api.SearchRangeRequest.fromJson(o.toJson()); + checkSearchRangeRequest(od); + }); + }); + + unittest.group("obj-schema-Service", () { + unittest.test("to-json--from-json", () { + var o = buildService(); + var od = new api.Service.fromJson(o.toJson()); + checkService(od); + }); + }); + + unittest.group("obj-schema-SourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildSourceContext(); + var od = new api.SourceContext.fromJson(o.toJson()); + checkSourceContext(od); + }); + }); + + unittest.group("obj-schema-SourceInfo", () { + unittest.test("to-json--from-json", () { + var o = buildSourceInfo(); + var od = new api.SourceInfo.fromJson(o.toJson()); + checkSourceInfo(od); + }); + }); + + unittest.group("obj-schema-Status", () { + unittest.test("to-json--from-json", () { + var o = buildStatus(); + var od = new api.Status.fromJson(o.toJson()); + checkStatus(od); + }); + }); + + unittest.group("obj-schema-Subnetwork", () { + unittest.test("to-json--from-json", () { + var o = buildSubnetwork(); + var od = new api.Subnetwork.fromJson(o.toJson()); + checkSubnetwork(od); + }); + }); + + unittest.group("obj-schema-SystemParameter", () { + unittest.test("to-json--from-json", () { + var o = buildSystemParameter(); + var od = new api.SystemParameter.fromJson(o.toJson()); + checkSystemParameter(od); + }); + }); + + unittest.group("obj-schema-SystemParameterRule", () { + unittest.test("to-json--from-json", () { + var o = buildSystemParameterRule(); + var od = new api.SystemParameterRule.fromJson(o.toJson()); + checkSystemParameterRule(od); + }); + }); + + unittest.group("obj-schema-SystemParameters", () { + unittest.test("to-json--from-json", () { + var o = buildSystemParameters(); + var od = new api.SystemParameters.fromJson(o.toJson()); + checkSystemParameters(od); + }); + }); + + unittest.group("obj-schema-Type", () { + unittest.test("to-json--from-json", () { + var o = buildType(); + var od = new api.Type.fromJson(o.toJson()); + checkType(od); + }); + }); + + unittest.group("obj-schema-Usage", () { + unittest.test("to-json--from-json", () { + var o = buildUsage(); + var od = new api.Usage.fromJson(o.toJson()); + checkUsage(od); + }); + }); + + unittest.group("obj-schema-UsageRule", () { + unittest.test("to-json--from-json", () { + var o = buildUsageRule(); + var od = new api.UsageRule.fromJson(o.toJson()); + checkUsageRule(od); + }); + }); + + unittest.group("resource-OperationsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.OperationsResourceApi res = + new api.ServicenetworkingApi(mock).operations; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-ServicesResourceApi", () { + unittest.test("method--addSubnetwork", () { + var mock = new HttpServerMock(); + api.ServicesResourceApi res = new api.ServicenetworkingApi(mock).services; + var arg_request = buildAddSubnetworkRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AddSubnetworkRequest.fromJson(json); + checkAddSubnetworkRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .addSubnetwork(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ServicesResourceApi res = new api.ServicenetworkingApi(mock).services; + var arg_request = buildConnection(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_force = true; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Connection.fromJson(json); + checkConnection(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["force"].first, unittest.equals("$arg_force")); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, + force: arg_force, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--searchRange", () { + var mock = new HttpServerMock(); + api.ServicesResourceApi res = new api.ServicenetworkingApi(mock).services; + var arg_request = buildSearchRangeRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SearchRangeRequest.fromJson(json); + checkSearchRangeRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .searchRange(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-ServicesConnectionsResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.ServicesConnectionsResourceApi res = + new api.ServicenetworkingApi(mock).services.connections; + var arg_request = buildConnection(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Connection.fromJson(json); + checkConnection(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ServicesConnectionsResourceApi res = + new api.ServicenetworkingApi(mock).services.connections; + var arg_parent = "foo"; + var arg_network = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["network"].first, unittest.equals(arg_network)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListConnectionsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, network: arg_network, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListConnectionsResponse(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/speech/v1beta1_test.dart b/generated/googleapis_beta/test/speech/v1beta1_test.dart deleted file mode 100644 index 5aa7d7b..0000000 --- a/generated/googleapis_beta/test/speech/v1beta1_test.dart +++ /dev/null
@@ -1,653 +0,0 @@ -library googleapis_beta.speech.v1beta1.test; - -import "dart:core" as core; -import "dart:async" as async; -import "dart:convert" as convert; - -import 'package:http/http.dart' as http; -import 'package:test/test.dart' as unittest; - -import 'package:googleapis_beta/speech/v1beta1.dart' as api; - -class HttpServerMock extends http.BaseClient { - core.Function _callback; - core.bool _expectJson; - - void register(core.Function callback, core.bool expectJson) { - _callback = callback; - _expectJson = expectJson; - } - - async.Future<http.StreamedResponse> send(http.BaseRequest request) { - if (_expectJson) { - return request - .finalize() - .transform(convert.utf8.decoder) - .join('') - .then((core.String jsonString) { - if (jsonString.isEmpty) { - return _callback(request, null); - } else { - return _callback(request, convert.json.decode(jsonString)); - } - }); - } else { - var stream = request.finalize(); - if (stream == null) { - return _callback(request, []); - } else { - return stream.toBytes().then((data) { - return _callback(request, data); - }); - } - } - } -} - -http.StreamedResponse stringResponse(core.int status, - core.Map<core.String, core.String> headers, core.String body) { - var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); - return new http.StreamedResponse(stream, status, headers: headers); -} - -core.int buildCounterAsyncRecognizeRequest = 0; -buildAsyncRecognizeRequest() { - var o = new api.AsyncRecognizeRequest(); - buildCounterAsyncRecognizeRequest++; - if (buildCounterAsyncRecognizeRequest < 3) { - o.audio = buildRecognitionAudio(); - o.config = buildRecognitionConfig(); - } - buildCounterAsyncRecognizeRequest--; - return o; -} - -checkAsyncRecognizeRequest(api.AsyncRecognizeRequest o) { - buildCounterAsyncRecognizeRequest++; - if (buildCounterAsyncRecognizeRequest < 3) { - checkRecognitionAudio(o.audio); - checkRecognitionConfig(o.config); - } - buildCounterAsyncRecognizeRequest--; -} - -buildUnnamed5571() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5571(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted1 = (o["x"]) as core.Map; - unittest.expect(casted1, unittest.hasLength(3)); - unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted1["bool"], unittest.equals(true)); - unittest.expect(casted1["string"], unittest.equals('foo')); - var casted2 = (o["y"]) as core.Map; - unittest.expect(casted2, unittest.hasLength(3)); - unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted2["bool"], unittest.equals(true)); - unittest.expect(casted2["string"], unittest.equals('foo')); -} - -buildUnnamed5572() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5572(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted3 = (o["x"]) as core.Map; - unittest.expect(casted3, unittest.hasLength(3)); - unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted3["bool"], unittest.equals(true)); - unittest.expect(casted3["string"], unittest.equals('foo')); - var casted4 = (o["y"]) as core.Map; - unittest.expect(casted4, unittest.hasLength(3)); - unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted4["bool"], unittest.equals(true)); - unittest.expect(casted4["string"], unittest.equals('foo')); -} - -core.int buildCounterOperation = 0; -buildOperation() { - var o = new api.Operation(); - buildCounterOperation++; - if (buildCounterOperation < 3) { - o.done = true; - o.error = buildStatus(); - o.metadata = buildUnnamed5571(); - o.name = "foo"; - o.response = buildUnnamed5572(); - } - buildCounterOperation--; - return o; -} - -checkOperation(api.Operation o) { - buildCounterOperation++; - if (buildCounterOperation < 3) { - unittest.expect(o.done, unittest.isTrue); - checkStatus(o.error); - checkUnnamed5571(o.metadata); - unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5572(o.response); - } - buildCounterOperation--; -} - -core.int buildCounterRecognitionAudio = 0; -buildRecognitionAudio() { - var o = new api.RecognitionAudio(); - buildCounterRecognitionAudio++; - if (buildCounterRecognitionAudio < 3) { - o.content = "foo"; - o.uri = "foo"; - } - buildCounterRecognitionAudio--; - return o; -} - -checkRecognitionAudio(api.RecognitionAudio o) { - buildCounterRecognitionAudio++; - if (buildCounterRecognitionAudio < 3) { - unittest.expect(o.content, unittest.equals('foo')); - unittest.expect(o.uri, unittest.equals('foo')); - } - buildCounterRecognitionAudio--; -} - -core.int buildCounterRecognitionConfig = 0; -buildRecognitionConfig() { - var o = new api.RecognitionConfig(); - buildCounterRecognitionConfig++; - if (buildCounterRecognitionConfig < 3) { - o.encoding = "foo"; - o.languageCode = "foo"; - o.maxAlternatives = 42; - o.profanityFilter = true; - o.sampleRate = 42; - o.speechContext = buildSpeechContext(); - } - buildCounterRecognitionConfig--; - return o; -} - -checkRecognitionConfig(api.RecognitionConfig o) { - buildCounterRecognitionConfig++; - if (buildCounterRecognitionConfig < 3) { - unittest.expect(o.encoding, unittest.equals('foo')); - unittest.expect(o.languageCode, unittest.equals('foo')); - unittest.expect(o.maxAlternatives, unittest.equals(42)); - unittest.expect(o.profanityFilter, unittest.isTrue); - unittest.expect(o.sampleRate, unittest.equals(42)); - checkSpeechContext(o.speechContext); - } - buildCounterRecognitionConfig--; -} - -buildUnnamed5573() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5573(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterSpeechContext = 0; -buildSpeechContext() { - var o = new api.SpeechContext(); - buildCounterSpeechContext++; - if (buildCounterSpeechContext < 3) { - o.phrases = buildUnnamed5573(); - } - buildCounterSpeechContext--; - return o; -} - -checkSpeechContext(api.SpeechContext o) { - buildCounterSpeechContext++; - if (buildCounterSpeechContext < 3) { - checkUnnamed5573(o.phrases); - } - buildCounterSpeechContext--; -} - -core.int buildCounterSpeechRecognitionAlternative = 0; -buildSpeechRecognitionAlternative() { - var o = new api.SpeechRecognitionAlternative(); - buildCounterSpeechRecognitionAlternative++; - if (buildCounterSpeechRecognitionAlternative < 3) { - o.confidence = 42.0; - o.transcript = "foo"; - } - buildCounterSpeechRecognitionAlternative--; - return o; -} - -checkSpeechRecognitionAlternative(api.SpeechRecognitionAlternative o) { - buildCounterSpeechRecognitionAlternative++; - if (buildCounterSpeechRecognitionAlternative < 3) { - unittest.expect(o.confidence, unittest.equals(42.0)); - unittest.expect(o.transcript, unittest.equals('foo')); - } - buildCounterSpeechRecognitionAlternative--; -} - -buildUnnamed5574() { - var o = new core.List<api.SpeechRecognitionAlternative>(); - o.add(buildSpeechRecognitionAlternative()); - o.add(buildSpeechRecognitionAlternative()); - return o; -} - -checkUnnamed5574(core.List<api.SpeechRecognitionAlternative> o) { - unittest.expect(o, unittest.hasLength(2)); - checkSpeechRecognitionAlternative(o[0]); - checkSpeechRecognitionAlternative(o[1]); -} - -core.int buildCounterSpeechRecognitionResult = 0; -buildSpeechRecognitionResult() { - var o = new api.SpeechRecognitionResult(); - buildCounterSpeechRecognitionResult++; - if (buildCounterSpeechRecognitionResult < 3) { - o.alternatives = buildUnnamed5574(); - } - buildCounterSpeechRecognitionResult--; - return o; -} - -checkSpeechRecognitionResult(api.SpeechRecognitionResult o) { - buildCounterSpeechRecognitionResult++; - if (buildCounterSpeechRecognitionResult < 3) { - checkUnnamed5574(o.alternatives); - } - buildCounterSpeechRecognitionResult--; -} - -buildUnnamed5575() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5575(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted5 = (o["x"]) as core.Map; - unittest.expect(casted5, unittest.hasLength(3)); - unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted5["bool"], unittest.equals(true)); - unittest.expect(casted5["string"], unittest.equals('foo')); - var casted6 = (o["y"]) as core.Map; - unittest.expect(casted6, unittest.hasLength(3)); - unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted6["bool"], unittest.equals(true)); - unittest.expect(casted6["string"], unittest.equals('foo')); -} - -buildUnnamed5576() { - var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5575()); - o.add(buildUnnamed5575()); - return o; -} - -checkUnnamed5576(core.List<core.Map<core.String, core.Object>> o) { - unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5575(o[0]); - checkUnnamed5575(o[1]); -} - -core.int buildCounterStatus = 0; -buildStatus() { - var o = new api.Status(); - buildCounterStatus++; - if (buildCounterStatus < 3) { - o.code = 42; - o.details = buildUnnamed5576(); - o.message = "foo"; - } - buildCounterStatus--; - return o; -} - -checkStatus(api.Status o) { - buildCounterStatus++; - if (buildCounterStatus < 3) { - unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5576(o.details); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterStatus--; -} - -core.int buildCounterSyncRecognizeRequest = 0; -buildSyncRecognizeRequest() { - var o = new api.SyncRecognizeRequest(); - buildCounterSyncRecognizeRequest++; - if (buildCounterSyncRecognizeRequest < 3) { - o.audio = buildRecognitionAudio(); - o.config = buildRecognitionConfig(); - } - buildCounterSyncRecognizeRequest--; - return o; -} - -checkSyncRecognizeRequest(api.SyncRecognizeRequest o) { - buildCounterSyncRecognizeRequest++; - if (buildCounterSyncRecognizeRequest < 3) { - checkRecognitionAudio(o.audio); - checkRecognitionConfig(o.config); - } - buildCounterSyncRecognizeRequest--; -} - -buildUnnamed5577() { - var o = new core.List<api.SpeechRecognitionResult>(); - o.add(buildSpeechRecognitionResult()); - o.add(buildSpeechRecognitionResult()); - return o; -} - -checkUnnamed5577(core.List<api.SpeechRecognitionResult> o) { - unittest.expect(o, unittest.hasLength(2)); - checkSpeechRecognitionResult(o[0]); - checkSpeechRecognitionResult(o[1]); -} - -core.int buildCounterSyncRecognizeResponse = 0; -buildSyncRecognizeResponse() { - var o = new api.SyncRecognizeResponse(); - buildCounterSyncRecognizeResponse++; - if (buildCounterSyncRecognizeResponse < 3) { - o.results = buildUnnamed5577(); - } - buildCounterSyncRecognizeResponse--; - return o; -} - -checkSyncRecognizeResponse(api.SyncRecognizeResponse o) { - buildCounterSyncRecognizeResponse++; - if (buildCounterSyncRecognizeResponse < 3) { - checkUnnamed5577(o.results); - } - buildCounterSyncRecognizeResponse--; -} - -main() { - unittest.group("obj-schema-AsyncRecognizeRequest", () { - unittest.test("to-json--from-json", () { - var o = buildAsyncRecognizeRequest(); - var od = new api.AsyncRecognizeRequest.fromJson(o.toJson()); - checkAsyncRecognizeRequest(od); - }); - }); - - unittest.group("obj-schema-Operation", () { - unittest.test("to-json--from-json", () { - var o = buildOperation(); - var od = new api.Operation.fromJson(o.toJson()); - checkOperation(od); - }); - }); - - unittest.group("obj-schema-RecognitionAudio", () { - unittest.test("to-json--from-json", () { - var o = buildRecognitionAudio(); - var od = new api.RecognitionAudio.fromJson(o.toJson()); - checkRecognitionAudio(od); - }); - }); - - unittest.group("obj-schema-RecognitionConfig", () { - unittest.test("to-json--from-json", () { - var o = buildRecognitionConfig(); - var od = new api.RecognitionConfig.fromJson(o.toJson()); - checkRecognitionConfig(od); - }); - }); - - unittest.group("obj-schema-SpeechContext", () { - unittest.test("to-json--from-json", () { - var o = buildSpeechContext(); - var od = new api.SpeechContext.fromJson(o.toJson()); - checkSpeechContext(od); - }); - }); - - unittest.group("obj-schema-SpeechRecognitionAlternative", () { - unittest.test("to-json--from-json", () { - var o = buildSpeechRecognitionAlternative(); - var od = new api.SpeechRecognitionAlternative.fromJson(o.toJson()); - checkSpeechRecognitionAlternative(od); - }); - }); - - unittest.group("obj-schema-SpeechRecognitionResult", () { - unittest.test("to-json--from-json", () { - var o = buildSpeechRecognitionResult(); - var od = new api.SpeechRecognitionResult.fromJson(o.toJson()); - checkSpeechRecognitionResult(od); - }); - }); - - unittest.group("obj-schema-Status", () { - unittest.test("to-json--from-json", () { - var o = buildStatus(); - var od = new api.Status.fromJson(o.toJson()); - checkStatus(od); - }); - }); - - unittest.group("obj-schema-SyncRecognizeRequest", () { - unittest.test("to-json--from-json", () { - var o = buildSyncRecognizeRequest(); - var od = new api.SyncRecognizeRequest.fromJson(o.toJson()); - checkSyncRecognizeRequest(od); - }); - }); - - unittest.group("obj-schema-SyncRecognizeResponse", () { - unittest.test("to-json--from-json", () { - var o = buildSyncRecognizeResponse(); - var od = new api.SyncRecognizeResponse.fromJson(o.toJson()); - checkSyncRecognizeResponse(od); - }); - }); - - unittest.group("resource-OperationsResourceApi", () { - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.OperationsResourceApi res = new api.SpeechApi(mock).operations; - var arg_name = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 19), - unittest.equals("v1beta1/operations/")); - pathOffset += 19; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_name, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - }); - - unittest.group("resource-SpeechResourceApi", () { - unittest.test("method--asyncrecognize", () { - var mock = new HttpServerMock(); - api.SpeechResourceApi res = new api.SpeechApi(mock).speech; - var arg_request = buildAsyncRecognizeRequest(); - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.AsyncRecognizeRequest.fromJson(json); - checkAsyncRecognizeRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 29), - unittest.equals("v1beta1/speech:asyncrecognize")); - pathOffset += 29; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .asyncrecognize(arg_request, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--syncrecognize", () { - var mock = new HttpServerMock(); - api.SpeechResourceApi res = new api.SpeechApi(mock).speech; - var arg_request = buildSyncRecognizeRequest(); - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SyncRecognizeRequest.fromJson(json); - checkSyncRecognizeRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 28), - unittest.equals("v1beta1/speech:syncrecognize")); - pathOffset += 28; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSyncRecognizeResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .syncrecognize(arg_request, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSyncRecognizeResponse(response); - }))); - }); - }); -}
diff --git a/generated/googleapis_beta/test/sqladmin/v1beta3_test.dart b/generated/googleapis_beta/test/sqladmin/v1beta3_test.dart deleted file mode 100644 index dbc0a5b..0000000 --- a/generated/googleapis_beta/test/sqladmin/v1beta3_test.dart +++ /dev/null
@@ -1,3444 +0,0 @@ -library googleapis_beta.sqladmin.v1beta3.test; - -import "dart:core" as core; -import "dart:async" as async; -import "dart:convert" as convert; - -import 'package:http/http.dart' as http; -import 'package:test/test.dart' as unittest; - -import 'package:googleapis_beta/sqladmin/v1beta3.dart' as api; - -class HttpServerMock extends http.BaseClient { - core.Function _callback; - core.bool _expectJson; - - void register(core.Function callback, core.bool expectJson) { - _callback = callback; - _expectJson = expectJson; - } - - async.Future<http.StreamedResponse> send(http.BaseRequest request) { - if (_expectJson) { - return request - .finalize() - .transform(convert.utf8.decoder) - .join('') - .then((core.String jsonString) { - if (jsonString.isEmpty) { - return _callback(request, null); - } else { - return _callback(request, convert.json.decode(jsonString)); - } - }); - } else { - var stream = request.finalize(); - if (stream == null) { - return _callback(request, []); - } else { - return stream.toBytes().then((data) { - return _callback(request, data); - }); - } - } - } -} - -http.StreamedResponse stringResponse(core.int status, - core.Map<core.String, core.String> headers, core.String body) { - var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); - return new http.StreamedResponse(stream, status, headers: headers); -} - -core.int buildCounterBackupConfiguration = 0; -buildBackupConfiguration() { - var o = new api.BackupConfiguration(); - buildCounterBackupConfiguration++; - if (buildCounterBackupConfiguration < 3) { - o.binaryLogEnabled = true; - o.enabled = true; - o.id = "foo"; - o.kind = "foo"; - o.replicationLogArchivingEnabled = true; - o.startTime = "foo"; - } - buildCounterBackupConfiguration--; - return o; -} - -checkBackupConfiguration(api.BackupConfiguration o) { - buildCounterBackupConfiguration++; - if (buildCounterBackupConfiguration < 3) { - unittest.expect(o.binaryLogEnabled, unittest.isTrue); - unittest.expect(o.enabled, unittest.isTrue); - unittest.expect(o.id, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.replicationLogArchivingEnabled, unittest.isTrue); - unittest.expect(o.startTime, unittest.equals('foo')); - } - buildCounterBackupConfiguration--; -} - -core.int buildCounterBackupRun = 0; -buildBackupRun() { - var o = new api.BackupRun(); - buildCounterBackupRun++; - if (buildCounterBackupRun < 3) { - o.backupConfiguration = "foo"; - o.dueTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.enqueuedTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.error = buildOperationError(); - o.instance = "foo"; - o.kind = "foo"; - o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.status = "foo"; - } - buildCounterBackupRun--; - return o; -} - -checkBackupRun(api.BackupRun o) { - buildCounterBackupRun++; - if (buildCounterBackupRun < 3) { - unittest.expect(o.backupConfiguration, unittest.equals('foo')); - unittest.expect( - o.dueTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect( - o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.enqueuedTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - checkOperationError(o.error); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.startTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.status, unittest.equals('foo')); - } - buildCounterBackupRun--; -} - -buildUnnamed5591() { - var o = new core.List<api.BackupRun>(); - o.add(buildBackupRun()); - o.add(buildBackupRun()); - return o; -} - -checkUnnamed5591(core.List<api.BackupRun> o) { - unittest.expect(o, unittest.hasLength(2)); - checkBackupRun(o[0]); - checkBackupRun(o[1]); -} - -core.int buildCounterBackupRunsListResponse = 0; -buildBackupRunsListResponse() { - var o = new api.BackupRunsListResponse(); - buildCounterBackupRunsListResponse++; - if (buildCounterBackupRunsListResponse < 3) { - o.items = buildUnnamed5591(); - o.kind = "foo"; - o.nextPageToken = "foo"; - } - buildCounterBackupRunsListResponse--; - return o; -} - -checkBackupRunsListResponse(api.BackupRunsListResponse o) { - buildCounterBackupRunsListResponse++; - if (buildCounterBackupRunsListResponse < 3) { - checkUnnamed5591(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - } - buildCounterBackupRunsListResponse--; -} - -core.int buildCounterBinLogCoordinates = 0; -buildBinLogCoordinates() { - var o = new api.BinLogCoordinates(); - buildCounterBinLogCoordinates++; - if (buildCounterBinLogCoordinates < 3) { - o.binLogFileName = "foo"; - o.binLogPosition = "foo"; - o.kind = "foo"; - } - buildCounterBinLogCoordinates--; - return o; -} - -checkBinLogCoordinates(api.BinLogCoordinates o) { - buildCounterBinLogCoordinates++; - if (buildCounterBinLogCoordinates < 3) { - unittest.expect(o.binLogFileName, unittest.equals('foo')); - unittest.expect(o.binLogPosition, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterBinLogCoordinates--; -} - -core.int buildCounterCloneContext = 0; -buildCloneContext() { - var o = new api.CloneContext(); - buildCounterCloneContext++; - if (buildCounterCloneContext < 3) { - o.binLogCoordinates = buildBinLogCoordinates(); - o.destinationInstanceName = "foo"; - o.kind = "foo"; - o.pitrTimestampMs = "foo"; - o.sourceInstanceName = "foo"; - } - buildCounterCloneContext--; - return o; -} - -checkCloneContext(api.CloneContext o) { - buildCounterCloneContext++; - if (buildCounterCloneContext < 3) { - checkBinLogCoordinates(o.binLogCoordinates); - unittest.expect(o.destinationInstanceName, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.pitrTimestampMs, unittest.equals('foo')); - unittest.expect(o.sourceInstanceName, unittest.equals('foo')); - } - buildCounterCloneContext--; -} - -core.int buildCounterDatabaseFlags = 0; -buildDatabaseFlags() { - var o = new api.DatabaseFlags(); - buildCounterDatabaseFlags++; - if (buildCounterDatabaseFlags < 3) { - o.name = "foo"; - o.value = "foo"; - } - buildCounterDatabaseFlags--; - return o; -} - -checkDatabaseFlags(api.DatabaseFlags o) { - buildCounterDatabaseFlags++; - if (buildCounterDatabaseFlags < 3) { - unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.value, unittest.equals('foo')); - } - buildCounterDatabaseFlags--; -} - -buildUnnamed5592() { - var o = new core.List<api.IpMapping>(); - o.add(buildIpMapping()); - o.add(buildIpMapping()); - return o; -} - -checkUnnamed5592(core.List<api.IpMapping> o) { - unittest.expect(o, unittest.hasLength(2)); - checkIpMapping(o[0]); - checkIpMapping(o[1]); -} - -buildUnnamed5593() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5593(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterDatabaseInstance = 0; -buildDatabaseInstance() { - var o = new api.DatabaseInstance(); - buildCounterDatabaseInstance++; - if (buildCounterDatabaseInstance < 3) { - o.connectionName = "foo"; - o.currentDiskSize = "foo"; - o.databaseVersion = "foo"; - o.etag = "foo"; - o.instance = "foo"; - o.instanceType = "foo"; - o.ipAddresses = buildUnnamed5592(); - o.ipv6Address = "foo"; - o.kind = "foo"; - o.masterInstanceName = "foo"; - o.maxDiskSize = "foo"; - o.project = "foo"; - o.region = "foo"; - o.replicaNames = buildUnnamed5593(); - o.serverCaCert = buildSslCert(); - o.serviceAccountEmailAddress = "foo"; - o.settings = buildSettings(); - o.state = "foo"; - } - buildCounterDatabaseInstance--; - return o; -} - -checkDatabaseInstance(api.DatabaseInstance o) { - buildCounterDatabaseInstance++; - if (buildCounterDatabaseInstance < 3) { - unittest.expect(o.connectionName, unittest.equals('foo')); - unittest.expect(o.currentDiskSize, unittest.equals('foo')); - unittest.expect(o.databaseVersion, unittest.equals('foo')); - unittest.expect(o.etag, unittest.equals('foo')); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.instanceType, unittest.equals('foo')); - checkUnnamed5592(o.ipAddresses); - unittest.expect(o.ipv6Address, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.masterInstanceName, unittest.equals('foo')); - unittest.expect(o.maxDiskSize, unittest.equals('foo')); - unittest.expect(o.project, unittest.equals('foo')); - unittest.expect(o.region, unittest.equals('foo')); - checkUnnamed5593(o.replicaNames); - checkSslCert(o.serverCaCert); - unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); - checkSettings(o.settings); - unittest.expect(o.state, unittest.equals('foo')); - } - buildCounterDatabaseInstance--; -} - -buildUnnamed5594() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5594(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -buildUnnamed5595() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5595(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterExportContext = 0; -buildExportContext() { - var o = new api.ExportContext(); - buildCounterExportContext++; - if (buildCounterExportContext < 3) { - o.database = buildUnnamed5594(); - o.kind = "foo"; - o.table = buildUnnamed5595(); - o.uri = "foo"; - } - buildCounterExportContext--; - return o; -} - -checkExportContext(api.ExportContext o) { - buildCounterExportContext++; - if (buildCounterExportContext < 3) { - checkUnnamed5594(o.database); - unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5595(o.table); - unittest.expect(o.uri, unittest.equals('foo')); - } - buildCounterExportContext--; -} - -buildUnnamed5596() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5596(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -buildUnnamed5597() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5597(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterFlag = 0; -buildFlag() { - var o = new api.Flag(); - buildCounterFlag++; - if (buildCounterFlag < 3) { - o.allowedStringValues = buildUnnamed5596(); - o.appliesTo = buildUnnamed5597(); - o.kind = "foo"; - o.maxValue = "foo"; - o.minValue = "foo"; - o.name = "foo"; - o.type = "foo"; - } - buildCounterFlag--; - return o; -} - -checkFlag(api.Flag o) { - buildCounterFlag++; - if (buildCounterFlag < 3) { - checkUnnamed5596(o.allowedStringValues); - checkUnnamed5597(o.appliesTo); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.maxValue, unittest.equals('foo')); - unittest.expect(o.minValue, unittest.equals('foo')); - unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.type, unittest.equals('foo')); - } - buildCounterFlag--; -} - -buildUnnamed5598() { - var o = new core.List<api.Flag>(); - o.add(buildFlag()); - o.add(buildFlag()); - return o; -} - -checkUnnamed5598(core.List<api.Flag> o) { - unittest.expect(o, unittest.hasLength(2)); - checkFlag(o[0]); - checkFlag(o[1]); -} - -core.int buildCounterFlagsListResponse = 0; -buildFlagsListResponse() { - var o = new api.FlagsListResponse(); - buildCounterFlagsListResponse++; - if (buildCounterFlagsListResponse < 3) { - o.items = buildUnnamed5598(); - o.kind = "foo"; - } - buildCounterFlagsListResponse--; - return o; -} - -checkFlagsListResponse(api.FlagsListResponse o) { - buildCounterFlagsListResponse++; - if (buildCounterFlagsListResponse < 3) { - checkUnnamed5598(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterFlagsListResponse--; -} - -buildUnnamed5599() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5599(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterImportContext = 0; -buildImportContext() { - var o = new api.ImportContext(); - buildCounterImportContext++; - if (buildCounterImportContext < 3) { - o.database = "foo"; - o.kind = "foo"; - o.uri = buildUnnamed5599(); - } - buildCounterImportContext--; - return o; -} - -checkImportContext(api.ImportContext o) { - buildCounterImportContext++; - if (buildCounterImportContext < 3) { - unittest.expect(o.database, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5599(o.uri); - } - buildCounterImportContext--; -} - -buildUnnamed5600() { - var o = new core.List<api.OperationError>(); - o.add(buildOperationError()); - o.add(buildOperationError()); - return o; -} - -checkUnnamed5600(core.List<api.OperationError> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperationError(o[0]); - checkOperationError(o[1]); -} - -core.int buildCounterInstanceOperation = 0; -buildInstanceOperation() { - var o = new api.InstanceOperation(); - buildCounterInstanceOperation++; - if (buildCounterInstanceOperation < 3) { - o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.enqueuedTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.error = buildUnnamed5600(); - o.exportContext = buildExportContext(); - o.importContext = buildImportContext(); - o.instance = "foo"; - o.kind = "foo"; - o.operation = "foo"; - o.operationType = "foo"; - o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.state = "foo"; - o.userEmailAddress = "foo"; - } - buildCounterInstanceOperation--; - return o; -} - -checkInstanceOperation(api.InstanceOperation o) { - buildCounterInstanceOperation++; - if (buildCounterInstanceOperation < 3) { - unittest.expect( - o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.enqueuedTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - checkUnnamed5600(o.error); - checkExportContext(o.exportContext); - checkImportContext(o.importContext); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - unittest.expect(o.operationType, unittest.equals('foo')); - unittest.expect(o.startTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.state, unittest.equals('foo')); - unittest.expect(o.userEmailAddress, unittest.equals('foo')); - } - buildCounterInstanceOperation--; -} - -core.int buildCounterInstanceSetRootPasswordRequest = 0; -buildInstanceSetRootPasswordRequest() { - var o = new api.InstanceSetRootPasswordRequest(); - buildCounterInstanceSetRootPasswordRequest++; - if (buildCounterInstanceSetRootPasswordRequest < 3) { - o.setRootPasswordContext = buildSetRootPasswordContext(); - } - buildCounterInstanceSetRootPasswordRequest--; - return o; -} - -checkInstanceSetRootPasswordRequest(api.InstanceSetRootPasswordRequest o) { - buildCounterInstanceSetRootPasswordRequest++; - if (buildCounterInstanceSetRootPasswordRequest < 3) { - checkSetRootPasswordContext(o.setRootPasswordContext); - } - buildCounterInstanceSetRootPasswordRequest--; -} - -core.int buildCounterInstancesCloneRequest = 0; -buildInstancesCloneRequest() { - var o = new api.InstancesCloneRequest(); - buildCounterInstancesCloneRequest++; - if (buildCounterInstancesCloneRequest < 3) { - o.cloneContext = buildCloneContext(); - } - buildCounterInstancesCloneRequest--; - return o; -} - -checkInstancesCloneRequest(api.InstancesCloneRequest o) { - buildCounterInstancesCloneRequest++; - if (buildCounterInstancesCloneRequest < 3) { - checkCloneContext(o.cloneContext); - } - buildCounterInstancesCloneRequest--; -} - -core.int buildCounterInstancesCloneResponse = 0; -buildInstancesCloneResponse() { - var o = new api.InstancesCloneResponse(); - buildCounterInstancesCloneResponse++; - if (buildCounterInstancesCloneResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesCloneResponse--; - return o; -} - -checkInstancesCloneResponse(api.InstancesCloneResponse o) { - buildCounterInstancesCloneResponse++; - if (buildCounterInstancesCloneResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesCloneResponse--; -} - -core.int buildCounterInstancesDeleteResponse = 0; -buildInstancesDeleteResponse() { - var o = new api.InstancesDeleteResponse(); - buildCounterInstancesDeleteResponse++; - if (buildCounterInstancesDeleteResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesDeleteResponse--; - return o; -} - -checkInstancesDeleteResponse(api.InstancesDeleteResponse o) { - buildCounterInstancesDeleteResponse++; - if (buildCounterInstancesDeleteResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesDeleteResponse--; -} - -core.int buildCounterInstancesExportRequest = 0; -buildInstancesExportRequest() { - var o = new api.InstancesExportRequest(); - buildCounterInstancesExportRequest++; - if (buildCounterInstancesExportRequest < 3) { - o.exportContext = buildExportContext(); - } - buildCounterInstancesExportRequest--; - return o; -} - -checkInstancesExportRequest(api.InstancesExportRequest o) { - buildCounterInstancesExportRequest++; - if (buildCounterInstancesExportRequest < 3) { - checkExportContext(o.exportContext); - } - buildCounterInstancesExportRequest--; -} - -core.int buildCounterInstancesExportResponse = 0; -buildInstancesExportResponse() { - var o = new api.InstancesExportResponse(); - buildCounterInstancesExportResponse++; - if (buildCounterInstancesExportResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesExportResponse--; - return o; -} - -checkInstancesExportResponse(api.InstancesExportResponse o) { - buildCounterInstancesExportResponse++; - if (buildCounterInstancesExportResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesExportResponse--; -} - -core.int buildCounterInstancesImportRequest = 0; -buildInstancesImportRequest() { - var o = new api.InstancesImportRequest(); - buildCounterInstancesImportRequest++; - if (buildCounterInstancesImportRequest < 3) { - o.importContext = buildImportContext(); - } - buildCounterInstancesImportRequest--; - return o; -} - -checkInstancesImportRequest(api.InstancesImportRequest o) { - buildCounterInstancesImportRequest++; - if (buildCounterInstancesImportRequest < 3) { - checkImportContext(o.importContext); - } - buildCounterInstancesImportRequest--; -} - -core.int buildCounterInstancesImportResponse = 0; -buildInstancesImportResponse() { - var o = new api.InstancesImportResponse(); - buildCounterInstancesImportResponse++; - if (buildCounterInstancesImportResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesImportResponse--; - return o; -} - -checkInstancesImportResponse(api.InstancesImportResponse o) { - buildCounterInstancesImportResponse++; - if (buildCounterInstancesImportResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesImportResponse--; -} - -core.int buildCounterInstancesInsertResponse = 0; -buildInstancesInsertResponse() { - var o = new api.InstancesInsertResponse(); - buildCounterInstancesInsertResponse++; - if (buildCounterInstancesInsertResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesInsertResponse--; - return o; -} - -checkInstancesInsertResponse(api.InstancesInsertResponse o) { - buildCounterInstancesInsertResponse++; - if (buildCounterInstancesInsertResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesInsertResponse--; -} - -buildUnnamed5601() { - var o = new core.List<api.DatabaseInstance>(); - o.add(buildDatabaseInstance()); - o.add(buildDatabaseInstance()); - return o; -} - -checkUnnamed5601(core.List<api.DatabaseInstance> o) { - unittest.expect(o, unittest.hasLength(2)); - checkDatabaseInstance(o[0]); - checkDatabaseInstance(o[1]); -} - -core.int buildCounterInstancesListResponse = 0; -buildInstancesListResponse() { - var o = new api.InstancesListResponse(); - buildCounterInstancesListResponse++; - if (buildCounterInstancesListResponse < 3) { - o.items = buildUnnamed5601(); - o.kind = "foo"; - o.nextPageToken = "foo"; - } - buildCounterInstancesListResponse--; - return o; -} - -checkInstancesListResponse(api.InstancesListResponse o) { - buildCounterInstancesListResponse++; - if (buildCounterInstancesListResponse < 3) { - checkUnnamed5601(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - } - buildCounterInstancesListResponse--; -} - -core.int buildCounterInstancesPromoteReplicaResponse = 0; -buildInstancesPromoteReplicaResponse() { - var o = new api.InstancesPromoteReplicaResponse(); - buildCounterInstancesPromoteReplicaResponse++; - if (buildCounterInstancesPromoteReplicaResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesPromoteReplicaResponse--; - return o; -} - -checkInstancesPromoteReplicaResponse(api.InstancesPromoteReplicaResponse o) { - buildCounterInstancesPromoteReplicaResponse++; - if (buildCounterInstancesPromoteReplicaResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesPromoteReplicaResponse--; -} - -core.int buildCounterInstancesResetSslConfigResponse = 0; -buildInstancesResetSslConfigResponse() { - var o = new api.InstancesResetSslConfigResponse(); - buildCounterInstancesResetSslConfigResponse++; - if (buildCounterInstancesResetSslConfigResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesResetSslConfigResponse--; - return o; -} - -checkInstancesResetSslConfigResponse(api.InstancesResetSslConfigResponse o) { - buildCounterInstancesResetSslConfigResponse++; - if (buildCounterInstancesResetSslConfigResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesResetSslConfigResponse--; -} - -core.int buildCounterInstancesRestartResponse = 0; -buildInstancesRestartResponse() { - var o = new api.InstancesRestartResponse(); - buildCounterInstancesRestartResponse++; - if (buildCounterInstancesRestartResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesRestartResponse--; - return o; -} - -checkInstancesRestartResponse(api.InstancesRestartResponse o) { - buildCounterInstancesRestartResponse++; - if (buildCounterInstancesRestartResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesRestartResponse--; -} - -core.int buildCounterInstancesRestoreBackupResponse = 0; -buildInstancesRestoreBackupResponse() { - var o = new api.InstancesRestoreBackupResponse(); - buildCounterInstancesRestoreBackupResponse++; - if (buildCounterInstancesRestoreBackupResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesRestoreBackupResponse--; - return o; -} - -checkInstancesRestoreBackupResponse(api.InstancesRestoreBackupResponse o) { - buildCounterInstancesRestoreBackupResponse++; - if (buildCounterInstancesRestoreBackupResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesRestoreBackupResponse--; -} - -core.int buildCounterInstancesSetRootPasswordResponse = 0; -buildInstancesSetRootPasswordResponse() { - var o = new api.InstancesSetRootPasswordResponse(); - buildCounterInstancesSetRootPasswordResponse++; - if (buildCounterInstancesSetRootPasswordResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesSetRootPasswordResponse--; - return o; -} - -checkInstancesSetRootPasswordResponse(api.InstancesSetRootPasswordResponse o) { - buildCounterInstancesSetRootPasswordResponse++; - if (buildCounterInstancesSetRootPasswordResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesSetRootPasswordResponse--; -} - -core.int buildCounterInstancesUpdateResponse = 0; -buildInstancesUpdateResponse() { - var o = new api.InstancesUpdateResponse(); - buildCounterInstancesUpdateResponse++; - if (buildCounterInstancesUpdateResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesUpdateResponse--; - return o; -} - -checkInstancesUpdateResponse(api.InstancesUpdateResponse o) { - buildCounterInstancesUpdateResponse++; - if (buildCounterInstancesUpdateResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesUpdateResponse--; -} - -buildUnnamed5602() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5602(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterIpConfiguration = 0; -buildIpConfiguration() { - var o = new api.IpConfiguration(); - buildCounterIpConfiguration++; - if (buildCounterIpConfiguration < 3) { - o.authorizedNetworks = buildUnnamed5602(); - o.enabled = true; - o.kind = "foo"; - o.requireSsl = true; - } - buildCounterIpConfiguration--; - return o; -} - -checkIpConfiguration(api.IpConfiguration o) { - buildCounterIpConfiguration++; - if (buildCounterIpConfiguration < 3) { - checkUnnamed5602(o.authorizedNetworks); - unittest.expect(o.enabled, unittest.isTrue); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.requireSsl, unittest.isTrue); - } - buildCounterIpConfiguration--; -} - -core.int buildCounterIpMapping = 0; -buildIpMapping() { - var o = new api.IpMapping(); - buildCounterIpMapping++; - if (buildCounterIpMapping < 3) { - o.ipAddress = "foo"; - o.timeToRetire = core.DateTime.parse("2002-02-27T14:01:02"); - } - buildCounterIpMapping--; - return o; -} - -checkIpMapping(api.IpMapping o) { - buildCounterIpMapping++; - if (buildCounterIpMapping < 3) { - unittest.expect(o.ipAddress, unittest.equals('foo')); - unittest.expect(o.timeToRetire, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - } - buildCounterIpMapping--; -} - -core.int buildCounterLocationPreference = 0; -buildLocationPreference() { - var o = new api.LocationPreference(); - buildCounterLocationPreference++; - if (buildCounterLocationPreference < 3) { - o.followGaeApplication = "foo"; - o.kind = "foo"; - o.zone = "foo"; - } - buildCounterLocationPreference--; - return o; -} - -checkLocationPreference(api.LocationPreference o) { - buildCounterLocationPreference++; - if (buildCounterLocationPreference < 3) { - unittest.expect(o.followGaeApplication, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.zone, unittest.equals('foo')); - } - buildCounterLocationPreference--; -} - -core.int buildCounterOperationError = 0; -buildOperationError() { - var o = new api.OperationError(); - buildCounterOperationError++; - if (buildCounterOperationError < 3) { - o.code = "foo"; - o.kind = "foo"; - } - buildCounterOperationError--; - return o; -} - -checkOperationError(api.OperationError o) { - buildCounterOperationError++; - if (buildCounterOperationError < 3) { - unittest.expect(o.code, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterOperationError--; -} - -buildUnnamed5603() { - var o = new core.List<api.InstanceOperation>(); - o.add(buildInstanceOperation()); - o.add(buildInstanceOperation()); - return o; -} - -checkUnnamed5603(core.List<api.InstanceOperation> o) { - unittest.expect(o, unittest.hasLength(2)); - checkInstanceOperation(o[0]); - checkInstanceOperation(o[1]); -} - -core.int buildCounterOperationsListResponse = 0; -buildOperationsListResponse() { - var o = new api.OperationsListResponse(); - buildCounterOperationsListResponse++; - if (buildCounterOperationsListResponse < 3) { - o.items = buildUnnamed5603(); - o.kind = "foo"; - o.nextPageToken = "foo"; - } - buildCounterOperationsListResponse--; - return o; -} - -checkOperationsListResponse(api.OperationsListResponse o) { - buildCounterOperationsListResponse++; - if (buildCounterOperationsListResponse < 3) { - checkUnnamed5603(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - } - buildCounterOperationsListResponse--; -} - -core.int buildCounterSetRootPasswordContext = 0; -buildSetRootPasswordContext() { - var o = new api.SetRootPasswordContext(); - buildCounterSetRootPasswordContext++; - if (buildCounterSetRootPasswordContext < 3) { - o.kind = "foo"; - o.password = "foo"; - } - buildCounterSetRootPasswordContext--; - return o; -} - -checkSetRootPasswordContext(api.SetRootPasswordContext o) { - buildCounterSetRootPasswordContext++; - if (buildCounterSetRootPasswordContext < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.password, unittest.equals('foo')); - } - buildCounterSetRootPasswordContext--; -} - -buildUnnamed5604() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5604(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -buildUnnamed5605() { - var o = new core.List<api.BackupConfiguration>(); - o.add(buildBackupConfiguration()); - o.add(buildBackupConfiguration()); - return o; -} - -checkUnnamed5605(core.List<api.BackupConfiguration> o) { - unittest.expect(o, unittest.hasLength(2)); - checkBackupConfiguration(o[0]); - checkBackupConfiguration(o[1]); -} - -buildUnnamed5606() { - var o = new core.List<api.DatabaseFlags>(); - o.add(buildDatabaseFlags()); - o.add(buildDatabaseFlags()); - return o; -} - -checkUnnamed5606(core.List<api.DatabaseFlags> o) { - unittest.expect(o, unittest.hasLength(2)); - checkDatabaseFlags(o[0]); - checkDatabaseFlags(o[1]); -} - -core.int buildCounterSettings = 0; -buildSettings() { - var o = new api.Settings(); - buildCounterSettings++; - if (buildCounterSettings < 3) { - o.activationPolicy = "foo"; - o.authorizedGaeApplications = buildUnnamed5604(); - o.backupConfiguration = buildUnnamed5605(); - o.databaseFlags = buildUnnamed5606(); - o.databaseReplicationEnabled = true; - o.ipConfiguration = buildIpConfiguration(); - o.kind = "foo"; - o.locationPreference = buildLocationPreference(); - o.pricingPlan = "foo"; - o.replicationType = "foo"; - o.settingsVersion = "foo"; - o.tier = "foo"; - } - buildCounterSettings--; - return o; -} - -checkSettings(api.Settings o) { - buildCounterSettings++; - if (buildCounterSettings < 3) { - unittest.expect(o.activationPolicy, unittest.equals('foo')); - checkUnnamed5604(o.authorizedGaeApplications); - checkUnnamed5605(o.backupConfiguration); - checkUnnamed5606(o.databaseFlags); - unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); - checkIpConfiguration(o.ipConfiguration); - unittest.expect(o.kind, unittest.equals('foo')); - checkLocationPreference(o.locationPreference); - unittest.expect(o.pricingPlan, unittest.equals('foo')); - unittest.expect(o.replicationType, unittest.equals('foo')); - unittest.expect(o.settingsVersion, unittest.equals('foo')); - unittest.expect(o.tier, unittest.equals('foo')); - } - buildCounterSettings--; -} - -core.int buildCounterSslCert = 0; -buildSslCert() { - var o = new api.SslCert(); - buildCounterSslCert++; - if (buildCounterSslCert < 3) { - o.cert = "foo"; - o.certSerialNumber = "foo"; - o.commonName = "foo"; - o.createTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.instance = "foo"; - o.kind = "foo"; - o.sha1Fingerprint = "foo"; - } - buildCounterSslCert--; - return o; -} - -checkSslCert(api.SslCert o) { - buildCounterSslCert++; - if (buildCounterSslCert < 3) { - unittest.expect(o.cert, unittest.equals('foo')); - unittest.expect(o.certSerialNumber, unittest.equals('foo')); - unittest.expect(o.commonName, unittest.equals('foo')); - unittest.expect(o.createTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.expirationTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.sha1Fingerprint, unittest.equals('foo')); - } - buildCounterSslCert--; -} - -core.int buildCounterSslCertDetail = 0; -buildSslCertDetail() { - var o = new api.SslCertDetail(); - buildCounterSslCertDetail++; - if (buildCounterSslCertDetail < 3) { - o.certInfo = buildSslCert(); - o.certPrivateKey = "foo"; - } - buildCounterSslCertDetail--; - return o; -} - -checkSslCertDetail(api.SslCertDetail o) { - buildCounterSslCertDetail++; - if (buildCounterSslCertDetail < 3) { - checkSslCert(o.certInfo); - unittest.expect(o.certPrivateKey, unittest.equals('foo')); - } - buildCounterSslCertDetail--; -} - -core.int buildCounterSslCertsDeleteResponse = 0; -buildSslCertsDeleteResponse() { - var o = new api.SslCertsDeleteResponse(); - buildCounterSslCertsDeleteResponse++; - if (buildCounterSslCertsDeleteResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterSslCertsDeleteResponse--; - return o; -} - -checkSslCertsDeleteResponse(api.SslCertsDeleteResponse o) { - buildCounterSslCertsDeleteResponse++; - if (buildCounterSslCertsDeleteResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterSslCertsDeleteResponse--; -} - -core.int buildCounterSslCertsInsertRequest = 0; -buildSslCertsInsertRequest() { - var o = new api.SslCertsInsertRequest(); - buildCounterSslCertsInsertRequest++; - if (buildCounterSslCertsInsertRequest < 3) { - o.commonName = "foo"; - } - buildCounterSslCertsInsertRequest--; - return o; -} - -checkSslCertsInsertRequest(api.SslCertsInsertRequest o) { - buildCounterSslCertsInsertRequest++; - if (buildCounterSslCertsInsertRequest < 3) { - unittest.expect(o.commonName, unittest.equals('foo')); - } - buildCounterSslCertsInsertRequest--; -} - -core.int buildCounterSslCertsInsertResponse = 0; -buildSslCertsInsertResponse() { - var o = new api.SslCertsInsertResponse(); - buildCounterSslCertsInsertResponse++; - if (buildCounterSslCertsInsertResponse < 3) { - o.clientCert = buildSslCertDetail(); - o.kind = "foo"; - o.serverCaCert = buildSslCert(); - } - buildCounterSslCertsInsertResponse--; - return o; -} - -checkSslCertsInsertResponse(api.SslCertsInsertResponse o) { - buildCounterSslCertsInsertResponse++; - if (buildCounterSslCertsInsertResponse < 3) { - checkSslCertDetail(o.clientCert); - unittest.expect(o.kind, unittest.equals('foo')); - checkSslCert(o.serverCaCert); - } - buildCounterSslCertsInsertResponse--; -} - -buildUnnamed5607() { - var o = new core.List<api.SslCert>(); - o.add(buildSslCert()); - o.add(buildSslCert()); - return o; -} - -checkUnnamed5607(core.List<api.SslCert> o) { - unittest.expect(o, unittest.hasLength(2)); - checkSslCert(o[0]); - checkSslCert(o[1]); -} - -core.int buildCounterSslCertsListResponse = 0; -buildSslCertsListResponse() { - var o = new api.SslCertsListResponse(); - buildCounterSslCertsListResponse++; - if (buildCounterSslCertsListResponse < 3) { - o.items = buildUnnamed5607(); - o.kind = "foo"; - } - buildCounterSslCertsListResponse--; - return o; -} - -checkSslCertsListResponse(api.SslCertsListResponse o) { - buildCounterSslCertsListResponse++; - if (buildCounterSslCertsListResponse < 3) { - checkUnnamed5607(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterSslCertsListResponse--; -} - -buildUnnamed5608() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5608(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterTier = 0; -buildTier() { - var o = new api.Tier(); - buildCounterTier++; - if (buildCounterTier < 3) { - o.DiskQuota = "foo"; - o.RAM = "foo"; - o.kind = "foo"; - o.region = buildUnnamed5608(); - o.tier = "foo"; - } - buildCounterTier--; - return o; -} - -checkTier(api.Tier o) { - buildCounterTier++; - if (buildCounterTier < 3) { - unittest.expect(o.DiskQuota, unittest.equals('foo')); - unittest.expect(o.RAM, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5608(o.region); - unittest.expect(o.tier, unittest.equals('foo')); - } - buildCounterTier--; -} - -buildUnnamed5609() { - var o = new core.List<api.Tier>(); - o.add(buildTier()); - o.add(buildTier()); - return o; -} - -checkUnnamed5609(core.List<api.Tier> o) { - unittest.expect(o, unittest.hasLength(2)); - checkTier(o[0]); - checkTier(o[1]); -} - -core.int buildCounterTiersListResponse = 0; -buildTiersListResponse() { - var o = new api.TiersListResponse(); - buildCounterTiersListResponse++; - if (buildCounterTiersListResponse < 3) { - o.items = buildUnnamed5609(); - o.kind = "foo"; - } - buildCounterTiersListResponse--; - return o; -} - -checkTiersListResponse(api.TiersListResponse o) { - buildCounterTiersListResponse++; - if (buildCounterTiersListResponse < 3) { - checkUnnamed5609(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterTiersListResponse--; -} - -main() { - unittest.group("obj-schema-BackupConfiguration", () { - unittest.test("to-json--from-json", () { - var o = buildBackupConfiguration(); - var od = new api.BackupConfiguration.fromJson(o.toJson()); - checkBackupConfiguration(od); - }); - }); - - unittest.group("obj-schema-BackupRun", () { - unittest.test("to-json--from-json", () { - var o = buildBackupRun(); - var od = new api.BackupRun.fromJson(o.toJson()); - checkBackupRun(od); - }); - }); - - unittest.group("obj-schema-BackupRunsListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildBackupRunsListResponse(); - var od = new api.BackupRunsListResponse.fromJson(o.toJson()); - checkBackupRunsListResponse(od); - }); - }); - - unittest.group("obj-schema-BinLogCoordinates", () { - unittest.test("to-json--from-json", () { - var o = buildBinLogCoordinates(); - var od = new api.BinLogCoordinates.fromJson(o.toJson()); - checkBinLogCoordinates(od); - }); - }); - - unittest.group("obj-schema-CloneContext", () { - unittest.test("to-json--from-json", () { - var o = buildCloneContext(); - var od = new api.CloneContext.fromJson(o.toJson()); - checkCloneContext(od); - }); - }); - - unittest.group("obj-schema-DatabaseFlags", () { - unittest.test("to-json--from-json", () { - var o = buildDatabaseFlags(); - var od = new api.DatabaseFlags.fromJson(o.toJson()); - checkDatabaseFlags(od); - }); - }); - - unittest.group("obj-schema-DatabaseInstance", () { - unittest.test("to-json--from-json", () { - var o = buildDatabaseInstance(); - var od = new api.DatabaseInstance.fromJson(o.toJson()); - checkDatabaseInstance(od); - }); - }); - - unittest.group("obj-schema-ExportContext", () { - unittest.test("to-json--from-json", () { - var o = buildExportContext(); - var od = new api.ExportContext.fromJson(o.toJson()); - checkExportContext(od); - }); - }); - - unittest.group("obj-schema-Flag", () { - unittest.test("to-json--from-json", () { - var o = buildFlag(); - var od = new api.Flag.fromJson(o.toJson()); - checkFlag(od); - }); - }); - - unittest.group("obj-schema-FlagsListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildFlagsListResponse(); - var od = new api.FlagsListResponse.fromJson(o.toJson()); - checkFlagsListResponse(od); - }); - }); - - unittest.group("obj-schema-ImportContext", () { - unittest.test("to-json--from-json", () { - var o = buildImportContext(); - var od = new api.ImportContext.fromJson(o.toJson()); - checkImportContext(od); - }); - }); - - unittest.group("obj-schema-InstanceOperation", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceOperation(); - var od = new api.InstanceOperation.fromJson(o.toJson()); - checkInstanceOperation(od); - }); - }); - - unittest.group("obj-schema-InstanceSetRootPasswordRequest", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceSetRootPasswordRequest(); - var od = new api.InstanceSetRootPasswordRequest.fromJson(o.toJson()); - checkInstanceSetRootPasswordRequest(od); - }); - }); - - unittest.group("obj-schema-InstancesCloneRequest", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesCloneRequest(); - var od = new api.InstancesCloneRequest.fromJson(o.toJson()); - checkInstancesCloneRequest(od); - }); - }); - - unittest.group("obj-schema-InstancesCloneResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesCloneResponse(); - var od = new api.InstancesCloneResponse.fromJson(o.toJson()); - checkInstancesCloneResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesDeleteResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesDeleteResponse(); - var od = new api.InstancesDeleteResponse.fromJson(o.toJson()); - checkInstancesDeleteResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesExportRequest", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesExportRequest(); - var od = new api.InstancesExportRequest.fromJson(o.toJson()); - checkInstancesExportRequest(od); - }); - }); - - unittest.group("obj-schema-InstancesExportResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesExportResponse(); - var od = new api.InstancesExportResponse.fromJson(o.toJson()); - checkInstancesExportResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesImportRequest", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesImportRequest(); - var od = new api.InstancesImportRequest.fromJson(o.toJson()); - checkInstancesImportRequest(od); - }); - }); - - unittest.group("obj-schema-InstancesImportResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesImportResponse(); - var od = new api.InstancesImportResponse.fromJson(o.toJson()); - checkInstancesImportResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesInsertResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesInsertResponse(); - var od = new api.InstancesInsertResponse.fromJson(o.toJson()); - checkInstancesInsertResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesListResponse(); - var od = new api.InstancesListResponse.fromJson(o.toJson()); - checkInstancesListResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesPromoteReplicaResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesPromoteReplicaResponse(); - var od = new api.InstancesPromoteReplicaResponse.fromJson(o.toJson()); - checkInstancesPromoteReplicaResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesResetSslConfigResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesResetSslConfigResponse(); - var od = new api.InstancesResetSslConfigResponse.fromJson(o.toJson()); - checkInstancesResetSslConfigResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesRestartResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesRestartResponse(); - var od = new api.InstancesRestartResponse.fromJson(o.toJson()); - checkInstancesRestartResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesRestoreBackupResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesRestoreBackupResponse(); - var od = new api.InstancesRestoreBackupResponse.fromJson(o.toJson()); - checkInstancesRestoreBackupResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesSetRootPasswordResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesSetRootPasswordResponse(); - var od = new api.InstancesSetRootPasswordResponse.fromJson(o.toJson()); - checkInstancesSetRootPasswordResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesUpdateResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesUpdateResponse(); - var od = new api.InstancesUpdateResponse.fromJson(o.toJson()); - checkInstancesUpdateResponse(od); - }); - }); - - unittest.group("obj-schema-IpConfiguration", () { - unittest.test("to-json--from-json", () { - var o = buildIpConfiguration(); - var od = new api.IpConfiguration.fromJson(o.toJson()); - checkIpConfiguration(od); - }); - }); - - unittest.group("obj-schema-IpMapping", () { - unittest.test("to-json--from-json", () { - var o = buildIpMapping(); - var od = new api.IpMapping.fromJson(o.toJson()); - checkIpMapping(od); - }); - }); - - unittest.group("obj-schema-LocationPreference", () { - unittest.test("to-json--from-json", () { - var o = buildLocationPreference(); - var od = new api.LocationPreference.fromJson(o.toJson()); - checkLocationPreference(od); - }); - }); - - unittest.group("obj-schema-OperationError", () { - unittest.test("to-json--from-json", () { - var o = buildOperationError(); - var od = new api.OperationError.fromJson(o.toJson()); - checkOperationError(od); - }); - }); - - unittest.group("obj-schema-OperationsListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildOperationsListResponse(); - var od = new api.OperationsListResponse.fromJson(o.toJson()); - checkOperationsListResponse(od); - }); - }); - - unittest.group("obj-schema-SetRootPasswordContext", () { - unittest.test("to-json--from-json", () { - var o = buildSetRootPasswordContext(); - var od = new api.SetRootPasswordContext.fromJson(o.toJson()); - checkSetRootPasswordContext(od); - }); - }); - - unittest.group("obj-schema-Settings", () { - unittest.test("to-json--from-json", () { - var o = buildSettings(); - var od = new api.Settings.fromJson(o.toJson()); - checkSettings(od); - }); - }); - - unittest.group("obj-schema-SslCert", () { - unittest.test("to-json--from-json", () { - var o = buildSslCert(); - var od = new api.SslCert.fromJson(o.toJson()); - checkSslCert(od); - }); - }); - - unittest.group("obj-schema-SslCertDetail", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertDetail(); - var od = new api.SslCertDetail.fromJson(o.toJson()); - checkSslCertDetail(od); - }); - }); - - unittest.group("obj-schema-SslCertsDeleteResponse", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertsDeleteResponse(); - var od = new api.SslCertsDeleteResponse.fromJson(o.toJson()); - checkSslCertsDeleteResponse(od); - }); - }); - - unittest.group("obj-schema-SslCertsInsertRequest", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertsInsertRequest(); - var od = new api.SslCertsInsertRequest.fromJson(o.toJson()); - checkSslCertsInsertRequest(od); - }); - }); - - unittest.group("obj-schema-SslCertsInsertResponse", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertsInsertResponse(); - var od = new api.SslCertsInsertResponse.fromJson(o.toJson()); - checkSslCertsInsertResponse(od); - }); - }); - - unittest.group("obj-schema-SslCertsListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertsListResponse(); - var od = new api.SslCertsListResponse.fromJson(o.toJson()); - checkSslCertsListResponse(od); - }); - }); - - unittest.group("obj-schema-Tier", () { - unittest.test("to-json--from-json", () { - var o = buildTier(); - var od = new api.Tier.fromJson(o.toJson()); - checkTier(od); - }); - }); - - unittest.group("obj-schema-TiersListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildTiersListResponse(); - var od = new api.TiersListResponse.fromJson(o.toJson()); - checkTiersListResponse(od); - }); - }); - - unittest.group("resource-BackupRunsResourceApi", () { - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_backupConfiguration = "foo"; - var arg_dueTime = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/backupRuns/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("/backupRuns/")); - pathOffset += 12; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_backupConfiguration")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect( - queryMap["dueTime"].first, unittest.equals(arg_dueTime)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildBackupRun()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_instance, arg_backupConfiguration, arg_dueTime, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkBackupRun(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_backupConfiguration = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/backupRuns", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/backupRuns")); - pathOffset += 11; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["backupConfiguration"].first, - unittest.equals(arg_backupConfiguration)); - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildBackupRunsListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_instance, arg_backupConfiguration, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkBackupRunsListResponse(response); - }))); - }); - }); - - unittest.group("resource-FlagsResourceApi", () { - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.FlagsResourceApi res = new api.SqladminApi(mock).flags; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 5), - unittest.equals("flags")); - pathOffset += 5; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildFlagsListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res.list($fields: arg_$fields).then(unittest.expectAsync1(((response) { - checkFlagsListResponse(response); - }))); - }); - }); - - unittest.group("resource-InstancesResourceApi", () { - unittest.test("method--clone", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildInstancesCloneRequest(); - var arg_project = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.InstancesCloneRequest.fromJson(json); - checkInstancesCloneRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/clone", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 16), - unittest.equals("/instances/clone")); - pathOffset += 16; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesCloneResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .clone(arg_request, arg_project, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesCloneResponse(response); - }))); - }); - - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_instance")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesDeleteResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesDeleteResponse(response); - }))); - }); - - unittest.test("method--export", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildInstancesExportRequest(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.InstancesExportRequest.fromJson(json); - checkInstancesExportRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/export", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 7), - unittest.equals("/export")); - pathOffset += 7; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesExportResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .export(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesExportResponse(response); - }))); - }); - - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_instance")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildDatabaseInstance()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkDatabaseInstance(response); - }))); - }); - - unittest.test("method--import", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildInstancesImportRequest(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.InstancesImportRequest.fromJson(json); - checkInstancesImportRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/import", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 7), - unittest.equals("/import")); - pathOffset += 7; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesImportResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .import(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesImportResponse(response); - }))); - }); - - unittest.test("method--insert", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildDatabaseInstance(); - var arg_project = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.DatabaseInstance.fromJson(json); - checkDatabaseInstance(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 10), - unittest.equals("/instances")); - pathOffset += 10; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesInsertResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .insert(arg_request, arg_project, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesInsertResponse(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 10), - unittest.equals("/instances")); - pathOffset += 10; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesListResponse(response); - }))); - }); - - unittest.test("method--patch", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildDatabaseInstance(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.DatabaseInstance.fromJson(json); - checkDatabaseInstance(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_instance")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesUpdateResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .patch(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesUpdateResponse(response); - }))); - }); - - unittest.test("method--promoteReplica", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/promoteReplica", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 15), - unittest.equals("/promoteReplica")); - pathOffset += 15; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesPromoteReplicaResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .promoteReplica(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesPromoteReplicaResponse(response); - }))); - }); - - unittest.test("method--resetSslConfig", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/resetSslConfig", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 15), - unittest.equals("/resetSslConfig")); - pathOffset += 15; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesResetSslConfigResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .resetSslConfig(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesResetSslConfigResponse(response); - }))); - }); - - unittest.test("method--restart", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/restart", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("/restart")); - pathOffset += 8; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesRestartResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .restart(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesRestartResponse(response); - }))); - }); - - unittest.test("method--restoreBackup", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_backupConfiguration = "foo"; - var arg_dueTime = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/restoreBackup", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 14), - unittest.equals("/restoreBackup")); - pathOffset += 14; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["backupConfiguration"].first, - unittest.equals(arg_backupConfiguration)); - unittest.expect( - queryMap["dueTime"].first, unittest.equals(arg_dueTime)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesRestoreBackupResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .restoreBackup( - arg_project, arg_instance, arg_backupConfiguration, arg_dueTime, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesRestoreBackupResponse(response); - }))); - }); - - unittest.test("method--setRootPassword", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildInstanceSetRootPasswordRequest(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.InstanceSetRootPasswordRequest.fromJson(json); - checkInstanceSetRootPasswordRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/setRootPassword", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 16), - unittest.equals("/setRootPassword")); - pathOffset += 16; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesSetRootPasswordResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .setRootPassword(arg_request, arg_project, arg_instance, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesSetRootPasswordResponse(response); - }))); - }); - - unittest.test("method--update", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildDatabaseInstance(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.DatabaseInstance.fromJson(json); - checkDatabaseInstance(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_instance")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesUpdateResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .update(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesUpdateResponse(response); - }))); - }); - }); - - unittest.group("resource-OperationsResourceApi", () { - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.OperationsResourceApi res = new api.SqladminApi(mock).operations; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_operation = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/operations/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("/operations/")); - pathOffset += 12; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_operation")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstanceOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_instance, arg_operation, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstanceOperation(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.OperationsResourceApi res = new api.SqladminApi(mock).operations; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/operations", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/operations")); - pathOffset += 11; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperationsListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_instance, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperationsListResponse(response); - }))); - }); - }); - - unittest.group("resource-SslCertsResourceApi", () { - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_sha1Fingerprint = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/sslCerts/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 10), - unittest.equals("/sslCerts/")); - pathOffset += 10; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_sha1Fingerprint")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSslCertsDeleteResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_project, arg_instance, arg_sha1Fingerprint, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSslCertsDeleteResponse(response); - }))); - }); - - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_sha1Fingerprint = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/sslCerts/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 10), - unittest.equals("/sslCerts/")); - pathOffset += 10; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_sha1Fingerprint")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSslCert()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_instance, arg_sha1Fingerprint, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSslCert(response); - }))); - }); - - unittest.test("method--insert", () { - var mock = new HttpServerMock(); - api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; - var arg_request = buildSslCertsInsertRequest(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SslCertsInsertRequest.fromJson(json); - checkSslCertsInsertRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/sslCerts", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("/sslCerts")); - pathOffset += 9; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSslCertsInsertResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .insert(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSslCertsInsertResponse(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/sslCerts", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("/sslCerts")); - pathOffset += 9; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSslCertsListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSslCertsListResponse(response); - }))); - }); - }); - - unittest.group("resource-TiersResourceApi", () { - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.TiersResourceApi res = new api.SqladminApi(mock).tiers; - var arg_project = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/tiers", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 6), - unittest.equals("/tiers")); - pathOffset += 6; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTiersListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTiersListResponse(response); - }))); - }); - }); -}
diff --git a/generated/googleapis_beta/test/sqladmin/v1beta4_test.dart b/generated/googleapis_beta/test/sqladmin/v1beta4_test.dart index 445b9b4..b24dec6 100644 --- a/generated/googleapis_beta/test/sqladmin/v1beta4_test.dart +++ b/generated/googleapis_beta/test/sqladmin/v1beta4_test.dart
@@ -76,6 +76,27 @@ buildCounterAclEntry--; } +core.int buildCounterApiWarning = 0; +buildApiWarning() { + var o = new api.ApiWarning(); + buildCounterApiWarning++; + if (buildCounterApiWarning < 3) { + o.code = "foo"; + o.message = "foo"; + } + buildCounterApiWarning--; + return o; +} + +checkApiWarning(api.ApiWarning o) { + buildCounterApiWarning++; + if (buildCounterApiWarning < 3) { + unittest.expect(o.code, unittest.equals('foo')); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterApiWarning--; +} + core.int buildCounterBackupConfiguration = 0; buildBackupConfiguration() { var o = new api.BackupConfiguration(); @@ -148,14 +169,14 @@ buildCounterBackupRun--; } -buildUnnamed5263() { +buildUnnamed5035() { var o = new core.List<api.BackupRun>(); o.add(buildBackupRun()); o.add(buildBackupRun()); return o; } -checkUnnamed5263(core.List<api.BackupRun> o) { +checkUnnamed5035(core.List<api.BackupRun> o) { unittest.expect(o, unittest.hasLength(2)); checkBackupRun(o[0]); checkBackupRun(o[1]); @@ -166,7 +187,7 @@ var o = new api.BackupRunsListResponse(); buildCounterBackupRunsListResponse++; if (buildCounterBackupRunsListResponse < 3) { - o.items = buildUnnamed5263(); + o.items = buildUnnamed5035(); o.kind = "foo"; o.nextPageToken = "foo"; } @@ -177,7 +198,7 @@ checkBackupRunsListResponse(api.BackupRunsListResponse o) { buildCounterBackupRunsListResponse++; if (buildCounterBackupRunsListResponse < 3) { - checkUnnamed5263(o.items); + checkUnnamed5035(o.items); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); } @@ -307,40 +328,40 @@ buildCounterDatabaseInstanceFailoverReplica--; } -buildUnnamed5264() { +buildUnnamed5036() { var o = new core.List<api.IpMapping>(); o.add(buildIpMapping()); o.add(buildIpMapping()); return o; } -checkUnnamed5264(core.List<api.IpMapping> o) { +checkUnnamed5036(core.List<api.IpMapping> o) { unittest.expect(o, unittest.hasLength(2)); checkIpMapping(o[0]); checkIpMapping(o[1]); } -buildUnnamed5265() { +buildUnnamed5037() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5265(core.List<core.String> o) { +checkUnnamed5037(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5266() { +buildUnnamed5038() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5266(core.List<core.String> o) { +checkUnnamed5038(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -359,7 +380,7 @@ o.failoverReplica = buildDatabaseInstanceFailoverReplica(); o.gceZone = "foo"; o.instanceType = "foo"; - o.ipAddresses = buildUnnamed5264(); + o.ipAddresses = buildUnnamed5036(); o.ipv6Address = "foo"; o.kind = "foo"; o.masterInstanceName = "foo"; @@ -369,13 +390,13 @@ o.project = "foo"; o.region = "foo"; o.replicaConfiguration = buildReplicaConfiguration(); - o.replicaNames = buildUnnamed5265(); + o.replicaNames = buildUnnamed5037(); o.selfLink = "foo"; o.serverCaCert = buildSslCert(); o.serviceAccountEmailAddress = "foo"; o.settings = buildSettings(); o.state = "foo"; - o.suspensionReason = buildUnnamed5266(); + o.suspensionReason = buildUnnamed5038(); } buildCounterDatabaseInstance--; return o; @@ -392,7 +413,7 @@ checkDatabaseInstanceFailoverReplica(o.failoverReplica); unittest.expect(o.gceZone, unittest.equals('foo')); unittest.expect(o.instanceType, unittest.equals('foo')); - checkUnnamed5264(o.ipAddresses); + checkUnnamed5036(o.ipAddresses); unittest.expect(o.ipv6Address, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.masterInstanceName, unittest.equals('foo')); @@ -402,25 +423,25 @@ unittest.expect(o.project, unittest.equals('foo')); unittest.expect(o.region, unittest.equals('foo')); checkReplicaConfiguration(o.replicaConfiguration); - checkUnnamed5265(o.replicaNames); + checkUnnamed5037(o.replicaNames); unittest.expect(o.selfLink, unittest.equals('foo')); checkSslCert(o.serverCaCert); unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); checkSettings(o.settings); unittest.expect(o.state, unittest.equals('foo')); - checkUnnamed5266(o.suspensionReason); + checkUnnamed5038(o.suspensionReason); } buildCounterDatabaseInstance--; } -buildUnnamed5267() { +buildUnnamed5039() { var o = new core.List<api.Database>(); o.add(buildDatabase()); o.add(buildDatabase()); return o; } -checkUnnamed5267(core.List<api.Database> o) { +checkUnnamed5039(core.List<api.Database> o) { unittest.expect(o, unittest.hasLength(2)); checkDatabase(o[0]); checkDatabase(o[1]); @@ -431,7 +452,7 @@ var o = new api.DatabasesListResponse(); buildCounterDatabasesListResponse++; if (buildCounterDatabasesListResponse < 3) { - o.items = buildUnnamed5267(); + o.items = buildUnnamed5039(); o.kind = "foo"; } buildCounterDatabasesListResponse--; @@ -441,7 +462,7 @@ checkDatabasesListResponse(api.DatabasesListResponse o) { buildCounterDatabasesListResponse++; if (buildCounterDatabasesListResponse < 3) { - checkUnnamed5267(o.items); + checkUnnamed5039(o.items); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterDatabasesListResponse--; @@ -542,27 +563,47 @@ buildCounterExportContextCsvExportOptions--; } -buildUnnamed5268() { +buildUnnamed5040() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5268(core.List<core.String> o) { +checkUnnamed5040(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5269() { +core.int buildCounterExportContextSqlExportOptionsMysqlExportOptions = 0; +buildExportContextSqlExportOptionsMysqlExportOptions() { + var o = new api.ExportContextSqlExportOptionsMysqlExportOptions(); + buildCounterExportContextSqlExportOptionsMysqlExportOptions++; + if (buildCounterExportContextSqlExportOptionsMysqlExportOptions < 3) { + o.masterData = 42; + } + buildCounterExportContextSqlExportOptionsMysqlExportOptions--; + return o; +} + +checkExportContextSqlExportOptionsMysqlExportOptions( + api.ExportContextSqlExportOptionsMysqlExportOptions o) { + buildCounterExportContextSqlExportOptionsMysqlExportOptions++; + if (buildCounterExportContextSqlExportOptionsMysqlExportOptions < 3) { + unittest.expect(o.masterData, unittest.equals(42)); + } + buildCounterExportContextSqlExportOptionsMysqlExportOptions--; +} + +buildUnnamed5041() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5269(core.List<core.String> o) { +checkUnnamed5041(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -573,8 +614,10 @@ var o = new api.ExportContextSqlExportOptions(); buildCounterExportContextSqlExportOptions++; if (buildCounterExportContextSqlExportOptions < 3) { + o.mysqlExportOptions = + buildExportContextSqlExportOptionsMysqlExportOptions(); o.schemaOnly = true; - o.tables = buildUnnamed5269(); + o.tables = buildUnnamed5041(); } buildCounterExportContextSqlExportOptions--; return o; @@ -583,8 +626,9 @@ checkExportContextSqlExportOptions(api.ExportContextSqlExportOptions o) { buildCounterExportContextSqlExportOptions++; if (buildCounterExportContextSqlExportOptions < 3) { + checkExportContextSqlExportOptionsMysqlExportOptions(o.mysqlExportOptions); unittest.expect(o.schemaOnly, unittest.isTrue); - checkUnnamed5269(o.tables); + checkUnnamed5041(o.tables); } buildCounterExportContextSqlExportOptions--; } @@ -595,7 +639,7 @@ buildCounterExportContext++; if (buildCounterExportContext < 3) { o.csvExportOptions = buildExportContextCsvExportOptions(); - o.databases = buildUnnamed5268(); + o.databases = buildUnnamed5040(); o.fileType = "foo"; o.kind = "foo"; o.sqlExportOptions = buildExportContextSqlExportOptions(); @@ -609,7 +653,7 @@ buildCounterExportContext++; if (buildCounterExportContext < 3) { checkExportContextCsvExportOptions(o.csvExportOptions); - checkUnnamed5268(o.databases); + checkUnnamed5040(o.databases); unittest.expect(o.fileType, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); checkExportContextSqlExportOptions(o.sqlExportOptions); @@ -639,27 +683,27 @@ buildCounterFailoverContext--; } -buildUnnamed5270() { +buildUnnamed5042() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5270(core.List<core.String> o) { +checkUnnamed5042(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5271() { +buildUnnamed5043() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5271(core.List<core.String> o) { +checkUnnamed5043(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -670,8 +714,8 @@ var o = new api.Flag(); buildCounterFlag++; if (buildCounterFlag < 3) { - o.allowedStringValues = buildUnnamed5270(); - o.appliesTo = buildUnnamed5271(); + o.allowedStringValues = buildUnnamed5042(); + o.appliesTo = buildUnnamed5043(); o.kind = "foo"; o.maxValue = "foo"; o.minValue = "foo"; @@ -686,8 +730,8 @@ checkFlag(api.Flag o) { buildCounterFlag++; if (buildCounterFlag < 3) { - checkUnnamed5270(o.allowedStringValues); - checkUnnamed5271(o.appliesTo); + checkUnnamed5042(o.allowedStringValues); + checkUnnamed5043(o.appliesTo); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.maxValue, unittest.equals('foo')); unittest.expect(o.minValue, unittest.equals('foo')); @@ -698,14 +742,14 @@ buildCounterFlag--; } -buildUnnamed5272() { +buildUnnamed5044() { var o = new core.List<api.Flag>(); o.add(buildFlag()); o.add(buildFlag()); return o; } -checkUnnamed5272(core.List<api.Flag> o) { +checkUnnamed5044(core.List<api.Flag> o) { unittest.expect(o, unittest.hasLength(2)); checkFlag(o[0]); checkFlag(o[1]); @@ -716,7 +760,7 @@ var o = new api.FlagsListResponse(); buildCounterFlagsListResponse++; if (buildCounterFlagsListResponse < 3) { - o.items = buildUnnamed5272(); + o.items = buildUnnamed5044(); o.kind = "foo"; } buildCounterFlagsListResponse--; @@ -726,20 +770,20 @@ checkFlagsListResponse(api.FlagsListResponse o) { buildCounterFlagsListResponse++; if (buildCounterFlagsListResponse < 3) { - checkUnnamed5272(o.items); + checkUnnamed5044(o.items); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterFlagsListResponse--; } -buildUnnamed5273() { +buildUnnamed5045() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5273(core.List<core.String> o) { +checkUnnamed5045(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -750,7 +794,7 @@ var o = new api.ImportContextCsvImportOptions(); buildCounterImportContextCsvImportOptions++; if (buildCounterImportContextCsvImportOptions < 3) { - o.columns = buildUnnamed5273(); + o.columns = buildUnnamed5045(); o.table = "foo"; } buildCounterImportContextCsvImportOptions--; @@ -760,7 +804,7 @@ checkImportContextCsvImportOptions(api.ImportContextCsvImportOptions o) { buildCounterImportContextCsvImportOptions++; if (buildCounterImportContextCsvImportOptions < 3) { - checkUnnamed5273(o.columns); + checkUnnamed5045(o.columns); unittest.expect(o.table, unittest.equals('foo')); } buildCounterImportContextCsvImportOptions--; @@ -890,27 +934,41 @@ buildCounterInstancesImportRequest--; } -buildUnnamed5274() { +buildUnnamed5046() { var o = new core.List<api.DatabaseInstance>(); o.add(buildDatabaseInstance()); o.add(buildDatabaseInstance()); return o; } -checkUnnamed5274(core.List<api.DatabaseInstance> o) { +checkUnnamed5046(core.List<api.DatabaseInstance> o) { unittest.expect(o, unittest.hasLength(2)); checkDatabaseInstance(o[0]); checkDatabaseInstance(o[1]); } +buildUnnamed5047() { + var o = new core.List<api.ApiWarning>(); + o.add(buildApiWarning()); + o.add(buildApiWarning()); + return o; +} + +checkUnnamed5047(core.List<api.ApiWarning> o) { + unittest.expect(o, unittest.hasLength(2)); + checkApiWarning(o[0]); + checkApiWarning(o[1]); +} + core.int buildCounterInstancesListResponse = 0; buildInstancesListResponse() { var o = new api.InstancesListResponse(); buildCounterInstancesListResponse++; if (buildCounterInstancesListResponse < 3) { - o.items = buildUnnamed5274(); + o.items = buildUnnamed5046(); o.kind = "foo"; o.nextPageToken = "foo"; + o.warnings = buildUnnamed5047(); } buildCounterInstancesListResponse--; return o; @@ -919,21 +977,22 @@ checkInstancesListResponse(api.InstancesListResponse o) { buildCounterInstancesListResponse++; if (buildCounterInstancesListResponse < 3) { - checkUnnamed5274(o.items); + checkUnnamed5046(o.items); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed5047(o.warnings); } buildCounterInstancesListResponse--; } -buildUnnamed5275() { +buildUnnamed5048() { var o = new core.List<api.SslCert>(); o.add(buildSslCert()); o.add(buildSslCert()); return o; } -checkUnnamed5275(core.List<api.SslCert> o) { +checkUnnamed5048(core.List<api.SslCert> o) { unittest.expect(o, unittest.hasLength(2)); checkSslCert(o[0]); checkSslCert(o[1]); @@ -945,7 +1004,7 @@ buildCounterInstancesListServerCasResponse++; if (buildCounterInstancesListServerCasResponse < 3) { o.activeVersion = "foo"; - o.certs = buildUnnamed5275(); + o.certs = buildUnnamed5048(); o.kind = "foo"; } buildCounterInstancesListServerCasResponse--; @@ -956,7 +1015,7 @@ buildCounterInstancesListServerCasResponse++; if (buildCounterInstancesListServerCasResponse < 3) { unittest.expect(o.activeVersion, unittest.equals('foo')); - checkUnnamed5275(o.certs); + checkUnnamed5048(o.certs); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterInstancesListServerCasResponse--; @@ -1019,14 +1078,14 @@ buildCounterInstancesTruncateLogRequest--; } -buildUnnamed5276() { +buildUnnamed5049() { var o = new core.List<api.AclEntry>(); o.add(buildAclEntry()); o.add(buildAclEntry()); return o; } -checkUnnamed5276(core.List<api.AclEntry> o) { +checkUnnamed5049(core.List<api.AclEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkAclEntry(o[0]); checkAclEntry(o[1]); @@ -1037,7 +1096,7 @@ var o = new api.IpConfiguration(); buildCounterIpConfiguration++; if (buildCounterIpConfiguration < 3) { - o.authorizedNetworks = buildUnnamed5276(); + o.authorizedNetworks = buildUnnamed5049(); o.ipv4Enabled = true; o.privateNetwork = "foo"; o.requireSsl = true; @@ -1049,7 +1108,7 @@ checkIpConfiguration(api.IpConfiguration o) { buildCounterIpConfiguration++; if (buildCounterIpConfiguration < 3) { - checkUnnamed5276(o.authorizedNetworks); + checkUnnamed5049(o.authorizedNetworks); unittest.expect(o.ipv4Enabled, unittest.isTrue); unittest.expect(o.privateNetwork, unittest.equals('foo')); unittest.expect(o.requireSsl, unittest.isTrue); @@ -1262,14 +1321,14 @@ buildCounterOperationError--; } -buildUnnamed5277() { +buildUnnamed5050() { var o = new core.List<api.OperationError>(); o.add(buildOperationError()); o.add(buildOperationError()); return o; } -checkUnnamed5277(core.List<api.OperationError> o) { +checkUnnamed5050(core.List<api.OperationError> o) { unittest.expect(o, unittest.hasLength(2)); checkOperationError(o[0]); checkOperationError(o[1]); @@ -1280,7 +1339,7 @@ var o = new api.OperationErrors(); buildCounterOperationErrors++; if (buildCounterOperationErrors < 3) { - o.errors = buildUnnamed5277(); + o.errors = buildUnnamed5050(); o.kind = "foo"; } buildCounterOperationErrors--; @@ -1290,20 +1349,20 @@ checkOperationErrors(api.OperationErrors o) { buildCounterOperationErrors++; if (buildCounterOperationErrors < 3) { - checkUnnamed5277(o.errors); + checkUnnamed5050(o.errors); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterOperationErrors--; } -buildUnnamed5278() { +buildUnnamed5051() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5278(core.List<api.Operation> o) { +checkUnnamed5051(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -1314,7 +1373,7 @@ var o = new api.OperationsListResponse(); buildCounterOperationsListResponse++; if (buildCounterOperationsListResponse < 3) { - o.items = buildUnnamed5278(); + o.items = buildUnnamed5051(); o.kind = "foo"; o.nextPageToken = "foo"; } @@ -1325,7 +1384,7 @@ checkOperationsListResponse(api.OperationsListResponse o) { buildCounterOperationsListResponse++; if (buildCounterOperationsListResponse < 3) { - checkUnnamed5278(o.items); + checkUnnamed5051(o.items); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); } @@ -1399,40 +1458,40 @@ buildCounterRotateServerCaContext--; } -buildUnnamed5279() { +buildUnnamed5052() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5279(core.List<core.String> o) { +checkUnnamed5052(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5280() { +buildUnnamed5053() { var o = new core.List<api.DatabaseFlags>(); o.add(buildDatabaseFlags()); o.add(buildDatabaseFlags()); return o; } -checkUnnamed5280(core.List<api.DatabaseFlags> o) { +checkUnnamed5053(core.List<api.DatabaseFlags> o) { unittest.expect(o, unittest.hasLength(2)); checkDatabaseFlags(o[0]); checkDatabaseFlags(o[1]); } -buildUnnamed5281() { +buildUnnamed5054() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5281(core.Map<core.String, core.String> o) { +checkUnnamed5054(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1444,13 +1503,13 @@ buildCounterSettings++; if (buildCounterSettings < 3) { o.activationPolicy = "foo"; - o.authorizedGaeApplications = buildUnnamed5279(); + o.authorizedGaeApplications = buildUnnamed5052(); o.availabilityType = "foo"; o.backupConfiguration = buildBackupConfiguration(); o.crashSafeReplicationEnabled = true; o.dataDiskSizeGb = "foo"; o.dataDiskType = "foo"; - o.databaseFlags = buildUnnamed5280(); + o.databaseFlags = buildUnnamed5053(); o.databaseReplicationEnabled = true; o.ipConfiguration = buildIpConfiguration(); o.kind = "foo"; @@ -1462,7 +1521,7 @@ o.storageAutoResize = true; o.storageAutoResizeLimit = "foo"; o.tier = "foo"; - o.userLabels = buildUnnamed5281(); + o.userLabels = buildUnnamed5054(); } buildCounterSettings--; return o; @@ -1472,13 +1531,13 @@ buildCounterSettings++; if (buildCounterSettings < 3) { unittest.expect(o.activationPolicy, unittest.equals('foo')); - checkUnnamed5279(o.authorizedGaeApplications); + checkUnnamed5052(o.authorizedGaeApplications); unittest.expect(o.availabilityType, unittest.equals('foo')); checkBackupConfiguration(o.backupConfiguration); unittest.expect(o.crashSafeReplicationEnabled, unittest.isTrue); unittest.expect(o.dataDiskSizeGb, unittest.equals('foo')); unittest.expect(o.dataDiskType, unittest.equals('foo')); - checkUnnamed5280(o.databaseFlags); + checkUnnamed5053(o.databaseFlags); unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); checkIpConfiguration(o.ipConfiguration); unittest.expect(o.kind, unittest.equals('foo')); @@ -1490,7 +1549,7 @@ unittest.expect(o.storageAutoResize, unittest.isTrue); unittest.expect(o.storageAutoResizeLimit, unittest.equals('foo')); unittest.expect(o.tier, unittest.equals('foo')); - checkUnnamed5281(o.userLabels); + checkUnnamed5054(o.userLabels); } buildCounterSettings--; } @@ -1616,14 +1675,14 @@ buildCounterSslCertsInsertResponse--; } -buildUnnamed5282() { +buildUnnamed5055() { var o = new core.List<api.SslCert>(); o.add(buildSslCert()); o.add(buildSslCert()); return o; } -checkUnnamed5282(core.List<api.SslCert> o) { +checkUnnamed5055(core.List<api.SslCert> o) { unittest.expect(o, unittest.hasLength(2)); checkSslCert(o[0]); checkSslCert(o[1]); @@ -1634,7 +1693,7 @@ var o = new api.SslCertsListResponse(); buildCounterSslCertsListResponse++; if (buildCounterSslCertsListResponse < 3) { - o.items = buildUnnamed5282(); + o.items = buildUnnamed5055(); o.kind = "foo"; } buildCounterSslCertsListResponse--; @@ -1644,20 +1703,20 @@ checkSslCertsListResponse(api.SslCertsListResponse o) { buildCounterSslCertsListResponse++; if (buildCounterSslCertsListResponse < 3) { - checkUnnamed5282(o.items); + checkUnnamed5055(o.items); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterSslCertsListResponse--; } -buildUnnamed5283() { +buildUnnamed5056() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5283(core.List<core.String> o) { +checkUnnamed5056(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1671,7 +1730,7 @@ o.DiskQuota = "foo"; o.RAM = "foo"; o.kind = "foo"; - o.region = buildUnnamed5283(); + o.region = buildUnnamed5056(); o.tier = "foo"; } buildCounterTier--; @@ -1684,20 +1743,20 @@ unittest.expect(o.DiskQuota, unittest.equals('foo')); unittest.expect(o.RAM, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5283(o.region); + checkUnnamed5056(o.region); unittest.expect(o.tier, unittest.equals('foo')); } buildCounterTier--; } -buildUnnamed5284() { +buildUnnamed5057() { var o = new core.List<api.Tier>(); o.add(buildTier()); o.add(buildTier()); return o; } -checkUnnamed5284(core.List<api.Tier> o) { +checkUnnamed5057(core.List<api.Tier> o) { unittest.expect(o, unittest.hasLength(2)); checkTier(o[0]); checkTier(o[1]); @@ -1708,7 +1767,7 @@ var o = new api.TiersListResponse(); buildCounterTiersListResponse++; if (buildCounterTiersListResponse < 3) { - o.items = buildUnnamed5284(); + o.items = buildUnnamed5057(); o.kind = "foo"; } buildCounterTiersListResponse--; @@ -1718,7 +1777,7 @@ checkTiersListResponse(api.TiersListResponse o) { buildCounterTiersListResponse++; if (buildCounterTiersListResponse < 3) { - checkUnnamed5284(o.items); + checkUnnamed5057(o.items); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterTiersListResponse--; @@ -1776,14 +1835,14 @@ buildCounterUser--; } -buildUnnamed5285() { +buildUnnamed5058() { var o = new core.List<api.User>(); o.add(buildUser()); o.add(buildUser()); return o; } -checkUnnamed5285(core.List<api.User> o) { +checkUnnamed5058(core.List<api.User> o) { unittest.expect(o, unittest.hasLength(2)); checkUser(o[0]); checkUser(o[1]); @@ -1794,7 +1853,7 @@ var o = new api.UsersListResponse(); buildCounterUsersListResponse++; if (buildCounterUsersListResponse < 3) { - o.items = buildUnnamed5285(); + o.items = buildUnnamed5058(); o.kind = "foo"; o.nextPageToken = "foo"; } @@ -1805,7 +1864,7 @@ checkUsersListResponse(api.UsersListResponse o) { buildCounterUsersListResponse++; if (buildCounterUsersListResponse < 3) { - checkUnnamed5285(o.items); + checkUnnamed5058(o.items); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); } @@ -1821,6 +1880,14 @@ }); }); + unittest.group("obj-schema-ApiWarning", () { + unittest.test("to-json--from-json", () { + var o = buildApiWarning(); + var od = new api.ApiWarning.fromJson(o.toJson()); + checkApiWarning(od); + }); + }); + unittest.group("obj-schema-BackupConfiguration", () { unittest.test("to-json--from-json", () { var o = buildBackupConfiguration(); @@ -1934,6 +2001,16 @@ }); }); + unittest.group("obj-schema-ExportContextSqlExportOptionsMysqlExportOptions", + () { + unittest.test("to-json--from-json", () { + var o = buildExportContextSqlExportOptionsMysqlExportOptions(); + var od = new api.ExportContextSqlExportOptionsMysqlExportOptions.fromJson( + o.toJson()); + checkExportContextSqlExportOptionsMysqlExportOptions(od); + }); + }); + unittest.group("obj-schema-ExportContextSqlExportOptions", () { unittest.test("to-json--from-json", () { var o = buildExportContextSqlExportOptions(); @@ -5452,8 +5529,8 @@ var arg_request = buildUser(); var arg_project = "foo"; var arg_instance = "foo"; - var arg_host = "foo"; var arg_name = "foo"; + var arg_host = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.User.fromJson(json); @@ -5509,8 +5586,8 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); + unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -5520,8 +5597,8 @@ return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .update(arg_request, arg_project, arg_instance, arg_host, arg_name, - $fields: arg_$fields) + .update(arg_request, arg_project, arg_instance, arg_name, + host: arg_host, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkOperation(response); })));
diff --git a/generated/googleapis_beta/test/toolresults/v1beta3_test.dart b/generated/googleapis_beta/test/toolresults/v1beta3_test.dart index 596a830..80d1b9c 100644 --- a/generated/googleapis_beta/test/toolresults/v1beta3_test.dart +++ b/generated/googleapis_beta/test/toolresults/v1beta3_test.dart
@@ -75,14 +75,14 @@ buildCounterAndroidAppInfo--; } -buildUnnamed5069() { +buildUnnamed4293() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5069(core.List<core.String> o) { +checkUnnamed4293(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -95,7 +95,7 @@ if (buildCounterAndroidInstrumentationTest < 3) { o.testPackageId = "foo"; o.testRunnerClass = "foo"; - o.testTargets = buildUnnamed5069(); + o.testTargets = buildUnnamed4293(); o.useOrchestrator = true; } buildCounterAndroidInstrumentationTest--; @@ -107,7 +107,7 @@ if (buildCounterAndroidInstrumentationTest < 3) { unittest.expect(o.testPackageId, unittest.equals('foo')); unittest.expect(o.testRunnerClass, unittest.equals('foo')); - checkUnnamed5069(o.testTargets); + checkUnnamed4293(o.testTargets); unittest.expect(o.useOrchestrator, unittest.isTrue); } buildCounterAndroidInstrumentationTest--; @@ -230,14 +230,14 @@ buildCounterBasicPerfSampleSeries--; } -buildUnnamed5070() { +buildUnnamed4294() { var o = new core.List<api.PerfSample>(); o.add(buildPerfSample()); o.add(buildPerfSample()); return o; } -checkUnnamed5070(core.List<api.PerfSample> o) { +checkUnnamed4294(core.List<api.PerfSample> o) { unittest.expect(o, unittest.hasLength(2)); checkPerfSample(o[0]); checkPerfSample(o[1]); @@ -248,7 +248,7 @@ var o = new api.BatchCreatePerfSamplesRequest(); buildCounterBatchCreatePerfSamplesRequest++; if (buildCounterBatchCreatePerfSamplesRequest < 3) { - o.perfSamples = buildUnnamed5070(); + o.perfSamples = buildUnnamed4294(); } buildCounterBatchCreatePerfSamplesRequest--; return o; @@ -257,19 +257,19 @@ checkBatchCreatePerfSamplesRequest(api.BatchCreatePerfSamplesRequest o) { buildCounterBatchCreatePerfSamplesRequest++; if (buildCounterBatchCreatePerfSamplesRequest < 3) { - checkUnnamed5070(o.perfSamples); + checkUnnamed4294(o.perfSamples); } buildCounterBatchCreatePerfSamplesRequest--; } -buildUnnamed5071() { +buildUnnamed4295() { var o = new core.List<api.PerfSample>(); o.add(buildPerfSample()); o.add(buildPerfSample()); return o; } -checkUnnamed5071(core.List<api.PerfSample> o) { +checkUnnamed4295(core.List<api.PerfSample> o) { unittest.expect(o, unittest.hasLength(2)); checkPerfSample(o[0]); checkPerfSample(o[1]); @@ -280,7 +280,7 @@ var o = new api.BatchCreatePerfSamplesResponse(); buildCounterBatchCreatePerfSamplesResponse++; if (buildCounterBatchCreatePerfSamplesResponse < 3) { - o.perfSamples = buildUnnamed5071(); + o.perfSamples = buildUnnamed4295(); } buildCounterBatchCreatePerfSamplesResponse--; return o; @@ -289,7 +289,7 @@ checkBatchCreatePerfSamplesResponse(api.BatchCreatePerfSamplesResponse o) { buildCounterBatchCreatePerfSamplesResponse++; if (buildCounterBatchCreatePerfSamplesResponse < 3) { - checkUnnamed5071(o.perfSamples); + checkUnnamed4295(o.perfSamples); } buildCounterBatchCreatePerfSamplesResponse--; } @@ -415,14 +415,14 @@ buildCounterFileReference--; } -buildUnnamed5072() { +buildUnnamed4296() { var o = new core.List<api.GraphicsStatsBucket>(); o.add(buildGraphicsStatsBucket()); o.add(buildGraphicsStatsBucket()); return o; } -checkUnnamed5072(core.List<api.GraphicsStatsBucket> o) { +checkUnnamed4296(core.List<api.GraphicsStatsBucket> o) { unittest.expect(o, unittest.hasLength(2)); checkGraphicsStatsBucket(o[0]); checkGraphicsStatsBucket(o[1]); @@ -433,7 +433,7 @@ var o = new api.GraphicsStats(); buildCounterGraphicsStats++; if (buildCounterGraphicsStats < 3) { - o.buckets = buildUnnamed5072(); + o.buckets = buildUnnamed4296(); o.highInputLatencyCount = "foo"; o.jankyFrames = "foo"; o.missedVsyncCount = "foo"; @@ -453,7 +453,7 @@ checkGraphicsStats(api.GraphicsStats o) { buildCounterGraphicsStats++; if (buildCounterGraphicsStats < 3) { - checkUnnamed5072(o.buckets); + checkUnnamed4296(o.buckets); unittest.expect(o.highInputLatencyCount, unittest.equals('foo')); unittest.expect(o.jankyFrames, unittest.equals('foo')); unittest.expect(o.missedVsyncCount, unittest.equals('foo')); @@ -559,14 +559,14 @@ buildCounterInconclusiveDetail--; } -buildUnnamed5073() { +buildUnnamed4297() { var o = new core.List<api.Execution>(); o.add(buildExecution()); o.add(buildExecution()); return o; } -checkUnnamed5073(core.List<api.Execution> o) { +checkUnnamed4297(core.List<api.Execution> o) { unittest.expect(o, unittest.hasLength(2)); checkExecution(o[0]); checkExecution(o[1]); @@ -577,7 +577,7 @@ var o = new api.ListExecutionsResponse(); buildCounterListExecutionsResponse++; if (buildCounterListExecutionsResponse < 3) { - o.executions = buildUnnamed5073(); + o.executions = buildUnnamed4297(); o.nextPageToken = "foo"; } buildCounterListExecutionsResponse--; @@ -587,20 +587,20 @@ checkListExecutionsResponse(api.ListExecutionsResponse o) { buildCounterListExecutionsResponse++; if (buildCounterListExecutionsResponse < 3) { - checkUnnamed5073(o.executions); + checkUnnamed4297(o.executions); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListExecutionsResponse--; } -buildUnnamed5074() { +buildUnnamed4298() { var o = new core.List<api.History>(); o.add(buildHistory()); o.add(buildHistory()); return o; } -checkUnnamed5074(core.List<api.History> o) { +checkUnnamed4298(core.List<api.History> o) { unittest.expect(o, unittest.hasLength(2)); checkHistory(o[0]); checkHistory(o[1]); @@ -611,7 +611,7 @@ var o = new api.ListHistoriesResponse(); buildCounterListHistoriesResponse++; if (buildCounterListHistoriesResponse < 3) { - o.histories = buildUnnamed5074(); + o.histories = buildUnnamed4298(); o.nextPageToken = "foo"; } buildCounterListHistoriesResponse--; @@ -621,20 +621,20 @@ checkListHistoriesResponse(api.ListHistoriesResponse o) { buildCounterListHistoriesResponse++; if (buildCounterListHistoriesResponse < 3) { - checkUnnamed5074(o.histories); + checkUnnamed4298(o.histories); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListHistoriesResponse--; } -buildUnnamed5075() { +buildUnnamed4299() { var o = new core.List<api.PerfSampleSeries>(); o.add(buildPerfSampleSeries()); o.add(buildPerfSampleSeries()); return o; } -checkUnnamed5075(core.List<api.PerfSampleSeries> o) { +checkUnnamed4299(core.List<api.PerfSampleSeries> o) { unittest.expect(o, unittest.hasLength(2)); checkPerfSampleSeries(o[0]); checkPerfSampleSeries(o[1]); @@ -645,7 +645,7 @@ var o = new api.ListPerfSampleSeriesResponse(); buildCounterListPerfSampleSeriesResponse++; if (buildCounterListPerfSampleSeriesResponse < 3) { - o.perfSampleSeries = buildUnnamed5075(); + o.perfSampleSeries = buildUnnamed4299(); } buildCounterListPerfSampleSeriesResponse--; return o; @@ -654,19 +654,19 @@ checkListPerfSampleSeriesResponse(api.ListPerfSampleSeriesResponse o) { buildCounterListPerfSampleSeriesResponse++; if (buildCounterListPerfSampleSeriesResponse < 3) { - checkUnnamed5075(o.perfSampleSeries); + checkUnnamed4299(o.perfSampleSeries); } buildCounterListPerfSampleSeriesResponse--; } -buildUnnamed5076() { +buildUnnamed4300() { var o = new core.List<api.PerfSample>(); o.add(buildPerfSample()); o.add(buildPerfSample()); return o; } -checkUnnamed5076(core.List<api.PerfSample> o) { +checkUnnamed4300(core.List<api.PerfSample> o) { unittest.expect(o, unittest.hasLength(2)); checkPerfSample(o[0]); checkPerfSample(o[1]); @@ -678,7 +678,7 @@ buildCounterListPerfSamplesResponse++; if (buildCounterListPerfSamplesResponse < 3) { o.nextPageToken = "foo"; - o.perfSamples = buildUnnamed5076(); + o.perfSamples = buildUnnamed4300(); } buildCounterListPerfSamplesResponse--; return o; @@ -688,19 +688,19 @@ buildCounterListPerfSamplesResponse++; if (buildCounterListPerfSamplesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5076(o.perfSamples); + checkUnnamed4300(o.perfSamples); } buildCounterListPerfSamplesResponse--; } -buildUnnamed5077() { +buildUnnamed4301() { var o = new core.List<api.ScreenshotCluster>(); o.add(buildScreenshotCluster()); o.add(buildScreenshotCluster()); return o; } -checkUnnamed5077(core.List<api.ScreenshotCluster> o) { +checkUnnamed4301(core.List<api.ScreenshotCluster> o) { unittest.expect(o, unittest.hasLength(2)); checkScreenshotCluster(o[0]); checkScreenshotCluster(o[1]); @@ -711,7 +711,7 @@ var o = new api.ListScreenshotClustersResponse(); buildCounterListScreenshotClustersResponse++; if (buildCounterListScreenshotClustersResponse < 3) { - o.clusters = buildUnnamed5077(); + o.clusters = buildUnnamed4301(); } buildCounterListScreenshotClustersResponse--; return o; @@ -720,19 +720,19 @@ checkListScreenshotClustersResponse(api.ListScreenshotClustersResponse o) { buildCounterListScreenshotClustersResponse++; if (buildCounterListScreenshotClustersResponse < 3) { - checkUnnamed5077(o.clusters); + checkUnnamed4301(o.clusters); } buildCounterListScreenshotClustersResponse--; } -buildUnnamed5078() { +buildUnnamed4302() { var o = new core.List<api.Image>(); o.add(buildImage()); o.add(buildImage()); return o; } -checkUnnamed5078(core.List<api.Image> o) { +checkUnnamed4302(core.List<api.Image> o) { unittest.expect(o, unittest.hasLength(2)); checkImage(o[0]); checkImage(o[1]); @@ -744,7 +744,7 @@ buildCounterListStepThumbnailsResponse++; if (buildCounterListStepThumbnailsResponse < 3) { o.nextPageToken = "foo"; - o.thumbnails = buildUnnamed5078(); + o.thumbnails = buildUnnamed4302(); } buildCounterListStepThumbnailsResponse--; return o; @@ -754,19 +754,19 @@ buildCounterListStepThumbnailsResponse++; if (buildCounterListStepThumbnailsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5078(o.thumbnails); + checkUnnamed4302(o.thumbnails); } buildCounterListStepThumbnailsResponse--; } -buildUnnamed5079() { +buildUnnamed4303() { var o = new core.List<api.Step>(); o.add(buildStep()); o.add(buildStep()); return o; } -checkUnnamed5079(core.List<api.Step> o) { +checkUnnamed4303(core.List<api.Step> o) { unittest.expect(o, unittest.hasLength(2)); checkStep(o[0]); checkStep(o[1]); @@ -778,7 +778,7 @@ buildCounterListStepsResponse++; if (buildCounterListStepsResponse < 3) { o.nextPageToken = "foo"; - o.steps = buildUnnamed5079(); + o.steps = buildUnnamed4303(); } buildCounterListStepsResponse--; return o; @@ -788,7 +788,7 @@ buildCounterListStepsResponse++; if (buildCounterListStepsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5079(o.steps); + checkUnnamed4303(o.steps); } buildCounterListStepsResponse--; } @@ -862,14 +862,14 @@ buildCounterPerfEnvironment--; } -buildUnnamed5080() { +buildUnnamed4304() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5080(core.List<core.String> o) { +checkUnnamed4304(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -885,7 +885,7 @@ o.graphicsStats = buildGraphicsStats(); o.historyId = "foo"; o.perfEnvironment = buildPerfEnvironment(); - o.perfMetrics = buildUnnamed5080(); + o.perfMetrics = buildUnnamed4304(); o.projectId = "foo"; o.stepId = "foo"; } @@ -901,7 +901,7 @@ checkGraphicsStats(o.graphicsStats); unittest.expect(o.historyId, unittest.equals('foo')); checkPerfEnvironment(o.perfEnvironment); - checkUnnamed5080(o.perfMetrics); + checkUnnamed4304(o.perfMetrics); unittest.expect(o.projectId, unittest.equals('foo')); unittest.expect(o.stepId, unittest.equals('foo')); } @@ -979,14 +979,14 @@ buildCounterProjectSettings--; } -buildUnnamed5081() { +buildUnnamed4305() { var o = new core.List<api.FileReference>(); o.add(buildFileReference()); o.add(buildFileReference()); return o; } -checkUnnamed5081(core.List<api.FileReference> o) { +checkUnnamed4305(core.List<api.FileReference> o) { unittest.expect(o, unittest.hasLength(2)); checkFileReference(o[0]); checkFileReference(o[1]); @@ -997,7 +997,7 @@ var o = new api.PublishXunitXmlFilesRequest(); buildCounterPublishXunitXmlFilesRequest++; if (buildCounterPublishXunitXmlFilesRequest < 3) { - o.xunitXmlFiles = buildUnnamed5081(); + o.xunitXmlFiles = buildUnnamed4305(); } buildCounterPublishXunitXmlFilesRequest--; return o; @@ -1006,7 +1006,7 @@ checkPublishXunitXmlFilesRequest(api.PublishXunitXmlFilesRequest o) { buildCounterPublishXunitXmlFilesRequest++; if (buildCounterPublishXunitXmlFilesRequest < 3) { - checkUnnamed5081(o.xunitXmlFiles); + checkUnnamed4305(o.xunitXmlFiles); } buildCounterPublishXunitXmlFilesRequest--; } @@ -1036,14 +1036,14 @@ buildCounterScreen--; } -buildUnnamed5082() { +buildUnnamed4306() { var o = new core.List<api.Screen>(); o.add(buildScreen()); o.add(buildScreen()); return o; } -checkUnnamed5082(core.List<api.Screen> o) { +checkUnnamed4306(core.List<api.Screen> o) { unittest.expect(o, unittest.hasLength(2)); checkScreen(o[0]); checkScreen(o[1]); @@ -1057,7 +1057,7 @@ o.activity = "foo"; o.clusterId = "foo"; o.keyScreen = buildScreen(); - o.screens = buildUnnamed5082(); + o.screens = buildUnnamed4306(); } buildCounterScreenshotCluster--; return o; @@ -1069,7 +1069,7 @@ unittest.expect(o.activity, unittest.equals('foo')); unittest.expect(o.clusterId, unittest.equals('foo')); checkScreen(o.keyScreen); - checkUnnamed5082(o.screens); + checkUnnamed4306(o.screens); } buildCounterScreenshotCluster--; } @@ -1135,14 +1135,14 @@ buildCounterStackTrace--; } -buildUnnamed5083() { +buildUnnamed4307() { var o = new core.List<api.Any>(); o.add(buildAny()); o.add(buildAny()); return o; } -checkUnnamed5083(core.List<api.Any> o) { +checkUnnamed4307(core.List<api.Any> o) { unittest.expect(o, unittest.hasLength(2)); checkAny(o[0]); checkAny(o[1]); @@ -1154,7 +1154,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5083(); + o.details = buildUnnamed4307(); o.message = "foo"; } buildCounterStatus--; @@ -1165,33 +1165,33 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5083(o.details); + checkUnnamed4307(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5084() { +buildUnnamed4308() { var o = new core.List<api.StepDimensionValueEntry>(); o.add(buildStepDimensionValueEntry()); o.add(buildStepDimensionValueEntry()); return o; } -checkUnnamed5084(core.List<api.StepDimensionValueEntry> o) { +checkUnnamed4308(core.List<api.StepDimensionValueEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkStepDimensionValueEntry(o[0]); checkStepDimensionValueEntry(o[1]); } -buildUnnamed5085() { +buildUnnamed4309() { var o = new core.List<api.StepLabelsEntry>(); o.add(buildStepLabelsEntry()); o.add(buildStepLabelsEntry()); return o; } -checkUnnamed5085(core.List<api.StepLabelsEntry> o) { +checkUnnamed4309(core.List<api.StepLabelsEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkStepLabelsEntry(o[0]); checkStepLabelsEntry(o[1]); @@ -1206,9 +1206,9 @@ o.creationTime = buildTimestamp(); o.description = "foo"; o.deviceUsageDuration = buildDuration(); - o.dimensionValue = buildUnnamed5084(); + o.dimensionValue = buildUnnamed4308(); o.hasImages = true; - o.labels = buildUnnamed5085(); + o.labels = buildUnnamed4309(); o.name = "foo"; o.outcome = buildOutcome(); o.runDuration = buildDuration(); @@ -1228,9 +1228,9 @@ checkTimestamp(o.creationTime); unittest.expect(o.description, unittest.equals('foo')); checkDuration(o.deviceUsageDuration); - checkUnnamed5084(o.dimensionValue); + checkUnnamed4308(o.dimensionValue); unittest.expect(o.hasImages, unittest.isTrue); - checkUnnamed5085(o.labels); + checkUnnamed4309(o.labels); unittest.expect(o.name, unittest.equals('foo')); checkOutcome(o.outcome); checkDuration(o.runDuration); @@ -1326,27 +1326,27 @@ buildCounterTestCaseReference--; } -buildUnnamed5086() { +buildUnnamed4310() { var o = new core.List<api.TestIssue>(); o.add(buildTestIssue()); o.add(buildTestIssue()); return o; } -checkUnnamed5086(core.List<api.TestIssue> o) { +checkUnnamed4310(core.List<api.TestIssue> o) { unittest.expect(o, unittest.hasLength(2)); checkTestIssue(o[0]); checkTestIssue(o[1]); } -buildUnnamed5087() { +buildUnnamed4311() { var o = new core.List<api.TestSuiteOverview>(); o.add(buildTestSuiteOverview()); o.add(buildTestSuiteOverview()); return o; } -checkUnnamed5087(core.List<api.TestSuiteOverview> o) { +checkUnnamed4311(core.List<api.TestSuiteOverview> o) { unittest.expect(o, unittest.hasLength(2)); checkTestSuiteOverview(o[0]); checkTestSuiteOverview(o[1]); @@ -1357,8 +1357,8 @@ var o = new api.TestExecutionStep(); buildCounterTestExecutionStep++; if (buildCounterTestExecutionStep < 3) { - o.testIssues = buildUnnamed5086(); - o.testSuiteOverviews = buildUnnamed5087(); + o.testIssues = buildUnnamed4310(); + o.testSuiteOverviews = buildUnnamed4311(); o.testTiming = buildTestTiming(); o.toolExecution = buildToolExecution(); } @@ -1369,8 +1369,8 @@ checkTestExecutionStep(api.TestExecutionStep o) { buildCounterTestExecutionStep++; if (buildCounterTestExecutionStep < 3) { - checkUnnamed5086(o.testIssues); - checkUnnamed5087(o.testSuiteOverviews); + checkUnnamed4310(o.testIssues); + checkUnnamed4311(o.testSuiteOverviews); checkTestTiming(o.testTiming); checkToolExecution(o.toolExecution); } @@ -1500,40 +1500,40 @@ buildCounterTimestamp--; } -buildUnnamed5088() { +buildUnnamed4312() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5088(core.List<core.String> o) { +checkUnnamed4312(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5089() { +buildUnnamed4313() { var o = new core.List<api.FileReference>(); o.add(buildFileReference()); o.add(buildFileReference()); return o; } -checkUnnamed5089(core.List<api.FileReference> o) { +checkUnnamed4313(core.List<api.FileReference> o) { unittest.expect(o, unittest.hasLength(2)); checkFileReference(o[0]); checkFileReference(o[1]); } -buildUnnamed5090() { +buildUnnamed4314() { var o = new core.List<api.ToolOutputReference>(); o.add(buildToolOutputReference()); o.add(buildToolOutputReference()); return o; } -checkUnnamed5090(core.List<api.ToolOutputReference> o) { +checkUnnamed4314(core.List<api.ToolOutputReference> o) { unittest.expect(o, unittest.hasLength(2)); checkToolOutputReference(o[0]); checkToolOutputReference(o[1]); @@ -1544,10 +1544,10 @@ var o = new api.ToolExecution(); buildCounterToolExecution++; if (buildCounterToolExecution < 3) { - o.commandLineArguments = buildUnnamed5088(); + o.commandLineArguments = buildUnnamed4312(); o.exitCode = buildToolExitCode(); - o.toolLogs = buildUnnamed5089(); - o.toolOutputs = buildUnnamed5090(); + o.toolLogs = buildUnnamed4313(); + o.toolOutputs = buildUnnamed4314(); } buildCounterToolExecution--; return o; @@ -1556,10 +1556,10 @@ checkToolExecution(api.ToolExecution o) { buildCounterToolExecution++; if (buildCounterToolExecution < 3) { - checkUnnamed5088(o.commandLineArguments); + checkUnnamed4312(o.commandLineArguments); checkToolExitCode(o.exitCode); - checkUnnamed5089(o.toolLogs); - checkUnnamed5090(o.toolOutputs); + checkUnnamed4313(o.toolLogs); + checkUnnamed4314(o.toolOutputs); } buildCounterToolExecution--; } @@ -1625,14 +1625,14 @@ buildCounterToolOutputReference--; } -buildUnnamed5091() { +buildUnnamed4315() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5091(core.List<core.String> o) { +checkUnnamed4315(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3218,7 +3218,7 @@ var arg_historyId = "foo"; var arg_executionId = "foo"; var arg_stepId = "foo"; - var arg_filter = buildUnnamed5091(); + var arg_filter = buildUnnamed4315(); var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path;
diff --git a/generated/googleapis_beta/test/tpu/v1alpha1_test.dart b/generated/googleapis_beta/test/tpu/v1alpha1_test.dart index d9b4287..adbd3b9 100644 --- a/generated/googleapis_beta/test/tpu/v1alpha1_test.dart +++ b/generated/googleapis_beta/test/tpu/v1alpha1_test.dart
@@ -86,14 +86,14 @@ buildCounterEmpty--; } -buildUnnamed5250() { +buildUnnamed4330() { var o = new core.List<api.AcceleratorType>(); o.add(buildAcceleratorType()); o.add(buildAcceleratorType()); return o; } -checkUnnamed5250(core.List<api.AcceleratorType> o) { +checkUnnamed4330(core.List<api.AcceleratorType> o) { unittest.expect(o, unittest.hasLength(2)); checkAcceleratorType(o[0]); checkAcceleratorType(o[1]); @@ -104,7 +104,7 @@ var o = new api.ListAcceleratorTypesResponse(); buildCounterListAcceleratorTypesResponse++; if (buildCounterListAcceleratorTypesResponse < 3) { - o.acceleratorTypes = buildUnnamed5250(); + o.acceleratorTypes = buildUnnamed4330(); o.nextPageToken = "foo"; } buildCounterListAcceleratorTypesResponse--; @@ -114,20 +114,20 @@ checkListAcceleratorTypesResponse(api.ListAcceleratorTypesResponse o) { buildCounterListAcceleratorTypesResponse++; if (buildCounterListAcceleratorTypesResponse < 3) { - checkUnnamed5250(o.acceleratorTypes); + checkUnnamed4330(o.acceleratorTypes); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListAcceleratorTypesResponse--; } -buildUnnamed5251() { +buildUnnamed4331() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5251(core.List<api.Location> o) { +checkUnnamed4331(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -138,7 +138,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5251(); + o.locations = buildUnnamed4331(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -148,32 +148,46 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5251(o.locations); + checkUnnamed4331(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5252() { +buildUnnamed4332() { var o = new core.List<api.Node>(); o.add(buildNode()); o.add(buildNode()); return o; } -checkUnnamed5252(core.List<api.Node> o) { +checkUnnamed4332(core.List<api.Node> o) { unittest.expect(o, unittest.hasLength(2)); checkNode(o[0]); checkNode(o[1]); } +buildUnnamed4333() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4333(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + core.int buildCounterListNodesResponse = 0; buildListNodesResponse() { var o = new api.ListNodesResponse(); buildCounterListNodesResponse++; if (buildCounterListNodesResponse < 3) { o.nextPageToken = "foo"; - o.nodes = buildUnnamed5252(); + o.nodes = buildUnnamed4332(); + o.unreachable = buildUnnamed4333(); } buildCounterListNodesResponse--; return o; @@ -183,19 +197,20 @@ buildCounterListNodesResponse++; if (buildCounterListNodesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5252(o.nodes); + checkUnnamed4332(o.nodes); + checkUnnamed4333(o.unreachable); } buildCounterListNodesResponse--; } -buildUnnamed5253() { +buildUnnamed4334() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5253(core.List<api.Operation> o) { +checkUnnamed4334(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -207,7 +222,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5253(); + o.operations = buildUnnamed4334(); } buildCounterListOperationsResponse--; return o; @@ -217,19 +232,19 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5253(o.operations); + checkUnnamed4334(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5254() { +buildUnnamed4335() { var o = new core.List<api.TensorFlowVersion>(); o.add(buildTensorFlowVersion()); o.add(buildTensorFlowVersion()); return o; } -checkUnnamed5254(core.List<api.TensorFlowVersion> o) { +checkUnnamed4335(core.List<api.TensorFlowVersion> o) { unittest.expect(o, unittest.hasLength(2)); checkTensorFlowVersion(o[0]); checkTensorFlowVersion(o[1]); @@ -241,7 +256,7 @@ buildCounterListTensorFlowVersionsResponse++; if (buildCounterListTensorFlowVersionsResponse < 3) { o.nextPageToken = "foo"; - o.tensorflowVersions = buildUnnamed5254(); + o.tensorflowVersions = buildUnnamed4335(); } buildCounterListTensorFlowVersionsResponse--; return o; @@ -251,25 +266,25 @@ buildCounterListTensorFlowVersionsResponse++; if (buildCounterListTensorFlowVersionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5254(o.tensorflowVersions); + checkUnnamed4335(o.tensorflowVersions); } buildCounterListTensorFlowVersionsResponse--; } -buildUnnamed5255() { +buildUnnamed4336() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5255(core.Map<core.String, core.String> o) { +checkUnnamed4336(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5256() { +buildUnnamed4337() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -284,7 +299,7 @@ return o; } -checkUnnamed5256(core.Map<core.String, core.Object> o) { +checkUnnamed4337(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -304,9 +319,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5255(); + o.labels = buildUnnamed4336(); o.locationId = "foo"; - o.metadata = buildUnnamed5256(); + o.metadata = buildUnnamed4337(); o.name = "foo"; } buildCounterLocation--; @@ -317,9 +332,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5255(o.labels); + checkUnnamed4336(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5256(o.metadata); + checkUnnamed4337(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -346,27 +361,27 @@ buildCounterNetworkEndpoint--; } -buildUnnamed5257() { +buildUnnamed4338() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5257(core.Map<core.String, core.String> o) { +checkUnnamed4338(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5258() { +buildUnnamed4339() { var o = new core.List<api.NetworkEndpoint>(); o.add(buildNetworkEndpoint()); o.add(buildNetworkEndpoint()); return o; } -checkUnnamed5258(core.List<api.NetworkEndpoint> o) { +checkUnnamed4339(core.List<api.NetworkEndpoint> o) { unittest.expect(o, unittest.hasLength(2)); checkNetworkEndpoint(o[0]); checkNetworkEndpoint(o[1]); @@ -384,10 +399,10 @@ o.health = "foo"; o.healthDescription = "foo"; o.ipAddress = "foo"; - o.labels = buildUnnamed5257(); + o.labels = buildUnnamed4338(); o.name = "foo"; o.network = "foo"; - o.networkEndpoints = buildUnnamed5258(); + o.networkEndpoints = buildUnnamed4339(); o.port = "foo"; o.schedulingConfig = buildSchedulingConfig(); o.serviceAccount = "foo"; @@ -408,10 +423,10 @@ unittest.expect(o.health, unittest.equals('foo')); unittest.expect(o.healthDescription, unittest.equals('foo')); unittest.expect(o.ipAddress, unittest.equals('foo')); - checkUnnamed5257(o.labels); + checkUnnamed4338(o.labels); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.network, unittest.equals('foo')); - checkUnnamed5258(o.networkEndpoints); + checkUnnamed4339(o.networkEndpoints); unittest.expect(o.port, unittest.equals('foo')); checkSchedulingConfig(o.schedulingConfig); unittest.expect(o.serviceAccount, unittest.equals('foo')); @@ -421,7 +436,7 @@ buildCounterNode--; } -buildUnnamed5259() { +buildUnnamed4340() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -436,7 +451,7 @@ return o; } -checkUnnamed5259(core.Map<core.String, core.Object> o) { +checkUnnamed4340(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -450,7 +465,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5260() { +buildUnnamed4341() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -465,7 +480,7 @@ return o; } -checkUnnamed5260(core.Map<core.String, core.Object> o) { +checkUnnamed4341(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -486,9 +501,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5259(); + o.metadata = buildUnnamed4340(); o.name = "foo"; - o.response = buildUnnamed5260(); + o.response = buildUnnamed4341(); } buildCounterOperation--; return o; @@ -499,9 +514,9 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5259(o.metadata); + checkUnnamed4340(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5260(o.response); + checkUnnamed4341(o.response); } buildCounterOperation--; } @@ -590,7 +605,7 @@ buildCounterStartNodeRequest--; } -buildUnnamed5261() { +buildUnnamed4342() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -605,7 +620,7 @@ return o; } -checkUnnamed5261(core.Map<core.String, core.Object> o) { +checkUnnamed4342(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -619,17 +634,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5262() { +buildUnnamed4343() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5261()); - o.add(buildUnnamed5261()); + o.add(buildUnnamed4342()); + o.add(buildUnnamed4342()); return o; } -checkUnnamed5262(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4343(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5261(o[0]); - checkUnnamed5261(o[1]); + checkUnnamed4342(o[0]); + checkUnnamed4342(o[1]); } core.int buildCounterStatus = 0; @@ -638,7 +653,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5262(); + o.details = buildUnnamed4343(); o.message = "foo"; } buildCounterStatus--; @@ -649,7 +664,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5262(o.details); + checkUnnamed4343(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; @@ -894,9 +909,9 @@ api.ProjectsLocationsResourceApi res = new api.TpuApi(mock).projects.locations; var arg_name = "foo"; + var arg_pageSize = 42; var arg_filter = "foo"; var arg_pageToken = "foo"; - var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -929,11 +944,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -944,9 +959,9 @@ }), true); res .list(arg_name, + pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken, - pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -1012,10 +1027,10 @@ api.ProjectsLocationsAcceleratorTypesResourceApi res = new api.TpuApi(mock).projects.locations.acceleratorTypes; var arg_parent = "foo"; + var arg_pageSize = 42; var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_orderBy = "foo"; - var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1048,13 +1063,13 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect( queryMap["orderBy"].first, unittest.equals(arg_orderBy)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1065,10 +1080,10 @@ }), true); res .list(arg_parent, + pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken, orderBy: arg_orderBy, - pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListAcceleratorTypesResponse(response); @@ -1632,9 +1647,9 @@ api.ProjectsLocationsOperationsResourceApi res = new api.TpuApi(mock).projects.locations.operations; var arg_name = "foo"; + var arg_pageSize = 42; var arg_filter = "foo"; var arg_pageToken = "foo"; - var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1667,11 +1682,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1682,9 +1697,9 @@ }), true); res .list(arg_name, + pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken, - pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListOperationsResponse(response); @@ -1750,10 +1765,10 @@ api.ProjectsLocationsTensorflowVersionsResourceApi res = new api.TpuApi(mock).projects.locations.tensorflowVersions; var arg_parent = "foo"; + var arg_pageSize = 42; var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_orderBy = "foo"; - var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1786,13 +1801,13 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect( queryMap["orderBy"].first, unittest.equals(arg_orderBy)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1803,10 +1818,10 @@ }), true); res .list(arg_parent, + pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken, orderBy: arg_orderBy, - pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListTensorFlowVersionsResponse(response);
diff --git a/generated/googleapis_beta/test/websecurityscanner/v1alpha_test.dart b/generated/googleapis_beta/test/websecurityscanner/v1alpha_test.dart index e260ee6..fbb2f7d 100644 --- a/generated/googleapis_beta/test/websecurityscanner/v1alpha_test.dart +++ b/generated/googleapis_beta/test/websecurityscanner/v1alpha_test.dart
@@ -242,14 +242,14 @@ buildCounterHeader--; } -buildUnnamed5371() { +buildUnnamed4748() { var o = new core.List<api.CrawledUrl>(); o.add(buildCrawledUrl()); o.add(buildCrawledUrl()); return o; } -checkUnnamed5371(core.List<api.CrawledUrl> o) { +checkUnnamed4748(core.List<api.CrawledUrl> o) { unittest.expect(o, unittest.hasLength(2)); checkCrawledUrl(o[0]); checkCrawledUrl(o[1]); @@ -260,7 +260,7 @@ var o = new api.ListCrawledUrlsResponse(); buildCounterListCrawledUrlsResponse++; if (buildCounterListCrawledUrlsResponse < 3) { - o.crawledUrls = buildUnnamed5371(); + o.crawledUrls = buildUnnamed4748(); o.nextPageToken = "foo"; } buildCounterListCrawledUrlsResponse--; @@ -270,20 +270,20 @@ checkListCrawledUrlsResponse(api.ListCrawledUrlsResponse o) { buildCounterListCrawledUrlsResponse++; if (buildCounterListCrawledUrlsResponse < 3) { - checkUnnamed5371(o.crawledUrls); + checkUnnamed4748(o.crawledUrls); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListCrawledUrlsResponse--; } -buildUnnamed5372() { +buildUnnamed4749() { var o = new core.List<api.FindingTypeStats>(); o.add(buildFindingTypeStats()); o.add(buildFindingTypeStats()); return o; } -checkUnnamed5372(core.List<api.FindingTypeStats> o) { +checkUnnamed4749(core.List<api.FindingTypeStats> o) { unittest.expect(o, unittest.hasLength(2)); checkFindingTypeStats(o[0]); checkFindingTypeStats(o[1]); @@ -294,7 +294,7 @@ var o = new api.ListFindingTypeStatsResponse(); buildCounterListFindingTypeStatsResponse++; if (buildCounterListFindingTypeStatsResponse < 3) { - o.findingTypeStats = buildUnnamed5372(); + o.findingTypeStats = buildUnnamed4749(); } buildCounterListFindingTypeStatsResponse--; return o; @@ -303,19 +303,19 @@ checkListFindingTypeStatsResponse(api.ListFindingTypeStatsResponse o) { buildCounterListFindingTypeStatsResponse++; if (buildCounterListFindingTypeStatsResponse < 3) { - checkUnnamed5372(o.findingTypeStats); + checkUnnamed4749(o.findingTypeStats); } buildCounterListFindingTypeStatsResponse--; } -buildUnnamed5373() { +buildUnnamed4750() { var o = new core.List<api.Finding>(); o.add(buildFinding()); o.add(buildFinding()); return o; } -checkUnnamed5373(core.List<api.Finding> o) { +checkUnnamed4750(core.List<api.Finding> o) { unittest.expect(o, unittest.hasLength(2)); checkFinding(o[0]); checkFinding(o[1]); @@ -326,7 +326,7 @@ var o = new api.ListFindingsResponse(); buildCounterListFindingsResponse++; if (buildCounterListFindingsResponse < 3) { - o.findings = buildUnnamed5373(); + o.findings = buildUnnamed4750(); o.nextPageToken = "foo"; } buildCounterListFindingsResponse--; @@ -336,20 +336,20 @@ checkListFindingsResponse(api.ListFindingsResponse o) { buildCounterListFindingsResponse++; if (buildCounterListFindingsResponse < 3) { - checkUnnamed5373(o.findings); + checkUnnamed4750(o.findings); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListFindingsResponse--; } -buildUnnamed5374() { +buildUnnamed4751() { var o = new core.List<api.ScanConfig>(); o.add(buildScanConfig()); o.add(buildScanConfig()); return o; } -checkUnnamed5374(core.List<api.ScanConfig> o) { +checkUnnamed4751(core.List<api.ScanConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkScanConfig(o[0]); checkScanConfig(o[1]); @@ -361,7 +361,7 @@ buildCounterListScanConfigsResponse++; if (buildCounterListScanConfigsResponse < 3) { o.nextPageToken = "foo"; - o.scanConfigs = buildUnnamed5374(); + o.scanConfigs = buildUnnamed4751(); } buildCounterListScanConfigsResponse--; return o; @@ -371,19 +371,19 @@ buildCounterListScanConfigsResponse++; if (buildCounterListScanConfigsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5374(o.scanConfigs); + checkUnnamed4751(o.scanConfigs); } buildCounterListScanConfigsResponse--; } -buildUnnamed5375() { +buildUnnamed4752() { var o = new core.List<api.ScanRun>(); o.add(buildScanRun()); o.add(buildScanRun()); return o; } -checkUnnamed5375(core.List<api.ScanRun> o) { +checkUnnamed4752(core.List<api.ScanRun> o) { unittest.expect(o, unittest.hasLength(2)); checkScanRun(o[0]); checkScanRun(o[1]); @@ -395,7 +395,7 @@ buildCounterListScanRunsResponse++; if (buildCounterListScanRunsResponse < 3) { o.nextPageToken = "foo"; - o.scanRuns = buildUnnamed5375(); + o.scanRuns = buildUnnamed4752(); } buildCounterListScanRunsResponse--; return o; @@ -405,19 +405,19 @@ buildCounterListScanRunsResponse++; if (buildCounterListScanRunsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5375(o.scanRuns); + checkUnnamed4752(o.scanRuns); } buildCounterListScanRunsResponse--; } -buildUnnamed5376() { +buildUnnamed4753() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5376(core.List<core.String> o) { +checkUnnamed4753(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -428,7 +428,7 @@ var o = new api.OutdatedLibrary(); buildCounterOutdatedLibrary++; if (buildCounterOutdatedLibrary < 3) { - o.learnMoreUrls = buildUnnamed5376(); + o.learnMoreUrls = buildUnnamed4753(); o.libraryName = "foo"; o.version = "foo"; } @@ -439,47 +439,47 @@ checkOutdatedLibrary(api.OutdatedLibrary o) { buildCounterOutdatedLibrary++; if (buildCounterOutdatedLibrary < 3) { - checkUnnamed5376(o.learnMoreUrls); + checkUnnamed4753(o.learnMoreUrls); unittest.expect(o.libraryName, unittest.equals('foo')); unittest.expect(o.version, unittest.equals('foo')); } buildCounterOutdatedLibrary--; } -buildUnnamed5377() { +buildUnnamed4754() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5377(core.List<core.String> o) { +checkUnnamed4754(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5378() { +buildUnnamed4755() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5378(core.List<core.String> o) { +checkUnnamed4755(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5379() { +buildUnnamed4756() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5379(core.List<core.String> o) { +checkUnnamed4756(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -491,13 +491,14 @@ buildCounterScanConfig++; if (buildCounterScanConfig < 3) { o.authentication = buildAuthentication(); - o.blacklistPatterns = buildUnnamed5377(); + o.blacklistPatterns = buildUnnamed4754(); o.displayName = "foo"; + o.latestRun = buildScanRun(); o.maxQps = 42; o.name = "foo"; o.schedule = buildSchedule(); - o.startingUrls = buildUnnamed5378(); - o.targetPlatforms = buildUnnamed5379(); + o.startingUrls = buildUnnamed4755(); + o.targetPlatforms = buildUnnamed4756(); o.userAgent = "foo"; } buildCounterScanConfig--; @@ -508,13 +509,14 @@ buildCounterScanConfig++; if (buildCounterScanConfig < 3) { checkAuthentication(o.authentication); - checkUnnamed5377(o.blacklistPatterns); + checkUnnamed4754(o.blacklistPatterns); unittest.expect(o.displayName, unittest.equals('foo')); + checkScanRun(o.latestRun); unittest.expect(o.maxQps, unittest.equals(42)); unittest.expect(o.name, unittest.equals('foo')); checkSchedule(o.schedule); - checkUnnamed5378(o.startingUrls); - checkUnnamed5379(o.targetPlatforms); + checkUnnamed4755(o.startingUrls); + checkUnnamed4756(o.targetPlatforms); unittest.expect(o.userAgent, unittest.equals('foo')); } buildCounterScanConfig--; @@ -627,27 +629,27 @@ buildCounterViolatingResource--; } -buildUnnamed5380() { +buildUnnamed4757() { var o = new core.List<api.Header>(); o.add(buildHeader()); o.add(buildHeader()); return o; } -checkUnnamed5380(core.List<api.Header> o) { +checkUnnamed4757(core.List<api.Header> o) { unittest.expect(o, unittest.hasLength(2)); checkHeader(o[0]); checkHeader(o[1]); } -buildUnnamed5381() { +buildUnnamed4758() { var o = new core.List<api.Header>(); o.add(buildHeader()); o.add(buildHeader()); return o; } -checkUnnamed5381(core.List<api.Header> o) { +checkUnnamed4758(core.List<api.Header> o) { unittest.expect(o, unittest.hasLength(2)); checkHeader(o[0]); checkHeader(o[1]); @@ -658,8 +660,8 @@ var o = new api.VulnerableHeaders(); buildCounterVulnerableHeaders++; if (buildCounterVulnerableHeaders < 3) { - o.headers = buildUnnamed5380(); - o.missingHeaders = buildUnnamed5381(); + o.headers = buildUnnamed4757(); + o.missingHeaders = buildUnnamed4758(); } buildCounterVulnerableHeaders--; return o; @@ -668,20 +670,20 @@ checkVulnerableHeaders(api.VulnerableHeaders o) { buildCounterVulnerableHeaders++; if (buildCounterVulnerableHeaders < 3) { - checkUnnamed5380(o.headers); - checkUnnamed5381(o.missingHeaders); + checkUnnamed4757(o.headers); + checkUnnamed4758(o.missingHeaders); } buildCounterVulnerableHeaders--; } -buildUnnamed5382() { +buildUnnamed4759() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5382(core.List<core.String> o) { +checkUnnamed4759(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -692,7 +694,7 @@ var o = new api.VulnerableParameters(); buildCounterVulnerableParameters++; if (buildCounterVulnerableParameters < 3) { - o.parameterNames = buildUnnamed5382(); + o.parameterNames = buildUnnamed4759(); } buildCounterVulnerableParameters--; return o; @@ -701,19 +703,19 @@ checkVulnerableParameters(api.VulnerableParameters o) { buildCounterVulnerableParameters++; if (buildCounterVulnerableParameters < 3) { - checkUnnamed5382(o.parameterNames); + checkUnnamed4759(o.parameterNames); } buildCounterVulnerableParameters--; } -buildUnnamed5383() { +buildUnnamed4760() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5383(core.List<core.String> o) { +checkUnnamed4760(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -725,7 +727,7 @@ buildCounterXss++; if (buildCounterXss < 3) { o.errorMessage = "foo"; - o.stackTraces = buildUnnamed5383(); + o.stackTraces = buildUnnamed4760(); } buildCounterXss--; return o; @@ -735,7 +737,7 @@ buildCounterXss++; if (buildCounterXss < 3) { unittest.expect(o.errorMessage, unittest.equals('foo')); - checkUnnamed5383(o.stackTraces); + checkUnnamed4760(o.stackTraces); } buildCounterXss--; } @@ -1322,8 +1324,8 @@ api.ProjectsScanConfigsScanRunsResourceApi res = new api.WebsecurityscannerApi(mock).projects.scanConfigs.scanRuns; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1356,10 +1358,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1370,8 +1372,8 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListScanRunsResponse(response); @@ -1446,8 +1448,8 @@ .scanRuns .crawledUrls; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1480,10 +1482,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1494,8 +1496,8 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListCrawledUrlsResponse(response);