Skip to content

Commit

Permalink
Merge branch 'google:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rebaz94 authored Sep 18, 2023
2 parents de973af + 8b0c55a commit d467feb
Show file tree
Hide file tree
Showing 1,003 changed files with 970,691 additions and 395,390 deletions.
186 changes: 93 additions & 93 deletions .github/workflows/dart.yml

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# A CI configuration to auto-publish pub packages.

name: Publish

on:
pull_request:
branches: [ master ]
push:
tags: [ '[A-z]+-v[0-9]+.[0-9]+.[0-9]+*' ]

jobs:
publish:
if: ${{ github.repository_owner == 'google' }}
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
6 changes: 3 additions & 3 deletions .github/workflows/verify_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:${{ matrix.example_directory }}"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: dev
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- run: |
pushd discoveryapis_generator
dart pub upgrade
Expand Down
59 changes: 30 additions & 29 deletions _test/expected_identical.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
// ignore_for_file: avoid_classes_with_only_static_members
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: file_names
// ignore_for_file: library_names
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations

library file_test_package.toyApi.client;

import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
Expand All @@ -25,13 +22,13 @@ import 'package:http/http.dart' as http;
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show
ApiRequestError,
ByteRange,
DetailedApiRequestError,
Media,
UploadOptions,
ResumableUploadOptions,
DownloadOptions,
Media,
PartialDownloadOptions,
ByteRange;
ResumableUploadOptions,
UploadOptions;

/// Request headers used by all libraries in this package
final requestHeaders = {
Expand Down Expand Up @@ -149,10 +146,10 @@ class ToyApi {
queryParams: queryParams_,
);
return (response_ as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
ToyResponseFactory.fromJson(
item as core.Map<core.String, core.dynamic>),
value as core.Map<core.String, core.dynamic>),
),
);
}
Expand Down Expand Up @@ -192,10 +189,10 @@ class ToyApi {
queryParams: queryParams_,
);
return (response_ as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
ToyResponseFactory.fromJson(
item as core.Map<core.String, core.dynamic>),
value as core.Map<core.String, core.dynamic>),
),
);
}
Expand Down Expand Up @@ -232,9 +229,9 @@ class ToyApi {
queryParams: queryParams_,
);
return (response_ as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
item as core.int,
value as core.int,
),
);
}
Expand Down Expand Up @@ -429,9 +426,9 @@ class ToyApi {
);
return (response_ as core.List)
.map((value) => (value as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
(item as core.List)
(value as core.List)
.map((value) => value as core.String)
.toList(),
),
Expand Down Expand Up @@ -504,13 +501,13 @@ class ToyApi {
queryParams: queryParams_,
);
return (response_ as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
(item as core.List)
(value as core.List)
.map((value) => (value as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
item as core.bool,
value as core.bool,
),
))
.toList(),
Expand Down Expand Up @@ -552,12 +549,12 @@ class ToyApi {
queryParams: queryParams_,
);
return (response_ as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
(item as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(value as core.Map<core.String, core.dynamic>).map(
(key, value) => core.MapEntry(
key,
item as core.bool,
value as core.bool,
),
),
),
Expand Down Expand Up @@ -792,6 +789,8 @@ class ComputeResource {
///
/// [mimeType] - The MIME type of the format requested for this export.
///
/// [dimensions] - Dimensions to base the report on.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
Expand All @@ -807,11 +806,13 @@ class ComputeResource {
async.Future<commons.Media?> export(
core.String fileId,
core.String mimeType, {
core.List<core.String>? dimensions,
core.String? $fields,
commons.DownloadOptions downloadOptions = commons.DownloadOptions.metadata,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'mimeType': [mimeType],
if (dimensions != null) 'dimensions': dimensions,
if ($fields != null) 'fields': [$fields],
};

Expand Down Expand Up @@ -960,10 +961,10 @@ class ToyMapResponseFactory {
if (json_.containsKey('mapResult')) {
message.mapResult =
(json_['mapResult'] as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
NestedResponseFactory.fromJson(
item as core.Map<core.String, core.dynamic>),
value as core.Map<core.String, core.dynamic>),
),
);
}
Expand All @@ -978,9 +979,9 @@ class ToyMapResponseFactory {
if (json_.containsKey('properties')) {
message.properties =
(json_['properties'] as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
(key, value) => core.MapEntry(
key,
item as core.String,
value as core.String,
),
);
}
Expand Down
Loading

0 comments on commit d467feb

Please sign in to comment.