code
stringlengths 8
3.25M
| repository
stringlengths 15
175
| metadata
stringlengths 66
249
|
---|---|---|
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:collection';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations_en.dart'
show GalleryLocalizationsEn;
import 'package:gallery/codeviewer/code_displayer.dart';
import 'package:gallery/codeviewer/code_segments.dart';
import 'package:gallery/data/icons.dart';
import 'package:gallery/deferred_widget.dart';
import 'package:gallery/demos/cupertino/cupertino_demos.dart'
deferred as cupertino_demos;
import 'package:gallery/demos/cupertino/demo_types.dart';
import 'package:gallery/demos/material/material_demo_types.dart';
import 'package:gallery/demos/material/material_demos.dart'
deferred as material_demos;
import 'package:gallery/demos/reference/colors_demo.dart'
deferred as colors_demo;
import 'package:gallery/demos/reference/motion_demo_container_transition.dart'
deferred as motion_demo_container;
import 'package:gallery/demos/reference/motion_demo_fade_scale_transition.dart';
import 'package:gallery/demos/reference/motion_demo_fade_through_transition.dart';
import 'package:gallery/demos/reference/motion_demo_shared_x_axis_transition.dart';
import 'package:gallery/demos/reference/motion_demo_shared_y_axis_transition.dart';
import 'package:gallery/demos/reference/motion_demo_shared_z_axis_transition.dart';
import 'package:gallery/demos/reference/transformations_demo.dart'
deferred as transformations_demo;
import 'package:gallery/demos/reference/two_pane_demo.dart'
deferred as twopane_demo;
import 'package:gallery/demos/reference/typography_demo.dart'
deferred as typography;
const _docsBaseUrl = 'https://api.flutter.dev/flutter';
const _docsAnimationsUrl =
'https://pub.dev/documentation/animations/latest/animations';
enum GalleryDemoCategory {
study,
material,
cupertino,
other;
@override
String toString() {
return name.toUpperCase();
}
String? displayTitle(GalleryLocalizations localizations) {
switch (this) {
case GalleryDemoCategory.other:
return localizations.homeCategoryReference;
case GalleryDemoCategory.material:
case GalleryDemoCategory.cupertino:
return toString();
case GalleryDemoCategory.study:
}
return null;
}
}
class GalleryDemo {
const GalleryDemo({
required this.title,
required this.category,
required this.subtitle,
// This parameter is required for studies.
this.studyId,
// Parameters below are required for non-study demos.
this.slug,
this.icon,
this.configurations = const [],
}) : assert(category == GalleryDemoCategory.study ||
(slug != null && icon != null)),
assert(slug != null || studyId != null);
final String title;
final GalleryDemoCategory category;
final String subtitle;
final String? studyId;
final String? slug;
final IconData? icon;
final List<GalleryDemoConfiguration> configurations;
String get describe => '${slug ?? studyId}@${category.name}';
}
class GalleryDemoConfiguration {
const GalleryDemoConfiguration({
required this.title,
required this.description,
required this.documentationUrl,
required this.buildRoute,
required this.code,
});
final String title;
final String description;
final String documentationUrl;
final WidgetBuilder buildRoute;
final CodeDisplayer code;
}
/// Awaits all deferred libraries for tests.
Future<void> pumpDeferredLibraries() {
final futures = <Future<void>>[
DeferredWidget.preload(cupertino_demos.loadLibrary),
DeferredWidget.preload(material_demos.loadLibrary),
DeferredWidget.preload(motion_demo_container.loadLibrary),
DeferredWidget.preload(colors_demo.loadLibrary),
DeferredWidget.preload(transformations_demo.loadLibrary),
DeferredWidget.preload(typography.loadLibrary),
];
return Future.wait(futures);
}
class Demos {
static Map<String?, GalleryDemo> asSlugToDemoMap(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return LinkedHashMap<String?, GalleryDemo>.fromIterable(
all(localizations),
key: (dynamic demo) => demo.slug as String?,
);
}
static List<GalleryDemo> all(GalleryLocalizations localizations) =>
studies(localizations).values.toList() +
materialDemos(localizations) +
cupertinoDemos(localizations) +
otherDemos(localizations);
static List<String> allDescriptions() =>
all(GalleryLocalizationsEn()).map((demo) => demo.describe).toList();
static Map<String, GalleryDemo> studies(GalleryLocalizations localizations) {
return <String, GalleryDemo>{
'shrine': GalleryDemo(
title: 'Shrine',
subtitle: localizations.shrineDescription,
category: GalleryDemoCategory.study,
studyId: 'shrine',
),
'rally': GalleryDemo(
title: 'Rally',
subtitle: localizations.rallyDescription,
category: GalleryDemoCategory.study,
studyId: 'rally',
),
'crane': GalleryDemo(
title: 'Crane',
subtitle: localizations.craneDescription,
category: GalleryDemoCategory.study,
studyId: 'crane',
),
'fortnightly': GalleryDemo(
title: 'Fortnightly',
subtitle: localizations.fortnightlyDescription,
category: GalleryDemoCategory.study,
studyId: 'fortnightly',
),
'reply': GalleryDemo(
title: 'Reply',
subtitle: localizations.replyDescription,
category: GalleryDemoCategory.study,
studyId: 'reply',
),
'starterApp': GalleryDemo(
title: localizations.starterAppTitle,
subtitle: localizations.starterAppDescription,
category: GalleryDemoCategory.study,
studyId: 'starter',
),
};
}
static List<GalleryDemo> materialDemos(GalleryLocalizations localizations) {
LibraryLoader materialDemosLibrary = material_demos.loadLibrary;
return [
GalleryDemo(
title: localizations.demoAppBarTitle,
icon: GalleryIcons.appbar,
slug: 'app-bar',
subtitle: localizations.demoAppBarSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoAppBarTitle,
description: localizations.demoAppBarDescription,
documentationUrl: '$_docsBaseUrl/material/AppBar-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() => material_demos.AppBarDemo(),
),
code: CodeSegments.appbarDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoBannerTitle,
icon: GalleryIcons.listsLeaveBehind,
slug: 'banner',
subtitle: localizations.demoBannerSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoBannerTitle,
description: localizations.demoBannerDescription,
documentationUrl:
'$_docsBaseUrl/material/MaterialBanner-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() => material_demos.BannerDemo(),
),
code: CodeSegments.bannerDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoBottomAppBarTitle,
icon: GalleryIcons.bottomAppBar,
slug: 'bottom-app-bar',
subtitle: localizations.demoBottomAppBarSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoBottomAppBarTitle,
description: localizations.demoBottomAppBarDescription,
documentationUrl: '$_docsBaseUrl/material/BottomAppBar-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() => material_demos.BottomAppBarDemo(),
),
code: CodeSegments.bottomAppBarDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoBottomNavigationTitle,
icon: GalleryIcons.bottomNavigation,
slug: 'bottom-navigation',
subtitle: localizations.demoBottomNavigationSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoBottomNavigationPersistentLabels,
description: localizations.demoBottomNavigationDescription,
documentationUrl:
'$_docsBaseUrl/material/BottomNavigationBar-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() => material_demos.BottomNavigationDemo(
type: BottomNavigationDemoType.withLabels,
restorationId: 'bottom_navigation_labels_demo',
)),
code: CodeSegments.bottomNavigationDemo,
),
GalleryDemoConfiguration(
title: localizations.demoBottomNavigationSelectedLabel,
description: localizations.demoBottomNavigationDescription,
documentationUrl:
'$_docsBaseUrl/material/BottomNavigationBar-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() => material_demos.BottomNavigationDemo(
type: BottomNavigationDemoType.withoutLabels,
restorationId: 'bottom_navigation_without_labels_demo',
)),
code: CodeSegments.bottomNavigationDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoBottomSheetTitle,
icon: GalleryIcons.bottomSheets,
slug: 'bottom-sheet',
subtitle: localizations.demoBottomSheetSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoBottomSheetPersistentTitle,
description: localizations.demoBottomSheetPersistentDescription,
documentationUrl: '$_docsBaseUrl/material/BottomSheet-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() => material_demos.BottomSheetDemo(
type: BottomSheetDemoType.persistent,
)),
code: CodeSegments.bottomSheetDemoPersistent,
),
GalleryDemoConfiguration(
title: localizations.demoBottomSheetModalTitle,
description: localizations.demoBottomSheetModalDescription,
documentationUrl: '$_docsBaseUrl/material/BottomSheet-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() => material_demos.BottomSheetDemo(
type: BottomSheetDemoType.modal,
)),
code: CodeSegments.bottomSheetDemoModal,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoButtonTitle,
icon: GalleryIcons.genericButtons,
slug: 'button',
subtitle: localizations.demoButtonSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoTextButtonTitle,
description: localizations.demoTextButtonDescription,
documentationUrl: '$_docsBaseUrl/material/TextButton-class.html',
buildRoute: (_) => DeferredWidget(materialDemosLibrary,
() => material_demos.ButtonDemo(type: ButtonDemoType.text)),
code: CodeSegments.buttonDemoText,
),
GalleryDemoConfiguration(
title: localizations.demoElevatedButtonTitle,
description: localizations.demoElevatedButtonDescription,
documentationUrl:
'$_docsBaseUrl/material/ElevatedButton-class.html',
buildRoute: (_) => DeferredWidget(materialDemosLibrary,
() => material_demos.ButtonDemo(type: ButtonDemoType.elevated)),
code: CodeSegments.buttonDemoElevated,
),
GalleryDemoConfiguration(
title: localizations.demoOutlinedButtonTitle,
description: localizations.demoOutlinedButtonDescription,
documentationUrl:
'$_docsBaseUrl/material/OutlinedButton-class.html',
buildRoute: (_) => DeferredWidget(materialDemosLibrary,
() => material_demos.ButtonDemo(type: ButtonDemoType.outlined)),
code: CodeSegments.buttonDemoOutlined,
),
GalleryDemoConfiguration(
title: localizations.demoToggleButtonTitle,
description: localizations.demoToggleButtonDescription,
documentationUrl: '$_docsBaseUrl/material/ToggleButtons-class.html',
buildRoute: (_) => DeferredWidget(materialDemosLibrary,
() => material_demos.ButtonDemo(type: ButtonDemoType.toggle)),
code: CodeSegments.buttonDemoToggle,
),
GalleryDemoConfiguration(
title: localizations.demoFloatingButtonTitle,
description: localizations.demoFloatingButtonDescription,
documentationUrl:
'$_docsBaseUrl/material/FloatingActionButton-class.html',
buildRoute: (_) => DeferredWidget(materialDemosLibrary,
() => material_demos.ButtonDemo(type: ButtonDemoType.floating)),
code: CodeSegments.buttonDemoFloating,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoCardTitle,
icon: GalleryIcons.cards,
slug: 'card',
subtitle: localizations.demoCardSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCardTitle,
description: localizations.demoCardDescription,
documentationUrl: '$_docsBaseUrl/material/Card-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.CardsDemo(),
),
code: CodeSegments.cardsDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoChipTitle,
icon: GalleryIcons.chips,
slug: 'chip',
subtitle: localizations.demoChipSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoActionChipTitle,
description: localizations.demoActionChipDescription,
documentationUrl: '$_docsBaseUrl/material/ActionChip-class.html',
buildRoute: (context) => DeferredWidget(materialDemosLibrary,
() => material_demos.ChipDemo(type: ChipDemoType.action)),
code: CodeSegments.chipDemoAction,
),
GalleryDemoConfiguration(
title: localizations.demoChoiceChipTitle,
description: localizations.demoChoiceChipDescription,
documentationUrl: '$_docsBaseUrl/material/ChoiceChip-class.html',
buildRoute: (context) => DeferredWidget(materialDemosLibrary,
() => material_demos.ChipDemo(type: ChipDemoType.choice)),
code: CodeSegments.chipDemoChoice,
),
GalleryDemoConfiguration(
title: localizations.demoFilterChipTitle,
description: localizations.demoFilterChipDescription,
documentationUrl: '$_docsBaseUrl/material/FilterChip-class.html',
buildRoute: (context) => DeferredWidget(materialDemosLibrary,
() => material_demos.ChipDemo(type: ChipDemoType.filter)),
code: CodeSegments.chipDemoFilter,
),
GalleryDemoConfiguration(
title: localizations.demoInputChipTitle,
description: localizations.demoInputChipDescription,
documentationUrl: '$_docsBaseUrl/material/InputChip-class.html',
buildRoute: (context) => DeferredWidget(materialDemosLibrary,
() => material_demos.ChipDemo(type: ChipDemoType.input)),
code: CodeSegments.chipDemoInput,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoDataTableTitle,
icon: GalleryIcons.dataTable,
slug: 'data-table',
subtitle: localizations.demoDataTableSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoDataTableTitle,
description: localizations.demoDataTableDescription,
documentationUrl: '$_docsBaseUrl/material/DataTable-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.DataTableDemo(),
),
code: CodeSegments.dataTableDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoDialogTitle,
icon: GalleryIcons.dialogs,
slug: 'dialog',
subtitle: localizations.demoDialogSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoAlertDialogTitle,
description: localizations.demoAlertDialogDescription,
documentationUrl: '$_docsBaseUrl/material/AlertDialog-class.html',
buildRoute: (context) => DeferredWidget(materialDemosLibrary,
() => material_demos.DialogDemo(type: DialogDemoType.alert)),
code: CodeSegments.dialogDemo,
),
GalleryDemoConfiguration(
title: localizations.demoAlertTitleDialogTitle,
description: localizations.demoAlertDialogDescription,
documentationUrl: '$_docsBaseUrl/material/AlertDialog-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() =>
material_demos.DialogDemo(type: DialogDemoType.alertTitle)),
code: CodeSegments.dialogDemo,
),
GalleryDemoConfiguration(
title: localizations.demoSimpleDialogTitle,
description: localizations.demoSimpleDialogDescription,
documentationUrl: '$_docsBaseUrl/material/SimpleDialog-class.html',
buildRoute: (context) => DeferredWidget(materialDemosLibrary,
() => material_demos.DialogDemo(type: DialogDemoType.simple)),
code: CodeSegments.dialogDemo,
),
GalleryDemoConfiguration(
title: localizations.demoFullscreenDialogTitle,
description: localizations.demoFullscreenDialogDescription,
documentationUrl:
'$_docsBaseUrl/widgets/PageRoute/fullscreenDialog.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() =>
material_demos.DialogDemo(type: DialogDemoType.fullscreen)),
code: CodeSegments.dialogDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoDividerTitle,
icon: GalleryIcons.divider,
slug: 'divider',
subtitle: localizations.demoDividerSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoDividerTitle,
description: localizations.demoDividerDescription,
documentationUrl: '$_docsBaseUrl/material/Divider-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() => material_demos.DividerDemo(
type: DividerDemoType.horizontal)),
code: CodeSegments.dividerDemo,
),
GalleryDemoConfiguration(
title: localizations.demoVerticalDividerTitle,
description: localizations.demoDividerDescription,
documentationUrl:
'$_docsBaseUrl/material/VerticalDivider-class.html',
buildRoute: (_) => DeferredWidget(
materialDemosLibrary,
() =>
material_demos.DividerDemo(type: DividerDemoType.vertical)),
code: CodeSegments.verticalDividerDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoGridListsTitle,
icon: GalleryIcons.gridOn,
slug: 'grid-lists',
subtitle: localizations.demoGridListsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoGridListsImageOnlyTitle,
description: localizations.demoGridListsDescription,
documentationUrl: '$_docsBaseUrl/widgets/GridView-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.GridListDemo(
type: GridListDemoType.imageOnly)),
code: CodeSegments.gridListsDemo,
),
GalleryDemoConfiguration(
title: localizations.demoGridListsHeaderTitle,
description: localizations.demoGridListsDescription,
documentationUrl: '$_docsBaseUrl/widgets/GridView-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() =>
material_demos.GridListDemo(type: GridListDemoType.header)),
code: CodeSegments.gridListsDemo,
),
GalleryDemoConfiguration(
title: localizations.demoGridListsFooterTitle,
description: localizations.demoGridListsDescription,
documentationUrl: '$_docsBaseUrl/widgets/GridView-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() =>
material_demos.GridListDemo(type: GridListDemoType.footer)),
code: CodeSegments.gridListsDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoListsTitle,
icon: GalleryIcons.listAlt,
slug: 'lists',
subtitle: localizations.demoListsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoOneLineListsTitle,
description: localizations.demoListsDescription,
documentationUrl: '$_docsBaseUrl/material/ListTile-class.html',
buildRoute: (context) => DeferredWidget(materialDemosLibrary,
() => material_demos.ListDemo(type: ListDemoType.oneLine)),
code: CodeSegments.listDemo,
),
GalleryDemoConfiguration(
title: localizations.demoTwoLineListsTitle,
description: localizations.demoListsDescription,
documentationUrl: '$_docsBaseUrl/material/ListTile-class.html',
buildRoute: (context) => DeferredWidget(materialDemosLibrary,
() => material_demos.ListDemo(type: ListDemoType.twoLine)),
code: CodeSegments.listDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoMenuTitle,
icon: GalleryIcons.moreVert,
slug: 'menu',
subtitle: localizations.demoMenuSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoContextMenuTitle,
description: localizations.demoMenuDescription,
documentationUrl: '$_docsBaseUrl/material/PopupMenuItem-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.MenuDemo(type: MenuDemoType.contextMenu),
),
code: CodeSegments.menuDemoContext,
),
GalleryDemoConfiguration(
title: localizations.demoSectionedMenuTitle,
description: localizations.demoMenuDescription,
documentationUrl: '$_docsBaseUrl/material/PopupMenuItem-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.MenuDemo(type: MenuDemoType.sectionedMenu),
),
code: CodeSegments.menuDemoSectioned,
),
GalleryDemoConfiguration(
title: localizations.demoChecklistMenuTitle,
description: localizations.demoMenuDescription,
documentationUrl:
'$_docsBaseUrl/material/CheckedPopupMenuItem-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.MenuDemo(type: MenuDemoType.checklistMenu),
),
code: CodeSegments.menuDemoChecklist,
),
GalleryDemoConfiguration(
title: localizations.demoSimpleMenuTitle,
description: localizations.demoMenuDescription,
documentationUrl: '$_docsBaseUrl/material/PopupMenuItem-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.MenuDemo(type: MenuDemoType.simpleMenu),
),
code: CodeSegments.menuDemoSimple,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoNavigationDrawerTitle,
icon: GalleryIcons.menu,
slug: 'nav_drawer',
subtitle: localizations.demoNavigationDrawerSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoNavigationDrawerTitle,
description: localizations.demoNavigationDrawerDescription,
documentationUrl: '$_docsBaseUrl/material/Drawer-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.NavDrawerDemo(),
),
code: CodeSegments.navDrawerDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoNavigationRailTitle,
icon: GalleryIcons.navigationRail,
slug: 'nav_rail',
subtitle: localizations.demoNavigationRailSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoNavigationRailTitle,
description: localizations.demoNavigationRailDescription,
documentationUrl:
'$_docsBaseUrl/material/NavigationRail-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.NavRailDemo(),
),
code: CodeSegments.navRailDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoPickersTitle,
icon: GalleryIcons.event,
slug: 'pickers',
subtitle: localizations.demoPickersSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoDatePickerTitle,
description: localizations.demoDatePickerDescription,
documentationUrl: '$_docsBaseUrl/material/showDatePicker.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.PickerDemo(type: PickerDemoType.date),
),
code: CodeSegments.pickerDemo,
),
GalleryDemoConfiguration(
title: localizations.demoTimePickerTitle,
description: localizations.demoTimePickerDescription,
documentationUrl: '$_docsBaseUrl/material/showTimePicker.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.PickerDemo(type: PickerDemoType.time),
),
code: CodeSegments.pickerDemo,
),
GalleryDemoConfiguration(
title: localizations.demoDateRangePickerTitle,
description: localizations.demoDateRangePickerDescription,
documentationUrl: '$_docsBaseUrl/material/showDateRangePicker.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.PickerDemo(type: PickerDemoType.range),
),
code: CodeSegments.pickerDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoProgressIndicatorTitle,
icon: GalleryIcons.progressActivity,
slug: 'progress-indicator',
subtitle: localizations.demoProgressIndicatorSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCircularProgressIndicatorTitle,
description: localizations.demoCircularProgressIndicatorDescription,
documentationUrl:
'$_docsBaseUrl/material/CircularProgressIndicator-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.ProgressIndicatorDemo(
type: ProgressIndicatorDemoType.circular,
),
),
code: CodeSegments.progressIndicatorsDemo,
),
GalleryDemoConfiguration(
title: localizations.demoLinearProgressIndicatorTitle,
description: localizations.demoLinearProgressIndicatorDescription,
documentationUrl:
'$_docsBaseUrl/material/LinearProgressIndicator-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.ProgressIndicatorDemo(
type: ProgressIndicatorDemoType.linear,
),
),
code: CodeSegments.progressIndicatorsDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoSelectionControlsTitle,
icon: GalleryIcons.checkBox,
slug: 'selection-controls',
subtitle: localizations.demoSelectionControlsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoSelectionControlsCheckboxTitle,
description: localizations.demoSelectionControlsCheckboxDescription,
documentationUrl: '$_docsBaseUrl/material/Checkbox-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.SelectionControlsDemo(
type: SelectionControlsDemoType.checkbox,
),
),
code: CodeSegments.selectionControlsDemoCheckbox,
),
GalleryDemoConfiguration(
title: localizations.demoSelectionControlsRadioTitle,
description: localizations.demoSelectionControlsRadioDescription,
documentationUrl: '$_docsBaseUrl/material/Radio-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.SelectionControlsDemo(
type: SelectionControlsDemoType.radio,
),
),
code: CodeSegments.selectionControlsDemoRadio,
),
GalleryDemoConfiguration(
title: localizations.demoSelectionControlsSwitchTitle,
description: localizations.demoSelectionControlsSwitchDescription,
documentationUrl: '$_docsBaseUrl/material/Switch-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.SelectionControlsDemo(
type: SelectionControlsDemoType.switches,
),
),
code: CodeSegments.selectionControlsDemoSwitches,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoSlidersTitle,
icon: GalleryIcons.sliders,
slug: 'sliders',
subtitle: localizations.demoSlidersSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoSlidersTitle,
description: localizations.demoSlidersDescription,
documentationUrl: '$_docsBaseUrl/material/Slider-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.SlidersDemo(type: SlidersDemoType.sliders),
),
code: CodeSegments.slidersDemo,
),
GalleryDemoConfiguration(
title: localizations.demoRangeSlidersTitle,
description: localizations.demoRangeSlidersDescription,
documentationUrl: '$_docsBaseUrl/material/RangeSlider-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.SlidersDemo(
type: SlidersDemoType.rangeSliders),
),
code: CodeSegments.rangeSlidersDemo,
),
GalleryDemoConfiguration(
title: localizations.demoCustomSlidersTitle,
description: localizations.demoCustomSlidersDescription,
documentationUrl: '$_docsBaseUrl/material/SliderTheme-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.SlidersDemo(
type: SlidersDemoType.customSliders),
),
code: CodeSegments.customSlidersDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoSnackbarsTitle,
icon: GalleryIcons.snackbar,
slug: 'snackbars',
subtitle: localizations.demoSnackbarsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoSnackbarsTitle,
description: localizations.demoSnackbarsDescription,
documentationUrl: '$_docsBaseUrl/material/SnackBar-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.SnackbarsDemo(),
),
code: CodeSegments.snackbarsDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoTabsTitle,
icon: GalleryIcons.tabs,
slug: 'tabs',
subtitle: localizations.demoTabsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoTabsScrollingTitle,
description: localizations.demoTabsDescription,
documentationUrl: '$_docsBaseUrl/material/TabBar-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.TabsDemo(type: TabsDemoType.scrollable),
),
code: CodeSegments.tabsScrollableDemo,
),
GalleryDemoConfiguration(
title: localizations.demoTabsNonScrollingTitle,
description: localizations.demoTabsDescription,
documentationUrl: '$_docsBaseUrl/material/TabBar-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.TabsDemo(type: TabsDemoType.nonScrollable),
),
code: CodeSegments.tabsNonScrollableDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoTextFieldTitle,
icon: GalleryIcons.textFieldsAlt,
slug: 'text-field',
subtitle: localizations.demoTextFieldSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoTextFieldTitle,
description: localizations.demoTextFieldDescription,
documentationUrl: '$_docsBaseUrl/material/TextField-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.TextFieldDemo(),
),
code: CodeSegments.textFieldDemo,
),
],
category: GalleryDemoCategory.material,
),
GalleryDemo(
title: localizations.demoTooltipTitle,
icon: GalleryIcons.tooltip,
slug: 'tooltip',
subtitle: localizations.demoTooltipSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoTooltipTitle,
description: localizations.demoTooltipDescription,
documentationUrl: '$_docsBaseUrl/material/Tooltip-class.html',
buildRoute: (context) => DeferredWidget(
materialDemosLibrary,
() => material_demos.TooltipDemo(),
),
code: CodeSegments.tooltipDemo,
),
],
category: GalleryDemoCategory.material,
),
];
}
static List<GalleryDemo> cupertinoDemos(GalleryLocalizations localizations) {
LibraryLoader cupertinoLoader = cupertino_demos.loadLibrary;
return [
GalleryDemo(
title: localizations.demoCupertinoActivityIndicatorTitle,
icon: GalleryIcons.cupertinoProgress,
slug: 'cupertino-activity-indicator',
subtitle: localizations.demoCupertinoActivityIndicatorSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoActivityIndicatorTitle,
description:
localizations.demoCupertinoActivityIndicatorDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoActivityIndicator-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoProgressIndicatorDemo(),
),
code: CodeSegments.cupertinoActivityIndicatorDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoAlertsTitle,
icon: GalleryIcons.dialogs,
slug: 'cupertino-alerts',
subtitle: localizations.demoCupertinoAlertsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoAlertTitle,
description: localizations.demoCupertinoAlertDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoAlertDialog-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoAlertDemo(
type: AlertDemoType.alert)),
code: CodeSegments.cupertinoAlertDemo,
),
GalleryDemoConfiguration(
title: localizations.demoCupertinoAlertWithTitleTitle,
description: localizations.demoCupertinoAlertDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoAlertDialog-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoAlertDemo(
type: AlertDemoType.alertTitle)),
code: CodeSegments.cupertinoAlertDemo,
),
GalleryDemoConfiguration(
title: localizations.demoCupertinoAlertButtonsTitle,
description: localizations.demoCupertinoAlertDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoAlertDialog-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoAlertDemo(
type: AlertDemoType.alertButtons)),
code: CodeSegments.cupertinoAlertDemo,
),
GalleryDemoConfiguration(
title: localizations.demoCupertinoAlertButtonsOnlyTitle,
description: localizations.demoCupertinoAlertDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoAlertDialog-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoAlertDemo(
type: AlertDemoType.alertButtonsOnly)),
code: CodeSegments.cupertinoAlertDemo,
),
GalleryDemoConfiguration(
title: localizations.demoCupertinoActionSheetTitle,
description: localizations.demoCupertinoActionSheetDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoActionSheet-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoAlertDemo(
type: AlertDemoType.actionSheet)),
code: CodeSegments.cupertinoAlertDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoButtonsTitle,
icon: GalleryIcons.genericButtons,
slug: 'cupertino-buttons',
subtitle: localizations.demoCupertinoButtonsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoButtonsTitle,
description: localizations.demoCupertinoButtonsDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoButton-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoButtonDemo(),
),
code: CodeSegments.cupertinoButtonDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoContextMenuTitle,
icon: GalleryIcons.moreVert,
slug: 'cupertino-context-menu',
subtitle: localizations.demoCupertinoContextMenuSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoContextMenuTitle,
description: localizations.demoCupertinoContextMenuDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoContextMenu-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoContextMenuDemo(),
),
code: CodeSegments.cupertinoContextMenuDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoNavigationBarTitle,
icon: GalleryIcons.bottomSheetPersistent,
slug: 'cupertino-navigation-bar',
subtitle: localizations.demoCupertinoNavigationBarSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoNavigationBarTitle,
description: localizations.demoCupertinoNavigationBarDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoNavigationBar-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoNavigationBarDemo(),
),
code: CodeSegments.cupertinoNavigationBarDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoPickerTitle,
icon: GalleryIcons.listAlt,
slug: 'cupertino-picker',
subtitle: localizations.demoCupertinoPickerSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoPickerTitle,
description: localizations.demoCupertinoPickerDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoDatePicker-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
// ignore: prefer_const_constructors
() => cupertino_demos.CupertinoPickerDemo()),
code: CodeSegments.cupertinoPickersDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoScrollbarTitle,
icon: GalleryIcons.listAlt,
slug: 'cupertino-scrollbar',
subtitle: localizations.demoCupertinoScrollbarSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoScrollbarTitle,
description: localizations.demoCupertinoScrollbarDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoScrollbar-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
// ignore: prefer_const_constructors
() => cupertino_demos.CupertinoScrollbarDemo()),
code: CodeSegments.cupertinoScrollbarDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoSegmentedControlTitle,
icon: GalleryIcons.tabs,
slug: 'cupertino-segmented-control',
subtitle: localizations.demoCupertinoSegmentedControlSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoSegmentedControlTitle,
description: localizations.demoCupertinoSegmentedControlDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoSegmentedControl-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoSegmentedControlDemo(),
),
code: CodeSegments.cupertinoSegmentedControlDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoSliderTitle,
icon: GalleryIcons.sliders,
slug: 'cupertino-slider',
subtitle: localizations.demoCupertinoSliderSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoSliderTitle,
description: localizations.demoCupertinoSliderDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoSlider-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoSliderDemo(),
),
code: CodeSegments.cupertinoSliderDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoSelectionControlsSwitchTitle,
icon: GalleryIcons.cupertinoSwitch,
slug: 'cupertino-switch',
subtitle: localizations.demoCupertinoSwitchSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoSelectionControlsSwitchTitle,
description: localizations.demoCupertinoSwitchDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoSwitch-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoSwitchDemo(),
),
code: CodeSegments.cupertinoSwitchDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoTabBarTitle,
icon: GalleryIcons.bottomNavigation,
slug: 'cupertino-tab-bar',
subtitle: localizations.demoCupertinoTabBarSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoTabBarTitle,
description: localizations.demoCupertinoTabBarDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoTabBar-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoTabBarDemo(),
),
code: CodeSegments.cupertinoNavigationDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoTextFieldTitle,
icon: GalleryIcons.textFieldsAlt,
slug: 'cupertino-text-field',
subtitle: localizations.demoCupertinoTextFieldSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoTextFieldTitle,
description: localizations.demoCupertinoTextFieldDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoTextField-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoTextFieldDemo(),
),
code: CodeSegments.cupertinoTextFieldDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
GalleryDemo(
title: localizations.demoCupertinoSearchTextFieldTitle,
icon: GalleryIcons.search,
slug: 'cupertino-search-text-field',
subtitle: localizations.demoCupertinoSearchTextFieldSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoCupertinoSearchTextFieldTitle,
description: localizations.demoCupertinoSearchTextFieldDescription,
documentationUrl:
'$_docsBaseUrl/cupertino/CupertinoSearchTextField-class.html',
buildRoute: (_) => DeferredWidget(
cupertinoLoader,
() => cupertino_demos.CupertinoSearchTextFieldDemo(),
),
code: CodeSegments.cupertinoTextFieldDemo,
),
],
category: GalleryDemoCategory.cupertino,
),
];
}
static List<GalleryDemo> otherDemos(GalleryLocalizations localizations) {
return [
GalleryDemo(
title: localizations.demoTwoPaneTitle,
icon: GalleryIcons.bottomSheetPersistent,
slug: 'two-pane',
subtitle: localizations.demoTwoPaneSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoTwoPaneFoldableLabel,
description: localizations.demoTwoPaneFoldableDescription,
documentationUrl:
'https://pub.dev/documentation/dual_screen/latest/dual_screen/TwoPane-class.html',
buildRoute: (_) => DeferredWidget(
twopane_demo.loadLibrary,
() => twopane_demo.TwoPaneDemo(
type: twopane_demo.TwoPaneDemoType.foldable,
restorationId: 'two_pane_foldable',
),
),
code: CodeSegments.twoPaneDemo,
),
GalleryDemoConfiguration(
title: localizations.demoTwoPaneTabletLabel,
description: localizations.demoTwoPaneTabletDescription,
documentationUrl:
'https://pub.dev/documentation/dual_screen/latest/dual_screen/TwoPane-class.html',
buildRoute: (_) => DeferredWidget(
twopane_demo.loadLibrary,
() => twopane_demo.TwoPaneDemo(
type: twopane_demo.TwoPaneDemoType.tablet,
restorationId: 'two_pane_tablet',
),
),
code: CodeSegments.twoPaneDemo,
),
GalleryDemoConfiguration(
title: localizations.demoTwoPaneSmallScreenLabel,
description: localizations.demoTwoPaneSmallScreenDescription,
documentationUrl:
'https://pub.dev/documentation/dual_screen/latest/dual_screen/TwoPane-class.html',
buildRoute: (_) => DeferredWidget(
twopane_demo.loadLibrary,
() => twopane_demo.TwoPaneDemo(
type: twopane_demo.TwoPaneDemoType.smallScreen,
restorationId: 'two_pane_single',
),
),
code: CodeSegments.twoPaneDemo,
),
],
category: GalleryDemoCategory.other,
),
GalleryDemo(
title: localizations.demoMotionTitle,
icon: GalleryIcons.animation,
slug: 'motion',
subtitle: localizations.demoMotionSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoContainerTransformTitle,
description: localizations.demoContainerTransformDescription,
documentationUrl: '$_docsAnimationsUrl/OpenContainer-class.html',
buildRoute: (_) => DeferredWidget(
motion_demo_container.loadLibrary,
() => motion_demo_container.OpenContainerTransformDemo(),
),
code: CodeSegments.openContainerTransformDemo,
),
GalleryDemoConfiguration(
title: localizations.demoSharedXAxisTitle,
description: localizations.demoSharedAxisDescription,
documentationUrl:
'$_docsAnimationsUrl/SharedAxisTransition-class.html',
buildRoute: (_) => const SharedXAxisTransitionDemo(),
code: CodeSegments.sharedXAxisTransitionDemo,
),
GalleryDemoConfiguration(
title: localizations.demoSharedYAxisTitle,
description: localizations.demoSharedAxisDescription,
documentationUrl:
'$_docsAnimationsUrl/SharedAxisTransition-class.html',
buildRoute: (_) => const SharedYAxisTransitionDemo(),
code: CodeSegments.sharedYAxisTransitionDemo,
),
GalleryDemoConfiguration(
title: localizations.demoSharedZAxisTitle,
description: localizations.demoSharedAxisDescription,
documentationUrl:
'$_docsAnimationsUrl/SharedAxisTransition-class.html',
buildRoute: (_) => const SharedZAxisTransitionDemo(),
code: CodeSegments.sharedZAxisTransitionDemo,
),
GalleryDemoConfiguration(
title: localizations.demoFadeThroughTitle,
description: localizations.demoFadeThroughDescription,
documentationUrl:
'$_docsAnimationsUrl/FadeThroughTransition-class.html',
buildRoute: (_) => const FadeThroughTransitionDemo(),
code: CodeSegments.fadeThroughTransitionDemo,
),
GalleryDemoConfiguration(
title: localizations.demoFadeScaleTitle,
description: localizations.demoFadeScaleDescription,
documentationUrl:
'$_docsAnimationsUrl/FadeScaleTransition-class.html',
buildRoute: (_) => const FadeScaleTransitionDemo(),
code: CodeSegments.fadeScaleTransitionDemo,
),
],
category: GalleryDemoCategory.other,
),
GalleryDemo(
title: localizations.demoColorsTitle,
icon: GalleryIcons.colors,
slug: 'colors',
subtitle: localizations.demoColorsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoColorsTitle,
description: localizations.demoColorsDescription,
documentationUrl: '$_docsBaseUrl/material/MaterialColor-class.html',
buildRoute: (_) => DeferredWidget(
colors_demo.loadLibrary,
() => colors_demo.ColorsDemo(),
),
code: CodeSegments.colorsDemo,
),
],
category: GalleryDemoCategory.other,
),
GalleryDemo(
title: localizations.demoTypographyTitle,
icon: GalleryIcons.customTypography,
slug: 'typography',
subtitle: localizations.demoTypographySubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demoTypographyTitle,
description: localizations.demoTypographyDescription,
documentationUrl: '$_docsBaseUrl/material/TextTheme-class.html',
buildRoute: (_) => DeferredWidget(
typography.loadLibrary,
() => typography.TypographyDemo(),
),
code: CodeSegments.typographyDemo,
),
],
category: GalleryDemoCategory.other,
),
GalleryDemo(
title: localizations.demo2dTransformationsTitle,
icon: GalleryIcons.gridOn,
slug: '2d-transformations',
subtitle: localizations.demo2dTransformationsSubtitle,
configurations: [
GalleryDemoConfiguration(
title: localizations.demo2dTransformationsTitle,
description: localizations.demo2dTransformationsDescription,
documentationUrl:
'$_docsBaseUrl/widgets/GestureDetector-class.html',
buildRoute: (_) => DeferredWidget(
transformations_demo.loadLibrary,
() => transformations_demo.TransformationsDemo(),
),
code: CodeSegments.transformationsDemo,
),
],
category: GalleryDemoCategory.other,
),
];
}
}
| gallery/lib/data/demos.dart/0 | {'file_path': 'gallery/lib/data/demos.dart', 'repo_id': 'gallery', 'token_count': 26252} |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/cupertino.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
// BEGIN cupertinoNavigationDemo
class _TabInfo {
const _TabInfo(this.title, this.icon);
final String title;
final IconData icon;
}
class CupertinoTabBarDemo extends StatelessWidget {
const CupertinoTabBarDemo({super.key});
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
final tabInfo = [
_TabInfo(
localizations.cupertinoTabBarHomeTab,
CupertinoIcons.home,
),
_TabInfo(
localizations.cupertinoTabBarChatTab,
CupertinoIcons.conversation_bubble,
),
_TabInfo(
localizations.cupertinoTabBarProfileTab,
CupertinoIcons.profile_circled,
),
];
return DefaultTextStyle(
style: CupertinoTheme.of(context).textTheme.textStyle,
child: CupertinoTabScaffold(
restorationId: 'cupertino_tab_scaffold',
tabBar: CupertinoTabBar(
items: [
for (final tabInfo in tabInfo)
BottomNavigationBarItem(
label: tabInfo.title,
icon: Icon(tabInfo.icon),
),
],
),
tabBuilder: (context, index) {
return CupertinoTabView(
restorationScopeId: 'cupertino_tab_view_$index',
builder: (context) => _CupertinoDemoTab(
title: tabInfo[index].title,
icon: tabInfo[index].icon,
),
defaultTitle: tabInfo[index].title,
);
},
),
);
}
}
class _CupertinoDemoTab extends StatelessWidget {
const _CupertinoDemoTab({
required this.title,
required this.icon,
});
final String title;
final IconData icon;
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(),
backgroundColor: CupertinoColors.systemBackground,
child: Center(
child: Icon(
icon,
semanticLabel: title,
size: 100,
),
),
);
}
}
// END
| gallery/lib/demos/cupertino/cupertino_tab_bar_demo.dart/0 | {'file_path': 'gallery/lib/demos/cupertino/cupertino_tab_bar_demo.dart', 'repo_id': 'gallery', 'token_count': 1020} |
enum BottomNavigationDemoType {
withLabels,
withoutLabels,
}
enum BottomSheetDemoType {
persistent,
modal,
}
enum ButtonDemoType {
text,
elevated,
outlined,
toggle,
floating,
}
enum ChipDemoType {
action,
choice,
filter,
input,
}
enum DialogDemoType {
alert,
alertTitle,
simple,
fullscreen,
}
enum GridListDemoType {
imageOnly,
header,
footer,
}
enum ListDemoType {
oneLine,
twoLine,
}
enum MenuDemoType {
contextMenu,
sectionedMenu,
simpleMenu,
checklistMenu,
}
enum PickerDemoType {
date,
time,
range,
}
enum ProgressIndicatorDemoType {
circular,
linear,
}
enum SelectionControlsDemoType {
checkbox,
radio,
switches,
}
enum SlidersDemoType {
sliders,
rangeSliders,
customSliders,
}
enum TabsDemoType {
scrollable,
nonScrollable,
}
enum DividerDemoType {
horizontal,
vertical,
}
| gallery/lib/demos/material/material_demo_types.dart/0 | {'file_path': 'gallery/lib/demos/material/material_demo_types.dart', 'repo_id': 'gallery', 'token_count': 342} |
// Copyright 2019 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:animations/animations.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
// BEGIN fadeThroughTransitionDemo
class FadeThroughTransitionDemo extends StatefulWidget {
const FadeThroughTransitionDemo({super.key});
@override
State<FadeThroughTransitionDemo> createState() =>
_FadeThroughTransitionDemoState();
}
class _FadeThroughTransitionDemoState extends State<FadeThroughTransitionDemo> {
int _pageIndex = 0;
final _pageList = <Widget>[
_AlbumsPage(),
_PhotosPage(),
_SearchPage(),
];
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: Column(
children: [
Text(localizations.demoFadeThroughTitle),
Text(
'(${localizations.demoFadeThroughDemoInstructions})',
style: Theme.of(context)
.textTheme
.titleSmall!
.copyWith(color: Colors.white),
),
],
),
),
body: PageTransitionSwitcher(
transitionBuilder: (
child,
animation,
secondaryAnimation,
) {
return FadeThroughTransition(
animation: animation,
secondaryAnimation: secondaryAnimation,
child: child,
);
},
child: _pageList[_pageIndex],
),
bottomNavigationBar: BottomNavigationBar(
currentIndex: _pageIndex,
onTap: (selectedIndex) {
setState(() {
_pageIndex = selectedIndex;
});
},
items: [
BottomNavigationBarItem(
icon: const Icon(Icons.photo_library),
label: localizations.demoFadeThroughAlbumsDestination,
),
BottomNavigationBarItem(
icon: const Icon(Icons.photo),
label: localizations.demoFadeThroughPhotosDestination,
),
BottomNavigationBarItem(
icon: const Icon(Icons.search),
label: localizations.demoFadeThroughSearchDestination,
),
],
),
);
}
}
class _ExampleCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
final textTheme = Theme.of(context).textTheme;
return Expanded(
child: Card(
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: Container(
color: Colors.black26,
child: Padding(
padding: const EdgeInsets.all(30),
child: Ink.image(
image: const AssetImage(
'placeholders/placeholder_image.png',
package: 'flutter_gallery_assets',
),
),
),
),
),
Padding(
padding: const EdgeInsets.all(8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
localizations.demoFadeThroughTextPlaceholder,
style: textTheme.bodyLarge,
),
Text(
localizations.demoFadeThroughTextPlaceholder,
style: textTheme.bodySmall,
),
],
),
),
],
),
InkWell(
splashColor: Colors.black38,
onTap: () {},
),
],
),
),
);
}
}
class _AlbumsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
...List.generate(
3,
(index) => Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_ExampleCard(),
_ExampleCard(),
],
),
),
),
],
);
}
}
class _PhotosPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
_ExampleCard(),
_ExampleCard(),
],
);
}
}
class _SearchPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context);
return ListView.builder(
itemBuilder: (context, index) {
return ListTile(
leading: Image.asset(
'placeholders/avatar_logo.png',
package: 'flutter_gallery_assets',
width: 40,
),
title: Text('${localizations!.demoMotionListTileTitle} ${index + 1}'),
subtitle: Text(localizations.demoMotionPlaceholderSubtitle),
);
},
itemCount: 10,
);
}
}
// END fadeThroughTransitionDemo
| gallery/lib/demos/reference/motion_demo_fade_through_transition.dart/0 | {'file_path': 'gallery/lib/demos/reference/motion_demo_fade_through_transition.dart', 'repo_id': 'gallery', 'token_count': 2780} |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
import 'package:gallery/constants.dart';
import 'package:gallery/data/demos.dart';
import 'package:gallery/data/gallery_options.dart';
import 'package:gallery/layout/adaptive.dart';
import 'package:gallery/pages/category_list_item.dart';
import 'package:gallery/pages/settings.dart';
import 'package:gallery/pages/splash.dart';
import 'package:gallery/studies/crane/colors.dart';
import 'package:gallery/studies/crane/routes.dart' as crane_routes;
import 'package:gallery/studies/fortnightly/routes.dart' as fortnightly_routes;
import 'package:gallery/studies/rally/colors.dart';
import 'package:gallery/studies/rally/routes.dart' as rally_routes;
import 'package:gallery/studies/reply/routes.dart' as reply_routes;
import 'package:gallery/studies/shrine/colors.dart';
import 'package:gallery/studies/shrine/routes.dart' as shrine_routes;
import 'package:gallery/studies/starter/routes.dart' as starter_app_routes;
import 'package:url_launcher/url_launcher.dart';
const _horizontalPadding = 32.0;
const _horizontalDesktopPadding = 81.0;
const _carouselHeightMin = 240.0;
const _carouselItemDesktopMargin = 8.0;
const _carouselItemMobileMargin = 4.0;
const _carouselItemWidth = 296.0;
class ToggleSplashNotification extends Notification {}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
final isDesktop = isDisplayDesktop(context);
final localizations = GalleryLocalizations.of(context)!;
final studyDemos = Demos.studies(localizations);
final carouselCards = <Widget>[
_CarouselCard(
demo: studyDemos['reply'],
asset: const AssetImage(
'assets/studies/reply_card.png',
package: 'flutter_gallery_assets',
),
assetColor: const Color(0xFF344955),
assetDark: const AssetImage(
'assets/studies/reply_card_dark.png',
package: 'flutter_gallery_assets',
),
assetDarkColor: const Color(0xFF1D2327),
textColor: Colors.white,
studyRoute: reply_routes.homeRoute,
),
_CarouselCard(
demo: studyDemos['shrine'],
asset: const AssetImage(
'assets/studies/shrine_card.png',
package: 'flutter_gallery_assets',
),
assetColor: const Color(0xFFFEDBD0),
assetDark: const AssetImage(
'assets/studies/shrine_card_dark.png',
package: 'flutter_gallery_assets',
),
assetDarkColor: const Color(0xFF543B3C),
textColor: shrineBrown900,
studyRoute: shrine_routes.loginRoute,
),
_CarouselCard(
demo: studyDemos['rally'],
textColor: RallyColors.accountColors[0],
asset: const AssetImage(
'assets/studies/rally_card.png',
package: 'flutter_gallery_assets',
),
assetColor: const Color(0xFFD1F2E6),
assetDark: const AssetImage(
'assets/studies/rally_card_dark.png',
package: 'flutter_gallery_assets',
),
assetDarkColor: const Color(0xFF253538),
studyRoute: rally_routes.loginRoute,
),
_CarouselCard(
demo: studyDemos['crane'],
asset: const AssetImage(
'assets/studies/crane_card.png',
package: 'flutter_gallery_assets',
),
assetColor: const Color(0xFFFBF6F8),
assetDark: const AssetImage(
'assets/studies/crane_card_dark.png',
package: 'flutter_gallery_assets',
),
assetDarkColor: const Color(0xFF591946),
textColor: cranePurple700,
studyRoute: crane_routes.defaultRoute,
),
_CarouselCard(
demo: studyDemos['fortnightly'],
asset: const AssetImage(
'assets/studies/fortnightly_card.png',
package: 'flutter_gallery_assets',
),
assetColor: Colors.white,
assetDark: const AssetImage(
'assets/studies/fortnightly_card_dark.png',
package: 'flutter_gallery_assets',
),
assetDarkColor: const Color(0xFF1F1F1F),
studyRoute: fortnightly_routes.defaultRoute,
),
_CarouselCard(
demo: studyDemos['starterApp'],
asset: const AssetImage(
'assets/studies/starter_card.png',
package: 'flutter_gallery_assets',
),
assetColor: const Color(0xFFFAF6FE),
assetDark: const AssetImage(
'assets/studies/starter_card_dark.png',
package: 'flutter_gallery_assets',
),
assetDarkColor: const Color(0xFF3F3D45),
textColor: Colors.black,
studyRoute: starter_app_routes.defaultRoute,
),
];
if (isDesktop) {
// Desktop layout
final desktopCategoryItems = <_DesktopCategoryItem>[
_DesktopCategoryItem(
category: GalleryDemoCategory.material,
asset: const AssetImage(
'assets/icons/material/material.png',
package: 'flutter_gallery_assets',
),
demos: Demos.materialDemos(localizations),
),
_DesktopCategoryItem(
category: GalleryDemoCategory.cupertino,
asset: const AssetImage(
'assets/icons/cupertino/cupertino.png',
package: 'flutter_gallery_assets',
),
demos: Demos.cupertinoDemos(localizations),
),
_DesktopCategoryItem(
category: GalleryDemoCategory.other,
asset: const AssetImage(
'assets/icons/reference/reference.png',
package: 'flutter_gallery_assets',
),
demos: Demos.otherDemos(localizations),
),
];
return Scaffold(
body: ListView(
// Makes integration tests possible.
key: const ValueKey('HomeListView'),
primary: true,
padding: const EdgeInsetsDirectional.only(
top: firstHeaderDesktopTopPadding,
),
children: [
_DesktopHomeItem(child: _GalleryHeader()),
_DesktopCarousel(
height: _carouselHeight(0.7, context),
children: carouselCards,
),
_DesktopHomeItem(child: _CategoriesHeader()),
SizedBox(
height: 585,
child: _DesktopHomeItem(
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: spaceBetween(28, desktopCategoryItems),
),
),
),
const SizedBox(height: 81),
_DesktopHomeItem(
child: Row(
children: [
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () async {
final url = Uri.parse('https://flutter.dev');
if (await canLaunchUrl(url)) {
await launchUrl(url);
}
},
excludeFromSemantics: true,
child: FadeInImage(
image: Theme.of(context).colorScheme.brightness ==
Brightness.dark
? const AssetImage(
'assets/logo/flutter_logo.png',
package: 'flutter_gallery_assets',
)
: const AssetImage(
'assets/logo/flutter_logo_color.png',
package: 'flutter_gallery_assets',
),
placeholder: MemoryImage(kTransparentImage),
fadeInDuration: entranceAnimationDuration,
),
),
),
const Expanded(
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
alignment: WrapAlignment.end,
children: [
SettingsAbout(),
SettingsFeedback(),
SettingsAttribution(),
],
),
),
],
),
),
const SizedBox(height: 109),
],
),
);
} else {
// Mobile layout
return Scaffold(
body: _AnimatedHomePage(
restorationId: 'animated_page',
isSplashPageAnimationFinished:
SplashPageAnimation.of(context)!.isFinished,
carouselCards: carouselCards,
),
);
}
}
List<Widget> spaceBetween(double paddingBetween, List<Widget> children) {
return [
for (int index = 0; index < children.length; index++) ...[
Flexible(
child: children[index],
),
if (index < children.length - 1) SizedBox(width: paddingBetween),
],
];
}
}
class _GalleryHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Header(
color: Theme.of(context).colorScheme.primaryContainer,
text: GalleryLocalizations.of(context)!.homeHeaderGallery,
);
}
}
class _CategoriesHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Header(
color: Theme.of(context).colorScheme.primary,
text: GalleryLocalizations.of(context)!.homeHeaderCategories,
);
}
}
class Header extends StatelessWidget {
const Header({super.key, required this.color, required this.text});
final Color color;
final String text;
@override
Widget build(BuildContext context) {
return Align(
alignment: AlignmentDirectional.centerStart,
child: Padding(
padding: EdgeInsets.only(
top: isDisplayDesktop(context) ? 63 : 15,
bottom: isDisplayDesktop(context) ? 21 : 11,
),
child: SelectableText(
text,
style: Theme.of(context).textTheme.headlineMedium!.apply(
color: color,
fontSizeDelta:
isDisplayDesktop(context) ? desktopDisplay1FontDelta : 0,
),
),
),
);
}
}
class _AnimatedHomePage extends StatefulWidget {
const _AnimatedHomePage({
required this.restorationId,
required this.carouselCards,
required this.isSplashPageAnimationFinished,
});
final String restorationId;
final List<Widget> carouselCards;
final bool isSplashPageAnimationFinished;
@override
_AnimatedHomePageState createState() => _AnimatedHomePageState();
}
class _AnimatedHomePageState extends State<_AnimatedHomePage>
with RestorationMixin, SingleTickerProviderStateMixin {
late AnimationController _animationController;
Timer? _launchTimer;
final RestorableBool _isMaterialListExpanded = RestorableBool(false);
final RestorableBool _isCupertinoListExpanded = RestorableBool(false);
final RestorableBool _isOtherListExpanded = RestorableBool(false);
@override
String get restorationId => widget.restorationId;
@override
void restoreState(RestorationBucket? oldBucket, bool initialRestore) {
registerForRestoration(_isMaterialListExpanded, 'material_list');
registerForRestoration(_isCupertinoListExpanded, 'cupertino_list');
registerForRestoration(_isOtherListExpanded, 'other_list');
}
@override
void initState() {
super.initState();
_animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 800),
);
if (widget.isSplashPageAnimationFinished) {
// To avoid the animation from running when changing the window size from
// desktop to mobile, we do not animate our widget if the
// splash page animation is finished on initState.
_animationController.value = 1.0;
} else {
// Start our animation halfway through the splash page animation.
_launchTimer = Timer(
halfSplashPageAnimationDuration,
() {
_animationController.forward();
},
);
}
}
@override
void dispose() {
_animationController.dispose();
_launchTimer?.cancel();
_launchTimer = null;
_isMaterialListExpanded.dispose();
_isCupertinoListExpanded.dispose();
_isOtherListExpanded.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
final isTestMode = GalleryOptions.of(context).isTestMode;
return Stack(
children: [
ListView(
// Makes integration tests possible.
key: const ValueKey('HomeListView'),
primary: true,
restorationId: 'home_list_view',
children: [
const SizedBox(height: 8),
Container(
margin:
const EdgeInsets.symmetric(horizontal: _horizontalPadding),
child: _GalleryHeader(),
),
_MobileCarousel(
animationController: _animationController,
restorationId: 'home_carousel',
children: widget.carouselCards,
),
Container(
margin:
const EdgeInsets.symmetric(horizontal: _horizontalPadding),
child: _CategoriesHeader(),
),
_AnimatedCategoryItem(
startDelayFraction: 0.00,
controller: _animationController,
child: CategoryListItem(
key: const PageStorageKey<GalleryDemoCategory>(
GalleryDemoCategory.material,
),
restorationId: 'home_material_category_list',
category: GalleryDemoCategory.material,
imageString: 'assets/icons/material/material.png',
demos: Demos.materialDemos(localizations),
initiallyExpanded:
_isMaterialListExpanded.value || isTestMode,
onTap: (shouldOpenList) {
_isMaterialListExpanded.value = shouldOpenList;
}),
),
_AnimatedCategoryItem(
startDelayFraction: 0.05,
controller: _animationController,
child: CategoryListItem(
key: const PageStorageKey<GalleryDemoCategory>(
GalleryDemoCategory.cupertino,
),
restorationId: 'home_cupertino_category_list',
category: GalleryDemoCategory.cupertino,
imageString: 'assets/icons/cupertino/cupertino.png',
demos: Demos.cupertinoDemos(localizations),
initiallyExpanded:
_isCupertinoListExpanded.value || isTestMode,
onTap: (shouldOpenList) {
_isCupertinoListExpanded.value = shouldOpenList;
}),
),
_AnimatedCategoryItem(
startDelayFraction: 0.10,
controller: _animationController,
child: CategoryListItem(
key: const PageStorageKey<GalleryDemoCategory>(
GalleryDemoCategory.other,
),
restorationId: 'home_other_category_list',
category: GalleryDemoCategory.other,
imageString: 'assets/icons/reference/reference.png',
demos: Demos.otherDemos(localizations),
initiallyExpanded: _isOtherListExpanded.value || isTestMode,
onTap: (shouldOpenList) {
_isOtherListExpanded.value = shouldOpenList;
}),
),
],
),
Align(
alignment: Alignment.topCenter,
child: GestureDetector(
onVerticalDragEnd: (details) {
if (details.velocity.pixelsPerSecond.dy > 200) {
ToggleSplashNotification().dispatch(context);
}
},
child: SafeArea(
child: Container(
height: 40,
// If we don't set the color, gestures are not detected.
color: Colors.transparent,
),
),
),
),
],
);
}
}
class _DesktopHomeItem extends StatelessWidget {
const _DesktopHomeItem({required this.child});
final Widget child;
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.center,
child: Container(
constraints: const BoxConstraints(maxWidth: maxHomeItemWidth),
padding: const EdgeInsets.symmetric(
horizontal: _horizontalDesktopPadding,
),
child: child,
),
);
}
}
class _DesktopCategoryItem extends StatelessWidget {
const _DesktopCategoryItem({
required this.category,
required this.asset,
required this.demos,
});
final GalleryDemoCategory category;
final ImageProvider asset;
final List<GalleryDemo> demos;
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
return Material(
borderRadius: BorderRadius.circular(10),
clipBehavior: Clip.antiAlias,
color: colorScheme.surface,
child: Semantics(
container: true,
child: FocusTraversalGroup(
policy: WidgetOrderTraversalPolicy(),
child: Column(
children: [
_DesktopCategoryHeader(
category: category,
asset: asset,
),
Divider(
height: 2,
thickness: 2,
color: colorScheme.background,
),
Flexible(
child: ListView.builder(
// Makes integration tests possible.
key: ValueKey('${category.name}DemoList'),
primary: false,
itemBuilder: (context, index) =>
CategoryDemoItem(demo: demos[index]),
itemCount: demos.length,
),
),
],
),
),
),
);
}
}
class _DesktopCategoryHeader extends StatelessWidget {
const _DesktopCategoryHeader({
required this.category,
required this.asset,
});
final GalleryDemoCategory category;
final ImageProvider asset;
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
return Material(
// Makes integration tests possible.
key: ValueKey('${category.name}CategoryHeader'),
color: colorScheme.onBackground,
child: Row(
children: [
Padding(
padding: const EdgeInsets.all(10),
child: FadeInImage(
image: asset,
placeholder: MemoryImage(kTransparentImage),
fadeInDuration: entranceAnimationDuration,
width: 64,
height: 64,
excludeFromSemantics: true,
),
),
Flexible(
child: Padding(
padding: const EdgeInsetsDirectional.only(start: 8),
child: Semantics(
header: true,
child: SelectableText(
category.displayTitle(GalleryLocalizations.of(context)!)!,
style: Theme.of(context).textTheme.headlineSmall!.apply(
color: colorScheme.onSurface,
),
),
),
),
),
],
),
);
}
}
/// Animates the category item to stagger in. The [_AnimatedCategoryItem.startDelayFraction]
/// gives a delay in the unit of a fraction of the whole animation duration,
/// which is defined in [_AnimatedHomePageState].
class _AnimatedCategoryItem extends StatelessWidget {
_AnimatedCategoryItem({
required double startDelayFraction,
required this.controller,
required this.child,
}) : topPaddingAnimation = Tween(
begin: 60.0,
end: 0.0,
).animate(
CurvedAnimation(
parent: controller,
curve: Interval(
0.000 + startDelayFraction,
0.400 + startDelayFraction,
curve: Curves.ease,
),
),
);
final Widget child;
final AnimationController controller;
final Animation<double> topPaddingAnimation;
@override
Widget build(BuildContext context) {
return AnimatedBuilder(
animation: controller,
builder: (context, child) {
return Padding(
padding: EdgeInsets.only(top: topPaddingAnimation.value),
child: child,
);
},
child: child,
);
}
}
/// Animates the carousel to come in from the right.
class _AnimatedCarousel extends StatelessWidget {
_AnimatedCarousel({
required this.child,
required this.controller,
}) : startPositionAnimation = Tween(
begin: 1.0,
end: 0.0,
).animate(
CurvedAnimation(
parent: controller,
curve: const Interval(
0.200,
0.800,
curve: Curves.ease,
),
),
);
final Widget child;
final AnimationController controller;
final Animation<double> startPositionAnimation;
@override
Widget build(BuildContext context) {
return LayoutBuilder(builder: (context, constraints) {
return Stack(
children: [
SizedBox(height: _carouselHeight(.4, context)),
AnimatedBuilder(
animation: controller,
builder: (context, child) {
return PositionedDirectional(
start: constraints.maxWidth * startPositionAnimation.value,
child: child!,
);
},
child: SizedBox(
height: _carouselHeight(.4, context),
width: constraints.maxWidth,
child: child,
),
),
],
);
});
}
}
/// Animates a carousel card to come in from the right.
class _AnimatedCarouselCard extends StatelessWidget {
_AnimatedCarouselCard({
required this.child,
required this.controller,
}) : startPaddingAnimation = Tween(
begin: _horizontalPadding,
end: 0.0,
).animate(
CurvedAnimation(
parent: controller,
curve: const Interval(
0.900,
1.000,
curve: Curves.ease,
),
),
);
final Widget child;
final AnimationController controller;
final Animation<double> startPaddingAnimation;
@override
Widget build(BuildContext context) {
return AnimatedBuilder(
animation: controller,
builder: (context, child) {
return Padding(
padding: EdgeInsetsDirectional.only(
start: startPaddingAnimation.value,
),
child: child,
);
},
child: child,
);
}
}
class _MobileCarousel extends StatefulWidget {
const _MobileCarousel({
required this.animationController,
this.restorationId,
required this.children,
});
final AnimationController animationController;
final String? restorationId;
final List<Widget> children;
@override
_MobileCarouselState createState() => _MobileCarouselState();
}
class _MobileCarouselState extends State<_MobileCarousel>
with RestorationMixin, SingleTickerProviderStateMixin {
late PageController _controller;
final RestorableInt _currentPage = RestorableInt(0);
@override
String? get restorationId => widget.restorationId;
@override
void restoreState(RestorationBucket? oldBucket, bool initialRestore) {
registerForRestoration(_currentPage, 'carousel_page');
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
// The viewPortFraction is calculated as the width of the device minus the
// padding.
final width = MediaQuery.of(context).size.width;
const padding = (_carouselItemMobileMargin * 2);
_controller = PageController(
initialPage: _currentPage.value,
viewportFraction: (_carouselItemWidth + padding) / width,
);
}
@override
void dispose() {
_controller.dispose();
_currentPage.dispose();
super.dispose();
}
Widget builder(int index) {
final carouselCard = AnimatedBuilder(
animation: _controller,
builder: (context, child) {
double value;
if (_controller.position.haveDimensions) {
value = _controller.page! - index;
} else {
// If haveDimensions is false, use _currentPage to calculate value.
value = (_currentPage.value - index).toDouble();
}
// .3 is an approximation of the curve used in the design.
value = (1 - (value.abs() * .3)).clamp(0, 1).toDouble();
value = Curves.easeOut.transform(value);
return Transform.scale(
scale: value,
alignment: Alignment.center,
child: child,
);
},
child: widget.children[index],
);
// We only want the second card to be animated.
if (index == 1) {
return _AnimatedCarouselCard(
controller: widget.animationController,
child: carouselCard,
);
} else {
return carouselCard;
}
}
@override
Widget build(BuildContext context) {
return _AnimatedCarousel(
controller: widget.animationController,
child: PageView.builder(
// Makes integration tests possible.
key: const ValueKey('studyDemoList'),
onPageChanged: (value) {
setState(() {
_currentPage.value = value;
});
},
controller: _controller,
pageSnapping: false,
itemCount: widget.children.length,
itemBuilder: (context, index) => builder(index),
allowImplicitScrolling: true,
),
);
}
}
/// This creates a horizontally scrolling [ListView] of items.
///
/// This class uses a [ListView] with a custom [ScrollPhysics] to enable
/// snapping behavior. A [PageView] was considered but does not allow for
/// multiple pages visible without centering the first page.
class _DesktopCarousel extends StatefulWidget {
const _DesktopCarousel({required this.height, required this.children});
final double height;
final List<Widget> children;
@override
_DesktopCarouselState createState() => _DesktopCarouselState();
}
class _DesktopCarouselState extends State<_DesktopCarousel> {
late ScrollController _controller;
@override
void initState() {
super.initState();
_controller = ScrollController();
_controller.addListener(() {
setState(() {});
});
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
var showPreviousButton = false;
var showNextButton = true;
// Only check this after the _controller has been attached to the ListView.
if (_controller.hasClients) {
showPreviousButton = _controller.offset > 0;
showNextButton =
_controller.offset < _controller.position.maxScrollExtent;
}
final isDesktop = isDisplayDesktop(context);
return Align(
alignment: Alignment.center,
child: Container(
height: widget.height,
constraints: const BoxConstraints(maxWidth: maxHomeItemWidth),
child: Stack(
children: [
ListView.builder(
padding: EdgeInsets.symmetric(
horizontal: isDesktop
? _horizontalDesktopPadding - _carouselItemDesktopMargin
: _horizontalPadding - _carouselItemMobileMargin,
),
scrollDirection: Axis.horizontal,
primary: false,
physics: const _SnappingScrollPhysics(),
controller: _controller,
itemExtent: _carouselItemWidth,
itemCount: widget.children.length,
itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: widget.children[index],
),
),
if (showPreviousButton)
_DesktopPageButton(
onTap: () {
_controller.animateTo(
_controller.offset - _carouselItemWidth,
duration: const Duration(milliseconds: 200),
curve: Curves.easeInOut,
);
},
),
if (showNextButton)
_DesktopPageButton(
isEnd: true,
onTap: () {
_controller.animateTo(
_controller.offset + _carouselItemWidth,
duration: const Duration(milliseconds: 200),
curve: Curves.easeInOut,
);
},
),
],
),
),
);
}
}
/// Scrolling physics that snaps to the new item in the [_DesktopCarousel].
class _SnappingScrollPhysics extends ScrollPhysics {
const _SnappingScrollPhysics({super.parent});
@override
_SnappingScrollPhysics applyTo(ScrollPhysics? ancestor) {
return _SnappingScrollPhysics(parent: buildParent(ancestor));
}
double _getTargetPixels(
ScrollMetrics position,
Tolerance tolerance,
double velocity,
) {
final itemWidth = position.viewportDimension / 4;
var item = position.pixels / itemWidth;
if (velocity < -tolerance.velocity) {
item -= 0.5;
} else if (velocity > tolerance.velocity) {
item += 0.5;
}
return math.min(
item.roundToDouble() * itemWidth,
position.maxScrollExtent,
);
}
@override
Simulation? createBallisticSimulation(
ScrollMetrics position,
double velocity,
) {
if ((velocity <= 0.0 && position.pixels <= position.minScrollExtent) ||
(velocity >= 0.0 && position.pixels >= position.maxScrollExtent)) {
return super.createBallisticSimulation(position, velocity);
}
final tolerance = toleranceFor(position);
final target = _getTargetPixels(position, tolerance, velocity);
if (target != position.pixels) {
return ScrollSpringSimulation(
spring,
position.pixels,
target,
velocity,
tolerance: tolerance,
);
}
return null;
}
@override
bool get allowImplicitScrolling => true;
}
class _DesktopPageButton extends StatelessWidget {
const _DesktopPageButton({
this.isEnd = false,
this.onTap,
});
final bool isEnd;
final GestureTapCallback? onTap;
@override
Widget build(BuildContext context) {
const buttonSize = 58.0;
const padding = _horizontalDesktopPadding - buttonSize / 2;
return ExcludeSemantics(
child: Align(
alignment: isEnd
? AlignmentDirectional.centerEnd
: AlignmentDirectional.centerStart,
child: Container(
width: buttonSize,
height: buttonSize,
margin: EdgeInsetsDirectional.only(
start: isEnd ? 0 : padding,
end: isEnd ? padding : 0,
),
child: Tooltip(
message: isEnd
? MaterialLocalizations.of(context).nextPageTooltip
: MaterialLocalizations.of(context).previousPageTooltip,
child: Material(
color: Colors.black.withOpacity(0.5),
shape: const CircleBorder(),
clipBehavior: Clip.antiAlias,
child: InkWell(
onTap: onTap,
child: Icon(
isEnd ? Icons.arrow_forward_ios : Icons.arrow_back_ios,
color: Colors.white,
),
),
),
),
),
),
);
}
}
class _CarouselCard extends StatelessWidget {
const _CarouselCard({
required this.demo,
this.asset,
this.assetDark,
this.assetColor,
this.assetDarkColor,
this.textColor,
required this.studyRoute,
});
final GalleryDemo? demo;
final ImageProvider? asset;
final ImageProvider? assetDark;
final Color? assetColor;
final Color? assetDarkColor;
final Color? textColor;
final String studyRoute;
@override
Widget build(BuildContext context) {
final textTheme = Theme.of(context).textTheme;
final isDark = Theme.of(context).colorScheme.brightness == Brightness.dark;
final asset = isDark ? assetDark : this.asset;
final assetColor = isDark ? assetDarkColor : this.assetColor;
final textColor = isDark ? Colors.white.withOpacity(0.87) : this.textColor;
final isDesktop = isDisplayDesktop(context);
return Container(
padding: EdgeInsets.symmetric(
horizontal: isDesktop
? _carouselItemDesktopMargin
: _carouselItemMobileMargin),
margin: const EdgeInsets.symmetric(vertical: 16.0),
height: _carouselHeight(0.7, context),
width: _carouselItemWidth,
child: Material(
// Makes integration tests possible.
key: ValueKey(demo!.describe),
color: assetColor,
elevation: 4,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
clipBehavior: Clip.antiAlias,
child: Stack(
fit: StackFit.expand,
children: [
if (asset != null)
FadeInImage(
image: asset,
placeholder: MemoryImage(kTransparentImage),
fit: BoxFit.cover,
height: _carouselHeightMin,
fadeInDuration: entranceAnimationDuration,
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16, 0, 16, 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
demo!.title,
style: textTheme.bodySmall!.apply(color: textColor),
maxLines: 3,
overflow: TextOverflow.visible,
),
Text(
demo!.subtitle,
style: textTheme.labelSmall!.apply(color: textColor),
maxLines: 5,
overflow: TextOverflow.visible,
),
],
),
),
Positioned.fill(
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
Navigator.of(context)
.popUntil((route) => route.settings.name == '/');
Navigator.of(context).restorablePushNamed(studyRoute);
},
),
),
),
],
),
),
);
}
}
double _carouselHeight(double scaleFactor, BuildContext context) => math.max(
_carouselHeightMin *
GalleryOptions.of(context).textScaleFactor(context) *
scaleFactor,
_carouselHeightMin);
/// Wrap the studies with this to display a back button and allow the user to
/// exit them at any time.
class StudyWrapper extends StatefulWidget {
const StudyWrapper({
super.key,
required this.study,
this.alignment = AlignmentDirectional.bottomStart,
this.hasBottomNavBar = false,
});
final Widget study;
final bool hasBottomNavBar;
final AlignmentDirectional alignment;
@override
State<StudyWrapper> createState() => _StudyWrapperState();
}
class _StudyWrapperState extends State<StudyWrapper> {
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
final textTheme = Theme.of(context).textTheme;
return ApplyTextOptions(
child: Stack(
children: [
Semantics(
sortKey: const OrdinalSortKey(1),
child: RestorationScope(
restorationId: 'study_wrapper',
child: widget.study,
),
),
if (!isDisplayFoldable(context))
SafeArea(
child: Align(
alignment: widget.alignment,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.0,
vertical: widget.hasBottomNavBar
? kBottomNavigationBarHeight + 16.0
: 16.0),
child: Semantics(
sortKey: const OrdinalSortKey(0),
label: GalleryLocalizations.of(context)!.backToGallery,
button: true,
enabled: true,
excludeSemantics: true,
child: FloatingActionButton.extended(
heroTag: _BackButtonHeroTag(),
key: const ValueKey('Back'),
onPressed: () {
Navigator.of(context)
.popUntil((route) => route.settings.name == '/');
},
icon: IconTheme(
data: IconThemeData(color: colorScheme.onPrimary),
child: const BackButtonIcon(),
),
label: Text(
MaterialLocalizations.of(context).backButtonTooltip,
style: textTheme.labelLarge!
.apply(color: colorScheme.onPrimary),
),
),
),
),
),
),
],
),
);
}
}
class _BackButtonHeroTag {}
| gallery/lib/pages/home.dart/0 | {'file_path': 'gallery/lib/pages/home.dart', 'repo_id': 'gallery', 'token_count': 17833} |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
import 'package:gallery/studies/crane/model/destination.dart';
List<FlyDestination> getFlyDestinations(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return <FlyDestination>[
FlyDestination(
id: 0,
destination: localizations.craneFly0,
stops: 1,
duration: const Duration(hours: 6, minutes: 15),
assetSemanticLabel: localizations.craneFly0SemanticLabel,
imageAspectRatio: 400 / 400,
),
FlyDestination(
id: 1,
destination: localizations.craneFly1,
stops: 0,
duration: const Duration(hours: 13, minutes: 30),
assetSemanticLabel: localizations.craneFly1SemanticLabel,
imageAspectRatio: 400 / 410,
),
FlyDestination(
id: 2,
destination: localizations.craneFly2,
stops: 0,
duration: const Duration(hours: 5, minutes: 16),
assetSemanticLabel: localizations.craneFly2SemanticLabel,
imageAspectRatio: 400 / 394,
),
FlyDestination(
id: 3,
destination: localizations.craneFly3,
stops: 2,
duration: const Duration(hours: 19, minutes: 40),
assetSemanticLabel: localizations.craneFly3SemanticLabel,
imageAspectRatio: 400 / 377,
),
FlyDestination(
id: 4,
destination: localizations.craneFly4,
stops: 0,
duration: const Duration(hours: 8, minutes: 24),
assetSemanticLabel: localizations.craneFly4SemanticLabel,
imageAspectRatio: 400 / 308,
),
FlyDestination(
id: 5,
destination: localizations.craneFly5,
stops: 1,
duration: const Duration(hours: 14, minutes: 12),
assetSemanticLabel: localizations.craneFly5SemanticLabel,
imageAspectRatio: 400 / 418,
),
FlyDestination(
id: 6,
destination: localizations.craneFly6,
stops: 0,
duration: const Duration(hours: 5, minutes: 24),
assetSemanticLabel: localizations.craneFly6SemanticLabel,
imageAspectRatio: 400 / 345,
),
FlyDestination(
id: 7,
destination: localizations.craneFly7,
stops: 1,
duration: const Duration(hours: 5, minutes: 43),
assetSemanticLabel: localizations.craneFly7SemanticLabel,
imageAspectRatio: 400 / 408,
),
FlyDestination(
id: 8,
destination: localizations.craneFly8,
stops: 0,
duration: const Duration(hours: 8, minutes: 25),
assetSemanticLabel: localizations.craneFly8SemanticLabel,
imageAspectRatio: 400 / 399,
),
FlyDestination(
id: 9,
destination: localizations.craneFly9,
stops: 1,
duration: const Duration(hours: 15, minutes: 52),
assetSemanticLabel: localizations.craneFly9SemanticLabel,
imageAspectRatio: 400 / 379,
),
FlyDestination(
id: 10,
destination: localizations.craneFly10,
stops: 0,
duration: const Duration(hours: 5, minutes: 57),
assetSemanticLabel: localizations.craneFly10SemanticLabel,
imageAspectRatio: 400 / 307,
),
FlyDestination(
id: 11,
destination: localizations.craneFly11,
stops: 1,
duration: const Duration(hours: 13, minutes: 24),
assetSemanticLabel: localizations.craneFly11SemanticLabel,
imageAspectRatio: 400 / 369,
),
FlyDestination(
id: 12,
destination: localizations.craneFly12,
stops: 2,
duration: const Duration(hours: 10, minutes: 20),
assetSemanticLabel: localizations.craneFly12SemanticLabel,
imageAspectRatio: 400 / 394,
),
FlyDestination(
id: 13,
destination: localizations.craneFly13,
stops: 0,
duration: const Duration(hours: 7, minutes: 15),
assetSemanticLabel: localizations.craneFly13SemanticLabel,
imageAspectRatio: 400 / 433,
),
];
}
List<SleepDestination> getSleepDestinations(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return <SleepDestination>[
SleepDestination(
id: 0,
destination: localizations.craneSleep0,
total: 2241,
assetSemanticLabel: localizations.craneSleep0SemanticLabel,
imageAspectRatio: 400 / 308,
),
SleepDestination(
id: 1,
destination: localizations.craneSleep1,
total: 876,
assetSemanticLabel: localizations.craneSleep1SemanticLabel,
),
SleepDestination(
id: 2,
destination: localizations.craneSleep2,
total: 1286,
assetSemanticLabel: localizations.craneSleep2SemanticLabel,
imageAspectRatio: 400 / 377,
),
SleepDestination(
id: 3,
destination: localizations.craneSleep3,
total: 496,
assetSemanticLabel: localizations.craneSleep3SemanticLabel,
imageAspectRatio: 400 / 379,
),
SleepDestination(
id: 4,
destination: localizations.craneSleep4,
total: 390,
assetSemanticLabel: localizations.craneSleep4SemanticLabel,
imageAspectRatio: 400 / 418,
),
SleepDestination(
id: 5,
destination: localizations.craneSleep5,
total: 876,
assetSemanticLabel: localizations.craneSleep5SemanticLabel,
imageAspectRatio: 400 / 410,
),
SleepDestination(
id: 6,
destination: localizations.craneSleep6,
total: 989,
assetSemanticLabel: localizations.craneSleep6SemanticLabel,
imageAspectRatio: 400 / 394,
),
SleepDestination(
id: 7,
destination: localizations.craneSleep7,
total: 306,
assetSemanticLabel: localizations.craneSleep7SemanticLabel,
imageAspectRatio: 400 / 266,
),
SleepDestination(
id: 8,
destination: localizations.craneSleep8,
total: 385,
assetSemanticLabel: localizations.craneSleep8SemanticLabel,
imageAspectRatio: 400 / 376,
),
SleepDestination(
id: 9,
destination: localizations.craneSleep9,
total: 989,
assetSemanticLabel: localizations.craneSleep9SemanticLabel,
imageAspectRatio: 400 / 369,
),
SleepDestination(
id: 10,
destination: localizations.craneSleep10,
total: 1380,
assetSemanticLabel: localizations.craneSleep10SemanticLabel,
imageAspectRatio: 400 / 307,
),
SleepDestination(
id: 11,
destination: localizations.craneSleep11,
total: 1109,
assetSemanticLabel: localizations.craneSleep11SemanticLabel,
imageAspectRatio: 400 / 456,
),
];
}
List<EatDestination> getEatDestinations(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return <EatDestination>[
EatDestination(
id: 0,
destination: localizations.craneEat0,
total: 354,
assetSemanticLabel: localizations.craneEat0SemanticLabel,
imageAspectRatio: 400 / 444,
),
EatDestination(
id: 1,
destination: localizations.craneEat1,
total: 623,
assetSemanticLabel: localizations.craneEat1SemanticLabel,
imageAspectRatio: 400 / 340,
),
EatDestination(
id: 2,
destination: localizations.craneEat2,
total: 124,
assetSemanticLabel: localizations.craneEat2SemanticLabel,
imageAspectRatio: 400 / 406,
),
EatDestination(
id: 3,
destination: localizations.craneEat3,
total: 495,
assetSemanticLabel: localizations.craneEat3SemanticLabel,
imageAspectRatio: 400 / 323,
),
EatDestination(
id: 4,
destination: localizations.craneEat4,
total: 683,
assetSemanticLabel: localizations.craneEat4SemanticLabel,
imageAspectRatio: 400 / 404,
),
EatDestination(
id: 5,
destination: localizations.craneEat5,
total: 786,
assetSemanticLabel: localizations.craneEat5SemanticLabel,
imageAspectRatio: 400 / 407,
),
EatDestination(
id: 6,
destination: localizations.craneEat6,
total: 323,
assetSemanticLabel: localizations.craneEat6SemanticLabel,
imageAspectRatio: 400 / 431,
),
EatDestination(
id: 7,
destination: localizations.craneEat7,
total: 285,
assetSemanticLabel: localizations.craneEat7SemanticLabel,
imageAspectRatio: 400 / 422,
),
EatDestination(
id: 8,
destination: localizations.craneEat8,
total: 323,
assetSemanticLabel: localizations.craneEat8SemanticLabel,
imageAspectRatio: 400 / 300,
),
EatDestination(
id: 9,
destination: localizations.craneEat9,
total: 1406,
assetSemanticLabel: localizations.craneEat9SemanticLabel,
imageAspectRatio: 400 / 451,
),
EatDestination(
id: 10,
destination: localizations.craneEat10,
total: 849,
assetSemanticLabel: localizations.craneEat10SemanticLabel,
imageAspectRatio: 400 / 266,
),
];
}
| gallery/lib/studies/crane/model/data.dart/0 | {'file_path': 'gallery/lib/studies/crane/model/data.dart', 'repo_id': 'gallery', 'token_count': 3727} |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:gallery/data/gallery_options.dart';
import 'package:intl/intl.dart';
/// Get the locale string for the context.
String locale(BuildContext context) =>
GalleryOptions.of(context).locale.toString();
/// Currency formatter for USD.
NumberFormat usdWithSignFormat(BuildContext context, {int decimalDigits = 2}) {
return NumberFormat.currency(
locale: locale(context),
name: '\$',
decimalDigits: decimalDigits,
);
}
/// Percent formatter with two decimal points.
NumberFormat percentFormat(BuildContext context, {int decimalDigits = 2}) {
return NumberFormat.decimalPercentPattern(
locale: locale(context),
decimalDigits: decimalDigits,
);
}
/// Date formatter with year / number month / day.
DateFormat shortDateFormat(BuildContext context) =>
DateFormat.yMd(locale(context));
/// Date formatter with year / month / day.
DateFormat longDateFormat(BuildContext context) =>
DateFormat.yMMMMd(locale(context));
/// Date formatter with abbreviated month and day.
DateFormat dateFormatAbbreviatedMonthDay(BuildContext context) =>
DateFormat.MMMd(locale(context));
/// Date formatter with year and abbreviated month.
DateFormat dateFormatMonthYear(BuildContext context) =>
DateFormat.yMMM(locale(context));
| gallery/lib/studies/rally/formatters.dart/0 | {'file_path': 'gallery/lib/studies/rally/formatters.dart', 'repo_id': 'gallery', 'token_count': 438} |
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:gallery/studies/reply/model/email_model.dart';
import 'package:gallery/studies/reply/model/email_store.dart';
import 'package:gallery/studies/reply/profile_avatar.dart';
import 'package:provider/provider.dart';
class MailViewPage extends StatelessWidget {
const MailViewPage({
super.key,
required this.id,
required this.email,
});
final int id;
final Email email;
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
bottom: false,
child: SizedBox(
height: double.infinity,
child: Material(
color: Theme.of(context).cardColor,
child: SingleChildScrollView(
padding: const EdgeInsetsDirectional.only(
top: 42,
start: 20,
end: 20,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_MailViewHeader(email: email),
const SizedBox(height: 32),
_MailViewBody(message: email.message),
if (email.containsPictures) ...[
const SizedBox(height: 28),
const _PictureGrid(),
],
const SizedBox(height: kToolbarHeight),
],
),
),
),
),
),
);
}
}
class _MailViewHeader extends StatelessWidget {
const _MailViewHeader({required this.email});
final Email email;
@override
Widget build(BuildContext context) {
final textTheme = Theme.of(context).textTheme;
return Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: SelectableText(
email.subject,
style: textTheme.headlineMedium!.copyWith(height: 1.1),
),
),
IconButton(
key: const ValueKey('ReplyExit'),
icon: const Icon(Icons.keyboard_arrow_down),
onPressed: () {
Provider.of<EmailStore>(
context,
listen: false,
).selectedEmailId = -1;
Navigator.pop(context);
},
splashRadius: 20,
),
],
),
const SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SelectableText('${email.sender} - ${email.time}'),
const SizedBox(height: 4),
SelectableText(
'To ${email.recipients},',
style: textTheme.bodySmall!.copyWith(
color: Theme.of(context)
.navigationRailTheme
.unselectedLabelTextStyle!
.color,
),
),
],
),
Padding(
padding: const EdgeInsetsDirectional.only(end: 4),
child: ProfileAvatar(avatar: email.avatar),
),
],
),
],
);
}
}
class _MailViewBody extends StatelessWidget {
const _MailViewBody({required this.message});
final String message;
@override
Widget build(BuildContext context) {
return SelectableText(
message,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(fontSize: 16),
);
}
}
class _PictureGrid extends StatelessWidget {
const _PictureGrid();
bool _shouldShrinkImage() {
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
case TargetPlatform.android:
return true;
default:
return false;
}
}
@override
Widget build(BuildContext context) {
return GridView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 4,
mainAxisSpacing: 4,
),
itemCount: 4,
itemBuilder: (context, index) {
return Image.asset(
'reply/attachments/paris_${index + 1}.jpg',
gaplessPlayback: true,
package: 'flutter_gallery_assets',
fit: BoxFit.fill,
cacheWidth: _shouldShrinkImage() ? 500 : null,
);
},
);
}
}
| gallery/lib/studies/reply/mail_view_page.dart/0 | {'file_path': 'gallery/lib/studies/reply/mail_view_page.dart', 'repo_id': 'gallery', 'token_count': 2395} |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
class Category {
const Category({
required this.name,
});
// A function taking a BuildContext as input and
// returns the internationalized name of the category.
final String Function(BuildContext) name;
}
Category categoryAll = Category(
name: (context) => GalleryLocalizations.of(context)!.shrineCategoryNameAll,
);
Category categoryAccessories = Category(
name: (context) =>
GalleryLocalizations.of(context)!.shrineCategoryNameAccessories,
);
Category categoryClothing = Category(
name: (context) =>
GalleryLocalizations.of(context)!.shrineCategoryNameClothing,
);
Category categoryHome = Category(
name: (context) => GalleryLocalizations.of(context)!.shrineCategoryNameHome,
);
List<Category> categories = [
categoryAll,
categoryAccessories,
categoryClothing,
categoryHome,
];
class Product {
const Product({
required this.category,
required this.id,
required this.isFeatured,
required this.name,
required this.price,
this.assetAspectRatio = 1,
});
final Category category;
final int id;
final bool isFeatured;
final double assetAspectRatio;
// A function taking a BuildContext as input and
// returns the internationalized name of the product.
final String Function(BuildContext) name;
final int price;
String get assetName => '$id-0.jpg';
String get assetPackage => 'shrine_images';
}
| gallery/lib/studies/shrine/model/product.dart/0 | {'file_path': 'gallery/lib/studies/shrine/model/product.dart', 'repo_id': 'gallery', 'token_count': 494} |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
import 'package:gallery/layout/adaptive.dart';
const appBarDesktopHeight = 128.0;
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
final textTheme = Theme.of(context).textTheme;
final colorScheme = Theme.of(context).colorScheme;
final isDesktop = isDisplayDesktop(context);
final localizations = GalleryLocalizations.of(context)!;
final body = SafeArea(
child: Padding(
padding: isDesktop
? const EdgeInsets.symmetric(horizontal: 72, vertical: 48)
: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SelectableText(
localizations.starterAppGenericHeadline,
style: textTheme.displaySmall!.copyWith(
color: colorScheme.onSecondary,
),
),
const SizedBox(height: 10),
SelectableText(
localizations.starterAppGenericSubtitle,
style: textTheme.titleMedium,
),
const SizedBox(height: 48),
SelectableText(
localizations.starterAppGenericBody,
style: textTheme.bodyLarge,
),
],
),
),
);
if (isDesktop) {
return Row(
children: [
const ListDrawer(),
const VerticalDivider(width: 1),
Expanded(
child: Scaffold(
appBar: const AdaptiveAppBar(
isDesktop: true,
),
body: body,
floatingActionButton: FloatingActionButton.extended(
heroTag: 'Extended Add',
onPressed: () {},
label: Text(
localizations.starterAppGenericButton,
style: TextStyle(color: colorScheme.onSecondary),
),
icon: Icon(Icons.add, color: colorScheme.onSecondary),
tooltip: localizations.starterAppTooltipAdd,
),
),
),
],
);
} else {
return Scaffold(
appBar: const AdaptiveAppBar(),
body: body,
drawer: const ListDrawer(),
floatingActionButton: FloatingActionButton(
heroTag: 'Add',
onPressed: () {},
tooltip: localizations.starterAppTooltipAdd,
child: Icon(
Icons.add,
color: Theme.of(context).colorScheme.onSecondary,
),
),
);
}
}
}
class AdaptiveAppBar extends StatelessWidget implements PreferredSizeWidget {
const AdaptiveAppBar({
super.key,
this.isDesktop = false,
});
final bool isDesktop;
@override
Size get preferredSize => isDesktop
? const Size.fromHeight(appBarDesktopHeight)
: const Size.fromHeight(kToolbarHeight);
@override
Widget build(BuildContext context) {
final themeData = Theme.of(context);
final localizations = GalleryLocalizations.of(context)!;
return AppBar(
automaticallyImplyLeading: !isDesktop,
title: isDesktop
? null
: SelectableText(localizations.starterAppGenericTitle),
bottom: isDesktop
? PreferredSize(
preferredSize: const Size.fromHeight(26),
child: Container(
alignment: AlignmentDirectional.centerStart,
margin: const EdgeInsetsDirectional.fromSTEB(72, 0, 0, 22),
child: SelectableText(
localizations.starterAppGenericTitle,
style: themeData.textTheme.titleLarge!.copyWith(
color: themeData.colorScheme.onPrimary,
),
),
),
)
: null,
actions: [
IconButton(
icon: const Icon(Icons.share),
tooltip: localizations.starterAppTooltipShare,
onPressed: () {},
),
IconButton(
icon: const Icon(Icons.favorite),
tooltip: localizations.starterAppTooltipFavorite,
onPressed: () {},
),
IconButton(
icon: const Icon(Icons.search),
tooltip: localizations.starterAppTooltipSearch,
onPressed: () {},
),
],
);
}
}
class ListDrawer extends StatefulWidget {
const ListDrawer({super.key});
@override
State<ListDrawer> createState() => _ListDrawerState();
}
class _ListDrawerState extends State<ListDrawer> {
static const numItems = 9;
int selectedItem = 0;
@override
Widget build(BuildContext context) {
final textTheme = Theme.of(context).textTheme;
final localizations = GalleryLocalizations.of(context)!;
return Drawer(
child: SafeArea(
child: ListView(
children: [
ListTile(
title: SelectableText(
localizations.starterAppTitle,
style: textTheme.titleLarge,
),
subtitle: SelectableText(
localizations.starterAppGenericSubtitle,
style: textTheme.bodyMedium,
),
),
const Divider(),
...Iterable<int>.generate(numItems).toList().map((i) {
return ListTile(
enabled: true,
selected: i == selectedItem,
leading: const Icon(Icons.favorite),
title: Text(
localizations.starterAppDrawerItem(i + 1),
),
onTap: () {
setState(() {
selectedItem = i;
});
},
);
}),
],
),
),
);
}
}
| gallery/lib/studies/starter/home.dart/0 | {'file_path': 'gallery/lib/studies/starter/home.dart', 'repo_id': 'gallery', 'token_count': 2921} |
// Copyright 2020 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:collection/collection.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations_en.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:gallery/data/demos.dart';
bool _isUnique(List<String> list) {
final covered = <String>{};
for (final element in list) {
if (covered.contains(element)) {
return false;
} else {
covered.add(element);
}
}
return true;
}
const _stringListEquality = ListEquality<String>();
void main() {
test('_isUnique works correctly', () {
expect(_isUnique(['a', 'b', 'c']), true);
expect(_isUnique(['a', 'c', 'a', 'b']), false);
expect(_isUnique(['a']), true);
expect(_isUnique([]), true);
});
test('Demo descriptions are unique and correct', () {
final allDemos = Demos.all(GalleryLocalizationsEn());
final allDemoDescriptions = allDemos.map((d) => d.describe).toList();
expect(_isUnique(allDemoDescriptions), true);
expect(
_stringListEquality.equals(
allDemoDescriptions,
Demos.allDescriptions(),
),
true,
);
});
test('Special demo descriptions are correct', () {
final allDemos = Demos.allDescriptions();
final specialDemos = <String>[
'shrine@study',
'rally@study',
'crane@study',
'fortnightly@study',
'bottom-navigation@material',
'button@material',
'card@material',
'chip@material',
'dialog@material',
'pickers@material',
'cupertino-alerts@cupertino',
'colors@other',
'progress-indicator@material',
'cupertino-activity-indicator@cupertino',
'colors@other',
];
for (final specialDemo in specialDemos) {
expect(allDemos.contains(specialDemo), true);
}
});
}
| gallery/test/demo_descriptions_test.dart/0 | {'file_path': 'gallery/test/demo_descriptions_test.dart', 'repo_id': 'gallery', 'token_count': 758} |
// Copyright 2020 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';
// Benchmark size in kB.
const int bundleSizeBenchmark = 5000;
const int gzipBundleSizeBenchmark = 1200;
void main() {
group('Web Compile', () {
test('bundle size', () async {
final js = path.join(
Directory.current.path,
'build',
'web',
'main.dart.js',
);
await _runProcess('flutter', [
'build',
'web',
]);
await _runProcess('gzip', ['-k', js]);
final bundleSize = await _measureSize(js);
final gzipBundleSize = await _measureSize('$js.gz');
if (bundleSize > bundleSizeBenchmark) {
fail(
'The size the compiled web build "$js" was $bundleSize kB. This is '
'larger than the benchmark that was set at $bundleSizeBenchmark kB.'
'\n\n'
'The build size should be as minimal as possible to reduce the web '
'app’s initial startup time. If this change is intentional, and'
' expected, please increase the constant "bundleSizeBenchmark".');
} else if (gzipBundleSize > gzipBundleSizeBenchmark) {
fail('The size the compiled and gzipped web build "$js" was'
' $gzipBundleSize kB. This is larger than the benchmark that was '
'set at $gzipBundleSizeBenchmark kB.\n\n'
'The build size should be as minimal as possible to reduce the '
'web app’s initial startup time. If this change is intentional, and'
' expected, please increase the constant "gzipBundleSizeBenchmark".');
}
}, timeout: const Timeout(Duration(minutes: 5)));
});
}
Future<int> _measureSize(String file) async {
final result = await _runProcess('du', ['-k', file]);
return int.parse(
(result.stdout as String).split(RegExp(r'\s+')).first.trim());
}
Future<ProcessResult> _runProcess(
String executable, List<String> arguments) async {
final result = await Process.run(executable, arguments);
stdout.write(result.stdout);
stderr.write(result.stderr);
return result;
}
| gallery/test_benchmarks/web_bundle_size_test.dart/0 | {'file_path': 'gallery/test_benchmarks/web_bundle_size_test.dart', 'repo_id': 'gallery', 'token_count': 888} |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/cupertino.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:gallery/main.dart';
import 'testing/precache_images.dart';
import 'testing/util.dart';
void main() {
group('mobile', () {
testWidgets('home page matches golden screenshot', (tester) async {
await setUpBinding(tester);
await pumpWidgetWithImages(
tester,
const GalleryApp(),
homeAssets,
);
await tester.pumpAndSettle();
await expectLater(
find.byType(GalleryApp),
matchesGoldenFile('goldens/home_page_mobile_light.png'),
);
});
testWidgets('dark home page matches golden screenshot', (tester) async {
await setUpBinding(tester, brightness: Brightness.dark);
await pumpWidgetWithImages(
tester,
const GalleryApp(),
homeAssets,
);
await tester.pumpAndSettle();
await expectLater(
find.byType(GalleryApp),
matchesGoldenFile('goldens/home_page_mobile_dark.png'),
);
});
});
group('desktop', () {
testWidgets('home page matches golden screenshot', (tester) async {
await setUpBinding(tester, size: desktopSize);
await pumpWidgetWithImages(
tester,
const GalleryApp(),
homeAssets,
);
await tester.pumpAndSettle();
await expectLater(
find.byType(GalleryApp),
matchesGoldenFile('goldens/home_page_desktop_light.png'),
);
});
testWidgets('dark home page matches golden screenshot', (tester) async {
await setUpBinding(
tester,
size: desktopSize,
brightness: Brightness.dark,
);
await pumpWidgetWithImages(
tester,
const GalleryApp(),
homeAssets,
);
await tester.pumpAndSettle();
await expectLater(
find.byType(GalleryApp),
matchesGoldenFile('goldens/home_page_desktop_dark.png'),
);
});
});
}
| gallery/test_goldens/home_test.dart/0 | {'file_path': 'gallery/test_goldens/home_test.dart', 'repo_id': 'gallery', 'token_count': 875} |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
const mobileSize = Size(540, 960);
const desktopSize = Size(1280, 850);
const homeAssets = [
AssetImage(
'assets/icons/cupertino/cupertino.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/icons/material/material.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/icons/reference/reference.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/logo/flutter_logo.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/reply_card.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/reply_card_dark.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/crane_card.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/crane_card_dark.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/rally_card.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/rally_card_dark.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/shrine_card.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/shrine_card_dark.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/fortnightly_card.png',
package: 'flutter_gallery_assets',
),
AssetImage(
'assets/studies/fortnightly_card_dark.png',
package: 'flutter_gallery_assets',
),
];
const shrineAssets = [
AssetImage('0-0.jpg', package: 'shrine_images'),
AssetImage('1-0.jpg', package: 'shrine_images'),
AssetImage('2-0.jpg', package: 'shrine_images'),
AssetImage('3-0.jpg', package: 'shrine_images'),
AssetImage('4-0.jpg', package: 'shrine_images'),
AssetImage('5-0.jpg', package: 'shrine_images'),
AssetImage('6-0.jpg', package: 'shrine_images'),
AssetImage('7-0.jpg', package: 'shrine_images'),
AssetImage('8-0.jpg', package: 'shrine_images'),
AssetImage('9-0.jpg', package: 'shrine_images'),
AssetImage('10-0.jpg', package: 'shrine_images'),
AssetImage('11-0.jpg', package: 'shrine_images'),
AssetImage('12-0.jpg', package: 'shrine_images'),
AssetImage('13-0.jpg', package: 'shrine_images'),
AssetImage('14-0.jpg', package: 'shrine_images'),
AssetImage('15-0.jpg', package: 'shrine_images'),
AssetImage('16-0.jpg', package: 'shrine_images'),
AssetImage('17-0.jpg', package: 'shrine_images'),
AssetImage('18-0.jpg', package: 'shrine_images'),
AssetImage('19-0.jpg', package: 'shrine_images'),
AssetImage('20-0.jpg', package: 'shrine_images'),
AssetImage('21-0.jpg', package: 'shrine_images'),
AssetImage('22-0.jpg', package: 'shrine_images'),
AssetImage('23-0.jpg', package: 'shrine_images'),
AssetImage('24-0.jpg', package: 'shrine_images'),
AssetImage('25-0.jpg', package: 'shrine_images'),
AssetImage('26-0.jpg', package: 'shrine_images'),
AssetImage('27-0.jpg', package: 'shrine_images'),
AssetImage('28-0.jpg', package: 'shrine_images'),
AssetImage('29-0.jpg', package: 'shrine_images'),
AssetImage('30-0.jpg', package: 'shrine_images'),
AssetImage('31-0.jpg', package: 'shrine_images'),
AssetImage('32-0.jpg', package: 'shrine_images'),
AssetImage('33-0.jpg', package: 'shrine_images'),
AssetImage('34-0.jpg', package: 'shrine_images'),
AssetImage('35-0.jpg', package: 'shrine_images'),
AssetImage('36-0.jpg', package: 'shrine_images'),
AssetImage('37-0.jpg', package: 'shrine_images'),
AssetImage('diamond.png', package: 'shrine_images'),
AssetImage('slanted_menu.png', package: 'shrine_images'),
];
Future<void> setUpBinding(
WidgetTester tester, {
Size size = mobileSize,
Brightness brightness = Brightness.light,
}) async {
tester.view.physicalSize = size;
tester.view.devicePixelRatio = 1.0;
tester.platformDispatcher.textScaleFactorTestValue = 1.0;
tester.platformDispatcher.platformBrightnessTestValue = brightness;
addTearDown(tester.view.reset);
addTearDown(tester.platformDispatcher.clearAllTestValues);
}
| gallery/test_goldens/testing/util.dart/0 | {'file_path': 'gallery/test_goldens/testing/util.dart', 'repo_id': 'gallery', 'token_count': 1577} |
// Copyright 2022, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:logging/logging.dart' hide Level;
import 'package:provider/provider.dart';
import '../audio/audio_controller.dart';
import '../audio/sounds.dart';
import '../game_internals/level_state.dart';
import '../game_internals/score.dart';
import '../level_selection/levels.dart';
import '../player_progress/player_progress.dart';
import '../style/confetti.dart';
import '../style/my_button.dart';
import '../style/palette.dart';
import 'game_widget.dart';
/// This widget defines the entirety of the screen that the player sees when
/// they are playing a level.
///
/// It is a stateful widget because it manages some state of its own,
/// such as whether the game is in a "celebration" state.
class PlaySessionScreen extends StatefulWidget {
final GameLevel level;
const PlaySessionScreen(this.level, {super.key});
@override
State<PlaySessionScreen> createState() => _PlaySessionScreenState();
}
class _PlaySessionScreenState extends State<PlaySessionScreen> {
static final _log = Logger('PlaySessionScreen');
static const _celebrationDuration = Duration(milliseconds: 2000);
static const _preCelebrationDuration = Duration(milliseconds: 500);
bool _duringCelebration = false;
late DateTime _startOfPlay;
@override
void initState() {
super.initState();
_startOfPlay = DateTime.now();
}
@override
Widget build(BuildContext context) {
final palette = context.watch<Palette>();
return MultiProvider(
providers: [
Provider.value(value: widget.level),
// Create and provide the [LevelState] object that will be used
// by widgets below this one in the widget tree.
ChangeNotifierProvider(
create: (context) => LevelState(
goal: widget.level.difficulty,
onWin: _playerWon,
),
),
],
child: IgnorePointer(
// Ignore all input during the celebration animation.
ignoring: _duringCelebration,
child: Scaffold(
backgroundColor: palette.backgroundPlaySession,
// The stack is how you layer widgets on top of each other.
// Here, it is used to overlay the winning confetti animation on top
// of the game.
body: Stack(
children: [
// This is the main layout of the play session screen,
// with a settings button on top, the actual play area
// in the middle, and a back button at the bottom.
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: Alignment.centerRight,
child: InkResponse(
onTap: () => GoRouter.of(context).push('/settings'),
child: Image.asset(
'assets/images/settings.png',
semanticLabel: 'Settings',
),
),
),
const Spacer(),
Expanded(
// The actual UI of the game.
child: GameWidget(),
),
const Spacer(),
Padding(
padding: const EdgeInsets.all(8.0),
child: MyButton(
onPressed: () => GoRouter.of(context).go('/play'),
child: const Text('Back'),
),
),
],
),
// This is the confetti animation that is overlaid on top of the
// game when the player wins.
SizedBox.expand(
child: Visibility(
visible: _duringCelebration,
child: IgnorePointer(
child: Confetti(
isStopped: !_duringCelebration,
),
),
),
),
],
),
),
),
);
}
Future<void> _playerWon() async {
_log.info('Level ${widget.level.number} won');
final score = Score(
widget.level.number,
widget.level.difficulty,
DateTime.now().difference(_startOfPlay),
);
final playerProgress = context.read<PlayerProgress>();
playerProgress.setLevelReached(widget.level.number);
// Let the player see the game just after winning for a bit.
await Future<void>.delayed(_preCelebrationDuration);
if (!mounted) return;
setState(() {
_duringCelebration = true;
});
final audioController = context.read<AudioController>();
audioController.playSfx(SfxType.congrats);
/// Give the player some time to see the celebration animation.
await Future<void>.delayed(_celebrationDuration);
if (!mounted) return;
GoRouter.of(context).go('/play/won', extra: {'score': score});
}
}
| games/samples/ads/lib/play_session/play_session_screen.dart/0 | {'file_path': 'games/samples/ads/lib/play_session/play_session_screen.dart', 'repo_id': 'games', 'token_count': 2275} |
import 'dart:math';
import 'dart:ui';
import 'package:flame/components.dart';
import 'package:flame/parallax.dart';
/// The [Background] is a component that is composed of multiple scrolling
/// images which form a parallax, a way to simulate movement and depth in the
/// background.
class Background extends ParallaxComponent {
Background({required this.speed});
final double speed;
@override
Future<void> onLoad() async {
final layers = [
ParallaxImageData('scenery/background.png'),
ParallaxImageData('scenery/clouds.png'),
ParallaxImageData('scenery/cliffs.png'),
ParallaxImageData('scenery/trees.png'),
ParallaxImageData('scenery/ground.png'),
];
// The base velocity sets the speed of the layer the farthest to the back.
// Since the speed in our game is defined as the speed of the layer in the
// front, where the player is, we have to calculate what speed the layer in
// the back should have and then the parallax will take care of setting the
// speeds for the rest of the layers.
final baseVelocity = Vector2(speed / pow(2, layers.length), 0);
// The multiplier delta is used by the parallax to multiply the speed of
// each layer compared to the last, starting from the back. Since we only
// want our layers to move in the X-axis, we multiply by something larger
// than 1.0 here so that the speed of each layer is higher the closer to the
// screen it is.
final velocityMultiplierDelta = Vector2(2.0, 0.0);
parallax = await game.loadParallax(
layers,
baseVelocity: baseVelocity,
velocityMultiplierDelta: velocityMultiplierDelta,
filterQuality: FilterQuality.none,
);
}
}
| games/templates/endless_runner/lib/flame_game/components/background.dart/0 | {'file_path': 'games/templates/endless_runner/lib/flame_game/components/background.dart', 'repo_id': 'games', 'token_count': 550} |
import 'dart:core';
import 'player_progress_persistence.dart';
/// An in-memory implementation of [PlayerProgressPersistence].
/// Useful for testing.
class MemoryOnlyPlayerProgressPersistence implements PlayerProgressPersistence {
final levels = <int>[];
@override
Future<List<int>> getFinishedLevels() async {
await Future<void>.delayed(const Duration(milliseconds: 500));
return levels;
}
@override
Future<void> saveLevelFinished(int level, int time) async {
await Future<void>.delayed(const Duration(milliseconds: 500));
if (level < levels.length - 1 && levels[level - 1] > time) {
levels[level - 1] = time;
}
}
@override
Future<void> reset() async {
levels.clear();
}
}
| games/templates/endless_runner/lib/player_progress/persistence/memory_player_progress_persistence.dart/0 | {'file_path': 'games/templates/endless_runner/lib/player_progress/persistence/memory_player_progress_persistence.dart', 'repo_id': 'games', 'token_count': 238} |
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of '../../db.dart';
/// A database of all registered models.
///
/// Responsible for converting between dart model objects and datastore
/// entities.
abstract class ModelDB {
/// Converts a [ds.Key] to a [Key].
Key fromDatastoreKey(ds.Key datastoreKey);
/// Converts a [Key] to a [ds.Key].
ds.Key toDatastoreKey(Key dbKey);
/// Converts a [Model] instance to a [ds.Entity].
ds.Entity toDatastoreEntity(Model model);
/// Converts a [ds.Entity] to a [Model] instance.
T? fromDatastoreEntity<T extends Model>(ds.Entity? entity);
/// Returns the kind name for instances of [type].
String kindName(Type type);
/// Returns the property name used for [fieldName]
// TODO: Get rid of this eventually.
String? fieldNameToPropertyName(String kind, String fieldName);
/// Converts [value] according to the [Property] named [fieldName] in [kind].
Object? toDatastoreValue(String kind, String fieldName, Object? value,
{bool forComparison = false});
}
| gcloud/lib/src/db/model_db.dart/0 | {'file_path': 'gcloud/lib/src/db/model_db.dart', 'repo_id': 'gcloud', 'token_count': 363} |
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:gen_art_canvas/auth/data/artists_repository.dart';
import 'package:gen_art_canvas/auth/data/auth_repository.dart';
import 'package:gen_art_canvas/auth/domain/artist.dart';
class AuthService {
AuthService(
this._authRepository,
this._artistsRepository,
);
final AuthRepository _authRepository;
final ArtistsRepository _artistsRepository;
Future<Artist?> signArtistInAnonymously({
required String nickname,
}) async {
final user = await _authRepository.signInAnonymously();
if (user != null) {
await _artistsRepository.addArtist(uid: user.uid, nickname: nickname);
}
return null;
}
Future<void> signArtistOut() async {
final user = _authRepository.currentUser;
if (user != null) {
await _artistsRepository.deleteArtist(user.uid);
await _authRepository.signOut();
}
}
}
final authServiceProvider = Provider<AuthService>(
(ref) => AuthService(
ref.watch(authRepositoryProvider),
ref.watch(artistsRepositoryProvider),
),
);
final authUserProvider = StreamProvider<User?>(
(ref) => ref.watch(authRepositoryProvider).watchUser(),
);
final authArtistProvider = StreamProvider<Artist?>((ref) {
final authUser = ref.watch(authUserProvider).value;
if (authUser != null) {
return ref.watch(artistsRepositoryProvider).watchArtist(authUser.uid);
}
return Stream.value(null);
});
| gen_art_canvas/lib/auth/application/auth_service.dart/0 | {'file_path': 'gen_art_canvas/lib/auth/application/auth_service.dart', 'repo_id': 'gen_art_canvas', 'token_count': 515} |
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:gen_art_canvas/auth/application/auth_service.dart';
import 'package:gen_art_canvas/auth/domain/artist.dart';
import 'package:gen_art_canvas/auth/widgets/artist_nickname_dialog.dart';
import 'package:gen_art_canvas/core/style/app_colors.dart';
import 'package:gen_art_canvas/cuboids/presentation/widgets/cuboids_creator_bottom_sheet.dart';
import 'package:gen_art_canvas/settings/cuboids_canvas_settings.dart';
import 'package:gen_art_canvas/settings/cuboids_canvas_settings_provider.dart';
class CuboidsCanvasArtistPage extends ConsumerWidget {
const CuboidsCanvasArtistPage({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
if (ref.watch(cuboidsCanvasSettingsProvider).isLoading) {
return const Scaffold(
body: Center(child: CircularProgressIndicator()),
);
}
final authArtist = ref.watch(authArtistProvider).value;
final isAuthLoading = ref.watch(authArtistProvider).isLoading;
return Scaffold(
body: isAuthLoading
? const Center(child: CircularProgressIndicator())
: authArtist == null
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'GenArtCanvas',
style: Theme.of(context).textTheme.headlineLarge,
),
const SizedBox(height: 20),
ArtistNicknameDialog(
onSubmit: (String nickname) => ref
.read(authServiceProvider)
.signArtistInAnonymously(nickname: nickname),
isLoading: isAuthLoading,
),
],
)
: ref.watch(cuboidsCanvasSettingsProvider).when(
data: (CuboidsCanvasSettings settings) => Column(
children: [
_buildArtistInfo(
context,
artist: authArtist,
onSignOut: () =>
ref.watch(authServiceProvider).signArtistOut(),
),
Expanded(
child: CuboidsCreatorBottomSheet(
settings: settings,
authArtist: authArtist,
),
),
],
),
error: (e, _) {
log('Error fetching cuboids canvas settings');
log(e.toString());
return const Center(child: Text('An error occurred!'));
},
loading: () =>
const Center(child: CircularProgressIndicator()),
),
);
}
Widget _buildArtistInfo(
BuildContext context, {
required Artist artist,
VoidCallback? onSignOut,
}) {
return Padding(
padding: const EdgeInsets.only(left: 5),
child: Row(
children: [
Expanded(
child: RichText(
text: TextSpan(
text: 'Welcome, ',
style: Theme.of(context).textTheme.bodySmall,
children: <TextSpan>[
TextSpan(
text: '${artist.nickname}!',
style: Theme.of(context)
.textTheme
.bodySmall!
.copyWith(color: AppColors.primary),
),
],
),
),
),
if (artist.createdCuboidsCount > 0)
Expanded(
child: Align(
alignment: Alignment.centerRight,
child: Text(
'Crafted cuboids: ${artist.createdCuboidsCount}',
style: Theme.of(context).textTheme.labelSmall!.copyWith(
color: AppColors.googleBlue600,
),
),
),
),
TextButton.icon(
onPressed: onSignOut,
icon: const Icon(
Icons.logout,
size: 12,
),
label: const Text(
'Exit',
style: TextStyle(fontSize: 12),
),
),
],
),
);
}
}
| gen_art_canvas/lib/cuboids/presentation/pages/cuboids_canvas_artist_page.dart/0 | {'file_path': 'gen_art_canvas/lib/cuboids/presentation/pages/cuboids_canvas_artist_page.dart', 'repo_id': 'gen_art_canvas', 'token_count': 2533} |
import 'dart:async';
import 'dart:developer';
import 'package:flutter/widgets.dart';
Future<void> bootstrap(FutureOr<Widget> Function() builder) async {
FlutterError.onError = (details) {
log(details.exceptionAsString(), stackTrace: details.stack);
};
await runZonedGuarded(
() async => runApp(await builder()),
(error, stackTrace) => log(error.toString(), stackTrace: stackTrace),
);
}
| glow_stuff_with_flutter/lib/bootstrap.dart/0 | {'file_path': 'glow_stuff_with_flutter/lib/bootstrap.dart', 'repo_id': 'glow_stuff_with_flutter', 'token_count': 146} |
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:core';
/// Represents a media consisting of a stream of bytes, a content type and a
/// length.
class Media {
final Stream<List<int>> stream;
final String contentType;
final int? length;
/// Creates a new [Media] with a byte [stream] of length [length] with a
/// [contentType].
///
/// When uploading media, [length] can only be null if
/// [ResumableUploadOptions] is used.
Media(this.stream, this.length,
{this.contentType = 'application/octet-stream'}) {
if (length != null && length! < 0) {
throw ArgumentError('A negative content length is not allowed');
}
}
}
/// Represents options for uploading a [Media].
class UploadOptions {
/// Use either simple uploads (only media) or multipart for media+metadata
static const UploadOptions defaultOptions = UploadOptions();
/// Make resumable uploads
static final ResumableUploadOptions resumable = ResumableUploadOptions();
const UploadOptions();
}
/// Specifies options for resumable uploads.
class ResumableUploadOptions extends UploadOptions {
static Duration? exponentialBackoff(int failedAttempts) {
// Do not retry more than 5 times.
if (failedAttempts > 5) return null;
// Wait for 2^(failedAttempts-1) seconds, before retrying.
// i.e. 1 second, 2 seconds, 4 seconds, ...
return Duration(seconds: 1 << (failedAttempts - 1));
}
/// Maximum number of upload attempts per chunk.
final int numberOfAttempts;
/// Preferred size (in bytes) of a uploaded chunk.
/// Must be a multiple of 256 KB.
///
/// The default is 1 MB.
final int chunkSize;
/// Function for determining the [Duration] to wait before making the
/// next attempt. See [exponentialBackoff] for an example.
final Duration? Function(int) backoffFunction;
ResumableUploadOptions({
this.numberOfAttempts = 3,
this.chunkSize = 1024 * 1024,
this.backoffFunction = exponentialBackoff,
}) {
// See e.g. here:
// https://developers.google.com/maps-engine/documentation/resumable-upload
//
// Chunk size restriction:
// There are some chunk size restrictions based on the size of the file you
// are uploading. Files larger than 256 KB (256 x 1024 bytes) must have
// chunk sizes that are multiples of 256 KB. For files smaller than 256 KB,
// there are no restrictions. In either case, the final chunk has no
// limitations; you can simply transfer the remaining bytes. If you use
// chunking, it is important to keep the chunk size as large as possible
// to keep the upload efficient.
//
if (numberOfAttempts < 1) {
throw ArgumentError.value(
numberOfAttempts,
'numberOfAttempts',
'Must be >= 1.',
);
}
const minChinkSize = 256 * 1024;
if (chunkSize < 1 || (chunkSize % minChinkSize) != 0) {
throw ArgumentError.value(
chunkSize,
'chunkSize',
'Must be > 0 and a multiple of $minChinkSize.',
);
}
}
}
/// Represents options for downloading media.
///
/// For partial downloads, see [PartialDownloadOptions].
class DownloadOptions {
/// Download only metadata.
// ignoring the non-standard name since we'd have to update the generator!
static const DownloadOptions metadata = DownloadOptions();
/// Download full media.
// ignoring the non-standard name since we'd have to update the generator!
static final PartialDownloadOptions fullMedia =
PartialDownloadOptions(ByteRange(0, -1));
const DownloadOptions();
/// Indicates whether metadata should be downloaded.
bool get isMetadataDownload => true;
}
/// Options for downloading a [Media].
class PartialDownloadOptions extends DownloadOptions {
/// The range of bytes to be downloaded
final ByteRange range;
PartialDownloadOptions(this.range);
@override
bool get isMetadataDownload => false;
/// `true` if this is a full download and `false` if this is a partial
/// download.
bool get isFullDownload => range.start == 0 && range.end == -1;
}
/// Specifies a range of media.
class ByteRange {
/// First byte of media.
final int start;
/// Last byte of media (inclusive)
final int end;
/// Length of this range (i.e. number of bytes)
int get length => end - start + 1;
ByteRange(this.start, this.end) {
if (!(start == 0 && end == -1 || start >= 0 && end >= start)) {
throw ArgumentError('Invalid media range [$start, $end]');
}
}
}
/// Represents a general error reported by the API endpoint.
class ApiRequestError implements Exception {
final String? message;
ApiRequestError(this.message);
@override
String toString() => 'ApiRequestError(message: $message)';
}
/// Represents a specific error reported by the API endpoint.
class DetailedApiRequestError extends ApiRequestError {
/// The error code. For some non-google services this can be `null`.
final int? status;
final List<ApiRequestErrorDetail> errors;
/// The full error response as decoded json if available. `null` otherwise.
final Map<String, dynamic>? jsonResponse;
DetailedApiRequestError(this.status, String? message,
{this.errors = const [], this.jsonResponse})
: super(message);
@override
String toString() =>
'DetailedApiRequestError(status: $status, message: $message)';
}
/// Instances of this class can be added to a [DetailedApiRequestError] to
/// provide detailed information.
///
/// This follows the Google JSON style guide:
/// https://google.github.io/styleguide/jsoncstyleguide.xml
class ApiRequestErrorDetail {
/// Unique identifier for the service raising this error. This helps
/// distinguish service-specific errors (i.e. error inserting an event in a
/// calendar) from general protocol errors (i.e. file not found).
final String? domain;
/// Unique identifier for this error. Different from the
/// [DetailedApiRequestError.status] property in that this is not an http
/// response code.
final String? reason;
/// A human readable message providing more details about the error. If there
/// is only one error, this field will match error.message.
final String? message;
/// The location of the error (the interpretation of its value depends on
/// [locationType]).
final String? location;
/// Indicates how the [location] property should be interpreted.
final String? locationType;
/// A URI for a help text that might shed some more light on the error.
final String? extendedHelp;
/// A URI for a report form used by the service to collect data about the
/// error condition. This URI should be preloaded with parameters describing
/// the request.
final String? sendReport;
/// If this error detail gets created with the `.fromJson` constructor, the
/// json will be accessible here.
final Map? originalJson;
ApiRequestErrorDetail({
this.domain,
this.reason,
this.message,
this.location,
this.locationType,
this.extendedHelp,
this.sendReport,
}) : originalJson = null;
ApiRequestErrorDetail.fromJson(Map<dynamic, dynamic> this.originalJson)
: domain = originalJson['domain'] as String?,
reason = originalJson['reason'] as String?,
message = originalJson['message'] as String?,
location = originalJson['location'] as String?,
locationType = originalJson['locationType'] as String?,
extendedHelp = originalJson['extendedHelp'] as String?,
sendReport = originalJson['sendReport'] as String?;
}
| googleapis.dart/discoveryapis_commons/lib/src/requests.dart/0 | {'file_path': 'googleapis.dart/discoveryapis_commons/lib/src/requests.dart', 'repo_id': 'googleapis.dart', 'token_count': 2288} |
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
import 'package:path/path.dart' as p;
import 'dart_api_library.dart';
import 'dart_api_test_library.dart';
import 'generated_googleapis/discovery/v1.dart';
import 'pubspec.dart';
import 'shared_output.dart';
import 'type_deduplicate.dart';
import 'utils.dart';
/// Generates a dart package with all APIs given in the constructor.
///
/// This class generates a dart package with the following layout:
/// $packageFolderPath
/// |- .gitignore
/// |- pubspec.yaml
/// |- LICENSE
/// |- README.md
/// |- VERSION
/// |- lib/$API/... (for all APIs to generate)
/// |- test/$API/... (for all APIs to generate)
class ApisPackageGenerator with DedupeMixin {
@override
final List<RestDescription> descriptions;
final String packageFolderPath;
final Pubspec pubspec;
final bool deleteExisting;
/// [descriptions] is a list of API descriptions we want to generate code for.
///
/// [pubspec] contains configuration parameters for this API package
/// generator.
///
/// [packageFolderPath] is the output directory where the dart package gets
/// generated.
ApisPackageGenerator(
this.descriptions,
this.pubspec,
this.packageFolderPath, {
this.deleteExisting = true,
});
/// Starts generating the API package with all the APIs given in the
/// constructor.
/// If the output directory already exists it will delete everything in it
/// except ".git" folders.
List<GenerateResult> generateApiPackage() {
final libFolderPath = '$packageFolderPath/lib';
final testFolderPath = '$packageFolderPath/test';
final pubspecYamlPath = '$packageFolderPath/pubspec.yaml';
final gitIgnorePath = '$packageFolderPath/.gitignore';
// Clean contents of directory (except for .git folder)
final packageDirectory = Directory(packageFolderPath);
if (packageDirectory.existsSync()) {
if (deleteExisting) {
print('Emptying folder before library generation.');
packageDirectory.listSync().forEach((FileSystemEntity fse) {
if (fse is File) {
fse.deleteSync();
} else if (fse is Directory && !fse.path.endsWith('.git')) {
fse.deleteSync(recursive: true);
}
});
} else {
print('WARNING: Directory exists, but NOT deleting contents.');
}
}
_writeFile(pubspecYamlPath, _writePubspec);
writeString(gitIgnorePath, _gitIgnore);
writeDartSource(
'$libFolderPath/$userAgentDartFilePath',
"""
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
${requestHeadersField(pubspec.version)}
""",
);
// Test utility
writeDartSource(
'$testFolderPath/$testSharedDartFileName',
testHelperLibraryContent,
);
final results = <GenerateResult>[];
final duplicateItems = wrapPackageDeduplicateLogic(() {
for (var description in descriptions) {
final name = description.name!.toLowerCase();
final version = description.version!
.toLowerCase()
.replaceAll('.', '_')
.replaceAll('-', '_');
final apiFolderPath = '$libFolderPath/$name';
final apiTestFolderPath = '$testFolderPath/$name';
final apiVersionFile = '$libFolderPath/$name/$version.dart';
final apiTestVersionFile = '$testFolderPath/$name/${version}_test.dart';
final packagePath = 'package:${pubspec.name}/$name/$version.dart';
try {
// Create API itself.
Directory(apiFolderPath).createSync();
final apiLibrary = _generateApiLibrary(apiVersionFile, description);
// Create Test for API.
Directory(apiTestFolderPath).createSync();
_generateApiTestLibrary(apiTestVersionFile, packagePath, apiLibrary);
results.add(GenerateResult(name, version, packagePath));
} catch (error, stack) {
var errorMessage = '';
if (error is GeneratorError) {
errorMessage = '$error';
} else {
errorMessage = '$error\nstack: $stack';
}
results.add(
GenerateResult.error(name, version, packagePath, errorMessage));
}
}
});
if (duplicateItems.isNotEmpty) {
final importDirectives = [
if (duplicateItems.any((element) => element.usedDartConvert == true))
"import 'dart:convert' as convert;",
"import 'dart:core' as core;",
];
writeDartSource(
'$libFolderPath/$sharedLibraryName',
'''
/// Shared types to minimize the package size. Do not use directly.
@core.Deprecated('Avoid importing this library. '
'Use the members defined in the target API library instead.',)
library;
${ignoreForFileComments(ignoreForFileSet)}
${importDirectives.join('\n')}
${duplicateItems.map((e) => e.definition).join('\n\n')}
''',
);
}
return results;
}
DartApiLibrary _generateApiLibrary(
String outputFile,
RestDescription description,
) =>
libraryDeduplicateLogic(() {
final lib = DartApiLibrary.build(description, isPackage: true);
writeDartSource(outputFile, lib.librarySource);
return lib;
});
void _generateApiTestLibrary(
String outputFile, String packageImportPath, DartApiLibrary apiLibrary) {
final testLib =
DartApiTestLibrary.build(apiLibrary, packageImportPath, pubspec.name);
writeDartSource(outputFile, testLib.librarySource);
}
void _writePubspec(StringSink sink) {
void writeDependencies(Map<String, dynamic> dependencies) {
orderedForEach<String, dynamic>(
dependencies,
(String lib, Object? value) {
if (value is String) {
if (lib.startsWith('_discoveryapis_commons')) {
sink.writeln(
' # This is a private package dependency used by the '
'generated client stubs.');
}
sink.writeln(' $lib: $value');
} else if (value is Map) {
sink.writeln(' $lib:');
value.forEach((k, v) {
sink.writeln(' $k: $v');
});
}
},
);
}
sink.writeln('name: ${pubspec.name}');
if (pubspec.version == null) {
sink.writeln('publish_to: none');
} else {
sink.writeln('version: ${pubspec.version}');
}
if (pubspec.author != null) {
sink.writeln('author: ${pubspec.author}');
}
sink.writeln('description: ${pubspec.description}');
if (pubspec.repository != null) {
sink.writeln('repository: ${pubspec.repository}');
}
sink.writeln('environment:');
sink.writeln(" sdk: '${pubspec.sdkConstraint}'");
sink.writeln('dependencies:');
writeDependencies(Pubspec.dependencies);
sink.writeln('dev_dependencies:');
writeDependencies(pubspec.devDependencies);
// Uncomment when aligning development with changes to commons
// sink.writeln('dependency_overrides:');
// writeDependencies({
// '_discoveryapis_commons': {'path': commonsDirRelativePath},
// });
}
/// Returns the relative path from [packageFolderPath] to the commons package
/// directory.
String get commonsDirRelativePath {
const commonsDir = 'discoveryapis_commons';
final outputPackageDir =
Directory(p.absolute(p.join(p.current, packageFolderPath)));
var commonsParentDir = outputPackageDir.parent;
if (commonsParentDir.existsSync() &&
commonsParentDir
.listSync()
.whereType<Directory>()
.where((element) => p.basename(element.path) == commonsDir)
.isEmpty) {
commonsParentDir = commonsParentDir.parent;
}
if (!commonsParentDir.existsSync()) {
throw StateError('Could not find the commons directory!');
}
return p.relative(
p.join(commonsParentDir.path, commonsDir),
from: outputPackageDir.path,
);
}
}
const _gitIgnore = '''
# See https://dart.dev/guides/libraries/private-files
.dart_tool/
.packages
pubspec.lock
''';
void _writeFile(String path, void Function(StringSink sink) writer) {
final file = File(path);
if (!file.existsSync()) {
file.createSync(recursive: true);
}
final sink = file.openWrite();
writer(sink);
sink.flush().then((value) => sink.close());
}
| googleapis.dart/discoveryapis_generator/lib/src/apis_package_generator.dart/0 | {'file_path': 'googleapis.dart/discoveryapis_generator/lib/src/apis_package_generator.dart', 'repo_id': 'googleapis.dart', 'token_count': 3297} |
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Specification of the pubspec.yaml for a generated package.
class Pubspec {
final String name;
final String? version;
final String description;
final String? author;
final String? repository;
final Map<String, String> devDependencies;
Pubspec(
this.name,
this.version,
this.description, {
this.author,
this.repository,
Map<String, String>? extraDevDependencies,
}) : devDependencies = {
..._defaultDevDependencies,
if (extraDevDependencies != null) ...extraDevDependencies,
};
String get sdkConstraint => '^3.0.0';
static const dependencies = {
'http': '">=0.13.0 <2.0.0"',
'_discoveryapis_commons': '^1.0.0',
};
static const _defaultDevDependencies = {
'test': '^1.16.0',
};
}
| googleapis.dart/discoveryapis_generator/lib/src/pubspec.dart/0 | {'file_path': 'googleapis.dart/discoveryapis_generator/lib/src/pubspec.dart', 'repo_id': 'googleapis.dart', 'token_count': 358} |
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// 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
/// Cloud Memorystore for Memcached API - v1
///
/// Google Cloud Memorystore for Memcached API is used for creating and managing
/// Memcached instances in GCP.
///
/// For more information, see <https://cloud.google.com/memorystore/>
///
/// Create an instance of [CloudMemorystoreForMemcachedApi] to access these
/// resources:
///
/// - [ProjectsResource]
/// - [ProjectsLocationsResource]
/// - [ProjectsLocationsInstancesResource]
/// - [ProjectsLocationsOperationsResource]
library memcache_v1;
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
import '../shared.dart';
import '../src/user_agent.dart';
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
/// Google Cloud Memorystore for Memcached API is used for creating and managing
/// Memcached instances in GCP.
class CloudMemorystoreForMemcachedApi {
/// See, edit, configure, and delete your Google Cloud data and see the email
/// address for your Google Account.
static const cloudPlatformScope =
'https://www.googleapis.com/auth/cloud-platform';
final commons.ApiRequester _requester;
ProjectsResource get projects => ProjectsResource(_requester);
CloudMemorystoreForMemcachedApi(http.Client client,
{core.String rootUrl = 'https://memcache.googleapis.com/',
core.String servicePath = ''})
: _requester =
commons.ApiRequester(client, rootUrl, servicePath, requestHeaders);
}
class ProjectsResource {
final commons.ApiRequester _requester;
ProjectsLocationsResource get locations =>
ProjectsLocationsResource(_requester);
ProjectsResource(commons.ApiRequester client) : _requester = client;
}
class ProjectsLocationsResource {
final commons.ApiRequester _requester;
ProjectsLocationsInstancesResource get instances =>
ProjectsLocationsInstancesResource(_requester);
ProjectsLocationsOperationsResource get operations =>
ProjectsLocationsOperationsResource(_requester);
ProjectsLocationsResource(commons.ApiRequester client) : _requester = client;
/// Gets information about a location.
///
/// Request parameters:
///
/// [name] - Resource name for the location.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Location].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Location> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Location.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists information about the supported locations for this service.
///
/// Request parameters:
///
/// [name] - The resource that owns the locations collection, if applicable.
/// Value must have pattern `^projects/\[^/\]+$`.
///
/// [filter] - A filter to narrow down results to a preferred subset. The
/// filtering language accepts strings like `"displayName=tokyo"`, and is
/// documented in more detail in \[AIP-160\](https://google.aip.dev/160).
///
/// [pageSize] - The maximum number of results to return. If not set, the
/// service selects a default.
///
/// [pageToken] - A page token received from the `next_page_token` field in
/// the response. Send that page token to receive the subsequent page.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListLocationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListLocationsResponse> list(
core.String name, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/locations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListLocationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsInstancesResource {
final commons.ApiRequester _requester;
ProjectsLocationsInstancesResource(commons.ApiRequester client)
: _requester = client;
/// `ApplyParameters` restarts the set of specified nodes in order to update
/// them to the current set of parameters for the Memcached Instance.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Required. Resource name of the Memcached instance for which
/// parameter group updates should be applied.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [$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> applyParameters(
ApplyParametersRequest request,
core.String name, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':applyParameters';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Creates a new Instance in a given location.
///
/// [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
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [instanceId] - Required. The logical name of the Memcached instance in the
/// user 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 user project / location. If any of the above are
/// not met, the API raises an invalid argument error.
///
/// [$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(
Instance request,
core.String parent, {
core.String? instanceId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (instanceId != null) 'instanceId': [instanceId],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/instances';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a single Instance.
///
/// Request parameters:
///
/// [name] - Required. Memcached instance resource name in the format:
/// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
/// where `location_id` refers to a GCP region
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single Instance.
///
/// Request parameters:
///
/// [name] - Required. Memcached instance resource name in the format:
/// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
/// where `location_id` refers to a GCP region
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Instance].
///
/// 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<Instance> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Instance.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists Instances in a given location.
///
/// 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
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - List filter. For example, exclude all Memcached instances with
/// name as my-instance by specifying `"name != my-instance"`.
///
/// [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.
///
/// [pageToken] - The `next_page_token` value returned from a previous List
/// request, if any.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListInstancesResponse].
///
/// 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<ListInstancesResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (orderBy != null) 'orderBy': [orderBy],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/instances';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListInstancesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Updates an existing Instance in a given project and location.
///
/// [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: Memcached instances are managed and addressed at the regional level
/// so `location_id` here refers to a Google Cloud region; however, users may
/// choose which zones Memcached nodes should be provisioned in within an
/// instance. Refer to zones field for more details.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [updateMask] - Required. Mask of fields to update. * `displayName`
///
/// [$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(
Instance request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (updateMask != null) 'updateMask': [updateMask],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Reschedules upcoming maintenance event.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [instance] - Required. Memcache instance resource name using the form:
/// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
/// where `location_id` refers to a GCP region.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [$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> rescheduleMaintenance(
RescheduleMaintenanceRequest request,
core.String instance, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$instance') + ':rescheduleMaintenance';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Updates the defined Memcached parameters for an existing instance.
///
/// This method only stages the parameters, it must be followed by
/// `ApplyParameters` to apply the parameters to nodes of the Memcached
/// instance.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - Required. Resource name of the Memcached instance for which the
/// parameters should be updated.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/instances/\[^/\]+$`.
///
/// [$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> updateParameters(
UpdateParametersRequest request,
core.String name, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':updateParameters';
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsOperationsResource {
final commons.ApiRequester _requester;
ProjectsLocationsOperationsResource(commons.ApiRequester client)
: _requester = client;
/// Starts asynchronous cancellation on a long-running operation.
///
/// The server makes a best effort to cancel the operation, but success is not
/// guaranteed. If the server doesn't support this method, it returns
/// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation
/// or other methods to check whether the cancellation succeeded or whether
/// the operation completed despite cancellation. On successful cancellation,
/// the operation is not deleted; instead, it becomes an operation with an
/// Operation.error value with a google.rpc.Status.code of 1, corresponding to
/// `Code.CANCELLED`.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - The name of the operation resource to be cancelled.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> cancel(
CancelOperationRequest request,
core.String name, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':cancel';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a long-running operation.
///
/// This method indicates that the client is no longer interested in the
/// operation result. It does not cancel the operation. If the server doesn't
/// support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
///
/// Request parameters:
///
/// [name] - The name of the operation resource to be deleted.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets the latest state of a long-running operation.
///
/// Clients can use this method to poll the operation result at intervals as
/// recommended by the API service.
///
/// Request parameters:
///
/// [name] - The name of the operation resource.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists operations that match the specified filter in the request.
///
/// If the server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// Request parameters:
///
/// [name] - The name of the operation's parent resource.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - The standard list filter.
///
/// [pageSize] - The standard list page size.
///
/// [pageToken] - The standard list page token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListOperationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListOperationsResponse> list(
core.String name, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/operations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListOperationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
/// Request for ApplyParameters.
class ApplyParametersRequest {
/// Whether to apply instance-level parameter group to all nodes.
///
/// If set to true, users are restricted from specifying individual nodes, and
/// `ApplyParameters` updates all nodes within the instance.
core.bool? applyAll;
/// Nodes to which the instance-level parameter group is applied.
core.List<core.String>? nodeIds;
ApplyParametersRequest({
this.applyAll,
this.nodeIds,
});
ApplyParametersRequest.fromJson(core.Map json_)
: this(
applyAll: json_.containsKey('applyAll')
? json_['applyAll'] as core.bool
: null,
nodeIds: json_.containsKey('nodeIds')
? (json_['nodeIds'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (applyAll != null) 'applyAll': applyAll!,
if (nodeIds != null) 'nodeIds': nodeIds!,
};
}
/// The request message for Operations.CancelOperation.
typedef CancelOperationRequest = $Empty;
/// A generic empty message that you can re-use to avoid defining duplicated
/// empty messages in your APIs.
///
/// A typical example is to use it as the request or the response type of an API
/// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns
/// (google.protobuf.Empty); }
typedef Empty = $Empty;
/// Maintenance policy per instance.
class GoogleCloudMemcacheV1MaintenancePolicy {
/// The time when the policy was created.
///
/// Output only.
core.String? createTime;
/// Description of what this policy is for.
///
/// Create/Update methods return INVALID_ARGUMENT if the length is greater
/// than 512.
core.String? description;
/// The time when the policy was updated.
///
/// Output only.
core.String? updateTime;
/// Maintenance window that is applied to resources covered by this policy.
///
/// Minimum 1. For the current version, the maximum number of
/// weekly_maintenance_windows is expected to be one.
///
/// Required.
core.List<WeeklyMaintenanceWindow>? weeklyMaintenanceWindow;
GoogleCloudMemcacheV1MaintenancePolicy({
this.createTime,
this.description,
this.updateTime,
this.weeklyMaintenanceWindow,
});
GoogleCloudMemcacheV1MaintenancePolicy.fromJson(core.Map json_)
: this(
createTime: json_.containsKey('createTime')
? json_['createTime'] as core.String
: null,
description: json_.containsKey('description')
? json_['description'] as core.String
: null,
updateTime: json_.containsKey('updateTime')
? json_['updateTime'] as core.String
: null,
weeklyMaintenanceWindow: json_.containsKey('weeklyMaintenanceWindow')
? (json_['weeklyMaintenanceWindow'] as core.List)
.map((value) => WeeklyMaintenanceWindow.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (createTime != null) 'createTime': createTime!,
if (description != null) 'description': description!,
if (updateTime != null) 'updateTime': updateTime!,
if (weeklyMaintenanceWindow != null)
'weeklyMaintenanceWindow': weeklyMaintenanceWindow!,
};
}
/// A Memorystore for Memcached instance
class Instance {
/// 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;
/// The time the instance was created.
///
/// Output only.
core.String? createTime;
/// Endpoint for the Discovery API.
///
/// Output only.
core.String? discoveryEndpoint;
/// User provided name for the instance, which is only used for display
/// purposes.
///
/// Cannot be more than 80 characters.
core.String? displayName;
/// List of messages that describe the current state of the Memcached
/// instance.
core.List<InstanceMessage>? instanceMessages;
/// Resource labels to represent user-provided metadata.
///
/// Refer to cloud documentation on labels for more details.
/// https://cloud.google.com/compute/docs/labeling-resources
core.Map<core.String, core.String>? labels;
/// The maintenance policy for the instance.
///
/// If not provided, the maintenance event will be performed based on
/// Memorystore internal rollout schedule.
GoogleCloudMemcacheV1MaintenancePolicy? maintenancePolicy;
/// Published maintenance schedule.
///
/// Output only.
MaintenanceSchedule? maintenanceSchedule;
/// The full version of memcached server running on this instance.
///
/// System automatically determines the full memcached version for an instance
/// based on the input MemcacheVersion. The full version format will be
/// "memcached-1.5.16".
///
/// Output only.
core.String? memcacheFullVersion;
/// List of Memcached nodes.
///
/// Refer to Node message for more details.
///
/// Output only.
core.List<Node>? memcacheNodes;
/// The major version of Memcached software.
///
/// If not provided, latest supported version will be used. Currently the
/// latest supported major version is `MEMCACHE_1_5`. The minor version will
/// be automatically determined by our system based on the latest supported
/// minor version.
/// Possible string values are:
/// - "MEMCACHE_VERSION_UNSPECIFIED" : Memcache version is not specified by
/// customer
/// - "MEMCACHE_1_5" : Memcached 1.5 version.
core.String? memcacheVersion;
/// 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: Memcached instances are managed and addressed at the regional level
/// so `location_id` here refers to a Google Cloud region; however, users may
/// choose which zones Memcached nodes should be provisioned in within an
/// instance.
///
/// Refer to zones field for more details.
///
/// Required.
core.String? name;
/// Configuration for Memcached nodes.
///
/// Required.
NodeConfig? nodeConfig;
/// Number of nodes in the Memcached instance.
///
/// Required.
core.int? nodeCount;
/// User defined parameters to apply to the memcached process on each node.
MemcacheParameters? parameters;
/// Contains the id of allocated IP address ranges associated with the private
/// service access connection for example, "test-default" associated with IP
/// range 10.0.0.0/29.
///
/// Optional.
core.List<core.String>? reservedIpRangeId;
/// The state of this Memcached instance.
///
/// Output only.
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : State not set.
/// - "CREATING" : Memcached instance is being created.
/// - "READY" : Memcached instance has been created and ready to be used.
/// - "UPDATING" : Memcached instance is updating configuration such as
/// maintenance policy and schedule.
/// - "DELETING" : Memcached instance is being deleted.
/// - "PERFORMING_MAINTENANCE" : Memcached instance is going through
/// maintenance, e.g. data plane rollout.
core.String? state;
/// The time the instance was updated.
///
/// Output only.
core.String? updateTime;
/// Zones in which Memcached nodes should be provisioned.
///
/// Memcached nodes will be equally distributed across these zones. If not
/// provided, the service will by default create nodes in all zones in the
/// region for the instance.
core.List<core.String>? zones;
Instance({
this.authorizedNetwork,
this.createTime,
this.discoveryEndpoint,
this.displayName,
this.instanceMessages,
this.labels,
this.maintenancePolicy,
this.maintenanceSchedule,
this.memcacheFullVersion,
this.memcacheNodes,
this.memcacheVersion,
this.name,
this.nodeConfig,
this.nodeCount,
this.parameters,
this.reservedIpRangeId,
this.state,
this.updateTime,
this.zones,
});
Instance.fromJson(core.Map json_)
: this(
authorizedNetwork: json_.containsKey('authorizedNetwork')
? json_['authorizedNetwork'] as core.String
: null,
createTime: json_.containsKey('createTime')
? json_['createTime'] as core.String
: null,
discoveryEndpoint: json_.containsKey('discoveryEndpoint')
? json_['discoveryEndpoint'] as core.String
: null,
displayName: json_.containsKey('displayName')
? json_['displayName'] as core.String
: null,
instanceMessages: json_.containsKey('instanceMessages')
? (json_['instanceMessages'] as core.List)
.map((value) => InstanceMessage.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
labels: json_.containsKey('labels')
? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
maintenancePolicy: json_.containsKey('maintenancePolicy')
? GoogleCloudMemcacheV1MaintenancePolicy.fromJson(
json_['maintenancePolicy']
as core.Map<core.String, core.dynamic>)
: null,
maintenanceSchedule: json_.containsKey('maintenanceSchedule')
? MaintenanceSchedule.fromJson(json_['maintenanceSchedule']
as core.Map<core.String, core.dynamic>)
: null,
memcacheFullVersion: json_.containsKey('memcacheFullVersion')
? json_['memcacheFullVersion'] as core.String
: null,
memcacheNodes: json_.containsKey('memcacheNodes')
? (json_['memcacheNodes'] as core.List)
.map((value) => Node.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
memcacheVersion: json_.containsKey('memcacheVersion')
? json_['memcacheVersion'] as core.String
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
nodeConfig: json_.containsKey('nodeConfig')
? NodeConfig.fromJson(
json_['nodeConfig'] as core.Map<core.String, core.dynamic>)
: null,
nodeCount: json_.containsKey('nodeCount')
? json_['nodeCount'] as core.int
: null,
parameters: json_.containsKey('parameters')
? MemcacheParameters.fromJson(
json_['parameters'] as core.Map<core.String, core.dynamic>)
: null,
reservedIpRangeId: json_.containsKey('reservedIpRangeId')
? (json_['reservedIpRangeId'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
state:
json_.containsKey('state') ? json_['state'] as core.String : null,
updateTime: json_.containsKey('updateTime')
? json_['updateTime'] as core.String
: null,
zones: json_.containsKey('zones')
? (json_['zones'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (authorizedNetwork != null) 'authorizedNetwork': authorizedNetwork!,
if (createTime != null) 'createTime': createTime!,
if (discoveryEndpoint != null) 'discoveryEndpoint': discoveryEndpoint!,
if (displayName != null) 'displayName': displayName!,
if (instanceMessages != null) 'instanceMessages': instanceMessages!,
if (labels != null) 'labels': labels!,
if (maintenancePolicy != null) 'maintenancePolicy': maintenancePolicy!,
if (maintenanceSchedule != null)
'maintenanceSchedule': maintenanceSchedule!,
if (memcacheFullVersion != null)
'memcacheFullVersion': memcacheFullVersion!,
if (memcacheNodes != null) 'memcacheNodes': memcacheNodes!,
if (memcacheVersion != null) 'memcacheVersion': memcacheVersion!,
if (name != null) 'name': name!,
if (nodeConfig != null) 'nodeConfig': nodeConfig!,
if (nodeCount != null) 'nodeCount': nodeCount!,
if (parameters != null) 'parameters': parameters!,
if (reservedIpRangeId != null) 'reservedIpRangeId': reservedIpRangeId!,
if (state != null) 'state': state!,
if (updateTime != null) 'updateTime': updateTime!,
if (zones != null) 'zones': zones!,
};
}
class InstanceMessage {
/// A code that correspond to one type of user-facing message.
/// Possible string values are:
/// - "CODE_UNSPECIFIED" : Message Code not set.
/// - "ZONE_DISTRIBUTION_UNBALANCED" : Memcached nodes are distributed
/// unevenly.
core.String? code;
/// Message on memcached instance which will be exposed to users.
core.String? message;
InstanceMessage({
this.code,
this.message,
});
InstanceMessage.fromJson(core.Map json_)
: this(
code: json_.containsKey('code') ? json_['code'] as core.String : null,
message: json_.containsKey('message')
? json_['message'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (code != null) 'code': code!,
if (message != null) 'message': message!,
};
}
/// Response for ListInstances.
class ListInstancesResponse {
/// A list of Memcached instances in the project in the specified location, or
/// across all locations.
///
/// If the `location_id` in the parent field of the request is "-", all
/// regions available to the project are queried, and the results aggregated.
core.List<Instance>? instances;
/// Token to retrieve the next page of results, or empty if there are no more
/// results in the list.
core.String? nextPageToken;
/// Locations that could not be reached.
core.List<core.String>? unreachable;
ListInstancesResponse({
this.instances,
this.nextPageToken,
this.unreachable,
});
ListInstancesResponse.fromJson(core.Map json_)
: this(
instances: json_.containsKey('instances')
? (json_['instances'] as core.List)
.map((value) => Instance.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
unreachable: json_.containsKey('unreachable')
? (json_['unreachable'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (instances != null) 'instances': instances!,
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
if (unreachable != null) 'unreachable': unreachable!,
};
}
/// The response message for Locations.ListLocations.
class ListLocationsResponse {
/// A list of locations that matches the specified filter in the request.
core.List<Location>? locations;
/// The standard List next-page token.
core.String? nextPageToken;
ListLocationsResponse({
this.locations,
this.nextPageToken,
});
ListLocationsResponse.fromJson(core.Map json_)
: this(
locations: json_.containsKey('locations')
? (json_['locations'] as core.List)
.map((value) => Location.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (locations != null) 'locations': locations!,
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
};
}
/// The response message for Operations.ListOperations.
class ListOperationsResponse {
/// The standard List next-page token.
core.String? nextPageToken;
/// A list of operations that matches the specified filter in the request.
core.List<Operation>? operations;
ListOperationsResponse({
this.nextPageToken,
this.operations,
});
ListOperationsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
operations: json_.containsKey('operations')
? (json_['operations'] as core.List)
.map((value) => Operation.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
if (operations != null) 'operations': operations!,
};
}
/// A resource that represents a Google Cloud location.
typedef Location = $Location00;
/// Upcoming maintenance schedule.
class MaintenanceSchedule {
/// The end time of any upcoming scheduled maintenance for this instance.
///
/// Output only.
core.String? endTime;
/// The deadline that the maintenance schedule start time can not go beyond,
/// including reschedule.
///
/// Output only.
core.String? scheduleDeadlineTime;
/// The start time of any upcoming scheduled maintenance for this instance.
///
/// Output only.
core.String? startTime;
MaintenanceSchedule({
this.endTime,
this.scheduleDeadlineTime,
this.startTime,
});
MaintenanceSchedule.fromJson(core.Map json_)
: this(
endTime: json_.containsKey('endTime')
? json_['endTime'] as core.String
: null,
scheduleDeadlineTime: json_.containsKey('scheduleDeadlineTime')
? json_['scheduleDeadlineTime'] as core.String
: null,
startTime: json_.containsKey('startTime')
? json_['startTime'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (endTime != null) 'endTime': endTime!,
if (scheduleDeadlineTime != null)
'scheduleDeadlineTime': scheduleDeadlineTime!,
if (startTime != null) 'startTime': startTime!,
};
}
class MemcacheParameters {
/// The unique ID associated with this set of parameters.
///
/// Users can use this id to determine if the parameters associated with the
/// instance differ from the parameters associated with the nodes. A
/// discrepancy between parameter ids can inform users that they may need to
/// take action to apply parameters on nodes.
///
/// Output only.
core.String? id;
/// User defined set of parameters to use in the memcached process.
core.Map<core.String, core.String>? params;
MemcacheParameters({
this.id,
this.params,
});
MemcacheParameters.fromJson(core.Map json_)
: this(
id: json_.containsKey('id') ? json_['id'] as core.String : null,
params: json_.containsKey('params')
? (json_['params'] as core.Map<core.String, core.dynamic>).map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (id != null) 'id': id!,
if (params != null) 'params': params!,
};
}
class Node {
/// Hostname or IP address of the Memcached node used by the clients to
/// connect to the Memcached server on this node.
///
/// Output only.
core.String? host;
/// Identifier of the Memcached node.
///
/// The node id does not include project or location like the Memcached
/// instance name.
///
/// Output only.
core.String? nodeId;
/// User defined parameters currently applied to the node.
MemcacheParameters? parameters;
/// The port number of the Memcached server on this node.
///
/// Output only.
core.int? port;
/// Current state of the Memcached node.
///
/// Output only.
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : Node state is not set.
/// - "CREATING" : Node is being created.
/// - "READY" : Node has been created and ready to be used.
/// - "DELETING" : Node is being deleted.
/// - "UPDATING" : Node is being updated.
core.String? state;
/// Location (GCP Zone) for the Memcached node.
///
/// Output only.
core.String? zone;
Node({
this.host,
this.nodeId,
this.parameters,
this.port,
this.state,
this.zone,
});
Node.fromJson(core.Map json_)
: this(
host: json_.containsKey('host') ? json_['host'] as core.String : null,
nodeId: json_.containsKey('nodeId')
? json_['nodeId'] as core.String
: null,
parameters: json_.containsKey('parameters')
? MemcacheParameters.fromJson(
json_['parameters'] as core.Map<core.String, core.dynamic>)
: null,
port: json_.containsKey('port') ? json_['port'] as core.int : null,
state:
json_.containsKey('state') ? json_['state'] as core.String : null,
zone: json_.containsKey('zone') ? json_['zone'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (host != null) 'host': host!,
if (nodeId != null) 'nodeId': nodeId!,
if (parameters != null) 'parameters': parameters!,
if (port != null) 'port': port!,
if (state != null) 'state': state!,
if (zone != null) 'zone': zone!,
};
}
/// Configuration for a Memcached Node.
class NodeConfig {
/// Number of cpus per Memcached node.
///
/// Required.
core.int? cpuCount;
/// Memory size in MiB for each Memcached node.
///
/// Required.
core.int? memorySizeMb;
NodeConfig({
this.cpuCount,
this.memorySizeMb,
});
NodeConfig.fromJson(core.Map json_)
: this(
cpuCount: json_.containsKey('cpuCount')
? json_['cpuCount'] as core.int
: null,
memorySizeMb: json_.containsKey('memorySizeMb')
? json_['memorySizeMb'] as core.int
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (cpuCount != null) 'cpuCount': cpuCount!,
if (memorySizeMb != null) 'memorySizeMb': memorySizeMb!,
};
}
/// This resource represents a long-running operation that is the result of a
/// network API call.
class Operation {
/// If the value is `false`, it means the operation is still in progress.
///
/// If `true`, the operation is completed, and either `error` or `response` is
/// available.
core.bool? done;
/// The error result of the operation in case of failure or cancellation.
Status? error;
/// Service-specific metadata associated with the operation.
///
/// It typically contains progress information and common metadata such as
/// create time. Some services might not provide such metadata. Any method
/// that returns a long-running operation should document the metadata type,
/// if any.
///
/// The values for Object must be JSON objects. It can consist of `num`,
/// `String`, `bool` and `null` as well as `Map` and `List` values.
core.Map<core.String, core.Object?>? metadata;
/// The server-assigned name, which is only unique within the same service
/// that originally returns it.
///
/// If you use the default HTTP mapping, the `name` should be a resource name
/// ending with `operations/{unique_id}`.
core.String? name;
/// The normal response of the operation in case of success.
///
/// If the original method returns no data on success, such as `Delete`, the
/// response is `google.protobuf.Empty`. If the original method is standard
/// `Get`/`Create`/`Update`, the response should be the resource. For other
/// methods, the response should have the type `XxxResponse`, where `Xxx` is
/// the original method name. For example, if the original method name is
/// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
///
/// The values for Object must be JSON objects. It can consist of `num`,
/// `String`, `bool` and `null` as well as `Map` and `List` values.
core.Map<core.String, core.Object?>? response;
Operation({
this.done,
this.error,
this.metadata,
this.name,
this.response,
});
Operation.fromJson(core.Map json_)
: this(
done: json_.containsKey('done') ? json_['done'] as core.bool : null,
error: json_.containsKey('error')
? Status.fromJson(
json_['error'] as core.Map<core.String, core.dynamic>)
: null,
metadata: json_.containsKey('metadata')
? json_['metadata'] as core.Map<core.String, core.dynamic>
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
response: json_.containsKey('response')
? json_['response'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (done != null) 'done': done!,
if (error != null) 'error': error!,
if (metadata != null) 'metadata': metadata!,
if (name != null) 'name': name!,
if (response != null) 'response': response!,
};
}
/// Request for RescheduleMaintenance.
class RescheduleMaintenanceRequest {
/// If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
///
/// Required.
/// Possible string values are:
/// - "RESCHEDULE_TYPE_UNSPECIFIED" : Not set.
/// - "IMMEDIATE" : If the user wants to schedule the maintenance to happen
/// now.
/// - "NEXT_AVAILABLE_WINDOW" : If the user wants to use the existing
/// maintenance policy to find the next available window.
/// - "SPECIFIC_TIME" : If the user wants to reschedule the maintenance to a
/// specific time.
core.String? rescheduleType;
/// Timestamp when the maintenance shall be rescheduled to if
/// reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example
/// `2012-11-15T16:19:00.094Z`.
core.String? scheduleTime;
RescheduleMaintenanceRequest({
this.rescheduleType,
this.scheduleTime,
});
RescheduleMaintenanceRequest.fromJson(core.Map json_)
: this(
rescheduleType: json_.containsKey('rescheduleType')
? json_['rescheduleType'] as core.String
: null,
scheduleTime: json_.containsKey('scheduleTime')
? json_['scheduleTime'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (rescheduleType != null) 'rescheduleType': rescheduleType!,
if (scheduleTime != null) 'scheduleTime': scheduleTime!,
};
}
/// The `Status` type defines a logical error model that is suitable for
/// different programming environments, including REST APIs and RPC APIs.
///
/// It is used by [gRPC](https://github.com/grpc). Each `Status` message
/// contains three pieces of data: error code, error message, and error details.
/// You can find out more about this error model and how to work with it in the
/// [API Design Guide](https://cloud.google.com/apis/design/errors).
typedef Status = $Status;
/// 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`.
typedef TimeOfDay = $TimeOfDay;
/// Request for UpdateParameters.
class UpdateParametersRequest {
/// The parameters to apply to the instance.
MemcacheParameters? parameters;
/// Mask of fields to update.
///
/// Required.
core.String? updateMask;
UpdateParametersRequest({
this.parameters,
this.updateMask,
});
UpdateParametersRequest.fromJson(core.Map json_)
: this(
parameters: json_.containsKey('parameters')
? MemcacheParameters.fromJson(
json_['parameters'] as core.Map<core.String, core.dynamic>)
: null,
updateMask: json_.containsKey('updateMask')
? json_['updateMask'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (parameters != null) 'parameters': parameters!,
if (updateMask != null) 'updateMask': updateMask!,
};
}
/// Time window specified for weekly operations.
class WeeklyMaintenanceWindow {
/// Allows to define schedule that runs specified day of the week.
///
/// Required.
/// Possible string values are:
/// - "DAY_OF_WEEK_UNSPECIFIED" : The day of the week is unspecified.
/// - "MONDAY" : Monday
/// - "TUESDAY" : Tuesday
/// - "WEDNESDAY" : Wednesday
/// - "THURSDAY" : Thursday
/// - "FRIDAY" : Friday
/// - "SATURDAY" : Saturday
/// - "SUNDAY" : Sunday
core.String? day;
/// Duration of the time window.
///
/// Required.
core.String? duration;
/// Start time of the window in UTC.
///
/// Required.
TimeOfDay? startTime;
WeeklyMaintenanceWindow({
this.day,
this.duration,
this.startTime,
});
WeeklyMaintenanceWindow.fromJson(core.Map json_)
: this(
day: json_.containsKey('day') ? json_['day'] as core.String : null,
duration: json_.containsKey('duration')
? json_['duration'] as core.String
: null,
startTime: json_.containsKey('startTime')
? TimeOfDay.fromJson(
json_['startTime'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (day != null) 'day': day!,
if (duration != null) 'duration': duration!,
if (startTime != null) 'startTime': startTime!,
};
}
| googleapis.dart/generated/googleapis/lib/memcache/v1.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/lib/memcache/v1.dart', 'repo_id': 'googleapis.dart', 'token_count': 20121} |
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// 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
/// Smart Device Management API - v1
///
/// Allow select enterprise partners to access, control, and manage Google and
/// Nest devices programmatically.
///
/// For more information, see <https://developers.google.com/nest/device-access>
///
/// Create an instance of [SmartDeviceManagementApi] to access these resources:
///
/// - [EnterprisesResource]
/// - [EnterprisesDevicesResource]
/// - [EnterprisesStructuresResource]
/// - [EnterprisesStructuresRoomsResource]
library smartdevicemanagement_v1;
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
import '../src/user_agent.dart';
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
/// Allow select enterprise partners to access, control, and manage Google and
/// Nest devices programmatically.
class SmartDeviceManagementApi {
/// See and/or control the devices that you selected
static const sdmServiceScope = 'https://www.googleapis.com/auth/sdm.service';
/// See your primary Google Account email address
static const userinfoEmailScope =
'https://www.googleapis.com/auth/userinfo.email';
final commons.ApiRequester _requester;
EnterprisesResource get enterprises => EnterprisesResource(_requester);
SmartDeviceManagementApi(http.Client client,
{core.String rootUrl = 'https://smartdevicemanagement.googleapis.com/',
core.String servicePath = ''})
: _requester =
commons.ApiRequester(client, rootUrl, servicePath, requestHeaders);
}
class EnterprisesResource {
final commons.ApiRequester _requester;
EnterprisesDevicesResource get devices =>
EnterprisesDevicesResource(_requester);
EnterprisesStructuresResource get structures =>
EnterprisesStructuresResource(_requester);
EnterprisesResource(commons.ApiRequester client) : _requester = client;
}
class EnterprisesDevicesResource {
final commons.ApiRequester _requester;
EnterprisesDevicesResource(commons.ApiRequester client) : _requester = client;
/// Executes a command to device managed by the enterprise.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - The name of the device requested. For example:
/// "enterprises/XYZ/devices/123"
/// Value must have pattern `^enterprises/\[^/\]+/devices/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse].
///
/// 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<GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>
executeCommand(
GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest request,
core.String name, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':executeCommand';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Gets a device managed by the enterprise.
///
/// Request parameters:
///
/// [name] - The name of the device requested. For example:
/// "enterprises/XYZ/devices/123"
/// Value must have pattern `^enterprises/\[^/\]+/devices/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [GoogleHomeEnterpriseSdmV1Device].
///
/// 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<GoogleHomeEnterpriseSdmV1Device> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleHomeEnterpriseSdmV1Device.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Lists devices managed by the enterprise.
///
/// Request parameters:
///
/// [parent] - The parent enterprise to list devices under. E.g.
/// "enterprises/XYZ".
/// Value must have pattern `^enterprises/\[^/\]+$`.
///
/// [filter] - Optional filter to list devices. Filters can be done on: Device
/// custom name (substring match): 'customName=wing'
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [GoogleHomeEnterpriseSdmV1ListDevicesResponse].
///
/// 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<GoogleHomeEnterpriseSdmV1ListDevicesResponse> list(
core.String parent, {
core.String? filter,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/devices';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleHomeEnterpriseSdmV1ListDevicesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
class EnterprisesStructuresResource {
final commons.ApiRequester _requester;
EnterprisesStructuresRoomsResource get rooms =>
EnterprisesStructuresRoomsResource(_requester);
EnterprisesStructuresResource(commons.ApiRequester client)
: _requester = client;
/// Gets a structure managed by the enterprise.
///
/// Request parameters:
///
/// [name] - The name of the structure requested. For example:
/// "enterprises/XYZ/structures/ABC".
/// Value must have pattern `^enterprises/\[^/\]+/structures/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [GoogleHomeEnterpriseSdmV1Structure].
///
/// 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<GoogleHomeEnterpriseSdmV1Structure> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleHomeEnterpriseSdmV1Structure.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Lists structures managed by the enterprise.
///
/// Request parameters:
///
/// [parent] - The parent enterprise to list structures under. E.g.
/// "enterprises/XYZ".
/// Value must have pattern `^enterprises/\[^/\]+$`.
///
/// [filter] - Optional filter to list structures.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [GoogleHomeEnterpriseSdmV1ListStructuresResponse].
///
/// 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<GoogleHomeEnterpriseSdmV1ListStructuresResponse> list(
core.String parent, {
core.String? filter,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/structures';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleHomeEnterpriseSdmV1ListStructuresResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
class EnterprisesStructuresRoomsResource {
final commons.ApiRequester _requester;
EnterprisesStructuresRoomsResource(commons.ApiRequester client)
: _requester = client;
/// Gets a room managed by the enterprise.
///
/// Request parameters:
///
/// [name] - The name of the room requested. For example:
/// "enterprises/XYZ/structures/ABC/rooms/123".
/// Value must have pattern
/// `^enterprises/\[^/\]+/structures/\[^/\]+/rooms/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [GoogleHomeEnterpriseSdmV1Room].
///
/// 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<GoogleHomeEnterpriseSdmV1Room> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleHomeEnterpriseSdmV1Room.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Lists rooms managed by the enterprise.
///
/// Request parameters:
///
/// [parent] - The parent resource name of the rooms requested. For example:
/// "enterprises/XYZ/structures/ABC".
/// Value must have pattern `^enterprises/\[^/\]+/structures/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [GoogleHomeEnterpriseSdmV1ListRoomsResponse].
///
/// 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<GoogleHomeEnterpriseSdmV1ListRoomsResponse> list(
core.String parent, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/rooms';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleHomeEnterpriseSdmV1ListRoomsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
/// Device resource represents an instance of enterprise managed device in the
/// property.
class GoogleHomeEnterpriseSdmV1Device {
/// The resource name of the device.
///
/// For example: "enterprises/XYZ/devices/123".
///
/// Required.
core.String? name;
/// Assignee details of the device.
core.List<GoogleHomeEnterpriseSdmV1ParentRelation>? parentRelations;
/// Device traits.
///
/// Output only.
///
/// 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?>? traits;
/// Type of the device for general display purposes.
///
/// For example: "THERMOSTAT". The device type should not be used to deduce or
/// infer functionality of the actual device it is assigned to. Instead, use
/// the returned traits for the device.
///
/// Output only.
core.String? type;
GoogleHomeEnterpriseSdmV1Device({
this.name,
this.parentRelations,
this.traits,
this.type,
});
GoogleHomeEnterpriseSdmV1Device.fromJson(core.Map json_)
: this(
name: json_.containsKey('name') ? json_['name'] as core.String : null,
parentRelations: json_.containsKey('parentRelations')
? (json_['parentRelations'] as core.List)
.map((value) =>
GoogleHomeEnterpriseSdmV1ParentRelation.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
traits: json_.containsKey('traits')
? json_['traits'] as core.Map<core.String, core.dynamic>
: null,
type: json_.containsKey('type') ? json_['type'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (name != null) 'name': name!,
if (parentRelations != null) 'parentRelations': parentRelations!,
if (traits != null) 'traits': traits!,
if (type != null) 'type': type!,
};
}
/// Request message for SmartDeviceManagementService.ExecuteDeviceCommand
class GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest {
/// The command name to execute, represented by the fully qualified protobuf
/// message name.
core.String? command;
/// The command message to execute, represented as a Struct.
///
/// 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?>? params;
GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest({
this.command,
this.params,
});
GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest.fromJson(core.Map json_)
: this(
command: json_.containsKey('command')
? json_['command'] as core.String
: null,
params: json_.containsKey('params')
? json_['params'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (command != null) 'command': command!,
if (params != null) 'params': params!,
};
}
/// Response message for SmartDeviceManagementService.ExecuteDeviceCommand
class GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse {
/// The results of executing the command.
///
/// 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?>? results;
GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse({
this.results,
});
GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse.fromJson(core.Map json_)
: this(
results: json_.containsKey('results')
? json_['results'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (results != null) 'results': results!,
};
}
/// Response message for SmartDeviceManagementService.ListDevices
class GoogleHomeEnterpriseSdmV1ListDevicesResponse {
/// The list of devices.
core.List<GoogleHomeEnterpriseSdmV1Device>? devices;
GoogleHomeEnterpriseSdmV1ListDevicesResponse({
this.devices,
});
GoogleHomeEnterpriseSdmV1ListDevicesResponse.fromJson(core.Map json_)
: this(
devices: json_.containsKey('devices')
? (json_['devices'] as core.List)
.map((value) => GoogleHomeEnterpriseSdmV1Device.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (devices != null) 'devices': devices!,
};
}
/// Response message for SmartDeviceManagementService.ListRooms
class GoogleHomeEnterpriseSdmV1ListRoomsResponse {
/// The list of rooms.
core.List<GoogleHomeEnterpriseSdmV1Room>? rooms;
GoogleHomeEnterpriseSdmV1ListRoomsResponse({
this.rooms,
});
GoogleHomeEnterpriseSdmV1ListRoomsResponse.fromJson(core.Map json_)
: this(
rooms: json_.containsKey('rooms')
? (json_['rooms'] as core.List)
.map((value) => GoogleHomeEnterpriseSdmV1Room.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (rooms != null) 'rooms': rooms!,
};
}
/// Response message for SmartDeviceManagementService.ListStructures
class GoogleHomeEnterpriseSdmV1ListStructuresResponse {
/// The list of structures.
core.List<GoogleHomeEnterpriseSdmV1Structure>? structures;
GoogleHomeEnterpriseSdmV1ListStructuresResponse({
this.structures,
});
GoogleHomeEnterpriseSdmV1ListStructuresResponse.fromJson(core.Map json_)
: this(
structures: json_.containsKey('structures')
? (json_['structures'] as core.List)
.map((value) => GoogleHomeEnterpriseSdmV1Structure.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (structures != null) 'structures': structures!,
};
}
/// Represents device relationships, for instance, structure/room to which the
/// device is assigned to.
class GoogleHomeEnterpriseSdmV1ParentRelation {
/// The custom name of the relation -- e.g., structure/room where the device
/// is assigned to.
///
/// Output only.
core.String? displayName;
/// The name of the relation -- e.g., structure/room where the device is
/// assigned to.
///
/// For example: "enterprises/XYZ/structures/ABC" or
/// "enterprises/XYZ/structures/ABC/rooms/123"
///
/// Output only.
core.String? parent;
GoogleHomeEnterpriseSdmV1ParentRelation({
this.displayName,
this.parent,
});
GoogleHomeEnterpriseSdmV1ParentRelation.fromJson(core.Map json_)
: this(
displayName: json_.containsKey('displayName')
? json_['displayName'] as core.String
: null,
parent: json_.containsKey('parent')
? json_['parent'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (displayName != null) 'displayName': displayName!,
if (parent != null) 'parent': parent!,
};
}
/// Room resource represents an instance of sub-space within a structure such as
/// rooms in a hotel suite or rental apartment.
class GoogleHomeEnterpriseSdmV1Room {
/// The resource name of the room.
///
/// For example: "enterprises/XYZ/structures/ABC/rooms/123".
///
/// Output only.
core.String? name;
/// Room traits.
///
/// 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?>? traits;
GoogleHomeEnterpriseSdmV1Room({
this.name,
this.traits,
});
GoogleHomeEnterpriseSdmV1Room.fromJson(core.Map json_)
: this(
name: json_.containsKey('name') ? json_['name'] as core.String : null,
traits: json_.containsKey('traits')
? json_['traits'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (name != null) 'name': name!,
if (traits != null) 'traits': traits!,
};
}
/// Structure resource represents an instance of enterprise managed home or
/// hotel room.
class GoogleHomeEnterpriseSdmV1Structure {
/// The resource name of the structure.
///
/// For example: "enterprises/XYZ/structures/ABC".
///
/// Output only.
core.String? name;
/// Structure traits.
///
/// 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?>? traits;
GoogleHomeEnterpriseSdmV1Structure({
this.name,
this.traits,
});
GoogleHomeEnterpriseSdmV1Structure.fromJson(core.Map json_)
: this(
name: json_.containsKey('name') ? json_['name'] as core.String : null,
traits: json_.containsKey('traits')
? json_['traits'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (name != null) 'name': name!,
if (traits != null) 'traits': traits!,
};
}
| googleapis.dart/generated/googleapis/lib/smartdevicemanagement/v1.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/lib/smartdevicemanagement/v1.dart', 'repo_id': 'googleapis.dart', 'token_count': 7903} |
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// 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
/// Traffic Director API - v2
///
/// For more information, see <https://cloud.google.com/traffic-director>
///
/// Create an instance of [TrafficDirectorServiceApi] to access these resources:
///
/// - [DiscoveryResource]
library trafficdirector_v2;
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
import '../shared.dart';
import '../src/user_agent.dart';
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
class TrafficDirectorServiceApi {
/// See, edit, configure, and delete your Google Cloud data and see the email
/// address for your Google Account.
static const cloudPlatformScope =
'https://www.googleapis.com/auth/cloud-platform';
final commons.ApiRequester _requester;
DiscoveryResource get discovery => DiscoveryResource(_requester);
TrafficDirectorServiceApi(http.Client client,
{core.String rootUrl = 'https://trafficdirector.googleapis.com/',
core.String servicePath = ''})
: _requester =
commons.ApiRequester(client, rootUrl, servicePath, requestHeaders);
}
class DiscoveryResource {
final commons.ApiRequester _requester;
DiscoveryResource(commons.ApiRequester client) : _requester = client;
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ClientStatusResponse].
///
/// 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<ClientStatusResponse> clientStatus(
ClientStatusRequest request, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v2/discovery:client_status';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return ClientStatusResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
/// Addresses specify either a logical or physical address and port, which are
/// used to tell Envoy where to bind/listen, connect to upstream and find
/// management servers.
class Address {
Pipe? pipe;
SocketAddress? socketAddress;
Address({
this.pipe,
this.socketAddress,
});
Address.fromJson(core.Map json_)
: this(
pipe: json_.containsKey('pipe')
? Pipe.fromJson(
json_['pipe'] as core.Map<core.String, core.dynamic>)
: null,
socketAddress: json_.containsKey('socketAddress')
? SocketAddress.fromJson(
json_['socketAddress'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (pipe != null) 'pipe': pipe!,
if (socketAddress != null) 'socketAddress': socketAddress!,
};
}
/// BuildVersion combines SemVer version of extension with free-form build
/// information (i.e. 'alpha', 'private-build') as a set of strings.
class BuildVersion {
/// Free-form build information.
///
/// Envoy defines several well known keys in the
/// source/common/version/version.h file
///
/// 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;
/// SemVer version of extension.
SemanticVersion? version;
BuildVersion({
this.metadata,
this.version,
});
BuildVersion.fromJson(core.Map json_)
: this(
metadata: json_.containsKey('metadata')
? json_['metadata'] as core.Map<core.String, core.dynamic>
: null,
version: json_.containsKey('version')
? SemanticVersion.fromJson(
json_['version'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (metadata != null) 'metadata': metadata!,
if (version != null) 'version': version!,
};
}
/// All xds configs for a particular client.
class ClientConfig {
/// Node for a particular client.
Node? node;
core.List<PerXdsConfig>? xdsConfig;
ClientConfig({
this.node,
this.xdsConfig,
});
ClientConfig.fromJson(core.Map json_)
: this(
node: json_.containsKey('node')
? Node.fromJson(
json_['node'] as core.Map<core.String, core.dynamic>)
: null,
xdsConfig: json_.containsKey('xdsConfig')
? (json_['xdsConfig'] as core.List)
.map((value) => PerXdsConfig.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (node != null) 'node': node!,
if (xdsConfig != null) 'xdsConfig': xdsConfig!,
};
}
/// Request for client status of clients identified by a list of NodeMatchers.
class ClientStatusRequest {
/// Management server can use these match criteria to identify clients.
///
/// The match follows OR semantics.
core.List<NodeMatcher>? nodeMatchers;
ClientStatusRequest({
this.nodeMatchers,
});
ClientStatusRequest.fromJson(core.Map json_)
: this(
nodeMatchers: json_.containsKey('nodeMatchers')
? (json_['nodeMatchers'] as core.List)
.map((value) => NodeMatcher.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (nodeMatchers != null) 'nodeMatchers': nodeMatchers!,
};
}
class ClientStatusResponse {
/// Client configs for the clients specified in the ClientStatusRequest.
core.List<ClientConfig>? config;
ClientStatusResponse({
this.config,
});
ClientStatusResponse.fromJson(core.Map json_)
: this(
config: json_.containsKey('config')
? (json_['config'] as core.List)
.map((value) => ClientConfig.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (config != null) 'config': config!,
};
}
/// Envoy's cluster manager fills this message with all currently known
/// clusters.
///
/// Cluster configuration information can be used to recreate an Envoy
/// configuration by populating all clusters as static clusters or by returning
/// them in a CDS response.
class ClustersConfigDump {
/// The dynamically loaded active clusters.
///
/// These are clusters that are available to service data plane traffic.
core.List<DynamicCluster>? dynamicActiveClusters;
/// The dynamically loaded warming clusters.
///
/// These are clusters that are currently undergoing warming in preparation to
/// service data plane traffic. Note that if attempting to recreate an Envoy
/// configuration from a configuration dump, the warming clusters should
/// generally be discarded.
core.List<DynamicCluster>? dynamicWarmingClusters;
/// The statically loaded cluster configs.
core.List<StaticCluster>? staticClusters;
/// This is the :ref:`version_info ` in the last processed CDS discovery
/// response.
///
/// If there are only static bootstrap clusters, this field will be "".
core.String? versionInfo;
ClustersConfigDump({
this.dynamicActiveClusters,
this.dynamicWarmingClusters,
this.staticClusters,
this.versionInfo,
});
ClustersConfigDump.fromJson(core.Map json_)
: this(
dynamicActiveClusters: json_.containsKey('dynamicActiveClusters')
? (json_['dynamicActiveClusters'] as core.List)
.map((value) => DynamicCluster.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
dynamicWarmingClusters: json_.containsKey('dynamicWarmingClusters')
? (json_['dynamicWarmingClusters'] as core.List)
.map((value) => DynamicCluster.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
staticClusters: json_.containsKey('staticClusters')
? (json_['staticClusters'] as core.List)
.map((value) => StaticCluster.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
versionInfo: json_.containsKey('versionInfo')
? json_['versionInfo'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (dynamicActiveClusters != null)
'dynamicActiveClusters': dynamicActiveClusters!,
if (dynamicWarmingClusters != null)
'dynamicWarmingClusters': dynamicWarmingClusters!,
if (staticClusters != null) 'staticClusters': staticClusters!,
if (versionInfo != null) 'versionInfo': versionInfo!,
};
}
/// Specifies the way to match a double value.
class DoubleMatcher {
/// If specified, the input double value must be equal to the value specified
/// here.
core.double? exact;
/// If specified, the input double value must be in the range specified here.
///
/// Note: The range is using half-open interval semantics \[start, end).
DoubleRange? range;
DoubleMatcher({
this.exact,
this.range,
});
DoubleMatcher.fromJson(core.Map json_)
: this(
exact: json_.containsKey('exact')
? (json_['exact'] as core.num).toDouble()
: null,
range: json_.containsKey('range')
? DoubleRange.fromJson(
json_['range'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (exact != null) 'exact': exact!,
if (range != null) 'range': range!,
};
}
/// Specifies the double start and end of the range using half-open interval
/// semantics \[start, end).
class DoubleRange {
/// end of the range (exclusive)
core.double? end;
/// start of the range (inclusive)
core.double? start;
DoubleRange({
this.end,
this.start,
});
DoubleRange.fromJson(core.Map json_)
: this(
end: json_.containsKey('end')
? (json_['end'] as core.num).toDouble()
: null,
start: json_.containsKey('start')
? (json_['start'] as core.num).toDouble()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (end != null) 'end': end!,
if (start != null) 'start': start!,
};
}
/// Describes a dynamically loaded cluster via the CDS API.
class DynamicCluster {
/// The cluster config.
///
/// 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?>? cluster;
/// The timestamp when the Cluster was last updated.
core.String? lastUpdated;
/// This is the per-resource version information.
///
/// This version is currently taken from the :ref:`version_info ` field at the
/// time that the cluster was loaded. In the future, discrete per-cluster
/// versions may be supported by the API.
core.String? versionInfo;
DynamicCluster({
this.cluster,
this.lastUpdated,
this.versionInfo,
});
DynamicCluster.fromJson(core.Map json_)
: this(
cluster: json_.containsKey('cluster')
? json_['cluster'] as core.Map<core.String, core.dynamic>
: null,
lastUpdated: json_.containsKey('lastUpdated')
? json_['lastUpdated'] as core.String
: null,
versionInfo: json_.containsKey('versionInfo')
? json_['versionInfo'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (cluster != null) 'cluster': cluster!,
if (lastUpdated != null) 'lastUpdated': lastUpdated!,
if (versionInfo != null) 'versionInfo': versionInfo!,
};
}
/// Describes a dynamically loaded listener via the LDS API.
///
/// \[#next-free-field: 6\]
class DynamicListener {
/// The listener state for any active listener by this name.
///
/// These are listeners that are available to service data plane traffic.
DynamicListenerState? activeState;
/// The listener state for any draining listener by this name.
///
/// These are listeners that are currently undergoing draining in preparation
/// to stop servicing data plane traffic. Note that if attempting to recreate
/// an Envoy configuration from a configuration dump, the draining listeners
/// should generally be discarded.
DynamicListenerState? drainingState;
/// Set if the last update failed, cleared after the next successful update.
UpdateFailureState? errorState;
/// The name or unique id of this listener, pulled from the
/// DynamicListenerState config.
core.String? name;
/// The listener state for any warming listener by this name.
///
/// These are listeners that are currently undergoing warming in preparation
/// to service data plane traffic. Note that if attempting to recreate an
/// Envoy configuration from a configuration dump, the warming listeners
/// should generally be discarded.
DynamicListenerState? warmingState;
DynamicListener({
this.activeState,
this.drainingState,
this.errorState,
this.name,
this.warmingState,
});
DynamicListener.fromJson(core.Map json_)
: this(
activeState: json_.containsKey('activeState')
? DynamicListenerState.fromJson(
json_['activeState'] as core.Map<core.String, core.dynamic>)
: null,
drainingState: json_.containsKey('drainingState')
? DynamicListenerState.fromJson(
json_['drainingState'] as core.Map<core.String, core.dynamic>)
: null,
errorState: json_.containsKey('errorState')
? UpdateFailureState.fromJson(
json_['errorState'] as core.Map<core.String, core.dynamic>)
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
warmingState: json_.containsKey('warmingState')
? DynamicListenerState.fromJson(
json_['warmingState'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (activeState != null) 'activeState': activeState!,
if (drainingState != null) 'drainingState': drainingState!,
if (errorState != null) 'errorState': errorState!,
if (name != null) 'name': name!,
if (warmingState != null) 'warmingState': warmingState!,
};
}
class DynamicListenerState {
/// The timestamp when the Listener was last successfully updated.
core.String? lastUpdated;
/// The listener config.
///
/// 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?>? listener;
/// This is the per-resource version information.
///
/// This version is currently taken from the :ref:`version_info ` field at the
/// time that the listener was loaded. In the future, discrete per-listener
/// versions may be supported by the API.
core.String? versionInfo;
DynamicListenerState({
this.lastUpdated,
this.listener,
this.versionInfo,
});
DynamicListenerState.fromJson(core.Map json_)
: this(
lastUpdated: json_.containsKey('lastUpdated')
? json_['lastUpdated'] as core.String
: null,
listener: json_.containsKey('listener')
? json_['listener'] as core.Map<core.String, core.dynamic>
: null,
versionInfo: json_.containsKey('versionInfo')
? json_['versionInfo'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (lastUpdated != null) 'lastUpdated': lastUpdated!,
if (listener != null) 'listener': listener!,
if (versionInfo != null) 'versionInfo': versionInfo!,
};
}
class DynamicRouteConfig {
/// The timestamp when the Route was last updated.
core.String? lastUpdated;
/// The route config.
///
/// 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?>? routeConfig;
/// This is the per-resource version information.
///
/// This version is currently taken from the :ref:`version_info ` field at the
/// time that the route configuration was loaded.
core.String? versionInfo;
DynamicRouteConfig({
this.lastUpdated,
this.routeConfig,
this.versionInfo,
});
DynamicRouteConfig.fromJson(core.Map json_)
: this(
lastUpdated: json_.containsKey('lastUpdated')
? json_['lastUpdated'] as core.String
: null,
routeConfig: json_.containsKey('routeConfig')
? json_['routeConfig'] as core.Map<core.String, core.dynamic>
: null,
versionInfo: json_.containsKey('versionInfo')
? json_['versionInfo'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (lastUpdated != null) 'lastUpdated': lastUpdated!,
if (routeConfig != null) 'routeConfig': routeConfig!,
if (versionInfo != null) 'versionInfo': versionInfo!,
};
}
class DynamicScopedRouteConfigs {
/// The timestamp when the scoped route config set was last updated.
core.String? lastUpdated;
/// The name assigned to the scoped route configurations.
core.String? name;
/// The scoped route configurations.
///
/// 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?>>? scopedRouteConfigs;
/// This is the per-resource version information.
///
/// This version is currently taken from the :ref:`version_info ` field at the
/// time that the scoped routes configuration was loaded.
core.String? versionInfo;
DynamicScopedRouteConfigs({
this.lastUpdated,
this.name,
this.scopedRouteConfigs,
this.versionInfo,
});
DynamicScopedRouteConfigs.fromJson(core.Map json_)
: this(
lastUpdated: json_.containsKey('lastUpdated')
? json_['lastUpdated'] as core.String
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
scopedRouteConfigs: json_.containsKey('scopedRouteConfigs')
? (json_['scopedRouteConfigs'] as core.List)
.map((value) => value as core.Map<core.String, core.dynamic>)
.toList()
: null,
versionInfo: json_.containsKey('versionInfo')
? json_['versionInfo'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (lastUpdated != null) 'lastUpdated': lastUpdated!,
if (name != null) 'name': name!,
if (scopedRouteConfigs != null)
'scopedRouteConfigs': scopedRouteConfigs!,
if (versionInfo != null) 'versionInfo': versionInfo!,
};
}
/// Version and identification for an Envoy extension.
///
/// \[#next-free-field: 6\]
class Extension {
/// Category of the extension.
///
/// Extension category names use reverse DNS notation. For instance
/// "envoy.filters.listener" for Envoy's built-in listener filters or
/// "com.acme.filters.http" for HTTP filters from acme.com vendor. \[#comment:
core.String? category;
/// Indicates that the extension is present but was disabled via dynamic
/// configuration.
core.bool? disabled;
/// This is the name of the Envoy filter as specified in the Envoy
/// configuration, e.g. envoy.filters.http.router, com.acme.widget.
core.String? name;
/// \[#not-implemented-hide:\] Type descriptor of extension configuration
/// proto.
///
/// \[#comment:
core.String? typeDescriptor;
/// The version is a property of the extension and maintained independently of
/// other extensions and the Envoy API.
///
/// This field is not set when extension did not provide version information.
BuildVersion? version;
Extension({
this.category,
this.disabled,
this.name,
this.typeDescriptor,
this.version,
});
Extension.fromJson(core.Map json_)
: this(
category: json_.containsKey('category')
? json_['category'] as core.String
: null,
disabled: json_.containsKey('disabled')
? json_['disabled'] as core.bool
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
typeDescriptor: json_.containsKey('typeDescriptor')
? json_['typeDescriptor'] as core.String
: null,
version: json_.containsKey('version')
? BuildVersion.fromJson(
json_['version'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (category != null) 'category': category!,
if (disabled != null) 'disabled': disabled!,
if (name != null) 'name': name!,
if (typeDescriptor != null) 'typeDescriptor': typeDescriptor!,
if (version != null) 'version': version!,
};
}
/// Google's `RE2 `_ regex engine.
///
/// The regex string must adhere to the documented `syntax `_. The engine is
/// designed to complete execution in linear time as well as limit the amount of
/// memory used. Envoy supports program size checking via runtime. The runtime
/// keys ``re2.max_program_size.error_level`` and
/// ``re2.max_program_size.warn_level`` can be set to integers as the maximum
/// program size or complexity that a compiled regex can have before an
/// exception is thrown or a warning is logged, respectively.
/// ``re2.max_program_size.error_level`` defaults to 100, and
/// ``re2.max_program_size.warn_level`` has no default if unset (will not
/// check/log a warning). Envoy emits two stats for tracking the program size of
/// regexes: the histogram `re2.program_size`, which records the program size,
/// and the counter `re2.exceeded_warn_level`, which is incremented each time
/// the program size exceeds the warn level threshold.
class GoogleRE2 {
/// This field controls the RE2 "program size" which is a rough estimate of
/// how complex a compiled regex is to evaluate.
///
/// A regex that has a program size greater than the configured value will
/// fail to compile. In this case, the configured max program size can be
/// increased or the regex can be simplified. If not specified, the default is
/// 100. This field is deprecated; regexp validation should be performed on
/// the management server instead of being done by each individual client.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.int? maxProgramSize;
GoogleRE2({
this.maxProgramSize,
});
GoogleRE2.fromJson(core.Map json_)
: this(
maxProgramSize: json_.containsKey('maxProgramSize')
? json_['maxProgramSize'] as core.int
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (maxProgramSize != null) 'maxProgramSize': maxProgramSize!,
};
}
class InlineScopedRouteConfigs {
/// The timestamp when the scoped route config set was last updated.
core.String? lastUpdated;
/// The name assigned to the scoped route configurations.
core.String? name;
/// The scoped route configurations.
///
/// 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?>>? scopedRouteConfigs;
InlineScopedRouteConfigs({
this.lastUpdated,
this.name,
this.scopedRouteConfigs,
});
InlineScopedRouteConfigs.fromJson(core.Map json_)
: this(
lastUpdated: json_.containsKey('lastUpdated')
? json_['lastUpdated'] as core.String
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
scopedRouteConfigs: json_.containsKey('scopedRouteConfigs')
? (json_['scopedRouteConfigs'] as core.List)
.map((value) => value as core.Map<core.String, core.dynamic>)
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (lastUpdated != null) 'lastUpdated': lastUpdated!,
if (name != null) 'name': name!,
if (scopedRouteConfigs != null)
'scopedRouteConfigs': scopedRouteConfigs!,
};
}
/// Specifies the way to match a list value.
class ListMatcher {
/// If specified, at least one of the values in the list must match the value
/// specified.
ValueMatcher? oneOf;
ListMatcher({
this.oneOf,
});
ListMatcher.fromJson(core.Map json_)
: this(
oneOf: json_.containsKey('oneOf')
? ValueMatcher.fromJson(
json_['oneOf'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (oneOf != null) 'oneOf': oneOf!,
};
}
/// Envoy's listener manager fills this message with all currently known
/// listeners.
///
/// Listener configuration information can be used to recreate an Envoy
/// configuration by populating all listeners as static listeners or by
/// returning them in a LDS response.
class ListenersConfigDump {
/// State for any warming, active, or draining listeners.
core.List<DynamicListener>? dynamicListeners;
/// The statically loaded listener configs.
core.List<StaticListener>? staticListeners;
/// This is the :ref:`version_info ` in the last processed LDS discovery
/// response.
///
/// If there are only static bootstrap listeners, this field will be "".
core.String? versionInfo;
ListenersConfigDump({
this.dynamicListeners,
this.staticListeners,
this.versionInfo,
});
ListenersConfigDump.fromJson(core.Map json_)
: this(
dynamicListeners: json_.containsKey('dynamicListeners')
? (json_['dynamicListeners'] as core.List)
.map((value) => DynamicListener.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
staticListeners: json_.containsKey('staticListeners')
? (json_['staticListeners'] as core.List)
.map((value) => StaticListener.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
versionInfo: json_.containsKey('versionInfo')
? json_['versionInfo'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (dynamicListeners != null) 'dynamicListeners': dynamicListeners!,
if (staticListeners != null) 'staticListeners': staticListeners!,
if (versionInfo != null) 'versionInfo': versionInfo!,
};
}
/// Identifies location of where either Envoy runs or where upstream hosts run.
class Locality {
/// Region this :ref:`zone ` belongs to.
core.String? region;
/// When used for locality of upstream hosts, this field further splits zone
/// into smaller chunks of sub-zones so they can be load balanced
/// independently.
core.String? subZone;
/// Defines the local service zone where Envoy is running.
///
/// Though optional, it should be set if discovery service routing is used and
/// the discovery service exposes :ref:`zone data `, either in this message or
/// via :option:`--service-zone`. The meaning of zone is context dependent,
/// e.g. `Availability Zone (AZ) `_ on AWS, `Zone `_ on GCP, etc.
core.String? zone;
Locality({
this.region,
this.subZone,
this.zone,
});
Locality.fromJson(core.Map json_)
: this(
region: json_.containsKey('region')
? json_['region'] as core.String
: null,
subZone: json_.containsKey('subZone')
? json_['subZone'] as core.String
: null,
zone: json_.containsKey('zone') ? json_['zone'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (region != null) 'region': region!,
if (subZone != null) 'subZone': subZone!,
if (zone != null) 'zone': zone!,
};
}
/// Identifies a specific Envoy instance.
///
/// The node identifier is presented to the management server, which may use
/// this identifier to distinguish per Envoy configuration for serving.
/// \[#next-free-field: 12\]
class Node {
/// This is motivated by informing a management server during canary which
/// version of Envoy is being tested in a heterogeneous fleet.
///
/// This will be set by Envoy in management server RPCs. This field is
/// deprecated in favor of the user_agent_name and user_agent_version values.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.String? buildVersion;
/// Client feature support list.
///
/// These are well known features described in the Envoy API repository for a
/// given major version of an API. Client features use reverse DNS naming
/// scheme, for example `com.acme.feature`. See :ref:`the list of features `
/// that xDS client may support.
core.List<core.String>? clientFeatures;
/// Defines the local service cluster name where Envoy is running.
///
/// Though optional, it should be set if any of the following features are
/// used: :ref:`statsd `, :ref:`health check cluster verification `,
/// :ref:`runtime override directory `, :ref:`user agent addition `,
/// :ref:`HTTP global rate limiting `, :ref:`CDS `, and :ref:`HTTP tracing `,
/// either in this message or via :option:`--service-cluster`.
core.String? cluster;
/// List of extensions and their versions supported by the node.
core.List<Extension>? extensions;
/// An opaque node identifier for the Envoy node.
///
/// This also provides the local service node name. It should be set if any of
/// the following features are used: :ref:`statsd `, :ref:`CDS `, and
/// :ref:`HTTP tracing `, either in this message or via
/// :option:`--service-node`.
core.String? id;
/// Known listening ports on the node as a generic hint to the management
/// server for filtering :ref:`listeners ` to be returned.
///
/// For example, if there is a listener bound to port 80, the list can
/// optionally contain the SocketAddress `(0.0.0.0,80)`. The field is optional
/// and just a hint.
core.List<Address>? listeningAddresses;
/// Locality specifying where the Envoy instance is running.
Locality? locality;
/// Opaque metadata extending the node identifier.
///
/// Envoy will pass this directly to the management server.
///
/// 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;
/// Structured version of the entity requesting config.
BuildVersion? userAgentBuildVersion;
/// Free-form string that identifies the entity requesting config.
///
/// E.g. "envoy" or "grpc"
core.String? userAgentName;
/// Free-form string that identifies the version of the entity requesting
/// config.
///
/// E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild"
core.String? userAgentVersion;
Node({
this.buildVersion,
this.clientFeatures,
this.cluster,
this.extensions,
this.id,
this.listeningAddresses,
this.locality,
this.metadata,
this.userAgentBuildVersion,
this.userAgentName,
this.userAgentVersion,
});
Node.fromJson(core.Map json_)
: this(
buildVersion: json_.containsKey('buildVersion')
? json_['buildVersion'] as core.String
: null,
clientFeatures: json_.containsKey('clientFeatures')
? (json_['clientFeatures'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
cluster: json_.containsKey('cluster')
? json_['cluster'] as core.String
: null,
extensions: json_.containsKey('extensions')
? (json_['extensions'] as core.List)
.map((value) => Extension.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
id: json_.containsKey('id') ? json_['id'] as core.String : null,
listeningAddresses: json_.containsKey('listeningAddresses')
? (json_['listeningAddresses'] as core.List)
.map((value) => Address.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
locality: json_.containsKey('locality')
? Locality.fromJson(
json_['locality'] as core.Map<core.String, core.dynamic>)
: null,
metadata: json_.containsKey('metadata')
? json_['metadata'] as core.Map<core.String, core.dynamic>
: null,
userAgentBuildVersion: json_.containsKey('userAgentBuildVersion')
? BuildVersion.fromJson(json_['userAgentBuildVersion']
as core.Map<core.String, core.dynamic>)
: null,
userAgentName: json_.containsKey('userAgentName')
? json_['userAgentName'] as core.String
: null,
userAgentVersion: json_.containsKey('userAgentVersion')
? json_['userAgentVersion'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (buildVersion != null) 'buildVersion': buildVersion!,
if (clientFeatures != null) 'clientFeatures': clientFeatures!,
if (cluster != null) 'cluster': cluster!,
if (extensions != null) 'extensions': extensions!,
if (id != null) 'id': id!,
if (listeningAddresses != null)
'listeningAddresses': listeningAddresses!,
if (locality != null) 'locality': locality!,
if (metadata != null) 'metadata': metadata!,
if (userAgentBuildVersion != null)
'userAgentBuildVersion': userAgentBuildVersion!,
if (userAgentName != null) 'userAgentName': userAgentName!,
if (userAgentVersion != null) 'userAgentVersion': userAgentVersion!,
};
}
/// Specifies the way to match a Node.
///
/// The match follows AND semantics.
class NodeMatcher {
/// Specifies match criteria on the node id.
StringMatcher? nodeId;
/// Specifies match criteria on the node metadata.
core.List<StructMatcher>? nodeMetadatas;
NodeMatcher({
this.nodeId,
this.nodeMetadatas,
});
NodeMatcher.fromJson(core.Map json_)
: this(
nodeId: json_.containsKey('nodeId')
? StringMatcher.fromJson(
json_['nodeId'] as core.Map<core.String, core.dynamic>)
: null,
nodeMetadatas: json_.containsKey('nodeMetadatas')
? (json_['nodeMetadatas'] as core.List)
.map((value) => StructMatcher.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (nodeId != null) 'nodeId': nodeId!,
if (nodeMetadatas != null) 'nodeMetadatas': nodeMetadatas!,
};
}
/// NullMatch is an empty message to specify a null value.
typedef NullMatch = $Empty;
/// Specifies the segment in a path to retrieve value from Struct.
class PathSegment {
/// If specified, use the key to retrieve the value in a Struct.
core.String? key;
PathSegment({
this.key,
});
PathSegment.fromJson(core.Map json_)
: this(
key: json_.containsKey('key') ? json_['key'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (key != null) 'key': key!,
};
}
/// Detailed config (per xDS) with status.
///
/// \[#next-free-field: 6\]
class PerXdsConfig {
ClustersConfigDump? clusterConfig;
ListenersConfigDump? listenerConfig;
RoutesConfigDump? routeConfig;
ScopedRoutesConfigDump? scopedRouteConfig;
///
/// Possible string values are:
/// - "UNKNOWN" : Status info is not available/unknown.
/// - "SYNCED" : Management server has sent the config to client and received
/// ACK.
/// - "NOT_SENT" : Config is not sent.
/// - "STALE" : Management server has sent the config to client but hasn’t
/// received ACK/NACK.
/// - "ERROR" : Management server has sent the config to client but received
/// NACK.
core.String? status;
PerXdsConfig({
this.clusterConfig,
this.listenerConfig,
this.routeConfig,
this.scopedRouteConfig,
this.status,
});
PerXdsConfig.fromJson(core.Map json_)
: this(
clusterConfig: json_.containsKey('clusterConfig')
? ClustersConfigDump.fromJson(
json_['clusterConfig'] as core.Map<core.String, core.dynamic>)
: null,
listenerConfig: json_.containsKey('listenerConfig')
? ListenersConfigDump.fromJson(json_['listenerConfig']
as core.Map<core.String, core.dynamic>)
: null,
routeConfig: json_.containsKey('routeConfig')
? RoutesConfigDump.fromJson(
json_['routeConfig'] as core.Map<core.String, core.dynamic>)
: null,
scopedRouteConfig: json_.containsKey('scopedRouteConfig')
? ScopedRoutesConfigDump.fromJson(json_['scopedRouteConfig']
as core.Map<core.String, core.dynamic>)
: null,
status: json_.containsKey('status')
? json_['status'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (clusterConfig != null) 'clusterConfig': clusterConfig!,
if (listenerConfig != null) 'listenerConfig': listenerConfig!,
if (routeConfig != null) 'routeConfig': routeConfig!,
if (scopedRouteConfig != null) 'scopedRouteConfig': scopedRouteConfig!,
if (status != null) 'status': status!,
};
}
class Pipe {
/// The mode for the Pipe.
///
/// Not applicable for abstract sockets.
core.int? mode;
/// Unix Domain Socket path.
///
/// On Linux, paths starting with '@' will use the abstract namespace. The
/// starting '@' is replaced by a null byte by Envoy. Paths starting with '@'
/// will result in an error in environments other than Linux.
core.String? path;
Pipe({
this.mode,
this.path,
});
Pipe.fromJson(core.Map json_)
: this(
mode: json_.containsKey('mode') ? json_['mode'] as core.int : null,
path: json_.containsKey('path') ? json_['path'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (mode != null) 'mode': mode!,
if (path != null) 'path': path!,
};
}
/// A regex matcher designed for safety when used with untrusted input.
class RegexMatcher {
/// Google's RE2 regex engine.
GoogleRE2? googleRe2;
/// The regex match string.
///
/// The string must be supported by the configured engine.
core.String? regex;
RegexMatcher({
this.googleRe2,
this.regex,
});
RegexMatcher.fromJson(core.Map json_)
: this(
googleRe2: json_.containsKey('googleRe2')
? GoogleRE2.fromJson(
json_['googleRe2'] as core.Map<core.String, core.dynamic>)
: null,
regex:
json_.containsKey('regex') ? json_['regex'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (googleRe2 != null) 'googleRe2': googleRe2!,
if (regex != null) 'regex': regex!,
};
}
/// Envoy's RDS implementation fills this message with all currently loaded
/// routes, as described by their RouteConfiguration objects.
///
/// Static routes that are either defined in the bootstrap configuration or
/// defined inline while configuring listeners are separated from those
/// configured dynamically via RDS. Route configuration information can be used
/// to recreate an Envoy configuration by populating all routes as static routes
/// or by returning them in RDS responses.
class RoutesConfigDump {
/// The dynamically loaded route configs.
core.List<DynamicRouteConfig>? dynamicRouteConfigs;
/// The statically loaded route configs.
core.List<StaticRouteConfig>? staticRouteConfigs;
RoutesConfigDump({
this.dynamicRouteConfigs,
this.staticRouteConfigs,
});
RoutesConfigDump.fromJson(core.Map json_)
: this(
dynamicRouteConfigs: json_.containsKey('dynamicRouteConfigs')
? (json_['dynamicRouteConfigs'] as core.List)
.map((value) => DynamicRouteConfig.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
staticRouteConfigs: json_.containsKey('staticRouteConfigs')
? (json_['staticRouteConfigs'] as core.List)
.map((value) => StaticRouteConfig.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (dynamicRouteConfigs != null)
'dynamicRouteConfigs': dynamicRouteConfigs!,
if (staticRouteConfigs != null)
'staticRouteConfigs': staticRouteConfigs!,
};
}
/// Envoy's scoped RDS implementation fills this message with all currently
/// loaded route configuration scopes (defined via ScopedRouteConfigurationsSet
/// protos).
///
/// This message lists both the scopes defined inline with the higher order
/// object (i.e., the HttpConnectionManager) and the dynamically obtained scopes
/// via the SRDS API.
class ScopedRoutesConfigDump {
/// The dynamically loaded scoped route configs.
core.List<DynamicScopedRouteConfigs>? dynamicScopedRouteConfigs;
/// The statically loaded scoped route configs.
core.List<InlineScopedRouteConfigs>? inlineScopedRouteConfigs;
ScopedRoutesConfigDump({
this.dynamicScopedRouteConfigs,
this.inlineScopedRouteConfigs,
});
ScopedRoutesConfigDump.fromJson(core.Map json_)
: this(
dynamicScopedRouteConfigs:
json_.containsKey('dynamicScopedRouteConfigs')
? (json_['dynamicScopedRouteConfigs'] as core.List)
.map((value) => DynamicScopedRouteConfigs.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
inlineScopedRouteConfigs:
json_.containsKey('inlineScopedRouteConfigs')
? (json_['inlineScopedRouteConfigs'] as core.List)
.map((value) => InlineScopedRouteConfigs.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (dynamicScopedRouteConfigs != null)
'dynamicScopedRouteConfigs': dynamicScopedRouteConfigs!,
if (inlineScopedRouteConfigs != null)
'inlineScopedRouteConfigs': inlineScopedRouteConfigs!,
};
}
/// Envoy uses SemVer (https://semver.org/).
///
/// Major/minor versions indicate expected behaviors and APIs, the patch version
/// field is used only for security fixes and can be generally ignored.
class SemanticVersion {
core.int? majorNumber;
core.int? minorNumber;
core.int? patch;
SemanticVersion({
this.majorNumber,
this.minorNumber,
this.patch,
});
SemanticVersion.fromJson(core.Map json_)
: this(
majorNumber: json_.containsKey('majorNumber')
? json_['majorNumber'] as core.int
: null,
minorNumber: json_.containsKey('minorNumber')
? json_['minorNumber'] as core.int
: null,
patch: json_.containsKey('patch') ? json_['patch'] as core.int : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (majorNumber != null) 'majorNumber': majorNumber!,
if (minorNumber != null) 'minorNumber': minorNumber!,
if (patch != null) 'patch': patch!,
};
}
/// \[#next-free-field: 7\]
class SocketAddress {
/// The address for this socket.
///
/// :ref:`Listeners ` will bind to the address. An empty address is not
/// allowed. Specify ``0.0.0.0`` or ``::`` to bind to any address.
/// \[#comment:TODO(zuercher) reinstate when implemented: It is possible to
/// distinguish a Listener address via the prefix/suffix matching in
/// :ref:`FilterChainMatch `.\] When used within an upstream :ref:`BindConfig
/// `, the address controls the source address of outbound connections. For
/// :ref:`clusters `, the cluster type determines whether the address must be
/// an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS
/// (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be
/// customized via :ref:`resolver_name `.
core.String? address;
/// When binding to an IPv6 address above, this enables `IPv4 compatibility
/// `_.
///
/// Binding to ``::`` will allow both IPv4 and IPv6 connections, with peer
/// IPv4 addresses mapped into IPv6 space as ``::FFFF:``.
core.bool? ipv4Compat;
/// This is only valid if :ref:`resolver_name ` is specified below and the
/// named resolver is capable of named port resolution.
core.String? namedPort;
core.int? portValue;
///
/// Possible string values are:
/// - "TCP"
/// - "UDP"
core.String? protocol;
/// The name of the custom resolver.
///
/// This must have been registered with Envoy. If this is empty, a context
/// dependent default applies. If the address is a concrete IP address, no
/// resolution will occur. If address is a hostname this should be set for
/// resolution other than DNS. Specifying a custom resolver with *STRICT_DNS*
/// or *LOGICAL_DNS* will generate an error at runtime.
core.String? resolverName;
SocketAddress({
this.address,
this.ipv4Compat,
this.namedPort,
this.portValue,
this.protocol,
this.resolverName,
});
SocketAddress.fromJson(core.Map json_)
: this(
address: json_.containsKey('address')
? json_['address'] as core.String
: null,
ipv4Compat: json_.containsKey('ipv4Compat')
? json_['ipv4Compat'] as core.bool
: null,
namedPort: json_.containsKey('namedPort')
? json_['namedPort'] as core.String
: null,
portValue: json_.containsKey('portValue')
? json_['portValue'] as core.int
: null,
protocol: json_.containsKey('protocol')
? json_['protocol'] as core.String
: null,
resolverName: json_.containsKey('resolverName')
? json_['resolverName'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (address != null) 'address': address!,
if (ipv4Compat != null) 'ipv4Compat': ipv4Compat!,
if (namedPort != null) 'namedPort': namedPort!,
if (portValue != null) 'portValue': portValue!,
if (protocol != null) 'protocol': protocol!,
if (resolverName != null) 'resolverName': resolverName!,
};
}
/// Describes a statically loaded cluster.
class StaticCluster {
/// The cluster config.
///
/// 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?>? cluster;
/// The timestamp when the Cluster was last updated.
core.String? lastUpdated;
StaticCluster({
this.cluster,
this.lastUpdated,
});
StaticCluster.fromJson(core.Map json_)
: this(
cluster: json_.containsKey('cluster')
? json_['cluster'] as core.Map<core.String, core.dynamic>
: null,
lastUpdated: json_.containsKey('lastUpdated')
? json_['lastUpdated'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (cluster != null) 'cluster': cluster!,
if (lastUpdated != null) 'lastUpdated': lastUpdated!,
};
}
/// Describes a statically loaded listener.
class StaticListener {
/// The timestamp when the Listener was last successfully updated.
core.String? lastUpdated;
/// The listener config.
///
/// 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?>? listener;
StaticListener({
this.lastUpdated,
this.listener,
});
StaticListener.fromJson(core.Map json_)
: this(
lastUpdated: json_.containsKey('lastUpdated')
? json_['lastUpdated'] as core.String
: null,
listener: json_.containsKey('listener')
? json_['listener'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (lastUpdated != null) 'lastUpdated': lastUpdated!,
if (listener != null) 'listener': listener!,
};
}
class StaticRouteConfig {
/// The timestamp when the Route was last updated.
core.String? lastUpdated;
/// The route config.
///
/// 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?>? routeConfig;
StaticRouteConfig({
this.lastUpdated,
this.routeConfig,
});
StaticRouteConfig.fromJson(core.Map json_)
: this(
lastUpdated: json_.containsKey('lastUpdated')
? json_['lastUpdated'] as core.String
: null,
routeConfig: json_.containsKey('routeConfig')
? json_['routeConfig'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (lastUpdated != null) 'lastUpdated': lastUpdated!,
if (routeConfig != null) 'routeConfig': routeConfig!,
};
}
/// Specifies the way to match a string.
///
/// \[#next-free-field: 7\]
class StringMatcher {
/// The input string must match exactly the string specified here.
///
/// Examples: * *abc* only matches the value *abc*.
core.String? exact;
/// If true, indicates the exact/prefix/suffix matching should be case
/// insensitive.
///
/// This has no effect for the safe_regex match. For example, the matcher
/// *data* will match both input string *Data* and *data* if set to true.
core.bool? ignoreCase;
/// The input string must have the prefix specified here.
///
/// Note: empty prefix is not allowed, please use regex instead. Examples: *
/// *abc* matches the value *abc.xyz*
core.String? prefix;
/// The input string must match the regular expression specified here.
///
/// The regex grammar is defined `here `_. Examples: * The regex ``\d{3}``
/// matches the value *123* * The regex ``\d{3}`` does not match the value
/// *1234* * The regex ``\d{3}`` does not match the value *123.456* ..
/// attention:: This field has been deprecated in favor of `safe_regex` as it
/// is not safe for use with untrusted input in all cases.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.String? regex;
/// The input string must match the regular expression specified here.
RegexMatcher? safeRegex;
/// The input string must have the suffix specified here.
///
/// Note: empty prefix is not allowed, please use regex instead. Examples: *
/// *abc* matches the value *xyz.abc*
core.String? suffix;
StringMatcher({
this.exact,
this.ignoreCase,
this.prefix,
this.regex,
this.safeRegex,
this.suffix,
});
StringMatcher.fromJson(core.Map json_)
: this(
exact:
json_.containsKey('exact') ? json_['exact'] as core.String : null,
ignoreCase: json_.containsKey('ignoreCase')
? json_['ignoreCase'] as core.bool
: null,
prefix: json_.containsKey('prefix')
? json_['prefix'] as core.String
: null,
regex:
json_.containsKey('regex') ? json_['regex'] as core.String : null,
safeRegex: json_.containsKey('safeRegex')
? RegexMatcher.fromJson(
json_['safeRegex'] as core.Map<core.String, core.dynamic>)
: null,
suffix: json_.containsKey('suffix')
? json_['suffix'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (exact != null) 'exact': exact!,
if (ignoreCase != null) 'ignoreCase': ignoreCase!,
if (prefix != null) 'prefix': prefix!,
if (regex != null) 'regex': regex!,
if (safeRegex != null) 'safeRegex': safeRegex!,
if (suffix != null) 'suffix': suffix!,
};
}
/// StructMatcher provides a general interface to check if a given value is
/// matched in google.protobuf.Struct.
///
/// It uses `path` to retrieve the value from the struct and then check if it's
/// matched to the specified value. For example, for the following Struct: ..
/// code-block:: yaml fields: a: struct_value: fields: b: struct_value: fields:
/// c: string_value: pro t: list_value: values: - string_value: m -
/// string_value: n The following MetadataMatcher is matched as the path \[a, b,
/// c\] will retrieve a string value "pro" from the Metadata which is matched to
/// the specified prefix match. .. code-block:: yaml path: - key: a - key: b -
/// key: c value: string_match: prefix: pr The following StructMatcher is
/// matched as the code will match one of the string values in the list at the
/// path \[a, t\]. .. code-block:: yaml path: - key: a - key: t value:
/// list_match: one_of: string_match: exact: m An example use of StructMatcher
/// is to match metadata in envoy.v*.core.Node.
class StructMatcher {
/// The path to retrieve the Value from the Struct.
core.List<PathSegment>? path;
/// The StructMatcher is matched if the value retrieved by path is matched to
/// this value.
ValueMatcher? value;
StructMatcher({
this.path,
this.value,
});
StructMatcher.fromJson(core.Map json_)
: this(
path: json_.containsKey('path')
? (json_['path'] as core.List)
.map((value) => PathSegment.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
value: json_.containsKey('value')
? ValueMatcher.fromJson(
json_['value'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (path != null) 'path': path!,
if (value != null) 'value': value!,
};
}
class UpdateFailureState {
/// Details about the last failed update attempt.
core.String? details;
/// What the component configuration would have been if the update had
/// succeeded.
///
/// 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?>? failedConfiguration;
/// Time of the latest failed update attempt.
core.String? lastUpdateAttempt;
UpdateFailureState({
this.details,
this.failedConfiguration,
this.lastUpdateAttempt,
});
UpdateFailureState.fromJson(core.Map json_)
: this(
details: json_.containsKey('details')
? json_['details'] as core.String
: null,
failedConfiguration: json_.containsKey('failedConfiguration')
? json_['failedConfiguration']
as core.Map<core.String, core.dynamic>
: null,
lastUpdateAttempt: json_.containsKey('lastUpdateAttempt')
? json_['lastUpdateAttempt'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (details != null) 'details': details!,
if (failedConfiguration != null)
'failedConfiguration': failedConfiguration!,
if (lastUpdateAttempt != null) 'lastUpdateAttempt': lastUpdateAttempt!,
};
}
/// Specifies the way to match a ProtobufWkt::Value.
///
/// Primitive values and ListValue are supported. StructValue is not supported
/// and is always not matched. \[#next-free-field: 7\]
class ValueMatcher {
/// If specified, a match occurs if and only if the target value is a bool
/// value and is equal to this field.
core.bool? boolMatch;
/// If specified, a match occurs if and only if the target value is a double
/// value and is matched to this field.
DoubleMatcher? doubleMatch;
/// If specified, a match occurs if and only if the target value is a list
/// value and is matched to this field.
ListMatcher? listMatch;
/// If specified, a match occurs if and only if the target value is a
/// NullValue.
NullMatch? nullMatch;
/// If specified, value match will be performed based on whether the path is
/// referring to a valid primitive value in the metadata.
///
/// If the path is referring to a non-primitive value, the result is always
/// not matched.
core.bool? presentMatch;
/// If specified, a match occurs if and only if the target value is a string
/// value and is matched to this field.
StringMatcher? stringMatch;
ValueMatcher({
this.boolMatch,
this.doubleMatch,
this.listMatch,
this.nullMatch,
this.presentMatch,
this.stringMatch,
});
ValueMatcher.fromJson(core.Map json_)
: this(
boolMatch: json_.containsKey('boolMatch')
? json_['boolMatch'] as core.bool
: null,
doubleMatch: json_.containsKey('doubleMatch')
? DoubleMatcher.fromJson(
json_['doubleMatch'] as core.Map<core.String, core.dynamic>)
: null,
listMatch: json_.containsKey('listMatch')
? ListMatcher.fromJson(
json_['listMatch'] as core.Map<core.String, core.dynamic>)
: null,
nullMatch: json_.containsKey('nullMatch')
? NullMatch.fromJson(
json_['nullMatch'] as core.Map<core.String, core.dynamic>)
: null,
presentMatch: json_.containsKey('presentMatch')
? json_['presentMatch'] as core.bool
: null,
stringMatch: json_.containsKey('stringMatch')
? StringMatcher.fromJson(
json_['stringMatch'] as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (boolMatch != null) 'boolMatch': boolMatch!,
if (doubleMatch != null) 'doubleMatch': doubleMatch!,
if (listMatch != null) 'listMatch': listMatch!,
if (nullMatch != null) 'nullMatch': nullMatch!,
if (presentMatch != null) 'presentMatch': presentMatch!,
if (stringMatch != null) 'stringMatch': stringMatch!,
};
}
| googleapis.dart/generated/googleapis/lib/trafficdirector/v2.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/lib/trafficdirector/v2.dart', 'repo_id': 'googleapis.dart', 'token_count': 23731} |
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// 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
/// Workflows API - v1
///
/// Manage workflow definitions. To execute workflows and manage executions, see
/// the Workflows Executions API.
///
/// For more information, see <https://cloud.google.com/workflows>
///
/// Create an instance of [WorkflowsApi] to access these resources:
///
/// - [ProjectsResource]
/// - [ProjectsLocationsResource]
/// - [ProjectsLocationsOperationsResource]
/// - [ProjectsLocationsWorkflowsResource]
library workflows_v1;
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
import '../shared.dart';
import '../src/user_agent.dart';
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
/// Manage workflow definitions.
///
/// To execute workflows and manage executions, see the Workflows Executions
/// API.
class WorkflowsApi {
/// See, edit, configure, and delete your Google Cloud data and see the email
/// address for your Google Account.
static const cloudPlatformScope =
'https://www.googleapis.com/auth/cloud-platform';
final commons.ApiRequester _requester;
ProjectsResource get projects => ProjectsResource(_requester);
WorkflowsApi(http.Client client,
{core.String rootUrl = 'https://workflows.googleapis.com/',
core.String servicePath = ''})
: _requester =
commons.ApiRequester(client, rootUrl, servicePath, requestHeaders);
}
class ProjectsResource {
final commons.ApiRequester _requester;
ProjectsLocationsResource get locations =>
ProjectsLocationsResource(_requester);
ProjectsResource(commons.ApiRequester client) : _requester = client;
}
class ProjectsLocationsResource {
final commons.ApiRequester _requester;
ProjectsLocationsOperationsResource get operations =>
ProjectsLocationsOperationsResource(_requester);
ProjectsLocationsWorkflowsResource get workflows =>
ProjectsLocationsWorkflowsResource(_requester);
ProjectsLocationsResource(commons.ApiRequester client) : _requester = client;
/// Gets information about a location.
///
/// Request parameters:
///
/// [name] - Resource name for the location.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Location].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Location> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Location.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists information about the supported locations for this service.
///
/// Request parameters:
///
/// [name] - The resource that owns the locations collection, if applicable.
/// Value must have pattern `^projects/\[^/\]+$`.
///
/// [filter] - A filter to narrow down results to a preferred subset. The
/// filtering language accepts strings like `"displayName=tokyo"`, and is
/// documented in more detail in \[AIP-160\](https://google.aip.dev/160).
///
/// [pageSize] - The maximum number of results to return. If not set, the
/// service selects a default.
///
/// [pageToken] - A page token received from the `next_page_token` field in
/// the response. Send that page token to receive the subsequent page.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListLocationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListLocationsResponse> list(
core.String name, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/locations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListLocationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsOperationsResource {
final commons.ApiRequester _requester;
ProjectsLocationsOperationsResource(commons.ApiRequester client)
: _requester = client;
/// Deletes a long-running operation.
///
/// This method indicates that the client is no longer interested in the
/// operation result. It does not cancel the operation. If the server doesn't
/// support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
///
/// Request parameters:
///
/// [name] - The name of the operation resource to be deleted.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets the latest state of a long-running operation.
///
/// Clients can use this method to poll the operation result at intervals as
/// recommended by the API service.
///
/// Request parameters:
///
/// [name] - The name of the operation resource.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists operations that match the specified filter in the request.
///
/// If the server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// Request parameters:
///
/// [name] - The name of the operation's parent resource.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - The standard list filter.
///
/// [pageSize] - The standard list page size.
///
/// [pageToken] - The standard list page token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListOperationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListOperationsResponse> list(
core.String name, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/operations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListOperationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
class ProjectsLocationsWorkflowsResource {
final commons.ApiRequester _requester;
ProjectsLocationsWorkflowsResource(commons.ApiRequester client)
: _requester = client;
/// Creates a new workflow.
///
/// If a workflow with the specified name already exists in the specified
/// project and location, the long running operation returns a ALREADY_EXISTS
/// error.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. Project and location in which the workflow should be
/// created. Format: projects/{project}/locations/{location}
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [workflowId] - Required. The ID of the workflow to be created. It has to
/// fulfill the following requirements: * Must contain only letters, numbers,
/// underscores and hyphens. * Must start with a letter. * Must be between
/// 1-64 characters. * Must end with a number or a letter. * Must be unique
/// within the customer project and location.
///
/// [$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(
Workflow request,
core.String parent, {
core.String? workflowId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (workflowId != null) 'workflowId': [workflowId],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/workflows';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a workflow with the specified name.
///
/// This method also cancels and deletes all running executions of the
/// workflow.
///
/// Request parameters:
///
/// [name] - Required. Name of the workflow to be deleted. Format:
/// projects/{project}/locations/{location}/workflows/{workflow}
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/workflows/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets details of a single workflow.
///
/// Request parameters:
///
/// [name] - Required. Name of the workflow for which information should be
/// retrieved. Format:
/// projects/{project}/locations/{location}/workflows/{workflow}
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/workflows/\[^/\]+$`.
///
/// [revisionId] - Optional. The revision of the workflow to retrieve. If the
/// revision_id is empty, the latest revision is retrieved. The format is
/// "000001-a4d", where the first six characters define the zero-padded
/// decimal revision number. They are followed by a hyphen and three
/// hexadecimal characters.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Workflow].
///
/// 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<Workflow> get(
core.String name, {
core.String? revisionId,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (revisionId != null) 'revisionId': [revisionId],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Workflow.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists workflows in a given project and location.
///
/// The default order is not specified.
///
/// Request parameters:
///
/// [parent] - Required. Project and location from which the workflows should
/// be listed. Format: projects/{project}/locations/{location}
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [filter] - Filter to restrict results to specific workflows.
///
/// [orderBy] - Comma-separated list of fields that specify the order of the
/// results. Default sorting order for a field is ascending. To specify
/// descending order for a field, append a "desc" suffix. If not specified,
/// the results are returned in an unspecified order.
///
/// [pageSize] - Maximum number of workflows to return per call. The service
/// might return fewer than this value even if not at the end of the
/// collection. If a value is not specified, a default value of 500 is used.
/// The maximum permitted value is 1000 and values greater than 1000 are
/// coerced down to 1000.
///
/// [pageToken] - A page token, received from a previous `ListWorkflows` call.
/// Provide this to retrieve the subsequent page. When paginating, all other
/// parameters provided to `ListWorkflows` must match the call that provided
/// the page token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListWorkflowsResponse].
///
/// 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<ListWorkflowsResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (orderBy != null) 'orderBy': [orderBy],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/workflows';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListWorkflowsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Updates an existing workflow.
///
/// Running this method has no impact on already running executions of the
/// workflow. A new revision of the workflow might be created as a result of a
/// successful update operation. In that case, the new revision is used in new
/// workflow executions.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - The resource name of the workflow. Format:
/// projects/{project}/locations/{location}/workflows/{workflow}
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/workflows/\[^/\]+$`.
///
/// [updateMask] - List of fields to be updated. If not present, the entire
/// workflow will be updated.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Operation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Operation> patch(
Workflow request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (updateMask != null) 'updateMask': [updateMask],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
/// A generic empty message that you can re-use to avoid defining duplicated
/// empty messages in your APIs.
///
/// A typical example is to use it as the request or the response type of an API
/// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns
/// (google.protobuf.Empty); }
typedef Empty = $Empty;
/// The response message for Locations.ListLocations.
class ListLocationsResponse {
/// A list of locations that matches the specified filter in the request.
core.List<Location>? locations;
/// The standard List next-page token.
core.String? nextPageToken;
ListLocationsResponse({
this.locations,
this.nextPageToken,
});
ListLocationsResponse.fromJson(core.Map json_)
: this(
locations: json_.containsKey('locations')
? (json_['locations'] as core.List)
.map((value) => Location.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (locations != null) 'locations': locations!,
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
};
}
/// The response message for Operations.ListOperations.
class ListOperationsResponse {
/// The standard List next-page token.
core.String? nextPageToken;
/// A list of operations that matches the specified filter in the request.
core.List<Operation>? operations;
ListOperationsResponse({
this.nextPageToken,
this.operations,
});
ListOperationsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
operations: json_.containsKey('operations')
? (json_['operations'] as core.List)
.map((value) => Operation.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
if (operations != null) 'operations': operations!,
};
}
/// Response for the ListWorkflows method.
class ListWorkflowsResponse {
/// A token, which can be sent as `page_token` to retrieve the next page.
///
/// If this field is omitted, there are no subsequent pages.
core.String? nextPageToken;
/// Unreachable resources.
core.List<core.String>? unreachable;
/// The workflows that match the request.
core.List<Workflow>? workflows;
ListWorkflowsResponse({
this.nextPageToken,
this.unreachable,
this.workflows,
});
ListWorkflowsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
unreachable: json_.containsKey('unreachable')
? (json_['unreachable'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
workflows: json_.containsKey('workflows')
? (json_['workflows'] as core.List)
.map((value) => Workflow.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
if (unreachable != null) 'unreachable': unreachable!,
if (workflows != null) 'workflows': workflows!,
};
}
/// A resource that represents a Google Cloud location.
typedef Location = $Location00;
/// This resource represents a long-running operation that is the result of a
/// network API call.
class Operation {
/// If the value is `false`, it means the operation is still in progress.
///
/// If `true`, the operation is completed, and either `error` or `response` is
/// available.
core.bool? done;
/// The error result of the operation in case of failure or cancellation.
Status? error;
/// Service-specific metadata associated with the operation.
///
/// It typically contains progress information and common metadata such as
/// create time. Some services might not provide such metadata. Any method
/// that returns a long-running operation should document the metadata type,
/// if any.
///
/// The values for Object must be JSON objects. It can consist of `num`,
/// `String`, `bool` and `null` as well as `Map` and `List` values.
core.Map<core.String, core.Object?>? metadata;
/// The server-assigned name, which is only unique within the same service
/// that originally returns it.
///
/// If you use the default HTTP mapping, the `name` should be a resource name
/// ending with `operations/{unique_id}`.
core.String? name;
/// The normal response of the operation in case of success.
///
/// If the original method returns no data on success, such as `Delete`, the
/// response is `google.protobuf.Empty`. If the original method is standard
/// `Get`/`Create`/`Update`, the response should be the resource. For other
/// methods, the response should have the type `XxxResponse`, where `Xxx` is
/// the original method name. For example, if the original method name is
/// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
///
/// The values for Object must be JSON objects. It can consist of `num`,
/// `String`, `bool` and `null` as well as `Map` and `List` values.
core.Map<core.String, core.Object?>? response;
Operation({
this.done,
this.error,
this.metadata,
this.name,
this.response,
});
Operation.fromJson(core.Map json_)
: this(
done: json_.containsKey('done') ? json_['done'] as core.bool : null,
error: json_.containsKey('error')
? Status.fromJson(
json_['error'] as core.Map<core.String, core.dynamic>)
: null,
metadata: json_.containsKey('metadata')
? json_['metadata'] as core.Map<core.String, core.dynamic>
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
response: json_.containsKey('response')
? json_['response'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (done != null) 'done': done!,
if (error != null) 'error': error!,
if (metadata != null) 'metadata': metadata!,
if (name != null) 'name': name!,
if (response != null) 'response': response!,
};
}
/// Describes an error related to the current state of the workflow.
typedef StateError = $StateError;
/// The `Status` type defines a logical error model that is suitable for
/// different programming environments, including REST APIs and RPC APIs.
///
/// It is used by [gRPC](https://github.com/grpc). Each `Status` message
/// contains three pieces of data: error code, error message, and error details.
/// You can find out more about this error model and how to work with it in the
/// [API Design Guide](https://cloud.google.com/apis/design/errors).
typedef Status = $Status;
/// Workflow program to be executed by Workflows.
class Workflow {
/// Describes the level of platform logging to apply to calls and call
/// responses during executions of this workflow.
///
/// If both the workflow and the execution specify a logging level, the
/// execution level takes precedence.
///
/// Optional.
/// Possible string values are:
/// - "CALL_LOG_LEVEL_UNSPECIFIED" : No call logging level specified.
/// - "LOG_ALL_CALLS" : Log all call steps within workflows, all call returns,
/// and all exceptions raised.
/// - "LOG_ERRORS_ONLY" : Log only exceptions that are raised from call steps
/// within workflows.
/// - "LOG_NONE" : Explicitly log nothing.
core.String? callLogLevel;
/// The timestamp for when the workflow was created.
///
/// Output only.
core.String? createTime;
/// The resource name of a KMS crypto key used to encrypt or decrypt the data
/// associated with the workflow.
///
/// Format:
/// projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
/// Using `-` as a wildcard for the `{project}` or not providing one at all
/// will infer the project from the account. If not provided, data associated
/// with the workflow will not be CMEK-encrypted.
///
/// Optional.
core.String? cryptoKeyName;
/// Description of the workflow provided by the user.
///
/// Must be at most 1000 unicode characters long.
core.String? description;
/// Labels associated with this workflow.
///
/// Labels can contain at most 64 entries. Keys and values can be no longer
/// than 63 characters and can only contain lowercase letters, numeric
/// characters, underscores, and dashes. Label keys must start with a letter.
/// International characters are allowed.
core.Map<core.String, core.String>? labels;
/// The resource name of the workflow.
///
/// Format: projects/{project}/locations/{location}/workflows/{workflow}
core.String? name;
/// The timestamp for the latest revision of the workflow's creation.
///
/// Output only.
core.String? revisionCreateTime;
/// The revision of the workflow.
///
/// A new revision of a workflow is created as a result of updating the
/// following properties of a workflow: - Service account - Workflow code to
/// be executed The format is "000001-a4d", where the first six characters
/// define the zero-padded revision ordinal number. They are followed by a
/// hyphen and three hexadecimal random characters.
///
/// Output only.
core.String? revisionId;
/// The service account associated with the latest workflow version.
///
/// This service account represents the identity of the workflow and
/// determines what permissions the workflow has. Format:
/// projects/{project}/serviceAccounts/{account} or {account} Using `-` as a
/// wildcard for the `{project}` or not providing one at all will infer the
/// project from the account. The `{account}` value can be the `email` address
/// or the `unique_id` of the service account. If not provided, workflow will
/// use the project's default service account. Modifying this field for an
/// existing workflow results in a new workflow revision.
core.String? serviceAccount;
/// Workflow code to be executed.
///
/// The size limit is 128KB.
core.String? sourceContents;
/// State of the workflow deployment.
///
/// Output only.
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : Invalid state.
/// - "ACTIVE" : The workflow has been deployed successfully and is serving.
/// - "UNAVAILABLE" : Workflow data is unavailable. See the `state_error`
/// field.
core.String? state;
/// Error regarding the state of the workflow.
///
/// For example, this field will have error details if the execution data is
/// unavailable due to revoked KMS key permissions.
///
/// Output only.
StateError? stateError;
/// The timestamp for when the workflow was last updated.
///
/// Output only.
core.String? updateTime;
/// User-defined environment variables associated with this workflow revision.
///
/// This map has a maximum length of 20. Each string can take up to 40KiB.
/// Keys cannot be empty strings and cannot start with “GOOGLE” or
/// “WORKFLOWS".
///
/// Optional.
core.Map<core.String, core.String>? userEnvVars;
Workflow({
this.callLogLevel,
this.createTime,
this.cryptoKeyName,
this.description,
this.labels,
this.name,
this.revisionCreateTime,
this.revisionId,
this.serviceAccount,
this.sourceContents,
this.state,
this.stateError,
this.updateTime,
this.userEnvVars,
});
Workflow.fromJson(core.Map json_)
: this(
callLogLevel: json_.containsKey('callLogLevel')
? json_['callLogLevel'] as core.String
: null,
createTime: json_.containsKey('createTime')
? json_['createTime'] as core.String
: null,
cryptoKeyName: json_.containsKey('cryptoKeyName')
? json_['cryptoKeyName'] as core.String
: null,
description: json_.containsKey('description')
? json_['description'] as core.String
: null,
labels: json_.containsKey('labels')
? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
revisionCreateTime: json_.containsKey('revisionCreateTime')
? json_['revisionCreateTime'] as core.String
: null,
revisionId: json_.containsKey('revisionId')
? json_['revisionId'] as core.String
: null,
serviceAccount: json_.containsKey('serviceAccount')
? json_['serviceAccount'] as core.String
: null,
sourceContents: json_.containsKey('sourceContents')
? json_['sourceContents'] as core.String
: null,
state:
json_.containsKey('state') ? json_['state'] as core.String : null,
stateError: json_.containsKey('stateError')
? StateError.fromJson(
json_['stateError'] as core.Map<core.String, core.dynamic>)
: null,
updateTime: json_.containsKey('updateTime')
? json_['updateTime'] as core.String
: null,
userEnvVars: json_.containsKey('userEnvVars')
? (json_['userEnvVars'] as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (callLogLevel != null) 'callLogLevel': callLogLevel!,
if (createTime != null) 'createTime': createTime!,
if (cryptoKeyName != null) 'cryptoKeyName': cryptoKeyName!,
if (description != null) 'description': description!,
if (labels != null) 'labels': labels!,
if (name != null) 'name': name!,
if (revisionCreateTime != null)
'revisionCreateTime': revisionCreateTime!,
if (revisionId != null) 'revisionId': revisionId!,
if (serviceAccount != null) 'serviceAccount': serviceAccount!,
if (sourceContents != null) 'sourceContents': sourceContents!,
if (state != null) 'state': state!,
if (stateError != null) 'stateError': stateError!,
if (updateTime != null) 'updateTime': updateTime!,
if (userEnvVars != null) 'userEnvVars': userEnvVars!,
};
}
| googleapis.dart/generated/googleapis/lib/workflows/v1.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/lib/workflows/v1.dart', 'repo_id': 'googleapis.dart', 'token_count': 12005} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/admob/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.List<core.String> buildUnnamed0() => [
'foo',
'foo',
];
void checkUnnamed0(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 buildCounterAdUnit = 0;
api.AdUnit buildAdUnit() {
final o = api.AdUnit();
buildCounterAdUnit++;
if (buildCounterAdUnit < 3) {
o.adFormat = 'foo';
o.adTypes = buildUnnamed0();
o.adUnitId = 'foo';
o.appId = 'foo';
o.displayName = 'foo';
o.name = 'foo';
}
buildCounterAdUnit--;
return o;
}
void checkAdUnit(api.AdUnit o) {
buildCounterAdUnit++;
if (buildCounterAdUnit < 3) {
unittest.expect(
o.adFormat!,
unittest.equals('foo'),
);
checkUnnamed0(o.adTypes!);
unittest.expect(
o.adUnitId!,
unittest.equals('foo'),
);
unittest.expect(
o.appId!,
unittest.equals('foo'),
);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterAdUnit--;
}
core.int buildCounterApp = 0;
api.App buildApp() {
final o = api.App();
buildCounterApp++;
if (buildCounterApp < 3) {
o.appApprovalState = 'foo';
o.appId = 'foo';
o.linkedAppInfo = buildAppLinkedAppInfo();
o.manualAppInfo = buildAppManualAppInfo();
o.name = 'foo';
o.platform = 'foo';
}
buildCounterApp--;
return o;
}
void checkApp(api.App o) {
buildCounterApp++;
if (buildCounterApp < 3) {
unittest.expect(
o.appApprovalState!,
unittest.equals('foo'),
);
unittest.expect(
o.appId!,
unittest.equals('foo'),
);
checkAppLinkedAppInfo(o.linkedAppInfo!);
checkAppManualAppInfo(o.manualAppInfo!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.platform!,
unittest.equals('foo'),
);
}
buildCounterApp--;
}
core.int buildCounterAppLinkedAppInfo = 0;
api.AppLinkedAppInfo buildAppLinkedAppInfo() {
final o = api.AppLinkedAppInfo();
buildCounterAppLinkedAppInfo++;
if (buildCounterAppLinkedAppInfo < 3) {
o.appStoreId = 'foo';
o.displayName = 'foo';
}
buildCounterAppLinkedAppInfo--;
return o;
}
void checkAppLinkedAppInfo(api.AppLinkedAppInfo o) {
buildCounterAppLinkedAppInfo++;
if (buildCounterAppLinkedAppInfo < 3) {
unittest.expect(
o.appStoreId!,
unittest.equals('foo'),
);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
}
buildCounterAppLinkedAppInfo--;
}
core.int buildCounterAppManualAppInfo = 0;
api.AppManualAppInfo buildAppManualAppInfo() {
final o = api.AppManualAppInfo();
buildCounterAppManualAppInfo++;
if (buildCounterAppManualAppInfo < 3) {
o.displayName = 'foo';
}
buildCounterAppManualAppInfo--;
return o;
}
void checkAppManualAppInfo(api.AppManualAppInfo o) {
buildCounterAppManualAppInfo++;
if (buildCounterAppManualAppInfo < 3) {
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
}
buildCounterAppManualAppInfo--;
}
core.int buildCounterDate = 0;
api.Date buildDate() {
final o = api.Date();
buildCounterDate++;
if (buildCounterDate < 3) {
o.day = 42;
o.month = 42;
o.year = 42;
}
buildCounterDate--;
return o;
}
void checkDate(api.Date o) {
buildCounterDate++;
if (buildCounterDate < 3) {
unittest.expect(
o.day!,
unittest.equals(42),
);
unittest.expect(
o.month!,
unittest.equals(42),
);
unittest.expect(
o.year!,
unittest.equals(42),
);
}
buildCounterDate--;
}
core.int buildCounterDateRange = 0;
api.DateRange buildDateRange() {
final o = api.DateRange();
buildCounterDateRange++;
if (buildCounterDateRange < 3) {
o.endDate = buildDate();
o.startDate = buildDate();
}
buildCounterDateRange--;
return o;
}
void checkDateRange(api.DateRange o) {
buildCounterDateRange++;
if (buildCounterDateRange < 3) {
checkDate(o.endDate!);
checkDate(o.startDate!);
}
buildCounterDateRange--;
}
core.int buildCounterGenerateMediationReportRequest = 0;
api.GenerateMediationReportRequest buildGenerateMediationReportRequest() {
final o = api.GenerateMediationReportRequest();
buildCounterGenerateMediationReportRequest++;
if (buildCounterGenerateMediationReportRequest < 3) {
o.reportSpec = buildMediationReportSpec();
}
buildCounterGenerateMediationReportRequest--;
return o;
}
void checkGenerateMediationReportRequest(api.GenerateMediationReportRequest o) {
buildCounterGenerateMediationReportRequest++;
if (buildCounterGenerateMediationReportRequest < 3) {
checkMediationReportSpec(o.reportSpec!);
}
buildCounterGenerateMediationReportRequest--;
}
core.int buildCounterGenerateMediationReportResponseElement = 0;
api.GenerateMediationReportResponseElement
buildGenerateMediationReportResponseElement() {
final o = api.GenerateMediationReportResponseElement();
buildCounterGenerateMediationReportResponseElement++;
if (buildCounterGenerateMediationReportResponseElement < 3) {
o.footer = buildReportFooter();
o.header = buildReportHeader();
o.row = buildReportRow();
}
buildCounterGenerateMediationReportResponseElement--;
return o;
}
void checkGenerateMediationReportResponseElement(
api.GenerateMediationReportResponseElement o) {
buildCounterGenerateMediationReportResponseElement++;
if (buildCounterGenerateMediationReportResponseElement < 3) {
checkReportFooter(o.footer!);
checkReportHeader(o.header!);
checkReportRow(o.row!);
}
buildCounterGenerateMediationReportResponseElement--;
}
api.GenerateMediationReportResponse buildGenerateMediationReportResponse() {
return [
buildGenerateMediationReportResponseElement(),
buildGenerateMediationReportResponseElement(),
];
}
void checkGenerateMediationReportResponse(
api.GenerateMediationReportResponse o) {
unittest.expect(o, unittest.hasLength(2));
checkGenerateMediationReportResponseElement(o[0]);
checkGenerateMediationReportResponseElement(o[1]);
}
core.int buildCounterGenerateNetworkReportRequest = 0;
api.GenerateNetworkReportRequest buildGenerateNetworkReportRequest() {
final o = api.GenerateNetworkReportRequest();
buildCounterGenerateNetworkReportRequest++;
if (buildCounterGenerateNetworkReportRequest < 3) {
o.reportSpec = buildNetworkReportSpec();
}
buildCounterGenerateNetworkReportRequest--;
return o;
}
void checkGenerateNetworkReportRequest(api.GenerateNetworkReportRequest o) {
buildCounterGenerateNetworkReportRequest++;
if (buildCounterGenerateNetworkReportRequest < 3) {
checkNetworkReportSpec(o.reportSpec!);
}
buildCounterGenerateNetworkReportRequest--;
}
core.int buildCounterGenerateNetworkReportResponseElement = 0;
api.GenerateNetworkReportResponseElement
buildGenerateNetworkReportResponseElement() {
final o = api.GenerateNetworkReportResponseElement();
buildCounterGenerateNetworkReportResponseElement++;
if (buildCounterGenerateNetworkReportResponseElement < 3) {
o.footer = buildReportFooter();
o.header = buildReportHeader();
o.row = buildReportRow();
}
buildCounterGenerateNetworkReportResponseElement--;
return o;
}
void checkGenerateNetworkReportResponseElement(
api.GenerateNetworkReportResponseElement o) {
buildCounterGenerateNetworkReportResponseElement++;
if (buildCounterGenerateNetworkReportResponseElement < 3) {
checkReportFooter(o.footer!);
checkReportHeader(o.header!);
checkReportRow(o.row!);
}
buildCounterGenerateNetworkReportResponseElement--;
}
api.GenerateNetworkReportResponse buildGenerateNetworkReportResponse() {
return [
buildGenerateNetworkReportResponseElement(),
buildGenerateNetworkReportResponseElement(),
];
}
void checkGenerateNetworkReportResponse(api.GenerateNetworkReportResponse o) {
unittest.expect(o, unittest.hasLength(2));
checkGenerateNetworkReportResponseElement(o[0]);
checkGenerateNetworkReportResponseElement(o[1]);
}
core.List<api.AdUnit> buildUnnamed1() => [
buildAdUnit(),
buildAdUnit(),
];
void checkUnnamed1(core.List<api.AdUnit> o) {
unittest.expect(o, unittest.hasLength(2));
checkAdUnit(o[0]);
checkAdUnit(o[1]);
}
core.int buildCounterListAdUnitsResponse = 0;
api.ListAdUnitsResponse buildListAdUnitsResponse() {
final o = api.ListAdUnitsResponse();
buildCounterListAdUnitsResponse++;
if (buildCounterListAdUnitsResponse < 3) {
o.adUnits = buildUnnamed1();
o.nextPageToken = 'foo';
}
buildCounterListAdUnitsResponse--;
return o;
}
void checkListAdUnitsResponse(api.ListAdUnitsResponse o) {
buildCounterListAdUnitsResponse++;
if (buildCounterListAdUnitsResponse < 3) {
checkUnnamed1(o.adUnits!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListAdUnitsResponse--;
}
core.List<api.App> buildUnnamed2() => [
buildApp(),
buildApp(),
];
void checkUnnamed2(core.List<api.App> o) {
unittest.expect(o, unittest.hasLength(2));
checkApp(o[0]);
checkApp(o[1]);
}
core.int buildCounterListAppsResponse = 0;
api.ListAppsResponse buildListAppsResponse() {
final o = api.ListAppsResponse();
buildCounterListAppsResponse++;
if (buildCounterListAppsResponse < 3) {
o.apps = buildUnnamed2();
o.nextPageToken = 'foo';
}
buildCounterListAppsResponse--;
return o;
}
void checkListAppsResponse(api.ListAppsResponse o) {
buildCounterListAppsResponse++;
if (buildCounterListAppsResponse < 3) {
checkUnnamed2(o.apps!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListAppsResponse--;
}
core.List<api.PublisherAccount> buildUnnamed3() => [
buildPublisherAccount(),
buildPublisherAccount(),
];
void checkUnnamed3(core.List<api.PublisherAccount> o) {
unittest.expect(o, unittest.hasLength(2));
checkPublisherAccount(o[0]);
checkPublisherAccount(o[1]);
}
core.int buildCounterListPublisherAccountsResponse = 0;
api.ListPublisherAccountsResponse buildListPublisherAccountsResponse() {
final o = api.ListPublisherAccountsResponse();
buildCounterListPublisherAccountsResponse++;
if (buildCounterListPublisherAccountsResponse < 3) {
o.account = buildUnnamed3();
o.nextPageToken = 'foo';
}
buildCounterListPublisherAccountsResponse--;
return o;
}
void checkListPublisherAccountsResponse(api.ListPublisherAccountsResponse o) {
buildCounterListPublisherAccountsResponse++;
if (buildCounterListPublisherAccountsResponse < 3) {
checkUnnamed3(o.account!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListPublisherAccountsResponse--;
}
core.int buildCounterLocalizationSettings = 0;
api.LocalizationSettings buildLocalizationSettings() {
final o = api.LocalizationSettings();
buildCounterLocalizationSettings++;
if (buildCounterLocalizationSettings < 3) {
o.currencyCode = 'foo';
o.languageCode = 'foo';
}
buildCounterLocalizationSettings--;
return o;
}
void checkLocalizationSettings(api.LocalizationSettings o) {
buildCounterLocalizationSettings++;
if (buildCounterLocalizationSettings < 3) {
unittest.expect(
o.currencyCode!,
unittest.equals('foo'),
);
unittest.expect(
o.languageCode!,
unittest.equals('foo'),
);
}
buildCounterLocalizationSettings--;
}
core.List<api.MediationReportSpecDimensionFilter> buildUnnamed4() => [
buildMediationReportSpecDimensionFilter(),
buildMediationReportSpecDimensionFilter(),
];
void checkUnnamed4(core.List<api.MediationReportSpecDimensionFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkMediationReportSpecDimensionFilter(o[0]);
checkMediationReportSpecDimensionFilter(o[1]);
}
core.List<core.String> buildUnnamed5() => [
'foo',
'foo',
];
void checkUnnamed5(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.List<core.String> buildUnnamed6() => [
'foo',
'foo',
];
void checkUnnamed6(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.List<api.MediationReportSpecSortCondition> buildUnnamed7() => [
buildMediationReportSpecSortCondition(),
buildMediationReportSpecSortCondition(),
];
void checkUnnamed7(core.List<api.MediationReportSpecSortCondition> o) {
unittest.expect(o, unittest.hasLength(2));
checkMediationReportSpecSortCondition(o[0]);
checkMediationReportSpecSortCondition(o[1]);
}
core.int buildCounterMediationReportSpec = 0;
api.MediationReportSpec buildMediationReportSpec() {
final o = api.MediationReportSpec();
buildCounterMediationReportSpec++;
if (buildCounterMediationReportSpec < 3) {
o.dateRange = buildDateRange();
o.dimensionFilters = buildUnnamed4();
o.dimensions = buildUnnamed5();
o.localizationSettings = buildLocalizationSettings();
o.maxReportRows = 42;
o.metrics = buildUnnamed6();
o.sortConditions = buildUnnamed7();
o.timeZone = 'foo';
}
buildCounterMediationReportSpec--;
return o;
}
void checkMediationReportSpec(api.MediationReportSpec o) {
buildCounterMediationReportSpec++;
if (buildCounterMediationReportSpec < 3) {
checkDateRange(o.dateRange!);
checkUnnamed4(o.dimensionFilters!);
checkUnnamed5(o.dimensions!);
checkLocalizationSettings(o.localizationSettings!);
unittest.expect(
o.maxReportRows!,
unittest.equals(42),
);
checkUnnamed6(o.metrics!);
checkUnnamed7(o.sortConditions!);
unittest.expect(
o.timeZone!,
unittest.equals('foo'),
);
}
buildCounterMediationReportSpec--;
}
core.int buildCounterMediationReportSpecDimensionFilter = 0;
api.MediationReportSpecDimensionFilter
buildMediationReportSpecDimensionFilter() {
final o = api.MediationReportSpecDimensionFilter();
buildCounterMediationReportSpecDimensionFilter++;
if (buildCounterMediationReportSpecDimensionFilter < 3) {
o.dimension = 'foo';
o.matchesAny = buildStringList();
}
buildCounterMediationReportSpecDimensionFilter--;
return o;
}
void checkMediationReportSpecDimensionFilter(
api.MediationReportSpecDimensionFilter o) {
buildCounterMediationReportSpecDimensionFilter++;
if (buildCounterMediationReportSpecDimensionFilter < 3) {
unittest.expect(
o.dimension!,
unittest.equals('foo'),
);
checkStringList(o.matchesAny!);
}
buildCounterMediationReportSpecDimensionFilter--;
}
core.int buildCounterMediationReportSpecSortCondition = 0;
api.MediationReportSpecSortCondition buildMediationReportSpecSortCondition() {
final o = api.MediationReportSpecSortCondition();
buildCounterMediationReportSpecSortCondition++;
if (buildCounterMediationReportSpecSortCondition < 3) {
o.dimension = 'foo';
o.metric = 'foo';
o.order = 'foo';
}
buildCounterMediationReportSpecSortCondition--;
return o;
}
void checkMediationReportSpecSortCondition(
api.MediationReportSpecSortCondition o) {
buildCounterMediationReportSpecSortCondition++;
if (buildCounterMediationReportSpecSortCondition < 3) {
unittest.expect(
o.dimension!,
unittest.equals('foo'),
);
unittest.expect(
o.metric!,
unittest.equals('foo'),
);
unittest.expect(
o.order!,
unittest.equals('foo'),
);
}
buildCounterMediationReportSpecSortCondition--;
}
core.List<api.NetworkReportSpecDimensionFilter> buildUnnamed8() => [
buildNetworkReportSpecDimensionFilter(),
buildNetworkReportSpecDimensionFilter(),
];
void checkUnnamed8(core.List<api.NetworkReportSpecDimensionFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkNetworkReportSpecDimensionFilter(o[0]);
checkNetworkReportSpecDimensionFilter(o[1]);
}
core.List<core.String> buildUnnamed9() => [
'foo',
'foo',
];
void checkUnnamed9(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.List<core.String> buildUnnamed10() => [
'foo',
'foo',
];
void checkUnnamed10(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.List<api.NetworkReportSpecSortCondition> buildUnnamed11() => [
buildNetworkReportSpecSortCondition(),
buildNetworkReportSpecSortCondition(),
];
void checkUnnamed11(core.List<api.NetworkReportSpecSortCondition> o) {
unittest.expect(o, unittest.hasLength(2));
checkNetworkReportSpecSortCondition(o[0]);
checkNetworkReportSpecSortCondition(o[1]);
}
core.int buildCounterNetworkReportSpec = 0;
api.NetworkReportSpec buildNetworkReportSpec() {
final o = api.NetworkReportSpec();
buildCounterNetworkReportSpec++;
if (buildCounterNetworkReportSpec < 3) {
o.dateRange = buildDateRange();
o.dimensionFilters = buildUnnamed8();
o.dimensions = buildUnnamed9();
o.localizationSettings = buildLocalizationSettings();
o.maxReportRows = 42;
o.metrics = buildUnnamed10();
o.sortConditions = buildUnnamed11();
o.timeZone = 'foo';
}
buildCounterNetworkReportSpec--;
return o;
}
void checkNetworkReportSpec(api.NetworkReportSpec o) {
buildCounterNetworkReportSpec++;
if (buildCounterNetworkReportSpec < 3) {
checkDateRange(o.dateRange!);
checkUnnamed8(o.dimensionFilters!);
checkUnnamed9(o.dimensions!);
checkLocalizationSettings(o.localizationSettings!);
unittest.expect(
o.maxReportRows!,
unittest.equals(42),
);
checkUnnamed10(o.metrics!);
checkUnnamed11(o.sortConditions!);
unittest.expect(
o.timeZone!,
unittest.equals('foo'),
);
}
buildCounterNetworkReportSpec--;
}
core.int buildCounterNetworkReportSpecDimensionFilter = 0;
api.NetworkReportSpecDimensionFilter buildNetworkReportSpecDimensionFilter() {
final o = api.NetworkReportSpecDimensionFilter();
buildCounterNetworkReportSpecDimensionFilter++;
if (buildCounterNetworkReportSpecDimensionFilter < 3) {
o.dimension = 'foo';
o.matchesAny = buildStringList();
}
buildCounterNetworkReportSpecDimensionFilter--;
return o;
}
void checkNetworkReportSpecDimensionFilter(
api.NetworkReportSpecDimensionFilter o) {
buildCounterNetworkReportSpecDimensionFilter++;
if (buildCounterNetworkReportSpecDimensionFilter < 3) {
unittest.expect(
o.dimension!,
unittest.equals('foo'),
);
checkStringList(o.matchesAny!);
}
buildCounterNetworkReportSpecDimensionFilter--;
}
core.int buildCounterNetworkReportSpecSortCondition = 0;
api.NetworkReportSpecSortCondition buildNetworkReportSpecSortCondition() {
final o = api.NetworkReportSpecSortCondition();
buildCounterNetworkReportSpecSortCondition++;
if (buildCounterNetworkReportSpecSortCondition < 3) {
o.dimension = 'foo';
o.metric = 'foo';
o.order = 'foo';
}
buildCounterNetworkReportSpecSortCondition--;
return o;
}
void checkNetworkReportSpecSortCondition(api.NetworkReportSpecSortCondition o) {
buildCounterNetworkReportSpecSortCondition++;
if (buildCounterNetworkReportSpecSortCondition < 3) {
unittest.expect(
o.dimension!,
unittest.equals('foo'),
);
unittest.expect(
o.metric!,
unittest.equals('foo'),
);
unittest.expect(
o.order!,
unittest.equals('foo'),
);
}
buildCounterNetworkReportSpecSortCondition--;
}
core.int buildCounterPublisherAccount = 0;
api.PublisherAccount buildPublisherAccount() {
final o = api.PublisherAccount();
buildCounterPublisherAccount++;
if (buildCounterPublisherAccount < 3) {
o.currencyCode = 'foo';
o.name = 'foo';
o.publisherId = 'foo';
o.reportingTimeZone = 'foo';
}
buildCounterPublisherAccount--;
return o;
}
void checkPublisherAccount(api.PublisherAccount o) {
buildCounterPublisherAccount++;
if (buildCounterPublisherAccount < 3) {
unittest.expect(
o.currencyCode!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.publisherId!,
unittest.equals('foo'),
);
unittest.expect(
o.reportingTimeZone!,
unittest.equals('foo'),
);
}
buildCounterPublisherAccount--;
}
core.List<api.ReportWarning> buildUnnamed12() => [
buildReportWarning(),
buildReportWarning(),
];
void checkUnnamed12(core.List<api.ReportWarning> o) {
unittest.expect(o, unittest.hasLength(2));
checkReportWarning(o[0]);
checkReportWarning(o[1]);
}
core.int buildCounterReportFooter = 0;
api.ReportFooter buildReportFooter() {
final o = api.ReportFooter();
buildCounterReportFooter++;
if (buildCounterReportFooter < 3) {
o.matchingRowCount = 'foo';
o.warnings = buildUnnamed12();
}
buildCounterReportFooter--;
return o;
}
void checkReportFooter(api.ReportFooter o) {
buildCounterReportFooter++;
if (buildCounterReportFooter < 3) {
unittest.expect(
o.matchingRowCount!,
unittest.equals('foo'),
);
checkUnnamed12(o.warnings!);
}
buildCounterReportFooter--;
}
core.int buildCounterReportHeader = 0;
api.ReportHeader buildReportHeader() {
final o = api.ReportHeader();
buildCounterReportHeader++;
if (buildCounterReportHeader < 3) {
o.dateRange = buildDateRange();
o.localizationSettings = buildLocalizationSettings();
o.reportingTimeZone = 'foo';
}
buildCounterReportHeader--;
return o;
}
void checkReportHeader(api.ReportHeader o) {
buildCounterReportHeader++;
if (buildCounterReportHeader < 3) {
checkDateRange(o.dateRange!);
checkLocalizationSettings(o.localizationSettings!);
unittest.expect(
o.reportingTimeZone!,
unittest.equals('foo'),
);
}
buildCounterReportHeader--;
}
core.Map<core.String, api.ReportRowDimensionValue> buildUnnamed13() => {
'x': buildReportRowDimensionValue(),
'y': buildReportRowDimensionValue(),
};
void checkUnnamed13(core.Map<core.String, api.ReportRowDimensionValue> o) {
unittest.expect(o, unittest.hasLength(2));
checkReportRowDimensionValue(o['x']!);
checkReportRowDimensionValue(o['y']!);
}
core.Map<core.String, api.ReportRowMetricValue> buildUnnamed14() => {
'x': buildReportRowMetricValue(),
'y': buildReportRowMetricValue(),
};
void checkUnnamed14(core.Map<core.String, api.ReportRowMetricValue> o) {
unittest.expect(o, unittest.hasLength(2));
checkReportRowMetricValue(o['x']!);
checkReportRowMetricValue(o['y']!);
}
core.int buildCounterReportRow = 0;
api.ReportRow buildReportRow() {
final o = api.ReportRow();
buildCounterReportRow++;
if (buildCounterReportRow < 3) {
o.dimensionValues = buildUnnamed13();
o.metricValues = buildUnnamed14();
}
buildCounterReportRow--;
return o;
}
void checkReportRow(api.ReportRow o) {
buildCounterReportRow++;
if (buildCounterReportRow < 3) {
checkUnnamed13(o.dimensionValues!);
checkUnnamed14(o.metricValues!);
}
buildCounterReportRow--;
}
core.int buildCounterReportRowDimensionValue = 0;
api.ReportRowDimensionValue buildReportRowDimensionValue() {
final o = api.ReportRowDimensionValue();
buildCounterReportRowDimensionValue++;
if (buildCounterReportRowDimensionValue < 3) {
o.displayLabel = 'foo';
o.value = 'foo';
}
buildCounterReportRowDimensionValue--;
return o;
}
void checkReportRowDimensionValue(api.ReportRowDimensionValue o) {
buildCounterReportRowDimensionValue++;
if (buildCounterReportRowDimensionValue < 3) {
unittest.expect(
o.displayLabel!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterReportRowDimensionValue--;
}
core.int buildCounterReportRowMetricValue = 0;
api.ReportRowMetricValue buildReportRowMetricValue() {
final o = api.ReportRowMetricValue();
buildCounterReportRowMetricValue++;
if (buildCounterReportRowMetricValue < 3) {
o.doubleValue = 42.0;
o.integerValue = 'foo';
o.microsValue = 'foo';
}
buildCounterReportRowMetricValue--;
return o;
}
void checkReportRowMetricValue(api.ReportRowMetricValue o) {
buildCounterReportRowMetricValue++;
if (buildCounterReportRowMetricValue < 3) {
unittest.expect(
o.doubleValue!,
unittest.equals(42.0),
);
unittest.expect(
o.integerValue!,
unittest.equals('foo'),
);
unittest.expect(
o.microsValue!,
unittest.equals('foo'),
);
}
buildCounterReportRowMetricValue--;
}
core.int buildCounterReportWarning = 0;
api.ReportWarning buildReportWarning() {
final o = api.ReportWarning();
buildCounterReportWarning++;
if (buildCounterReportWarning < 3) {
o.description = 'foo';
o.type = 'foo';
}
buildCounterReportWarning--;
return o;
}
void checkReportWarning(api.ReportWarning o) {
buildCounterReportWarning++;
if (buildCounterReportWarning < 3) {
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterReportWarning--;
}
core.List<core.String> buildUnnamed15() => [
'foo',
'foo',
];
void checkUnnamed15(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 buildCounterStringList = 0;
api.StringList buildStringList() {
final o = api.StringList();
buildCounterStringList++;
if (buildCounterStringList < 3) {
o.values = buildUnnamed15();
}
buildCounterStringList--;
return o;
}
void checkStringList(api.StringList o) {
buildCounterStringList++;
if (buildCounterStringList < 3) {
checkUnnamed15(o.values!);
}
buildCounterStringList--;
}
void main() {
unittest.group('obj-schema-AdUnit', () {
unittest.test('to-json--from-json', () async {
final o = buildAdUnit();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.AdUnit.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkAdUnit(od);
});
});
unittest.group('obj-schema-App', () {
unittest.test('to-json--from-json', () async {
final o = buildApp();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.App.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkApp(od);
});
});
unittest.group('obj-schema-AppLinkedAppInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildAppLinkedAppInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AppLinkedAppInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAppLinkedAppInfo(od);
});
});
unittest.group('obj-schema-AppManualAppInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildAppManualAppInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AppManualAppInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAppManualAppInfo(od);
});
});
unittest.group('obj-schema-Date', () {
unittest.test('to-json--from-json', () async {
final o = buildDate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Date.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDate(od);
});
});
unittest.group('obj-schema-DateRange', () {
unittest.test('to-json--from-json', () async {
final o = buildDateRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DateRange.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDateRange(od);
});
});
unittest.group('obj-schema-GenerateMediationReportRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGenerateMediationReportRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GenerateMediationReportRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGenerateMediationReportRequest(od);
});
});
unittest.group('obj-schema-GenerateMediationReportResponseElement', () {
unittest.test('to-json--from-json', () async {
final o = buildGenerateMediationReportResponseElement();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GenerateMediationReportResponseElement.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGenerateMediationReportResponseElement(od);
});
});
unittest.group('obj-schema-GenerateMediationReportResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGenerateMediationReportResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = (oJson as core.List)
.map((value) => api.GenerateMediationReportResponseElement.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList();
checkGenerateMediationReportResponse(od);
});
});
unittest.group('obj-schema-GenerateNetworkReportRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGenerateNetworkReportRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GenerateNetworkReportRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGenerateNetworkReportRequest(od);
});
});
unittest.group('obj-schema-GenerateNetworkReportResponseElement', () {
unittest.test('to-json--from-json', () async {
final o = buildGenerateNetworkReportResponseElement();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GenerateNetworkReportResponseElement.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGenerateNetworkReportResponseElement(od);
});
});
unittest.group('obj-schema-GenerateNetworkReportResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGenerateNetworkReportResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = (oJson as core.List)
.map((value) => api.GenerateNetworkReportResponseElement.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList();
checkGenerateNetworkReportResponse(od);
});
});
unittest.group('obj-schema-ListAdUnitsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListAdUnitsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListAdUnitsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListAdUnitsResponse(od);
});
});
unittest.group('obj-schema-ListAppsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListAppsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListAppsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListAppsResponse(od);
});
});
unittest.group('obj-schema-ListPublisherAccountsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListPublisherAccountsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListPublisherAccountsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListPublisherAccountsResponse(od);
});
});
unittest.group('obj-schema-LocalizationSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildLocalizationSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LocalizationSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLocalizationSettings(od);
});
});
unittest.group('obj-schema-MediationReportSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildMediationReportSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MediationReportSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMediationReportSpec(od);
});
});
unittest.group('obj-schema-MediationReportSpecDimensionFilter', () {
unittest.test('to-json--from-json', () async {
final o = buildMediationReportSpecDimensionFilter();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MediationReportSpecDimensionFilter.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMediationReportSpecDimensionFilter(od);
});
});
unittest.group('obj-schema-MediationReportSpecSortCondition', () {
unittest.test('to-json--from-json', () async {
final o = buildMediationReportSpecSortCondition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MediationReportSpecSortCondition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMediationReportSpecSortCondition(od);
});
});
unittest.group('obj-schema-NetworkReportSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildNetworkReportSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.NetworkReportSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkNetworkReportSpec(od);
});
});
unittest.group('obj-schema-NetworkReportSpecDimensionFilter', () {
unittest.test('to-json--from-json', () async {
final o = buildNetworkReportSpecDimensionFilter();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.NetworkReportSpecDimensionFilter.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkNetworkReportSpecDimensionFilter(od);
});
});
unittest.group('obj-schema-NetworkReportSpecSortCondition', () {
unittest.test('to-json--from-json', () async {
final o = buildNetworkReportSpecSortCondition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.NetworkReportSpecSortCondition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkNetworkReportSpecSortCondition(od);
});
});
unittest.group('obj-schema-PublisherAccount', () {
unittest.test('to-json--from-json', () async {
final o = buildPublisherAccount();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PublisherAccount.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPublisherAccount(od);
});
});
unittest.group('obj-schema-ReportFooter', () {
unittest.test('to-json--from-json', () async {
final o = buildReportFooter();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReportFooter.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReportFooter(od);
});
});
unittest.group('obj-schema-ReportHeader', () {
unittest.test('to-json--from-json', () async {
final o = buildReportHeader();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReportHeader.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReportHeader(od);
});
});
unittest.group('obj-schema-ReportRow', () {
unittest.test('to-json--from-json', () async {
final o = buildReportRow();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ReportRow.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkReportRow(od);
});
});
unittest.group('obj-schema-ReportRowDimensionValue', () {
unittest.test('to-json--from-json', () async {
final o = buildReportRowDimensionValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReportRowDimensionValue.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReportRowDimensionValue(od);
});
});
unittest.group('obj-schema-ReportRowMetricValue', () {
unittest.test('to-json--from-json', () async {
final o = buildReportRowMetricValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReportRowMetricValue.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReportRowMetricValue(od);
});
});
unittest.group('obj-schema-ReportWarning', () {
unittest.test('to-json--from-json', () async {
final o = buildReportWarning();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReportWarning.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReportWarning(od);
});
});
unittest.group('obj-schema-StringList', () {
unittest.test('to-json--from-json', () async {
final o = buildStringList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.StringList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStringList(od);
});
});
unittest.group('resource-AccountsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AdMobApi(mock).accounts;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPublisherAccount());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkPublisherAccount(response as api.PublisherAccount);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AdMobApi(mock).accounts;
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('v1/accounts'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListPublisherAccountsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListPublisherAccountsResponse(
response as api.ListPublisherAccountsResponse);
});
});
unittest.group('resource-AccountsAdUnitsResource', () {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AdMobApi(mock).accounts.adUnits;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListAdUnitsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListAdUnitsResponse(response as api.ListAdUnitsResponse);
});
});
unittest.group('resource-AccountsAppsResource', () {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AdMobApi(mock).accounts.apps;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListAppsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListAppsResponse(response as api.ListAppsResponse);
});
});
unittest.group('resource-AccountsMediationReportResource', () {
unittest.test('method--generate', () async {
final mock = HttpServerMock();
final res = api.AdMobApi(mock).accounts.mediationReport;
final arg_request = buildGenerateMediationReportRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GenerateMediationReportRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGenerateMediationReportRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGenerateMediationReportResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.generate(arg_request, arg_parent, $fields: arg_$fields);
checkGenerateMediationReportResponse(
response as api.GenerateMediationReportResponse);
});
});
unittest.group('resource-AccountsNetworkReportResource', () {
unittest.test('method--generate', () async {
final mock = HttpServerMock();
final res = api.AdMobApi(mock).accounts.networkReport;
final arg_request = buildGenerateNetworkReportRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GenerateNetworkReportRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGenerateNetworkReportRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGenerateNetworkReportResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.generate(arg_request, arg_parent, $fields: arg_$fields);
checkGenerateNetworkReportResponse(
response as api.GenerateNetworkReportResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/admob/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/admob/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 20816} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/appengine/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterApiConfigHandler = 0;
api.ApiConfigHandler buildApiConfigHandler() {
final o = api.ApiConfigHandler();
buildCounterApiConfigHandler++;
if (buildCounterApiConfigHandler < 3) {
o.authFailAction = 'foo';
o.login = 'foo';
o.script = 'foo';
o.securityLevel = 'foo';
o.url = 'foo';
}
buildCounterApiConfigHandler--;
return o;
}
void checkApiConfigHandler(api.ApiConfigHandler o) {
buildCounterApiConfigHandler++;
if (buildCounterApiConfigHandler < 3) {
unittest.expect(
o.authFailAction!,
unittest.equals('foo'),
);
unittest.expect(
o.login!,
unittest.equals('foo'),
);
unittest.expect(
o.script!,
unittest.equals('foo'),
);
unittest.expect(
o.securityLevel!,
unittest.equals('foo'),
);
unittest.expect(
o.url!,
unittest.equals('foo'),
);
}
buildCounterApiConfigHandler--;
}
core.int buildCounterApiEndpointHandler = 0;
api.ApiEndpointHandler buildApiEndpointHandler() {
final o = api.ApiEndpointHandler();
buildCounterApiEndpointHandler++;
if (buildCounterApiEndpointHandler < 3) {
o.scriptPath = 'foo';
}
buildCounterApiEndpointHandler--;
return o;
}
void checkApiEndpointHandler(api.ApiEndpointHandler o) {
buildCounterApiEndpointHandler++;
if (buildCounterApiEndpointHandler < 3) {
unittest.expect(
o.scriptPath!,
unittest.equals('foo'),
);
}
buildCounterApiEndpointHandler--;
}
core.List<api.UrlDispatchRule> buildUnnamed0() => [
buildUrlDispatchRule(),
buildUrlDispatchRule(),
];
void checkUnnamed0(core.List<api.UrlDispatchRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkUrlDispatchRule(o[0]);
checkUrlDispatchRule(o[1]);
}
core.int buildCounterApplication = 0;
api.Application buildApplication() {
final o = api.Application();
buildCounterApplication++;
if (buildCounterApplication < 3) {
o.authDomain = 'foo';
o.codeBucket = 'foo';
o.databaseType = 'foo';
o.defaultBucket = 'foo';
o.defaultCookieExpiration = 'foo';
o.defaultHostname = 'foo';
o.dispatchRules = buildUnnamed0();
o.featureSettings = buildFeatureSettings();
o.gcrDomain = 'foo';
o.iap = buildIdentityAwareProxy();
o.id = 'foo';
o.locationId = 'foo';
o.name = 'foo';
o.serviceAccount = 'foo';
o.servingStatus = 'foo';
}
buildCounterApplication--;
return o;
}
void checkApplication(api.Application o) {
buildCounterApplication++;
if (buildCounterApplication < 3) {
unittest.expect(
o.authDomain!,
unittest.equals('foo'),
);
unittest.expect(
o.codeBucket!,
unittest.equals('foo'),
);
unittest.expect(
o.databaseType!,
unittest.equals('foo'),
);
unittest.expect(
o.defaultBucket!,
unittest.equals('foo'),
);
unittest.expect(
o.defaultCookieExpiration!,
unittest.equals('foo'),
);
unittest.expect(
o.defaultHostname!,
unittest.equals('foo'),
);
checkUnnamed0(o.dispatchRules!);
checkFeatureSettings(o.featureSettings!);
unittest.expect(
o.gcrDomain!,
unittest.equals('foo'),
);
checkIdentityAwareProxy(o.iap!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.locationId!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.serviceAccount!,
unittest.equals('foo'),
);
unittest.expect(
o.servingStatus!,
unittest.equals('foo'),
);
}
buildCounterApplication--;
}
core.List<core.String> buildUnnamed1() => [
'foo',
'foo',
];
void checkUnnamed1(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.List<core.String> buildUnnamed2() => [
'foo',
'foo',
];
void checkUnnamed2(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 buildCounterAuthorizedCertificate = 0;
api.AuthorizedCertificate buildAuthorizedCertificate() {
final o = api.AuthorizedCertificate();
buildCounterAuthorizedCertificate++;
if (buildCounterAuthorizedCertificate < 3) {
o.certificateRawData = buildCertificateRawData();
o.displayName = 'foo';
o.domainMappingsCount = 42;
o.domainNames = buildUnnamed1();
o.expireTime = 'foo';
o.id = 'foo';
o.managedCertificate = buildManagedCertificate();
o.name = 'foo';
o.visibleDomainMappings = buildUnnamed2();
}
buildCounterAuthorizedCertificate--;
return o;
}
void checkAuthorizedCertificate(api.AuthorizedCertificate o) {
buildCounterAuthorizedCertificate++;
if (buildCounterAuthorizedCertificate < 3) {
checkCertificateRawData(o.certificateRawData!);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.domainMappingsCount!,
unittest.equals(42),
);
checkUnnamed1(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'),
);
checkUnnamed2(o.visibleDomainMappings!);
}
buildCounterAuthorizedCertificate--;
}
core.int buildCounterAuthorizedDomain = 0;
api.AuthorizedDomain buildAuthorizedDomain() {
final o = api.AuthorizedDomain();
buildCounterAuthorizedDomain++;
if (buildCounterAuthorizedDomain < 3) {
o.id = 'foo';
o.name = 'foo';
}
buildCounterAuthorizedDomain--;
return o;
}
void checkAuthorizedDomain(api.AuthorizedDomain o) {
buildCounterAuthorizedDomain++;
if (buildCounterAuthorizedDomain < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterAuthorizedDomain--;
}
core.int buildCounterAutomaticScaling = 0;
api.AutomaticScaling buildAutomaticScaling() {
final o = api.AutomaticScaling();
buildCounterAutomaticScaling++;
if (buildCounterAutomaticScaling < 3) {
o.coolDownPeriod = 'foo';
o.cpuUtilization = buildCpuUtilization();
o.diskUtilization = buildDiskUtilization();
o.maxConcurrentRequests = 42;
o.maxIdleInstances = 42;
o.maxPendingLatency = 'foo';
o.maxTotalInstances = 42;
o.minIdleInstances = 42;
o.minPendingLatency = 'foo';
o.minTotalInstances = 42;
o.networkUtilization = buildNetworkUtilization();
o.requestUtilization = buildRequestUtilization();
o.standardSchedulerSettings = buildStandardSchedulerSettings();
}
buildCounterAutomaticScaling--;
return o;
}
void checkAutomaticScaling(api.AutomaticScaling o) {
buildCounterAutomaticScaling++;
if (buildCounterAutomaticScaling < 3) {
unittest.expect(
o.coolDownPeriod!,
unittest.equals('foo'),
);
checkCpuUtilization(o.cpuUtilization!);
checkDiskUtilization(o.diskUtilization!);
unittest.expect(
o.maxConcurrentRequests!,
unittest.equals(42),
);
unittest.expect(
o.maxIdleInstances!,
unittest.equals(42),
);
unittest.expect(
o.maxPendingLatency!,
unittest.equals('foo'),
);
unittest.expect(
o.maxTotalInstances!,
unittest.equals(42),
);
unittest.expect(
o.minIdleInstances!,
unittest.equals(42),
);
unittest.expect(
o.minPendingLatency!,
unittest.equals('foo'),
);
unittest.expect(
o.minTotalInstances!,
unittest.equals(42),
);
checkNetworkUtilization(o.networkUtilization!);
checkRequestUtilization(o.requestUtilization!);
checkStandardSchedulerSettings(o.standardSchedulerSettings!);
}
buildCounterAutomaticScaling--;
}
core.int buildCounterBasicScaling = 0;
api.BasicScaling buildBasicScaling() {
final o = api.BasicScaling();
buildCounterBasicScaling++;
if (buildCounterBasicScaling < 3) {
o.idleTimeout = 'foo';
o.maxInstances = 42;
}
buildCounterBasicScaling--;
return o;
}
void checkBasicScaling(api.BasicScaling o) {
buildCounterBasicScaling++;
if (buildCounterBasicScaling < 3) {
unittest.expect(
o.idleTimeout!,
unittest.equals('foo'),
);
unittest.expect(
o.maxInstances!,
unittest.equals(42),
);
}
buildCounterBasicScaling--;
}
core.List<api.FirewallRule> buildUnnamed3() => [
buildFirewallRule(),
buildFirewallRule(),
];
void checkUnnamed3(core.List<api.FirewallRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkFirewallRule(o[0]);
checkFirewallRule(o[1]);
}
core.int buildCounterBatchUpdateIngressRulesRequest = 0;
api.BatchUpdateIngressRulesRequest buildBatchUpdateIngressRulesRequest() {
final o = api.BatchUpdateIngressRulesRequest();
buildCounterBatchUpdateIngressRulesRequest++;
if (buildCounterBatchUpdateIngressRulesRequest < 3) {
o.ingressRules = buildUnnamed3();
}
buildCounterBatchUpdateIngressRulesRequest--;
return o;
}
void checkBatchUpdateIngressRulesRequest(api.BatchUpdateIngressRulesRequest o) {
buildCounterBatchUpdateIngressRulesRequest++;
if (buildCounterBatchUpdateIngressRulesRequest < 3) {
checkUnnamed3(o.ingressRules!);
}
buildCounterBatchUpdateIngressRulesRequest--;
}
core.List<api.FirewallRule> buildUnnamed4() => [
buildFirewallRule(),
buildFirewallRule(),
];
void checkUnnamed4(core.List<api.FirewallRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkFirewallRule(o[0]);
checkFirewallRule(o[1]);
}
core.int buildCounterBatchUpdateIngressRulesResponse = 0;
api.BatchUpdateIngressRulesResponse buildBatchUpdateIngressRulesResponse() {
final o = api.BatchUpdateIngressRulesResponse();
buildCounterBatchUpdateIngressRulesResponse++;
if (buildCounterBatchUpdateIngressRulesResponse < 3) {
o.ingressRules = buildUnnamed4();
}
buildCounterBatchUpdateIngressRulesResponse--;
return o;
}
void checkBatchUpdateIngressRulesResponse(
api.BatchUpdateIngressRulesResponse o) {
buildCounterBatchUpdateIngressRulesResponse++;
if (buildCounterBatchUpdateIngressRulesResponse < 3) {
checkUnnamed4(o.ingressRules!);
}
buildCounterBatchUpdateIngressRulesResponse--;
}
core.int buildCounterCertificateRawData = 0;
api.CertificateRawData buildCertificateRawData() {
final o = api.CertificateRawData();
buildCounterCertificateRawData++;
if (buildCounterCertificateRawData < 3) {
o.privateKey = 'foo';
o.publicCertificate = 'foo';
}
buildCounterCertificateRawData--;
return o;
}
void checkCertificateRawData(api.CertificateRawData o) {
buildCounterCertificateRawData++;
if (buildCounterCertificateRawData < 3) {
unittest.expect(
o.privateKey!,
unittest.equals('foo'),
);
unittest.expect(
o.publicCertificate!,
unittest.equals('foo'),
);
}
buildCounterCertificateRawData--;
}
core.int buildCounterCloudBuildOptions = 0;
api.CloudBuildOptions buildCloudBuildOptions() {
final o = api.CloudBuildOptions();
buildCounterCloudBuildOptions++;
if (buildCounterCloudBuildOptions < 3) {
o.appYamlPath = 'foo';
o.cloudBuildTimeout = 'foo';
}
buildCounterCloudBuildOptions--;
return o;
}
void checkCloudBuildOptions(api.CloudBuildOptions o) {
buildCounterCloudBuildOptions++;
if (buildCounterCloudBuildOptions < 3) {
unittest.expect(
o.appYamlPath!,
unittest.equals('foo'),
);
unittest.expect(
o.cloudBuildTimeout!,
unittest.equals('foo'),
);
}
buildCounterCloudBuildOptions--;
}
core.int buildCounterContainerInfo = 0;
api.ContainerInfo buildContainerInfo() {
final o = api.ContainerInfo();
buildCounterContainerInfo++;
if (buildCounterContainerInfo < 3) {
o.image = 'foo';
}
buildCounterContainerInfo--;
return o;
}
void checkContainerInfo(api.ContainerInfo o) {
buildCounterContainerInfo++;
if (buildCounterContainerInfo < 3) {
unittest.expect(
o.image!,
unittest.equals('foo'),
);
}
buildCounterContainerInfo--;
}
core.int buildCounterCpuUtilization = 0;
api.CpuUtilization buildCpuUtilization() {
final o = api.CpuUtilization();
buildCounterCpuUtilization++;
if (buildCounterCpuUtilization < 3) {
o.aggregationWindowLength = 'foo';
o.targetUtilization = 42.0;
}
buildCounterCpuUtilization--;
return o;
}
void checkCpuUtilization(api.CpuUtilization o) {
buildCounterCpuUtilization++;
if (buildCounterCpuUtilization < 3) {
unittest.expect(
o.aggregationWindowLength!,
unittest.equals('foo'),
);
unittest.expect(
o.targetUtilization!,
unittest.equals(42.0),
);
}
buildCounterCpuUtilization--;
}
core.int buildCounterDebugInstanceRequest = 0;
api.DebugInstanceRequest buildDebugInstanceRequest() {
final o = api.DebugInstanceRequest();
buildCounterDebugInstanceRequest++;
if (buildCounterDebugInstanceRequest < 3) {
o.sshKey = 'foo';
}
buildCounterDebugInstanceRequest--;
return o;
}
void checkDebugInstanceRequest(api.DebugInstanceRequest o) {
buildCounterDebugInstanceRequest++;
if (buildCounterDebugInstanceRequest < 3) {
unittest.expect(
o.sshKey!,
unittest.equals('foo'),
);
}
buildCounterDebugInstanceRequest--;
}
core.Map<core.String, api.FileInfo> buildUnnamed5() => {
'x': buildFileInfo(),
'y': buildFileInfo(),
};
void checkUnnamed5(core.Map<core.String, api.FileInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkFileInfo(o['x']!);
checkFileInfo(o['y']!);
}
core.int buildCounterDeployment = 0;
api.Deployment buildDeployment() {
final o = api.Deployment();
buildCounterDeployment++;
if (buildCounterDeployment < 3) {
o.cloudBuildOptions = buildCloudBuildOptions();
o.container = buildContainerInfo();
o.files = buildUnnamed5();
o.zip = buildZipInfo();
}
buildCounterDeployment--;
return o;
}
void checkDeployment(api.Deployment o) {
buildCounterDeployment++;
if (buildCounterDeployment < 3) {
checkCloudBuildOptions(o.cloudBuildOptions!);
checkContainerInfo(o.container!);
checkUnnamed5(o.files!);
checkZipInfo(o.zip!);
}
buildCounterDeployment--;
}
core.int buildCounterDiskUtilization = 0;
api.DiskUtilization buildDiskUtilization() {
final o = api.DiskUtilization();
buildCounterDiskUtilization++;
if (buildCounterDiskUtilization < 3) {
o.targetReadBytesPerSecond = 42;
o.targetReadOpsPerSecond = 42;
o.targetWriteBytesPerSecond = 42;
o.targetWriteOpsPerSecond = 42;
}
buildCounterDiskUtilization--;
return o;
}
void checkDiskUtilization(api.DiskUtilization o) {
buildCounterDiskUtilization++;
if (buildCounterDiskUtilization < 3) {
unittest.expect(
o.targetReadBytesPerSecond!,
unittest.equals(42),
);
unittest.expect(
o.targetReadOpsPerSecond!,
unittest.equals(42),
);
unittest.expect(
o.targetWriteBytesPerSecond!,
unittest.equals(42),
);
unittest.expect(
o.targetWriteOpsPerSecond!,
unittest.equals(42),
);
}
buildCounterDiskUtilization--;
}
core.List<api.ResourceRecord> buildUnnamed6() => [
buildResourceRecord(),
buildResourceRecord(),
];
void checkUnnamed6(core.List<api.ResourceRecord> o) {
unittest.expect(o, unittest.hasLength(2));
checkResourceRecord(o[0]);
checkResourceRecord(o[1]);
}
core.int buildCounterDomainMapping = 0;
api.DomainMapping buildDomainMapping() {
final o = api.DomainMapping();
buildCounterDomainMapping++;
if (buildCounterDomainMapping < 3) {
o.id = 'foo';
o.name = 'foo';
o.resourceRecords = buildUnnamed6();
o.sslSettings = buildSslSettings();
}
buildCounterDomainMapping--;
return o;
}
void checkDomainMapping(api.DomainMapping o) {
buildCounterDomainMapping++;
if (buildCounterDomainMapping < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed6(o.resourceRecords!);
checkSslSettings(o.sslSettings!);
}
buildCounterDomainMapping--;
}
core.int buildCounterEmpty = 0;
api.Empty buildEmpty() {
final o = api.Empty();
buildCounterEmpty++;
if (buildCounterEmpty < 3) {}
buildCounterEmpty--;
return o;
}
void checkEmpty(api.Empty o) {
buildCounterEmpty++;
if (buildCounterEmpty < 3) {}
buildCounterEmpty--;
}
core.int buildCounterEndpointsApiService = 0;
api.EndpointsApiService buildEndpointsApiService() {
final o = api.EndpointsApiService();
buildCounterEndpointsApiService++;
if (buildCounterEndpointsApiService < 3) {
o.configId = 'foo';
o.disableTraceSampling = true;
o.name = 'foo';
o.rolloutStrategy = 'foo';
}
buildCounterEndpointsApiService--;
return o;
}
void checkEndpointsApiService(api.EndpointsApiService o) {
buildCounterEndpointsApiService++;
if (buildCounterEndpointsApiService < 3) {
unittest.expect(
o.configId!,
unittest.equals('foo'),
);
unittest.expect(o.disableTraceSampling!, unittest.isTrue);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.rolloutStrategy!,
unittest.equals('foo'),
);
}
buildCounterEndpointsApiService--;
}
core.int buildCounterEntrypoint = 0;
api.Entrypoint buildEntrypoint() {
final o = api.Entrypoint();
buildCounterEntrypoint++;
if (buildCounterEntrypoint < 3) {
o.shell = 'foo';
}
buildCounterEntrypoint--;
return o;
}
void checkEntrypoint(api.Entrypoint o) {
buildCounterEntrypoint++;
if (buildCounterEntrypoint < 3) {
unittest.expect(
o.shell!,
unittest.equals('foo'),
);
}
buildCounterEntrypoint--;
}
core.int buildCounterErrorHandler = 0;
api.ErrorHandler buildErrorHandler() {
final o = api.ErrorHandler();
buildCounterErrorHandler++;
if (buildCounterErrorHandler < 3) {
o.errorCode = 'foo';
o.mimeType = 'foo';
o.staticFile = 'foo';
}
buildCounterErrorHandler--;
return o;
}
void checkErrorHandler(api.ErrorHandler o) {
buildCounterErrorHandler++;
if (buildCounterErrorHandler < 3) {
unittest.expect(
o.errorCode!,
unittest.equals('foo'),
);
unittest.expect(
o.mimeType!,
unittest.equals('foo'),
);
unittest.expect(
o.staticFile!,
unittest.equals('foo'),
);
}
buildCounterErrorHandler--;
}
core.int buildCounterFeatureSettings = 0;
api.FeatureSettings buildFeatureSettings() {
final o = api.FeatureSettings();
buildCounterFeatureSettings++;
if (buildCounterFeatureSettings < 3) {
o.splitHealthChecks = true;
o.useContainerOptimizedOs = true;
}
buildCounterFeatureSettings--;
return o;
}
void checkFeatureSettings(api.FeatureSettings o) {
buildCounterFeatureSettings++;
if (buildCounterFeatureSettings < 3) {
unittest.expect(o.splitHealthChecks!, unittest.isTrue);
unittest.expect(o.useContainerOptimizedOs!, unittest.isTrue);
}
buildCounterFeatureSettings--;
}
core.int buildCounterFileInfo = 0;
api.FileInfo buildFileInfo() {
final o = api.FileInfo();
buildCounterFileInfo++;
if (buildCounterFileInfo < 3) {
o.mimeType = 'foo';
o.sha1Sum = 'foo';
o.sourceUrl = 'foo';
}
buildCounterFileInfo--;
return o;
}
void checkFileInfo(api.FileInfo o) {
buildCounterFileInfo++;
if (buildCounterFileInfo < 3) {
unittest.expect(
o.mimeType!,
unittest.equals('foo'),
);
unittest.expect(
o.sha1Sum!,
unittest.equals('foo'),
);
unittest.expect(
o.sourceUrl!,
unittest.equals('foo'),
);
}
buildCounterFileInfo--;
}
core.int buildCounterFirewallRule = 0;
api.FirewallRule buildFirewallRule() {
final o = api.FirewallRule();
buildCounterFirewallRule++;
if (buildCounterFirewallRule < 3) {
o.action = 'foo';
o.description = 'foo';
o.priority = 42;
o.sourceRange = 'foo';
}
buildCounterFirewallRule--;
return o;
}
void checkFirewallRule(api.FirewallRule o) {
buildCounterFirewallRule++;
if (buildCounterFirewallRule < 3) {
unittest.expect(
o.action!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.priority!,
unittest.equals(42),
);
unittest.expect(
o.sourceRange!,
unittest.equals('foo'),
);
}
buildCounterFirewallRule--;
}
core.int buildCounterFlexibleRuntimeSettings = 0;
api.FlexibleRuntimeSettings buildFlexibleRuntimeSettings() {
final o = api.FlexibleRuntimeSettings();
buildCounterFlexibleRuntimeSettings++;
if (buildCounterFlexibleRuntimeSettings < 3) {
o.operatingSystem = 'foo';
o.runtimeVersion = 'foo';
}
buildCounterFlexibleRuntimeSettings--;
return o;
}
void checkFlexibleRuntimeSettings(api.FlexibleRuntimeSettings o) {
buildCounterFlexibleRuntimeSettings++;
if (buildCounterFlexibleRuntimeSettings < 3) {
unittest.expect(
o.operatingSystem!,
unittest.equals('foo'),
);
unittest.expect(
o.runtimeVersion!,
unittest.equals('foo'),
);
}
buildCounterFlexibleRuntimeSettings--;
}
core.int buildCounterHealthCheck = 0;
api.HealthCheck buildHealthCheck() {
final o = api.HealthCheck();
buildCounterHealthCheck++;
if (buildCounterHealthCheck < 3) {
o.checkInterval = 'foo';
o.disableHealthCheck = true;
o.healthyThreshold = 42;
o.host = 'foo';
o.restartThreshold = 42;
o.timeout = 'foo';
o.unhealthyThreshold = 42;
}
buildCounterHealthCheck--;
return o;
}
void checkHealthCheck(api.HealthCheck o) {
buildCounterHealthCheck++;
if (buildCounterHealthCheck < 3) {
unittest.expect(
o.checkInterval!,
unittest.equals('foo'),
);
unittest.expect(o.disableHealthCheck!, unittest.isTrue);
unittest.expect(
o.healthyThreshold!,
unittest.equals(42),
);
unittest.expect(
o.host!,
unittest.equals('foo'),
);
unittest.expect(
o.restartThreshold!,
unittest.equals(42),
);
unittest.expect(
o.timeout!,
unittest.equals('foo'),
);
unittest.expect(
o.unhealthyThreshold!,
unittest.equals(42),
);
}
buildCounterHealthCheck--;
}
core.int buildCounterIdentityAwareProxy = 0;
api.IdentityAwareProxy buildIdentityAwareProxy() {
final o = api.IdentityAwareProxy();
buildCounterIdentityAwareProxy++;
if (buildCounterIdentityAwareProxy < 3) {
o.enabled = true;
o.oauth2ClientId = 'foo';
o.oauth2ClientSecret = 'foo';
o.oauth2ClientSecretSha256 = 'foo';
}
buildCounterIdentityAwareProxy--;
return o;
}
void checkIdentityAwareProxy(api.IdentityAwareProxy o) {
buildCounterIdentityAwareProxy++;
if (buildCounterIdentityAwareProxy < 3) {
unittest.expect(o.enabled!, unittest.isTrue);
unittest.expect(
o.oauth2ClientId!,
unittest.equals('foo'),
);
unittest.expect(
o.oauth2ClientSecret!,
unittest.equals('foo'),
);
unittest.expect(
o.oauth2ClientSecretSha256!,
unittest.equals('foo'),
);
}
buildCounterIdentityAwareProxy--;
}
core.int buildCounterInstance = 0;
api.Instance buildInstance() {
final o = api.Instance();
buildCounterInstance++;
if (buildCounterInstance < 3) {
o.appEngineRelease = 'foo';
o.availability = 'foo';
o.averageLatency = 42;
o.errors = 42;
o.id = 'foo';
o.memoryUsage = 'foo';
o.name = 'foo';
o.qps = 42.0;
o.requests = 42;
o.startTime = 'foo';
o.vmDebugEnabled = true;
o.vmId = 'foo';
o.vmIp = 'foo';
o.vmLiveness = 'foo';
o.vmName = 'foo';
o.vmStatus = 'foo';
o.vmZoneName = 'foo';
}
buildCounterInstance--;
return o;
}
void checkInstance(api.Instance o) {
buildCounterInstance++;
if (buildCounterInstance < 3) {
unittest.expect(
o.appEngineRelease!,
unittest.equals('foo'),
);
unittest.expect(
o.availability!,
unittest.equals('foo'),
);
unittest.expect(
o.averageLatency!,
unittest.equals(42),
);
unittest.expect(
o.errors!,
unittest.equals(42),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.memoryUsage!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.qps!,
unittest.equals(42.0),
);
unittest.expect(
o.requests!,
unittest.equals(42),
);
unittest.expect(
o.startTime!,
unittest.equals('foo'),
);
unittest.expect(o.vmDebugEnabled!, unittest.isTrue);
unittest.expect(
o.vmId!,
unittest.equals('foo'),
);
unittest.expect(
o.vmIp!,
unittest.equals('foo'),
);
unittest.expect(
o.vmLiveness!,
unittest.equals('foo'),
);
unittest.expect(
o.vmName!,
unittest.equals('foo'),
);
unittest.expect(
o.vmStatus!,
unittest.equals('foo'),
);
unittest.expect(
o.vmZoneName!,
unittest.equals('foo'),
);
}
buildCounterInstance--;
}
core.int buildCounterLibrary = 0;
api.Library buildLibrary() {
final o = api.Library();
buildCounterLibrary++;
if (buildCounterLibrary < 3) {
o.name = 'foo';
o.version = 'foo';
}
buildCounterLibrary--;
return o;
}
void checkLibrary(api.Library o) {
buildCounterLibrary++;
if (buildCounterLibrary < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.version!,
unittest.equals('foo'),
);
}
buildCounterLibrary--;
}
core.List<api.AuthorizedCertificate> buildUnnamed7() => [
buildAuthorizedCertificate(),
buildAuthorizedCertificate(),
];
void checkUnnamed7(core.List<api.AuthorizedCertificate> o) {
unittest.expect(o, unittest.hasLength(2));
checkAuthorizedCertificate(o[0]);
checkAuthorizedCertificate(o[1]);
}
core.int buildCounterListAuthorizedCertificatesResponse = 0;
api.ListAuthorizedCertificatesResponse
buildListAuthorizedCertificatesResponse() {
final o = api.ListAuthorizedCertificatesResponse();
buildCounterListAuthorizedCertificatesResponse++;
if (buildCounterListAuthorizedCertificatesResponse < 3) {
o.certificates = buildUnnamed7();
o.nextPageToken = 'foo';
}
buildCounterListAuthorizedCertificatesResponse--;
return o;
}
void checkListAuthorizedCertificatesResponse(
api.ListAuthorizedCertificatesResponse o) {
buildCounterListAuthorizedCertificatesResponse++;
if (buildCounterListAuthorizedCertificatesResponse < 3) {
checkUnnamed7(o.certificates!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListAuthorizedCertificatesResponse--;
}
core.List<api.AuthorizedDomain> buildUnnamed8() => [
buildAuthorizedDomain(),
buildAuthorizedDomain(),
];
void checkUnnamed8(core.List<api.AuthorizedDomain> o) {
unittest.expect(o, unittest.hasLength(2));
checkAuthorizedDomain(o[0]);
checkAuthorizedDomain(o[1]);
}
core.int buildCounterListAuthorizedDomainsResponse = 0;
api.ListAuthorizedDomainsResponse buildListAuthorizedDomainsResponse() {
final o = api.ListAuthorizedDomainsResponse();
buildCounterListAuthorizedDomainsResponse++;
if (buildCounterListAuthorizedDomainsResponse < 3) {
o.domains = buildUnnamed8();
o.nextPageToken = 'foo';
}
buildCounterListAuthorizedDomainsResponse--;
return o;
}
void checkListAuthorizedDomainsResponse(api.ListAuthorizedDomainsResponse o) {
buildCounterListAuthorizedDomainsResponse++;
if (buildCounterListAuthorizedDomainsResponse < 3) {
checkUnnamed8(o.domains!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListAuthorizedDomainsResponse--;
}
core.List<api.DomainMapping> buildUnnamed9() => [
buildDomainMapping(),
buildDomainMapping(),
];
void checkUnnamed9(core.List<api.DomainMapping> o) {
unittest.expect(o, unittest.hasLength(2));
checkDomainMapping(o[0]);
checkDomainMapping(o[1]);
}
core.int buildCounterListDomainMappingsResponse = 0;
api.ListDomainMappingsResponse buildListDomainMappingsResponse() {
final o = api.ListDomainMappingsResponse();
buildCounterListDomainMappingsResponse++;
if (buildCounterListDomainMappingsResponse < 3) {
o.domainMappings = buildUnnamed9();
o.nextPageToken = 'foo';
}
buildCounterListDomainMappingsResponse--;
return o;
}
void checkListDomainMappingsResponse(api.ListDomainMappingsResponse o) {
buildCounterListDomainMappingsResponse++;
if (buildCounterListDomainMappingsResponse < 3) {
checkUnnamed9(o.domainMappings!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListDomainMappingsResponse--;
}
core.List<api.FirewallRule> buildUnnamed10() => [
buildFirewallRule(),
buildFirewallRule(),
];
void checkUnnamed10(core.List<api.FirewallRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkFirewallRule(o[0]);
checkFirewallRule(o[1]);
}
core.int buildCounterListIngressRulesResponse = 0;
api.ListIngressRulesResponse buildListIngressRulesResponse() {
final o = api.ListIngressRulesResponse();
buildCounterListIngressRulesResponse++;
if (buildCounterListIngressRulesResponse < 3) {
o.ingressRules = buildUnnamed10();
o.nextPageToken = 'foo';
}
buildCounterListIngressRulesResponse--;
return o;
}
void checkListIngressRulesResponse(api.ListIngressRulesResponse o) {
buildCounterListIngressRulesResponse++;
if (buildCounterListIngressRulesResponse < 3) {
checkUnnamed10(o.ingressRules!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListIngressRulesResponse--;
}
core.List<api.Instance> buildUnnamed11() => [
buildInstance(),
buildInstance(),
];
void checkUnnamed11(core.List<api.Instance> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstance(o[0]);
checkInstance(o[1]);
}
core.int buildCounterListInstancesResponse = 0;
api.ListInstancesResponse buildListInstancesResponse() {
final o = api.ListInstancesResponse();
buildCounterListInstancesResponse++;
if (buildCounterListInstancesResponse < 3) {
o.instances = buildUnnamed11();
o.nextPageToken = 'foo';
}
buildCounterListInstancesResponse--;
return o;
}
void checkListInstancesResponse(api.ListInstancesResponse o) {
buildCounterListInstancesResponse++;
if (buildCounterListInstancesResponse < 3) {
checkUnnamed11(o.instances!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListInstancesResponse--;
}
core.List<api.Location> buildUnnamed12() => [
buildLocation(),
buildLocation(),
];
void checkUnnamed12(core.List<api.Location> o) {
unittest.expect(o, unittest.hasLength(2));
checkLocation(o[0]);
checkLocation(o[1]);
}
core.int buildCounterListLocationsResponse = 0;
api.ListLocationsResponse buildListLocationsResponse() {
final o = api.ListLocationsResponse();
buildCounterListLocationsResponse++;
if (buildCounterListLocationsResponse < 3) {
o.locations = buildUnnamed12();
o.nextPageToken = 'foo';
}
buildCounterListLocationsResponse--;
return o;
}
void checkListLocationsResponse(api.ListLocationsResponse o) {
buildCounterListLocationsResponse++;
if (buildCounterListLocationsResponse < 3) {
checkUnnamed12(o.locations!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListLocationsResponse--;
}
core.List<api.Operation> buildUnnamed13() => [
buildOperation(),
buildOperation(),
];
void checkUnnamed13(core.List<api.Operation> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperation(o[0]);
checkOperation(o[1]);
}
core.int buildCounterListOperationsResponse = 0;
api.ListOperationsResponse buildListOperationsResponse() {
final o = api.ListOperationsResponse();
buildCounterListOperationsResponse++;
if (buildCounterListOperationsResponse < 3) {
o.nextPageToken = 'foo';
o.operations = buildUnnamed13();
}
buildCounterListOperationsResponse--;
return o;
}
void checkListOperationsResponse(api.ListOperationsResponse o) {
buildCounterListOperationsResponse++;
if (buildCounterListOperationsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed13(o.operations!);
}
buildCounterListOperationsResponse--;
}
core.List<api.Service> buildUnnamed14() => [
buildService(),
buildService(),
];
void checkUnnamed14(core.List<api.Service> o) {
unittest.expect(o, unittest.hasLength(2));
checkService(o[0]);
checkService(o[1]);
}
core.int buildCounterListServicesResponse = 0;
api.ListServicesResponse buildListServicesResponse() {
final o = api.ListServicesResponse();
buildCounterListServicesResponse++;
if (buildCounterListServicesResponse < 3) {
o.nextPageToken = 'foo';
o.services = buildUnnamed14();
}
buildCounterListServicesResponse--;
return o;
}
void checkListServicesResponse(api.ListServicesResponse o) {
buildCounterListServicesResponse++;
if (buildCounterListServicesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed14(o.services!);
}
buildCounterListServicesResponse--;
}
core.List<api.Version> buildUnnamed15() => [
buildVersion(),
buildVersion(),
];
void checkUnnamed15(core.List<api.Version> o) {
unittest.expect(o, unittest.hasLength(2));
checkVersion(o[0]);
checkVersion(o[1]);
}
core.int buildCounterListVersionsResponse = 0;
api.ListVersionsResponse buildListVersionsResponse() {
final o = api.ListVersionsResponse();
buildCounterListVersionsResponse++;
if (buildCounterListVersionsResponse < 3) {
o.nextPageToken = 'foo';
o.versions = buildUnnamed15();
}
buildCounterListVersionsResponse--;
return o;
}
void checkListVersionsResponse(api.ListVersionsResponse o) {
buildCounterListVersionsResponse++;
if (buildCounterListVersionsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed15(o.versions!);
}
buildCounterListVersionsResponse--;
}
core.int buildCounterLivenessCheck = 0;
api.LivenessCheck buildLivenessCheck() {
final o = api.LivenessCheck();
buildCounterLivenessCheck++;
if (buildCounterLivenessCheck < 3) {
o.checkInterval = 'foo';
o.failureThreshold = 42;
o.host = 'foo';
o.initialDelay = 'foo';
o.path = 'foo';
o.successThreshold = 42;
o.timeout = 'foo';
}
buildCounterLivenessCheck--;
return o;
}
void checkLivenessCheck(api.LivenessCheck o) {
buildCounterLivenessCheck++;
if (buildCounterLivenessCheck < 3) {
unittest.expect(
o.checkInterval!,
unittest.equals('foo'),
);
unittest.expect(
o.failureThreshold!,
unittest.equals(42),
);
unittest.expect(
o.host!,
unittest.equals('foo'),
);
unittest.expect(
o.initialDelay!,
unittest.equals('foo'),
);
unittest.expect(
o.path!,
unittest.equals('foo'),
);
unittest.expect(
o.successThreshold!,
unittest.equals(42),
);
unittest.expect(
o.timeout!,
unittest.equals('foo'),
);
}
buildCounterLivenessCheck--;
}
core.Map<core.String, core.String> buildUnnamed16() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed16(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.Map<core.String, core.Object?> buildUnnamed17() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed17(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 buildCounterLocation = 0;
api.Location buildLocation() {
final o = api.Location();
buildCounterLocation++;
if (buildCounterLocation < 3) {
o.displayName = 'foo';
o.labels = buildUnnamed16();
o.locationId = 'foo';
o.metadata = buildUnnamed17();
o.name = 'foo';
}
buildCounterLocation--;
return o;
}
void checkLocation(api.Location o) {
buildCounterLocation++;
if (buildCounterLocation < 3) {
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
checkUnnamed16(o.labels!);
unittest.expect(
o.locationId!,
unittest.equals('foo'),
);
checkUnnamed17(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterLocation--;
}
core.int buildCounterManagedCertificate = 0;
api.ManagedCertificate buildManagedCertificate() {
final o = api.ManagedCertificate();
buildCounterManagedCertificate++;
if (buildCounterManagedCertificate < 3) {
o.lastRenewalTime = 'foo';
o.status = 'foo';
}
buildCounterManagedCertificate--;
return o;
}
void checkManagedCertificate(api.ManagedCertificate o) {
buildCounterManagedCertificate++;
if (buildCounterManagedCertificate < 3) {
unittest.expect(
o.lastRenewalTime!,
unittest.equals('foo'),
);
unittest.expect(
o.status!,
unittest.equals('foo'),
);
}
buildCounterManagedCertificate--;
}
core.int buildCounterManualScaling = 0;
api.ManualScaling buildManualScaling() {
final o = api.ManualScaling();
buildCounterManualScaling++;
if (buildCounterManualScaling < 3) {
o.instances = 42;
}
buildCounterManualScaling--;
return o;
}
void checkManualScaling(api.ManualScaling o) {
buildCounterManualScaling++;
if (buildCounterManualScaling < 3) {
unittest.expect(
o.instances!,
unittest.equals(42),
);
}
buildCounterManualScaling--;
}
core.List<core.String> buildUnnamed18() => [
'foo',
'foo',
];
void checkUnnamed18(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 buildCounterNetwork = 0;
api.Network buildNetwork() {
final o = api.Network();
buildCounterNetwork++;
if (buildCounterNetwork < 3) {
o.forwardedPorts = buildUnnamed18();
o.instanceIpMode = 'foo';
o.instanceTag = 'foo';
o.name = 'foo';
o.sessionAffinity = true;
o.subnetworkName = 'foo';
}
buildCounterNetwork--;
return o;
}
void checkNetwork(api.Network o) {
buildCounterNetwork++;
if (buildCounterNetwork < 3) {
checkUnnamed18(o.forwardedPorts!);
unittest.expect(
o.instanceIpMode!,
unittest.equals('foo'),
);
unittest.expect(
o.instanceTag!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(o.sessionAffinity!, unittest.isTrue);
unittest.expect(
o.subnetworkName!,
unittest.equals('foo'),
);
}
buildCounterNetwork--;
}
core.int buildCounterNetworkSettings = 0;
api.NetworkSettings buildNetworkSettings() {
final o = api.NetworkSettings();
buildCounterNetworkSettings++;
if (buildCounterNetworkSettings < 3) {
o.ingressTrafficAllowed = 'foo';
}
buildCounterNetworkSettings--;
return o;
}
void checkNetworkSettings(api.NetworkSettings o) {
buildCounterNetworkSettings++;
if (buildCounterNetworkSettings < 3) {
unittest.expect(
o.ingressTrafficAllowed!,
unittest.equals('foo'),
);
}
buildCounterNetworkSettings--;
}
core.int buildCounterNetworkUtilization = 0;
api.NetworkUtilization buildNetworkUtilization() {
final o = api.NetworkUtilization();
buildCounterNetworkUtilization++;
if (buildCounterNetworkUtilization < 3) {
o.targetReceivedBytesPerSecond = 42;
o.targetReceivedPacketsPerSecond = 42;
o.targetSentBytesPerSecond = 42;
o.targetSentPacketsPerSecond = 42;
}
buildCounterNetworkUtilization--;
return o;
}
void checkNetworkUtilization(api.NetworkUtilization o) {
buildCounterNetworkUtilization++;
if (buildCounterNetworkUtilization < 3) {
unittest.expect(
o.targetReceivedBytesPerSecond!,
unittest.equals(42),
);
unittest.expect(
o.targetReceivedPacketsPerSecond!,
unittest.equals(42),
);
unittest.expect(
o.targetSentBytesPerSecond!,
unittest.equals(42),
);
unittest.expect(
o.targetSentPacketsPerSecond!,
unittest.equals(42),
);
}
buildCounterNetworkUtilization--;
}
core.Map<core.String, core.Object?> buildUnnamed19() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed19(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.Map<core.String, core.Object?> buildUnnamed20() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed20(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;
api.Operation buildOperation() {
final o = api.Operation();
buildCounterOperation++;
if (buildCounterOperation < 3) {
o.done = true;
o.error = buildStatus();
o.metadata = buildUnnamed19();
o.name = 'foo';
o.response = buildUnnamed20();
}
buildCounterOperation--;
return o;
}
void checkOperation(api.Operation o) {
buildCounterOperation++;
if (buildCounterOperation < 3) {
unittest.expect(o.done!, unittest.isTrue);
checkStatus(o.error!);
checkUnnamed19(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed20(o.response!);
}
buildCounterOperation--;
}
core.int buildCounterReadinessCheck = 0;
api.ReadinessCheck buildReadinessCheck() {
final o = api.ReadinessCheck();
buildCounterReadinessCheck++;
if (buildCounterReadinessCheck < 3) {
o.appStartTimeout = 'foo';
o.checkInterval = 'foo';
o.failureThreshold = 42;
o.host = 'foo';
o.path = 'foo';
o.successThreshold = 42;
o.timeout = 'foo';
}
buildCounterReadinessCheck--;
return o;
}
void checkReadinessCheck(api.ReadinessCheck o) {
buildCounterReadinessCheck++;
if (buildCounterReadinessCheck < 3) {
unittest.expect(
o.appStartTimeout!,
unittest.equals('foo'),
);
unittest.expect(
o.checkInterval!,
unittest.equals('foo'),
);
unittest.expect(
o.failureThreshold!,
unittest.equals(42),
);
unittest.expect(
o.host!,
unittest.equals('foo'),
);
unittest.expect(
o.path!,
unittest.equals('foo'),
);
unittest.expect(
o.successThreshold!,
unittest.equals(42),
);
unittest.expect(
o.timeout!,
unittest.equals('foo'),
);
}
buildCounterReadinessCheck--;
}
core.int buildCounterRepairApplicationRequest = 0;
api.RepairApplicationRequest buildRepairApplicationRequest() {
final o = api.RepairApplicationRequest();
buildCounterRepairApplicationRequest++;
if (buildCounterRepairApplicationRequest < 3) {}
buildCounterRepairApplicationRequest--;
return o;
}
void checkRepairApplicationRequest(api.RepairApplicationRequest o) {
buildCounterRepairApplicationRequest++;
if (buildCounterRepairApplicationRequest < 3) {}
buildCounterRepairApplicationRequest--;
}
core.int buildCounterRequestUtilization = 0;
api.RequestUtilization buildRequestUtilization() {
final o = api.RequestUtilization();
buildCounterRequestUtilization++;
if (buildCounterRequestUtilization < 3) {
o.targetConcurrentRequests = 42;
o.targetRequestCountPerSecond = 42;
}
buildCounterRequestUtilization--;
return o;
}
void checkRequestUtilization(api.RequestUtilization o) {
buildCounterRequestUtilization++;
if (buildCounterRequestUtilization < 3) {
unittest.expect(
o.targetConcurrentRequests!,
unittest.equals(42),
);
unittest.expect(
o.targetRequestCountPerSecond!,
unittest.equals(42),
);
}
buildCounterRequestUtilization--;
}
core.int buildCounterResourceRecord = 0;
api.ResourceRecord buildResourceRecord() {
final o = api.ResourceRecord();
buildCounterResourceRecord++;
if (buildCounterResourceRecord < 3) {
o.name = 'foo';
o.rrdata = 'foo';
o.type = 'foo';
}
buildCounterResourceRecord--;
return o;
}
void checkResourceRecord(api.ResourceRecord o) {
buildCounterResourceRecord++;
if (buildCounterResourceRecord < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.rrdata!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterResourceRecord--;
}
core.List<api.Volume> buildUnnamed21() => [
buildVolume(),
buildVolume(),
];
void checkUnnamed21(core.List<api.Volume> o) {
unittest.expect(o, unittest.hasLength(2));
checkVolume(o[0]);
checkVolume(o[1]);
}
core.int buildCounterResources = 0;
api.Resources buildResources() {
final o = api.Resources();
buildCounterResources++;
if (buildCounterResources < 3) {
o.cpu = 42.0;
o.diskGb = 42.0;
o.kmsKeyReference = 'foo';
o.memoryGb = 42.0;
o.volumes = buildUnnamed21();
}
buildCounterResources--;
return o;
}
void checkResources(api.Resources o) {
buildCounterResources++;
if (buildCounterResources < 3) {
unittest.expect(
o.cpu!,
unittest.equals(42.0),
);
unittest.expect(
o.diskGb!,
unittest.equals(42.0),
);
unittest.expect(
o.kmsKeyReference!,
unittest.equals('foo'),
);
unittest.expect(
o.memoryGb!,
unittest.equals(42.0),
);
checkUnnamed21(o.volumes!);
}
buildCounterResources--;
}
core.int buildCounterScriptHandler = 0;
api.ScriptHandler buildScriptHandler() {
final o = api.ScriptHandler();
buildCounterScriptHandler++;
if (buildCounterScriptHandler < 3) {
o.scriptPath = 'foo';
}
buildCounterScriptHandler--;
return o;
}
void checkScriptHandler(api.ScriptHandler o) {
buildCounterScriptHandler++;
if (buildCounterScriptHandler < 3) {
unittest.expect(
o.scriptPath!,
unittest.equals('foo'),
);
}
buildCounterScriptHandler--;
}
core.Map<core.String, core.String> buildUnnamed22() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed22(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 buildCounterService = 0;
api.Service buildService() {
final o = api.Service();
buildCounterService++;
if (buildCounterService < 3) {
o.id = 'foo';
o.labels = buildUnnamed22();
o.name = 'foo';
o.networkSettings = buildNetworkSettings();
o.split = buildTrafficSplit();
}
buildCounterService--;
return o;
}
void checkService(api.Service o) {
buildCounterService++;
if (buildCounterService < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkUnnamed22(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkNetworkSettings(o.networkSettings!);
checkTrafficSplit(o.split!);
}
buildCounterService--;
}
core.int buildCounterSslSettings = 0;
api.SslSettings buildSslSettings() {
final o = api.SslSettings();
buildCounterSslSettings++;
if (buildCounterSslSettings < 3) {
o.certificateId = 'foo';
o.pendingManagedCertificateId = 'foo';
o.sslManagementType = 'foo';
}
buildCounterSslSettings--;
return o;
}
void checkSslSettings(api.SslSettings o) {
buildCounterSslSettings++;
if (buildCounterSslSettings < 3) {
unittest.expect(
o.certificateId!,
unittest.equals('foo'),
);
unittest.expect(
o.pendingManagedCertificateId!,
unittest.equals('foo'),
);
unittest.expect(
o.sslManagementType!,
unittest.equals('foo'),
);
}
buildCounterSslSettings--;
}
core.int buildCounterStandardSchedulerSettings = 0;
api.StandardSchedulerSettings buildStandardSchedulerSettings() {
final o = api.StandardSchedulerSettings();
buildCounterStandardSchedulerSettings++;
if (buildCounterStandardSchedulerSettings < 3) {
o.maxInstances = 42;
o.minInstances = 42;
o.targetCpuUtilization = 42.0;
o.targetThroughputUtilization = 42.0;
}
buildCounterStandardSchedulerSettings--;
return o;
}
void checkStandardSchedulerSettings(api.StandardSchedulerSettings o) {
buildCounterStandardSchedulerSettings++;
if (buildCounterStandardSchedulerSettings < 3) {
unittest.expect(
o.maxInstances!,
unittest.equals(42),
);
unittest.expect(
o.minInstances!,
unittest.equals(42),
);
unittest.expect(
o.targetCpuUtilization!,
unittest.equals(42.0),
);
unittest.expect(
o.targetThroughputUtilization!,
unittest.equals(42.0),
);
}
buildCounterStandardSchedulerSettings--;
}
core.Map<core.String, core.String> buildUnnamed23() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed23(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 buildCounterStaticFilesHandler = 0;
api.StaticFilesHandler buildStaticFilesHandler() {
final o = api.StaticFilesHandler();
buildCounterStaticFilesHandler++;
if (buildCounterStaticFilesHandler < 3) {
o.applicationReadable = true;
o.expiration = 'foo';
o.httpHeaders = buildUnnamed23();
o.mimeType = 'foo';
o.path = 'foo';
o.requireMatchingFile = true;
o.uploadPathRegex = 'foo';
}
buildCounterStaticFilesHandler--;
return o;
}
void checkStaticFilesHandler(api.StaticFilesHandler o) {
buildCounterStaticFilesHandler++;
if (buildCounterStaticFilesHandler < 3) {
unittest.expect(o.applicationReadable!, unittest.isTrue);
unittest.expect(
o.expiration!,
unittest.equals('foo'),
);
checkUnnamed23(o.httpHeaders!);
unittest.expect(
o.mimeType!,
unittest.equals('foo'),
);
unittest.expect(
o.path!,
unittest.equals('foo'),
);
unittest.expect(o.requireMatchingFile!, unittest.isTrue);
unittest.expect(
o.uploadPathRegex!,
unittest.equals('foo'),
);
}
buildCounterStaticFilesHandler--;
}
core.Map<core.String, core.Object?> buildUnnamed24() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed24(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'),
);
}
core.List<core.Map<core.String, core.Object?>> buildUnnamed25() => [
buildUnnamed24(),
buildUnnamed24(),
];
void checkUnnamed25(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed24(o[0]);
checkUnnamed24(o[1]);
}
core.int buildCounterStatus = 0;
api.Status buildStatus() {
final o = api.Status();
buildCounterStatus++;
if (buildCounterStatus < 3) {
o.code = 42;
o.details = buildUnnamed25();
o.message = 'foo';
}
buildCounterStatus--;
return o;
}
void checkStatus(api.Status o) {
buildCounterStatus++;
if (buildCounterStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed25(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterStatus--;
}
core.Map<core.String, core.double> buildUnnamed26() => {
'x': 42.0,
'y': 42.0,
};
void checkUnnamed26(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),
);
}
core.int buildCounterTrafficSplit = 0;
api.TrafficSplit buildTrafficSplit() {
final o = api.TrafficSplit();
buildCounterTrafficSplit++;
if (buildCounterTrafficSplit < 3) {
o.allocations = buildUnnamed26();
o.shardBy = 'foo';
}
buildCounterTrafficSplit--;
return o;
}
void checkTrafficSplit(api.TrafficSplit o) {
buildCounterTrafficSplit++;
if (buildCounterTrafficSplit < 3) {
checkUnnamed26(o.allocations!);
unittest.expect(
o.shardBy!,
unittest.equals('foo'),
);
}
buildCounterTrafficSplit--;
}
core.int buildCounterUrlDispatchRule = 0;
api.UrlDispatchRule buildUrlDispatchRule() {
final o = api.UrlDispatchRule();
buildCounterUrlDispatchRule++;
if (buildCounterUrlDispatchRule < 3) {
o.domain = 'foo';
o.path = 'foo';
o.service = 'foo';
}
buildCounterUrlDispatchRule--;
return o;
}
void checkUrlDispatchRule(api.UrlDispatchRule o) {
buildCounterUrlDispatchRule++;
if (buildCounterUrlDispatchRule < 3) {
unittest.expect(
o.domain!,
unittest.equals('foo'),
);
unittest.expect(
o.path!,
unittest.equals('foo'),
);
unittest.expect(
o.service!,
unittest.equals('foo'),
);
}
buildCounterUrlDispatchRule--;
}
core.int buildCounterUrlMap = 0;
api.UrlMap buildUrlMap() {
final o = api.UrlMap();
buildCounterUrlMap++;
if (buildCounterUrlMap < 3) {
o.apiEndpoint = buildApiEndpointHandler();
o.authFailAction = 'foo';
o.login = 'foo';
o.redirectHttpResponseCode = 'foo';
o.script = buildScriptHandler();
o.securityLevel = 'foo';
o.staticFiles = buildStaticFilesHandler();
o.urlRegex = 'foo';
}
buildCounterUrlMap--;
return o;
}
void checkUrlMap(api.UrlMap o) {
buildCounterUrlMap++;
if (buildCounterUrlMap < 3) {
checkApiEndpointHandler(o.apiEndpoint!);
unittest.expect(
o.authFailAction!,
unittest.equals('foo'),
);
unittest.expect(
o.login!,
unittest.equals('foo'),
);
unittest.expect(
o.redirectHttpResponseCode!,
unittest.equals('foo'),
);
checkScriptHandler(o.script!);
unittest.expect(
o.securityLevel!,
unittest.equals('foo'),
);
checkStaticFilesHandler(o.staticFiles!);
unittest.expect(
o.urlRegex!,
unittest.equals('foo'),
);
}
buildCounterUrlMap--;
}
core.Map<core.String, core.String> buildUnnamed27() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed27(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.Map<core.String, core.String> buildUnnamed28() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed28(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.Map<core.String, core.String> buildUnnamed29() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed29(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.List<api.ErrorHandler> buildUnnamed30() => [
buildErrorHandler(),
buildErrorHandler(),
];
void checkUnnamed30(core.List<api.ErrorHandler> o) {
unittest.expect(o, unittest.hasLength(2));
checkErrorHandler(o[0]);
checkErrorHandler(o[1]);
}
core.List<api.UrlMap> buildUnnamed31() => [
buildUrlMap(),
buildUrlMap(),
];
void checkUnnamed31(core.List<api.UrlMap> o) {
unittest.expect(o, unittest.hasLength(2));
checkUrlMap(o[0]);
checkUrlMap(o[1]);
}
core.List<core.String> buildUnnamed32() => [
'foo',
'foo',
];
void checkUnnamed32(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.List<api.Library> buildUnnamed33() => [
buildLibrary(),
buildLibrary(),
];
void checkUnnamed33(core.List<api.Library> o) {
unittest.expect(o, unittest.hasLength(2));
checkLibrary(o[0]);
checkLibrary(o[1]);
}
core.List<core.String> buildUnnamed34() => [
'foo',
'foo',
];
void checkUnnamed34(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 buildCounterVersion = 0;
api.Version buildVersion() {
final o = api.Version();
buildCounterVersion++;
if (buildCounterVersion < 3) {
o.apiConfig = buildApiConfigHandler();
o.appEngineApis = true;
o.automaticScaling = buildAutomaticScaling();
o.basicScaling = buildBasicScaling();
o.betaSettings = buildUnnamed27();
o.buildEnvVariables = buildUnnamed28();
o.createTime = 'foo';
o.createdBy = 'foo';
o.defaultExpiration = 'foo';
o.deployment = buildDeployment();
o.diskUsageBytes = 'foo';
o.endpointsApiService = buildEndpointsApiService();
o.entrypoint = buildEntrypoint();
o.env = 'foo';
o.envVariables = buildUnnamed29();
o.errorHandlers = buildUnnamed30();
o.flexibleRuntimeSettings = buildFlexibleRuntimeSettings();
o.handlers = buildUnnamed31();
o.healthCheck = buildHealthCheck();
o.id = 'foo';
o.inboundServices = buildUnnamed32();
o.instanceClass = 'foo';
o.libraries = buildUnnamed33();
o.livenessCheck = buildLivenessCheck();
o.manualScaling = buildManualScaling();
o.name = 'foo';
o.network = buildNetwork();
o.nobuildFilesRegex = 'foo';
o.readinessCheck = buildReadinessCheck();
o.resources = buildResources();
o.runtime = 'foo';
o.runtimeApiVersion = 'foo';
o.runtimeChannel = 'foo';
o.runtimeMainExecutablePath = 'foo';
o.serviceAccount = 'foo';
o.servingStatus = 'foo';
o.threadsafe = true;
o.versionUrl = 'foo';
o.vm = true;
o.vpcAccessConnector = buildVpcAccessConnector();
o.zones = buildUnnamed34();
}
buildCounterVersion--;
return o;
}
void checkVersion(api.Version o) {
buildCounterVersion++;
if (buildCounterVersion < 3) {
checkApiConfigHandler(o.apiConfig!);
unittest.expect(o.appEngineApis!, unittest.isTrue);
checkAutomaticScaling(o.automaticScaling!);
checkBasicScaling(o.basicScaling!);
checkUnnamed27(o.betaSettings!);
checkUnnamed28(o.buildEnvVariables!);
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.createdBy!,
unittest.equals('foo'),
);
unittest.expect(
o.defaultExpiration!,
unittest.equals('foo'),
);
checkDeployment(o.deployment!);
unittest.expect(
o.diskUsageBytes!,
unittest.equals('foo'),
);
checkEndpointsApiService(o.endpointsApiService!);
checkEntrypoint(o.entrypoint!);
unittest.expect(
o.env!,
unittest.equals('foo'),
);
checkUnnamed29(o.envVariables!);
checkUnnamed30(o.errorHandlers!);
checkFlexibleRuntimeSettings(o.flexibleRuntimeSettings!);
checkUnnamed31(o.handlers!);
checkHealthCheck(o.healthCheck!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkUnnamed32(o.inboundServices!);
unittest.expect(
o.instanceClass!,
unittest.equals('foo'),
);
checkUnnamed33(o.libraries!);
checkLivenessCheck(o.livenessCheck!);
checkManualScaling(o.manualScaling!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkNetwork(o.network!);
unittest.expect(
o.nobuildFilesRegex!,
unittest.equals('foo'),
);
checkReadinessCheck(o.readinessCheck!);
checkResources(o.resources!);
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.serviceAccount!,
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);
checkVpcAccessConnector(o.vpcAccessConnector!);
checkUnnamed34(o.zones!);
}
buildCounterVersion--;
}
core.int buildCounterVolume = 0;
api.Volume buildVolume() {
final o = api.Volume();
buildCounterVolume++;
if (buildCounterVolume < 3) {
o.name = 'foo';
o.sizeGb = 42.0;
o.volumeType = 'foo';
}
buildCounterVolume--;
return o;
}
void checkVolume(api.Volume o) {
buildCounterVolume++;
if (buildCounterVolume < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.sizeGb!,
unittest.equals(42.0),
);
unittest.expect(
o.volumeType!,
unittest.equals('foo'),
);
}
buildCounterVolume--;
}
core.int buildCounterVpcAccessConnector = 0;
api.VpcAccessConnector buildVpcAccessConnector() {
final o = api.VpcAccessConnector();
buildCounterVpcAccessConnector++;
if (buildCounterVpcAccessConnector < 3) {
o.egressSetting = 'foo';
o.name = 'foo';
}
buildCounterVpcAccessConnector--;
return o;
}
void checkVpcAccessConnector(api.VpcAccessConnector o) {
buildCounterVpcAccessConnector++;
if (buildCounterVpcAccessConnector < 3) {
unittest.expect(
o.egressSetting!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterVpcAccessConnector--;
}
core.int buildCounterZipInfo = 0;
api.ZipInfo buildZipInfo() {
final o = api.ZipInfo();
buildCounterZipInfo++;
if (buildCounterZipInfo < 3) {
o.filesCount = 42;
o.sourceUrl = 'foo';
}
buildCounterZipInfo--;
return o;
}
void checkZipInfo(api.ZipInfo o) {
buildCounterZipInfo++;
if (buildCounterZipInfo < 3) {
unittest.expect(
o.filesCount!,
unittest.equals(42),
);
unittest.expect(
o.sourceUrl!,
unittest.equals('foo'),
);
}
buildCounterZipInfo--;
}
void main() {
unittest.group('obj-schema-ApiConfigHandler', () {
unittest.test('to-json--from-json', () async {
final o = buildApiConfigHandler();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ApiConfigHandler.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkApiConfigHandler(od);
});
});
unittest.group('obj-schema-ApiEndpointHandler', () {
unittest.test('to-json--from-json', () async {
final o = buildApiEndpointHandler();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ApiEndpointHandler.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkApiEndpointHandler(od);
});
});
unittest.group('obj-schema-Application', () {
unittest.test('to-json--from-json', () async {
final o = buildApplication();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Application.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkApplication(od);
});
});
unittest.group('obj-schema-AuthorizedCertificate', () {
unittest.test('to-json--from-json', () async {
final o = buildAuthorizedCertificate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AuthorizedCertificate.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAuthorizedCertificate(od);
});
});
unittest.group('obj-schema-AuthorizedDomain', () {
unittest.test('to-json--from-json', () async {
final o = buildAuthorizedDomain();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AuthorizedDomain.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAuthorizedDomain(od);
});
});
unittest.group('obj-schema-AutomaticScaling', () {
unittest.test('to-json--from-json', () async {
final o = buildAutomaticScaling();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AutomaticScaling.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAutomaticScaling(od);
});
});
unittest.group('obj-schema-BasicScaling', () {
unittest.test('to-json--from-json', () async {
final o = buildBasicScaling();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BasicScaling.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBasicScaling(od);
});
});
unittest.group('obj-schema-BatchUpdateIngressRulesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchUpdateIngressRulesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchUpdateIngressRulesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchUpdateIngressRulesRequest(od);
});
});
unittest.group('obj-schema-BatchUpdateIngressRulesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchUpdateIngressRulesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchUpdateIngressRulesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchUpdateIngressRulesResponse(od);
});
});
unittest.group('obj-schema-CertificateRawData', () {
unittest.test('to-json--from-json', () async {
final o = buildCertificateRawData();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CertificateRawData.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCertificateRawData(od);
});
});
unittest.group('obj-schema-CloudBuildOptions', () {
unittest.test('to-json--from-json', () async {
final o = buildCloudBuildOptions();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CloudBuildOptions.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCloudBuildOptions(od);
});
});
unittest.group('obj-schema-ContainerInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildContainerInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ContainerInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkContainerInfo(od);
});
});
unittest.group('obj-schema-CpuUtilization', () {
unittest.test('to-json--from-json', () async {
final o = buildCpuUtilization();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CpuUtilization.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCpuUtilization(od);
});
});
unittest.group('obj-schema-DebugInstanceRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDebugInstanceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DebugInstanceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDebugInstanceRequest(od);
});
});
unittest.group('obj-schema-Deployment', () {
unittest.test('to-json--from-json', () async {
final o = buildDeployment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Deployment.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDeployment(od);
});
});
unittest.group('obj-schema-DiskUtilization', () {
unittest.test('to-json--from-json', () async {
final o = buildDiskUtilization();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DiskUtilization.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDiskUtilization(od);
});
});
unittest.group('obj-schema-DomainMapping', () {
unittest.test('to-json--from-json', () async {
final o = buildDomainMapping();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DomainMapping.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDomainMapping(od);
});
});
unittest.group('obj-schema-Empty', () {
unittest.test('to-json--from-json', () async {
final o = buildEmpty();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Empty.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkEmpty(od);
});
});
unittest.group('obj-schema-EndpointsApiService', () {
unittest.test('to-json--from-json', () async {
final o = buildEndpointsApiService();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.EndpointsApiService.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkEndpointsApiService(od);
});
});
unittest.group('obj-schema-Entrypoint', () {
unittest.test('to-json--from-json', () async {
final o = buildEntrypoint();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Entrypoint.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkEntrypoint(od);
});
});
unittest.group('obj-schema-ErrorHandler', () {
unittest.test('to-json--from-json', () async {
final o = buildErrorHandler();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ErrorHandler.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkErrorHandler(od);
});
});
unittest.group('obj-schema-FeatureSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildFeatureSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FeatureSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFeatureSettings(od);
});
});
unittest.group('obj-schema-FileInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildFileInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.FileInfo.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkFileInfo(od);
});
});
unittest.group('obj-schema-FirewallRule', () {
unittest.test('to-json--from-json', () async {
final o = buildFirewallRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FirewallRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFirewallRule(od);
});
});
unittest.group('obj-schema-FlexibleRuntimeSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildFlexibleRuntimeSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FlexibleRuntimeSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFlexibleRuntimeSettings(od);
});
});
unittest.group('obj-schema-HealthCheck', () {
unittest.test('to-json--from-json', () async {
final o = buildHealthCheck();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.HealthCheck.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkHealthCheck(od);
});
});
unittest.group('obj-schema-IdentityAwareProxy', () {
unittest.test('to-json--from-json', () async {
final o = buildIdentityAwareProxy();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IdentityAwareProxy.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIdentityAwareProxy(od);
});
});
unittest.group('obj-schema-Instance', () {
unittest.test('to-json--from-json', () async {
final o = buildInstance();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Instance.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkInstance(od);
});
});
unittest.group('obj-schema-Library', () {
unittest.test('to-json--from-json', () async {
final o = buildLibrary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Library.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkLibrary(od);
});
});
unittest.group('obj-schema-ListAuthorizedCertificatesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListAuthorizedCertificatesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListAuthorizedCertificatesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListAuthorizedCertificatesResponse(od);
});
});
unittest.group('obj-schema-ListAuthorizedDomainsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListAuthorizedDomainsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListAuthorizedDomainsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListAuthorizedDomainsResponse(od);
});
});
unittest.group('obj-schema-ListDomainMappingsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListDomainMappingsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListDomainMappingsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListDomainMappingsResponse(od);
});
});
unittest.group('obj-schema-ListIngressRulesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListIngressRulesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListIngressRulesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListIngressRulesResponse(od);
});
});
unittest.group('obj-schema-ListInstancesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListInstancesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListInstancesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListInstancesResponse(od);
});
});
unittest.group('obj-schema-ListLocationsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListLocationsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListLocationsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListLocationsResponse(od);
});
});
unittest.group('obj-schema-ListOperationsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListOperationsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListOperationsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListOperationsResponse(od);
});
});
unittest.group('obj-schema-ListServicesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListServicesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListServicesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListServicesResponse(od);
});
});
unittest.group('obj-schema-ListVersionsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListVersionsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListVersionsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListVersionsResponse(od);
});
});
unittest.group('obj-schema-LivenessCheck', () {
unittest.test('to-json--from-json', () async {
final o = buildLivenessCheck();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LivenessCheck.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLivenessCheck(od);
});
});
unittest.group('obj-schema-Location', () {
unittest.test('to-json--from-json', () async {
final o = buildLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Location.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkLocation(od);
});
});
unittest.group('obj-schema-ManagedCertificate', () {
unittest.test('to-json--from-json', () async {
final o = buildManagedCertificate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ManagedCertificate.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkManagedCertificate(od);
});
});
unittest.group('obj-schema-ManualScaling', () {
unittest.test('to-json--from-json', () async {
final o = buildManualScaling();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ManualScaling.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkManualScaling(od);
});
});
unittest.group('obj-schema-Network', () {
unittest.test('to-json--from-json', () async {
final o = buildNetwork();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Network.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkNetwork(od);
});
});
unittest.group('obj-schema-NetworkSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildNetworkSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.NetworkSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkNetworkSettings(od);
});
});
unittest.group('obj-schema-NetworkUtilization', () {
unittest.test('to-json--from-json', () async {
final o = buildNetworkUtilization();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.NetworkUtilization.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkNetworkUtilization(od);
});
});
unittest.group('obj-schema-Operation', () {
unittest.test('to-json--from-json', () async {
final o = buildOperation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Operation.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkOperation(od);
});
});
unittest.group('obj-schema-ReadinessCheck', () {
unittest.test('to-json--from-json', () async {
final o = buildReadinessCheck();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReadinessCheck.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReadinessCheck(od);
});
});
unittest.group('obj-schema-RepairApplicationRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildRepairApplicationRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RepairApplicationRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRepairApplicationRequest(od);
});
});
unittest.group('obj-schema-RequestUtilization', () {
unittest.test('to-json--from-json', () async {
final o = buildRequestUtilization();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RequestUtilization.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRequestUtilization(od);
});
});
unittest.group('obj-schema-ResourceRecord', () {
unittest.test('to-json--from-json', () async {
final o = buildResourceRecord();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ResourceRecord.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkResourceRecord(od);
});
});
unittest.group('obj-schema-Resources', () {
unittest.test('to-json--from-json', () async {
final o = buildResources();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Resources.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkResources(od);
});
});
unittest.group('obj-schema-ScriptHandler', () {
unittest.test('to-json--from-json', () async {
final o = buildScriptHandler();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ScriptHandler.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkScriptHandler(od);
});
});
unittest.group('obj-schema-Service', () {
unittest.test('to-json--from-json', () async {
final o = buildService();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Service.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkService(od);
});
});
unittest.group('obj-schema-SslSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildSslSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SslSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSslSettings(od);
});
});
unittest.group('obj-schema-StandardSchedulerSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildStandardSchedulerSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StandardSchedulerSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStandardSchedulerSettings(od);
});
});
unittest.group('obj-schema-StaticFilesHandler', () {
unittest.test('to-json--from-json', () async {
final o = buildStaticFilesHandler();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StaticFilesHandler.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStaticFilesHandler(od);
});
});
unittest.group('obj-schema-Status', () {
unittest.test('to-json--from-json', () async {
final o = buildStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Status.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStatus(od);
});
});
unittest.group('obj-schema-TrafficSplit', () {
unittest.test('to-json--from-json', () async {
final o = buildTrafficSplit();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TrafficSplit.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTrafficSplit(od);
});
});
unittest.group('obj-schema-UrlDispatchRule', () {
unittest.test('to-json--from-json', () async {
final o = buildUrlDispatchRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UrlDispatchRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUrlDispatchRule(od);
});
});
unittest.group('obj-schema-UrlMap', () {
unittest.test('to-json--from-json', () async {
final o = buildUrlMap();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.UrlMap.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkUrlMap(od);
});
});
unittest.group('obj-schema-Version', () {
unittest.test('to-json--from-json', () async {
final o = buildVersion();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Version.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkVersion(od);
});
});
unittest.group('obj-schema-Volume', () {
unittest.test('to-json--from-json', () async {
final o = buildVolume();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Volume.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkVolume(od);
});
});
unittest.group('obj-schema-VpcAccessConnector', () {
unittest.test('to-json--from-json', () async {
final o = buildVpcAccessConnector();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.VpcAccessConnector.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkVpcAccessConnector(od);
});
});
unittest.group('obj-schema-ZipInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildZipInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ZipInfo.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkZipInfo(od);
});
});
unittest.group('resource-AppsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps;
final arg_request = buildApplication();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.Application.fromJson(
json as core.Map<core.String, core.dynamic>);
checkApplication(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('v1/apps'),
);
pathOffset += 7;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps;
final arg_appsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildApplication());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_appsId, $fields: arg_$fields);
checkApplication(response as api.Application);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps;
final arg_request = buildApplication();
final arg_appsId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.Application.fromJson(
json as core.Map<core.String, core.dynamic>);
checkApplication(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_appsId,
updateMask: arg_updateMask, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--repair', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps;
final arg_request = buildRepairApplicationRequest();
final arg_appsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.RepairApplicationRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkRepairApplicationRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf(':repair', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals(':repair'),
);
pathOffset += 7;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.repair(arg_request, arg_appsId, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-AppsAuthorizedCertificatesResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.authorizedCertificates;
final arg_request = buildAuthorizedCertificate();
final arg_appsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.AuthorizedCertificate.fromJson(
json as core.Map<core.String, core.dynamic>);
checkAuthorizedCertificate(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/authorizedCertificates', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 23),
unittest.equals('/authorizedCertificates'),
);
pathOffset += 23;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildAuthorizedCertificate());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.create(arg_request, arg_appsId, $fields: arg_$fields);
checkAuthorizedCertificate(response as api.AuthorizedCertificate);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.authorizedCertificates;
final arg_appsId = 'foo';
final arg_authorizedCertificatesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/authorizedCertificates/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 24),
unittest.equals('/authorizedCertificates/'),
);
pathOffset += 24;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_authorizedCertificatesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(
arg_appsId, arg_authorizedCertificatesId,
$fields: arg_$fields);
checkEmpty(response as api.Empty);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.authorizedCertificates;
final arg_appsId = 'foo';
final arg_authorizedCertificatesId = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/authorizedCertificates/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 24),
unittest.equals('/authorizedCertificates/'),
);
pathOffset += 24;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_authorizedCertificatesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildAuthorizedCertificate());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_appsId, arg_authorizedCertificatesId,
view: arg_view, $fields: arg_$fields);
checkAuthorizedCertificate(response as api.AuthorizedCertificate);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.authorizedCertificates;
final arg_appsId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/authorizedCertificates', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 23),
unittest.equals('/authorizedCertificates'),
);
pathOffset += 23;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildListAuthorizedCertificatesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_appsId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
view: arg_view,
$fields: arg_$fields);
checkListAuthorizedCertificatesResponse(
response as api.ListAuthorizedCertificatesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.authorizedCertificates;
final arg_request = buildAuthorizedCertificate();
final arg_appsId = 'foo';
final arg_authorizedCertificatesId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.AuthorizedCertificate.fromJson(
json as core.Map<core.String, core.dynamic>);
checkAuthorizedCertificate(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/authorizedCertificates/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 24),
unittest.equals('/authorizedCertificates/'),
);
pathOffset += 24;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_authorizedCertificatesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildAuthorizedCertificate());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(
arg_request, arg_appsId, arg_authorizedCertificatesId,
updateMask: arg_updateMask, $fields: arg_$fields);
checkAuthorizedCertificate(response as api.AuthorizedCertificate);
});
});
unittest.group('resource-AppsAuthorizedDomainsResource', () {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.authorizedDomains;
final arg_appsId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/authorizedDomains', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 18),
unittest.equals('/authorizedDomains'),
);
pathOffset += 18;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListAuthorizedDomainsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_appsId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListAuthorizedDomainsResponse(
response as api.ListAuthorizedDomainsResponse);
});
});
unittest.group('resource-AppsDomainMappingsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.domainMappings;
final arg_request = buildDomainMapping();
final arg_appsId = 'foo';
final arg_overrideStrategy = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.DomainMapping.fromJson(
json as core.Map<core.String, core.dynamic>);
checkDomainMapping(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/domainMappings', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 15),
unittest.equals('/domainMappings'),
);
pathOffset += 15;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['overrideStrategy']!.first,
unittest.equals(arg_overrideStrategy),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_appsId,
overrideStrategy: arg_overrideStrategy, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.domainMappings;
final arg_appsId = 'foo';
final arg_domainMappingsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/domainMappings/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('/domainMappings/'),
);
pathOffset += 16;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_domainMappingsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_appsId, arg_domainMappingsId,
$fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.domainMappings;
final arg_appsId = 'foo';
final arg_domainMappingsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/domainMappings/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('/domainMappings/'),
);
pathOffset += 16;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_domainMappingsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDomainMapping());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_appsId, arg_domainMappingsId, $fields: arg_$fields);
checkDomainMapping(response as api.DomainMapping);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.domainMappings;
final arg_appsId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/domainMappings', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 15),
unittest.equals('/domainMappings'),
);
pathOffset += 15;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListDomainMappingsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_appsId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListDomainMappingsResponse(
response as api.ListDomainMappingsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.domainMappings;
final arg_request = buildDomainMapping();
final arg_appsId = 'foo';
final arg_domainMappingsId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.DomainMapping.fromJson(
json as core.Map<core.String, core.dynamic>);
checkDomainMapping(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/domainMappings/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('/domainMappings/'),
);
pathOffset += 16;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_domainMappingsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(
arg_request, arg_appsId, arg_domainMappingsId,
updateMask: arg_updateMask, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-AppsFirewallIngressRulesResource', () {
unittest.test('method--batchUpdate', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.firewall.ingressRules;
final arg_request = buildBatchUpdateIngressRulesRequest();
final arg_appsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.BatchUpdateIngressRulesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkBatchUpdateIngressRulesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/firewall/ingressRules:batchUpdate', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 34),
unittest.equals('/firewall/ingressRules:batchUpdate'),
);
pathOffset += 34;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildBatchUpdateIngressRulesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.batchUpdate(arg_request, arg_appsId, $fields: arg_$fields);
checkBatchUpdateIngressRulesResponse(
response as api.BatchUpdateIngressRulesResponse);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.firewall.ingressRules;
final arg_request = buildFirewallRule();
final arg_appsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.FirewallRule.fromJson(
json as core.Map<core.String, core.dynamic>);
checkFirewallRule(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/firewall/ingressRules', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 22),
unittest.equals('/firewall/ingressRules'),
);
pathOffset += 22;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFirewallRule());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.create(arg_request, arg_appsId, $fields: arg_$fields);
checkFirewallRule(response as api.FirewallRule);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.firewall.ingressRules;
final arg_appsId = 'foo';
final arg_ingressRulesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/firewall/ingressRules/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 23),
unittest.equals('/firewall/ingressRules/'),
);
pathOffset += 23;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_ingressRulesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_appsId, arg_ingressRulesId,
$fields: arg_$fields);
checkEmpty(response as api.Empty);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.firewall.ingressRules;
final arg_appsId = 'foo';
final arg_ingressRulesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/firewall/ingressRules/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 23),
unittest.equals('/firewall/ingressRules/'),
);
pathOffset += 23;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_ingressRulesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFirewallRule());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_appsId, arg_ingressRulesId, $fields: arg_$fields);
checkFirewallRule(response as api.FirewallRule);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.firewall.ingressRules;
final arg_appsId = 'foo';
final arg_matchingAddress = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/firewall/ingressRules', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 22),
unittest.equals('/firewall/ingressRules'),
);
pathOffset += 22;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['matchingAddress']!.first,
unittest.equals(arg_matchingAddress),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListIngressRulesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_appsId,
matchingAddress: arg_matchingAddress,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListIngressRulesResponse(response as api.ListIngressRulesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.firewall.ingressRules;
final arg_request = buildFirewallRule();
final arg_appsId = 'foo';
final arg_ingressRulesId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.FirewallRule.fromJson(
json as core.Map<core.String, core.dynamic>);
checkFirewallRule(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/firewall/ingressRules/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 23),
unittest.equals('/firewall/ingressRules/'),
);
pathOffset += 23;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_ingressRulesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFirewallRule());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(
arg_request, arg_appsId, arg_ingressRulesId,
updateMask: arg_updateMask, $fields: arg_$fields);
checkFirewallRule(response as api.FirewallRule);
});
});
unittest.group('resource-AppsLocationsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.locations;
final arg_appsId = 'foo';
final arg_locationsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
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_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/locations/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_locationsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLocation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_appsId, arg_locationsId, $fields: arg_$fields);
checkLocation(response as api.Location);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.locations;
final arg_appsId = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
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_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/locations'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListLocationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_appsId,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListLocationsResponse(response as api.ListLocationsResponse);
});
});
unittest.group('resource-AppsOperationsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.operations;
final arg_appsId = 'foo';
final arg_operationsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
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_appsId'),
);
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_operationsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_appsId, arg_operationsId, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.operations;
final arg_appsId = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
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_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/operations'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListOperationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_appsId,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListOperationsResponse(response as api.ListOperationsResponse);
});
});
unittest.group('resource-AppsServicesResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services;
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.delete(arg_appsId, arg_servicesId, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services;
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildService());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_appsId, arg_servicesId, $fields: arg_$fields);
checkService(response as api.Service);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services;
final arg_appsId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/services'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListServicesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_appsId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListServicesResponse(response as api.ListServicesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services;
final arg_request = buildService();
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_migrateTraffic = true;
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Service.fromJson(json as core.Map<core.String, core.dynamic>);
checkService(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['migrateTraffic']!.first,
unittest.equals('$arg_migrateTraffic'),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_appsId, arg_servicesId,
migrateTraffic: arg_migrateTraffic,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-AppsServicesVersionsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions;
final arg_request = buildVersion();
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Version.fromJson(json as core.Map<core.String, core.dynamic>);
checkVersion(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/versions'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_appsId, arg_servicesId,
$fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions;
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_versionsId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/versions/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_versionsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(
arg_appsId, arg_servicesId, arg_versionsId,
$fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions;
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_versionsId = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/versions/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_versionsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildVersion());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_appsId, arg_servicesId, arg_versionsId,
view: arg_view, $fields: arg_$fields);
checkVersion(response as api.Version);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions;
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/versions'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListVersionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_appsId, arg_servicesId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
view: arg_view,
$fields: arg_$fields);
checkListVersionsResponse(response as api.ListVersionsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions;
final arg_request = buildVersion();
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_versionsId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Version.fromJson(json as core.Map<core.String, core.dynamic>);
checkVersion(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/versions/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_versionsId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(
arg_request, arg_appsId, arg_servicesId, arg_versionsId,
updateMask: arg_updateMask, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-AppsServicesVersionsInstancesResource', () {
unittest.test('method--debug', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions.instances;
final arg_request = buildDebugInstanceRequest();
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_versionsId = 'foo';
final arg_instancesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.DebugInstanceRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkDebugInstanceRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/versions/'),
);
pathOffset += 10;
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_versionsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/instances/'),
);
pathOffset += 11;
index = path.indexOf(':debug', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_instancesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals(':debug'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.debug(arg_request, arg_appsId, arg_servicesId,
arg_versionsId, arg_instancesId,
$fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions.instances;
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_versionsId = 'foo';
final arg_instancesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/versions/'),
);
pathOffset += 10;
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_versionsId'),
);
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_instancesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(
arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId,
$fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions.instances;
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_versionsId = 'foo';
final arg_instancesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/versions/'),
);
pathOffset += 10;
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_versionsId'),
);
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_instancesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildInstance());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(
arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId,
$fields: arg_$fields);
checkInstance(response as api.Instance);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.AppengineApi(mock).apps.services.versions.instances;
final arg_appsId = 'foo';
final arg_servicesId = 'foo';
final arg_versionsId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('v1/apps/'),
);
pathOffset += 8;
index = path.indexOf('/services/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_appsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/services/'),
);
pathOffset += 10;
index = path.indexOf('/versions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_servicesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/versions/'),
);
pathOffset += 10;
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_versionsId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/instances'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListInstancesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
arg_appsId, arg_servicesId, arg_versionsId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListInstancesResponse(response as api.ListInstancesResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/appengine/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/appengine/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 88715} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/businessprofileperformance/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterDailyMetricTimeSeries = 0;
api.DailyMetricTimeSeries buildDailyMetricTimeSeries() {
final o = api.DailyMetricTimeSeries();
buildCounterDailyMetricTimeSeries++;
if (buildCounterDailyMetricTimeSeries < 3) {
o.dailyMetric = 'foo';
o.dailySubEntityType = buildDailySubEntityType();
o.timeSeries = buildTimeSeries();
}
buildCounterDailyMetricTimeSeries--;
return o;
}
void checkDailyMetricTimeSeries(api.DailyMetricTimeSeries o) {
buildCounterDailyMetricTimeSeries++;
if (buildCounterDailyMetricTimeSeries < 3) {
unittest.expect(
o.dailyMetric!,
unittest.equals('foo'),
);
checkDailySubEntityType(o.dailySubEntityType!);
checkTimeSeries(o.timeSeries!);
}
buildCounterDailyMetricTimeSeries--;
}
core.int buildCounterDailySubEntityType = 0;
api.DailySubEntityType buildDailySubEntityType() {
final o = api.DailySubEntityType();
buildCounterDailySubEntityType++;
if (buildCounterDailySubEntityType < 3) {
o.dayOfWeek = 'foo';
o.timeOfDay = buildTimeOfDay();
}
buildCounterDailySubEntityType--;
return o;
}
void checkDailySubEntityType(api.DailySubEntityType o) {
buildCounterDailySubEntityType++;
if (buildCounterDailySubEntityType < 3) {
unittest.expect(
o.dayOfWeek!,
unittest.equals('foo'),
);
checkTimeOfDay(o.timeOfDay!);
}
buildCounterDailySubEntityType--;
}
core.int buildCounterDate = 0;
api.Date buildDate() {
final o = api.Date();
buildCounterDate++;
if (buildCounterDate < 3) {
o.day = 42;
o.month = 42;
o.year = 42;
}
buildCounterDate--;
return o;
}
void checkDate(api.Date o) {
buildCounterDate++;
if (buildCounterDate < 3) {
unittest.expect(
o.day!,
unittest.equals(42),
);
unittest.expect(
o.month!,
unittest.equals(42),
);
unittest.expect(
o.year!,
unittest.equals(42),
);
}
buildCounterDate--;
}
core.int buildCounterDatedValue = 0;
api.DatedValue buildDatedValue() {
final o = api.DatedValue();
buildCounterDatedValue++;
if (buildCounterDatedValue < 3) {
o.date = buildDate();
o.value = 'foo';
}
buildCounterDatedValue--;
return o;
}
void checkDatedValue(api.DatedValue o) {
buildCounterDatedValue++;
if (buildCounterDatedValue < 3) {
checkDate(o.date!);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterDatedValue--;
}
core.List<api.MultiDailyMetricTimeSeries> buildUnnamed0() => [
buildMultiDailyMetricTimeSeries(),
buildMultiDailyMetricTimeSeries(),
];
void checkUnnamed0(core.List<api.MultiDailyMetricTimeSeries> o) {
unittest.expect(o, unittest.hasLength(2));
checkMultiDailyMetricTimeSeries(o[0]);
checkMultiDailyMetricTimeSeries(o[1]);
}
core.int buildCounterFetchMultiDailyMetricsTimeSeriesResponse = 0;
api.FetchMultiDailyMetricsTimeSeriesResponse
buildFetchMultiDailyMetricsTimeSeriesResponse() {
final o = api.FetchMultiDailyMetricsTimeSeriesResponse();
buildCounterFetchMultiDailyMetricsTimeSeriesResponse++;
if (buildCounterFetchMultiDailyMetricsTimeSeriesResponse < 3) {
o.multiDailyMetricTimeSeries = buildUnnamed0();
}
buildCounterFetchMultiDailyMetricsTimeSeriesResponse--;
return o;
}
void checkFetchMultiDailyMetricsTimeSeriesResponse(
api.FetchMultiDailyMetricsTimeSeriesResponse o) {
buildCounterFetchMultiDailyMetricsTimeSeriesResponse++;
if (buildCounterFetchMultiDailyMetricsTimeSeriesResponse < 3) {
checkUnnamed0(o.multiDailyMetricTimeSeries!);
}
buildCounterFetchMultiDailyMetricsTimeSeriesResponse--;
}
core.int buildCounterGetDailyMetricsTimeSeriesResponse = 0;
api.GetDailyMetricsTimeSeriesResponse buildGetDailyMetricsTimeSeriesResponse() {
final o = api.GetDailyMetricsTimeSeriesResponse();
buildCounterGetDailyMetricsTimeSeriesResponse++;
if (buildCounterGetDailyMetricsTimeSeriesResponse < 3) {
o.timeSeries = buildTimeSeries();
}
buildCounterGetDailyMetricsTimeSeriesResponse--;
return o;
}
void checkGetDailyMetricsTimeSeriesResponse(
api.GetDailyMetricsTimeSeriesResponse o) {
buildCounterGetDailyMetricsTimeSeriesResponse++;
if (buildCounterGetDailyMetricsTimeSeriesResponse < 3) {
checkTimeSeries(o.timeSeries!);
}
buildCounterGetDailyMetricsTimeSeriesResponse--;
}
core.int buildCounterInsightsValue = 0;
api.InsightsValue buildInsightsValue() {
final o = api.InsightsValue();
buildCounterInsightsValue++;
if (buildCounterInsightsValue < 3) {
o.threshold = 'foo';
o.value = 'foo';
}
buildCounterInsightsValue--;
return o;
}
void checkInsightsValue(api.InsightsValue o) {
buildCounterInsightsValue++;
if (buildCounterInsightsValue < 3) {
unittest.expect(
o.threshold!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterInsightsValue--;
}
core.List<api.SearchKeywordCount> buildUnnamed1() => [
buildSearchKeywordCount(),
buildSearchKeywordCount(),
];
void checkUnnamed1(core.List<api.SearchKeywordCount> o) {
unittest.expect(o, unittest.hasLength(2));
checkSearchKeywordCount(o[0]);
checkSearchKeywordCount(o[1]);
}
core.int buildCounterListSearchKeywordImpressionsMonthlyResponse = 0;
api.ListSearchKeywordImpressionsMonthlyResponse
buildListSearchKeywordImpressionsMonthlyResponse() {
final o = api.ListSearchKeywordImpressionsMonthlyResponse();
buildCounterListSearchKeywordImpressionsMonthlyResponse++;
if (buildCounterListSearchKeywordImpressionsMonthlyResponse < 3) {
o.nextPageToken = 'foo';
o.searchKeywordsCounts = buildUnnamed1();
}
buildCounterListSearchKeywordImpressionsMonthlyResponse--;
return o;
}
void checkListSearchKeywordImpressionsMonthlyResponse(
api.ListSearchKeywordImpressionsMonthlyResponse o) {
buildCounterListSearchKeywordImpressionsMonthlyResponse++;
if (buildCounterListSearchKeywordImpressionsMonthlyResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed1(o.searchKeywordsCounts!);
}
buildCounterListSearchKeywordImpressionsMonthlyResponse--;
}
core.List<api.DailyMetricTimeSeries> buildUnnamed2() => [
buildDailyMetricTimeSeries(),
buildDailyMetricTimeSeries(),
];
void checkUnnamed2(core.List<api.DailyMetricTimeSeries> o) {
unittest.expect(o, unittest.hasLength(2));
checkDailyMetricTimeSeries(o[0]);
checkDailyMetricTimeSeries(o[1]);
}
core.int buildCounterMultiDailyMetricTimeSeries = 0;
api.MultiDailyMetricTimeSeries buildMultiDailyMetricTimeSeries() {
final o = api.MultiDailyMetricTimeSeries();
buildCounterMultiDailyMetricTimeSeries++;
if (buildCounterMultiDailyMetricTimeSeries < 3) {
o.dailyMetricTimeSeries = buildUnnamed2();
}
buildCounterMultiDailyMetricTimeSeries--;
return o;
}
void checkMultiDailyMetricTimeSeries(api.MultiDailyMetricTimeSeries o) {
buildCounterMultiDailyMetricTimeSeries++;
if (buildCounterMultiDailyMetricTimeSeries < 3) {
checkUnnamed2(o.dailyMetricTimeSeries!);
}
buildCounterMultiDailyMetricTimeSeries--;
}
core.int buildCounterSearchKeywordCount = 0;
api.SearchKeywordCount buildSearchKeywordCount() {
final o = api.SearchKeywordCount();
buildCounterSearchKeywordCount++;
if (buildCounterSearchKeywordCount < 3) {
o.insightsValue = buildInsightsValue();
o.searchKeyword = 'foo';
}
buildCounterSearchKeywordCount--;
return o;
}
void checkSearchKeywordCount(api.SearchKeywordCount o) {
buildCounterSearchKeywordCount++;
if (buildCounterSearchKeywordCount < 3) {
checkInsightsValue(o.insightsValue!);
unittest.expect(
o.searchKeyword!,
unittest.equals('foo'),
);
}
buildCounterSearchKeywordCount--;
}
core.int buildCounterTimeOfDay = 0;
api.TimeOfDay buildTimeOfDay() {
final o = api.TimeOfDay();
buildCounterTimeOfDay++;
if (buildCounterTimeOfDay < 3) {
o.hours = 42;
o.minutes = 42;
o.nanos = 42;
o.seconds = 42;
}
buildCounterTimeOfDay--;
return o;
}
void 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--;
}
core.List<api.DatedValue> buildUnnamed3() => [
buildDatedValue(),
buildDatedValue(),
];
void checkUnnamed3(core.List<api.DatedValue> o) {
unittest.expect(o, unittest.hasLength(2));
checkDatedValue(o[0]);
checkDatedValue(o[1]);
}
core.int buildCounterTimeSeries = 0;
api.TimeSeries buildTimeSeries() {
final o = api.TimeSeries();
buildCounterTimeSeries++;
if (buildCounterTimeSeries < 3) {
o.datedValues = buildUnnamed3();
}
buildCounterTimeSeries--;
return o;
}
void checkTimeSeries(api.TimeSeries o) {
buildCounterTimeSeries++;
if (buildCounterTimeSeries < 3) {
checkUnnamed3(o.datedValues!);
}
buildCounterTimeSeries--;
}
core.List<core.String> buildUnnamed4() => [
'foo',
'foo',
];
void checkUnnamed4(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'),
);
}
void main() {
unittest.group('obj-schema-DailyMetricTimeSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildDailyMetricTimeSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DailyMetricTimeSeries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDailyMetricTimeSeries(od);
});
});
unittest.group('obj-schema-DailySubEntityType', () {
unittest.test('to-json--from-json', () async {
final o = buildDailySubEntityType();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DailySubEntityType.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDailySubEntityType(od);
});
});
unittest.group('obj-schema-Date', () {
unittest.test('to-json--from-json', () async {
final o = buildDate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Date.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDate(od);
});
});
unittest.group('obj-schema-DatedValue', () {
unittest.test('to-json--from-json', () async {
final o = buildDatedValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DatedValue.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDatedValue(od);
});
});
unittest.group('obj-schema-FetchMultiDailyMetricsTimeSeriesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildFetchMultiDailyMetricsTimeSeriesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FetchMultiDailyMetricsTimeSeriesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFetchMultiDailyMetricsTimeSeriesResponse(od);
});
});
unittest.group('obj-schema-GetDailyMetricsTimeSeriesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGetDailyMetricsTimeSeriesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GetDailyMetricsTimeSeriesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGetDailyMetricsTimeSeriesResponse(od);
});
});
unittest.group('obj-schema-InsightsValue', () {
unittest.test('to-json--from-json', () async {
final o = buildInsightsValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InsightsValue.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInsightsValue(od);
});
});
unittest.group('obj-schema-ListSearchKeywordImpressionsMonthlyResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListSearchKeywordImpressionsMonthlyResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListSearchKeywordImpressionsMonthlyResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListSearchKeywordImpressionsMonthlyResponse(od);
});
});
unittest.group('obj-schema-MultiDailyMetricTimeSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildMultiDailyMetricTimeSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MultiDailyMetricTimeSeries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMultiDailyMetricTimeSeries(od);
});
});
unittest.group('obj-schema-SearchKeywordCount', () {
unittest.test('to-json--from-json', () async {
final o = buildSearchKeywordCount();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SearchKeywordCount.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSearchKeywordCount(od);
});
});
unittest.group('obj-schema-TimeOfDay', () {
unittest.test('to-json--from-json', () async {
final o = buildTimeOfDay();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.TimeOfDay.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTimeOfDay(od);
});
});
unittest.group('obj-schema-TimeSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildTimeSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.TimeSeries.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTimeSeries(od);
});
});
unittest.group('resource-LocationsResource', () {
unittest.test('method--fetchMultiDailyMetricsTimeSeries', () async {
final mock = HttpServerMock();
final res = api.BusinessProfilePerformanceApi(mock).locations;
final arg_location = 'foo';
final arg_dailyMetrics = buildUnnamed4();
final arg_dailyRange_endDate_day = 42;
final arg_dailyRange_endDate_month = 42;
final arg_dailyRange_endDate_year = 42;
final arg_dailyRange_startDate_day = 42;
final arg_dailyRange_startDate_month = 42;
final arg_dailyRange_startDate_year = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['dailyMetrics']!,
unittest.equals(arg_dailyMetrics),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.endDate.day']!.first),
unittest.equals(arg_dailyRange_endDate_day),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.endDate.month']!.first),
unittest.equals(arg_dailyRange_endDate_month),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.endDate.year']!.first),
unittest.equals(arg_dailyRange_endDate_year),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.startDate.day']!.first),
unittest.equals(arg_dailyRange_startDate_day),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.startDate.month']!.first),
unittest.equals(arg_dailyRange_startDate_month),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.startDate.year']!.first),
unittest.equals(arg_dailyRange_startDate_year),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildFetchMultiDailyMetricsTimeSeriesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.fetchMultiDailyMetricsTimeSeries(arg_location,
dailyMetrics: arg_dailyMetrics,
dailyRange_endDate_day: arg_dailyRange_endDate_day,
dailyRange_endDate_month: arg_dailyRange_endDate_month,
dailyRange_endDate_year: arg_dailyRange_endDate_year,
dailyRange_startDate_day: arg_dailyRange_startDate_day,
dailyRange_startDate_month: arg_dailyRange_startDate_month,
dailyRange_startDate_year: arg_dailyRange_startDate_year,
$fields: arg_$fields);
checkFetchMultiDailyMetricsTimeSeriesResponse(
response as api.FetchMultiDailyMetricsTimeSeriesResponse);
});
unittest.test('method--getDailyMetricsTimeSeries', () async {
final mock = HttpServerMock();
final res = api.BusinessProfilePerformanceApi(mock).locations;
final arg_name = 'foo';
final arg_dailyMetric = 'foo';
final arg_dailyRange_endDate_day = 42;
final arg_dailyRange_endDate_month = 42;
final arg_dailyRange_endDate_year = 42;
final arg_dailyRange_startDate_day = 42;
final arg_dailyRange_startDate_month = 42;
final arg_dailyRange_startDate_year = 42;
final arg_dailySubEntityType_dayOfWeek = 'foo';
final arg_dailySubEntityType_timeOfDay_hours = 42;
final arg_dailySubEntityType_timeOfDay_minutes = 42;
final arg_dailySubEntityType_timeOfDay_nanos = 42;
final arg_dailySubEntityType_timeOfDay_seconds = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['dailyMetric']!.first,
unittest.equals(arg_dailyMetric),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.endDate.day']!.first),
unittest.equals(arg_dailyRange_endDate_day),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.endDate.month']!.first),
unittest.equals(arg_dailyRange_endDate_month),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.endDate.year']!.first),
unittest.equals(arg_dailyRange_endDate_year),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.startDate.day']!.first),
unittest.equals(arg_dailyRange_startDate_day),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.startDate.month']!.first),
unittest.equals(arg_dailyRange_startDate_month),
);
unittest.expect(
core.int.parse(queryMap['dailyRange.startDate.year']!.first),
unittest.equals(arg_dailyRange_startDate_year),
);
unittest.expect(
queryMap['dailySubEntityType.dayOfWeek']!.first,
unittest.equals(arg_dailySubEntityType_dayOfWeek),
);
unittest.expect(
core.int.parse(queryMap['dailySubEntityType.timeOfDay.hours']!.first),
unittest.equals(arg_dailySubEntityType_timeOfDay_hours),
);
unittest.expect(
core.int.parse(
queryMap['dailySubEntityType.timeOfDay.minutes']!.first),
unittest.equals(arg_dailySubEntityType_timeOfDay_minutes),
);
unittest.expect(
core.int.parse(queryMap['dailySubEntityType.timeOfDay.nanos']!.first),
unittest.equals(arg_dailySubEntityType_timeOfDay_nanos),
);
unittest.expect(
core.int.parse(
queryMap['dailySubEntityType.timeOfDay.seconds']!.first),
unittest.equals(arg_dailySubEntityType_timeOfDay_seconds),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGetDailyMetricsTimeSeriesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getDailyMetricsTimeSeries(arg_name,
dailyMetric: arg_dailyMetric,
dailyRange_endDate_day: arg_dailyRange_endDate_day,
dailyRange_endDate_month: arg_dailyRange_endDate_month,
dailyRange_endDate_year: arg_dailyRange_endDate_year,
dailyRange_startDate_day: arg_dailyRange_startDate_day,
dailyRange_startDate_month: arg_dailyRange_startDate_month,
dailyRange_startDate_year: arg_dailyRange_startDate_year,
dailySubEntityType_dayOfWeek: arg_dailySubEntityType_dayOfWeek,
dailySubEntityType_timeOfDay_hours:
arg_dailySubEntityType_timeOfDay_hours,
dailySubEntityType_timeOfDay_minutes:
arg_dailySubEntityType_timeOfDay_minutes,
dailySubEntityType_timeOfDay_nanos:
arg_dailySubEntityType_timeOfDay_nanos,
dailySubEntityType_timeOfDay_seconds:
arg_dailySubEntityType_timeOfDay_seconds,
$fields: arg_$fields);
checkGetDailyMetricsTimeSeriesResponse(
response as api.GetDailyMetricsTimeSeriesResponse);
});
});
unittest.group('resource-LocationsSearchkeywordsImpressionsMonthlyResource',
() {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.BusinessProfilePerformanceApi(mock)
.locations
.searchkeywords
.impressions
.monthly;
final arg_parent = 'foo';
final arg_monthlyRange_endMonth_day = 42;
final arg_monthlyRange_endMonth_month = 42;
final arg_monthlyRange_endMonth_year = 42;
final arg_monthlyRange_startMonth_day = 42;
final arg_monthlyRange_startMonth_month = 42;
final arg_monthlyRange_startMonth_year = 42;
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['monthlyRange.endMonth.day']!.first),
unittest.equals(arg_monthlyRange_endMonth_day),
);
unittest.expect(
core.int.parse(queryMap['monthlyRange.endMonth.month']!.first),
unittest.equals(arg_monthlyRange_endMonth_month),
);
unittest.expect(
core.int.parse(queryMap['monthlyRange.endMonth.year']!.first),
unittest.equals(arg_monthlyRange_endMonth_year),
);
unittest.expect(
core.int.parse(queryMap['monthlyRange.startMonth.day']!.first),
unittest.equals(arg_monthlyRange_startMonth_day),
);
unittest.expect(
core.int.parse(queryMap['monthlyRange.startMonth.month']!.first),
unittest.equals(arg_monthlyRange_startMonth_month),
);
unittest.expect(
core.int.parse(queryMap['monthlyRange.startMonth.year']!.first),
unittest.equals(arg_monthlyRange_startMonth_year),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildListSearchKeywordImpressionsMonthlyResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
monthlyRange_endMonth_day: arg_monthlyRange_endMonth_day,
monthlyRange_endMonth_month: arg_monthlyRange_endMonth_month,
monthlyRange_endMonth_year: arg_monthlyRange_endMonth_year,
monthlyRange_startMonth_day: arg_monthlyRange_startMonth_day,
monthlyRange_startMonth_month: arg_monthlyRange_startMonth_month,
monthlyRange_startMonth_year: arg_monthlyRange_startMonth_year,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListSearchKeywordImpressionsMonthlyResponse(
response as api.ListSearchKeywordImpressionsMonthlyResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/businessprofileperformance/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/businessprofileperformance/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 12058} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/cloudidentity/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterAddIdpCredentialRequest = 0;
api.AddIdpCredentialRequest buildAddIdpCredentialRequest() {
final o = api.AddIdpCredentialRequest();
buildCounterAddIdpCredentialRequest++;
if (buildCounterAddIdpCredentialRequest < 3) {
o.pemData = 'foo';
}
buildCounterAddIdpCredentialRequest--;
return o;
}
void checkAddIdpCredentialRequest(api.AddIdpCredentialRequest o) {
buildCounterAddIdpCredentialRequest++;
if (buildCounterAddIdpCredentialRequest < 3) {
unittest.expect(
o.pemData!,
unittest.equals('foo'),
);
}
buildCounterAddIdpCredentialRequest--;
}
core.int buildCounterCancelUserInvitationRequest = 0;
api.CancelUserInvitationRequest buildCancelUserInvitationRequest() {
final o = api.CancelUserInvitationRequest();
buildCounterCancelUserInvitationRequest++;
if (buildCounterCancelUserInvitationRequest < 3) {}
buildCounterCancelUserInvitationRequest--;
return o;
}
void checkCancelUserInvitationRequest(api.CancelUserInvitationRequest o) {
buildCounterCancelUserInvitationRequest++;
if (buildCounterCancelUserInvitationRequest < 3) {}
buildCounterCancelUserInvitationRequest--;
}
core.int buildCounterCheckTransitiveMembershipResponse = 0;
api.CheckTransitiveMembershipResponse buildCheckTransitiveMembershipResponse() {
final o = api.CheckTransitiveMembershipResponse();
buildCounterCheckTransitiveMembershipResponse++;
if (buildCounterCheckTransitiveMembershipResponse < 3) {
o.hasMembership = true;
}
buildCounterCheckTransitiveMembershipResponse--;
return o;
}
void checkCheckTransitiveMembershipResponse(
api.CheckTransitiveMembershipResponse o) {
buildCounterCheckTransitiveMembershipResponse++;
if (buildCounterCheckTransitiveMembershipResponse < 3) {
unittest.expect(o.hasMembership!, unittest.isTrue);
}
buildCounterCheckTransitiveMembershipResponse--;
}
core.int buildCounterDsaPublicKeyInfo = 0;
api.DsaPublicKeyInfo buildDsaPublicKeyInfo() {
final o = api.DsaPublicKeyInfo();
buildCounterDsaPublicKeyInfo++;
if (buildCounterDsaPublicKeyInfo < 3) {
o.keySize = 42;
}
buildCounterDsaPublicKeyInfo--;
return o;
}
void checkDsaPublicKeyInfo(api.DsaPublicKeyInfo o) {
buildCounterDsaPublicKeyInfo++;
if (buildCounterDsaPublicKeyInfo < 3) {
unittest.expect(
o.keySize!,
unittest.equals(42),
);
}
buildCounterDsaPublicKeyInfo--;
}
core.List<api.DynamicGroupQuery> buildUnnamed0() => [
buildDynamicGroupQuery(),
buildDynamicGroupQuery(),
];
void checkUnnamed0(core.List<api.DynamicGroupQuery> o) {
unittest.expect(o, unittest.hasLength(2));
checkDynamicGroupQuery(o[0]);
checkDynamicGroupQuery(o[1]);
}
core.int buildCounterDynamicGroupMetadata = 0;
api.DynamicGroupMetadata buildDynamicGroupMetadata() {
final o = api.DynamicGroupMetadata();
buildCounterDynamicGroupMetadata++;
if (buildCounterDynamicGroupMetadata < 3) {
o.queries = buildUnnamed0();
o.status = buildDynamicGroupStatus();
}
buildCounterDynamicGroupMetadata--;
return o;
}
void checkDynamicGroupMetadata(api.DynamicGroupMetadata o) {
buildCounterDynamicGroupMetadata++;
if (buildCounterDynamicGroupMetadata < 3) {
checkUnnamed0(o.queries!);
checkDynamicGroupStatus(o.status!);
}
buildCounterDynamicGroupMetadata--;
}
core.int buildCounterDynamicGroupQuery = 0;
api.DynamicGroupQuery buildDynamicGroupQuery() {
final o = api.DynamicGroupQuery();
buildCounterDynamicGroupQuery++;
if (buildCounterDynamicGroupQuery < 3) {
o.query = 'foo';
o.resourceType = 'foo';
}
buildCounterDynamicGroupQuery--;
return o;
}
void checkDynamicGroupQuery(api.DynamicGroupQuery o) {
buildCounterDynamicGroupQuery++;
if (buildCounterDynamicGroupQuery < 3) {
unittest.expect(
o.query!,
unittest.equals('foo'),
);
unittest.expect(
o.resourceType!,
unittest.equals('foo'),
);
}
buildCounterDynamicGroupQuery--;
}
core.int buildCounterDynamicGroupStatus = 0;
api.DynamicGroupStatus buildDynamicGroupStatus() {
final o = api.DynamicGroupStatus();
buildCounterDynamicGroupStatus++;
if (buildCounterDynamicGroupStatus < 3) {
o.status = 'foo';
o.statusTime = 'foo';
}
buildCounterDynamicGroupStatus--;
return o;
}
void checkDynamicGroupStatus(api.DynamicGroupStatus o) {
buildCounterDynamicGroupStatus++;
if (buildCounterDynamicGroupStatus < 3) {
unittest.expect(
o.status!,
unittest.equals('foo'),
);
unittest.expect(
o.statusTime!,
unittest.equals('foo'),
);
}
buildCounterDynamicGroupStatus--;
}
core.int buildCounterEntityKey = 0;
api.EntityKey buildEntityKey() {
final o = api.EntityKey();
buildCounterEntityKey++;
if (buildCounterEntityKey < 3) {
o.id = 'foo';
o.namespace = 'foo';
}
buildCounterEntityKey--;
return o;
}
void checkEntityKey(api.EntityKey o) {
buildCounterEntityKey++;
if (buildCounterEntityKey < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.namespace!,
unittest.equals('foo'),
);
}
buildCounterEntityKey--;
}
core.int buildCounterExpiryDetail = 0;
api.ExpiryDetail buildExpiryDetail() {
final o = api.ExpiryDetail();
buildCounterExpiryDetail++;
if (buildCounterExpiryDetail < 3) {
o.expireTime = 'foo';
}
buildCounterExpiryDetail--;
return o;
}
void checkExpiryDetail(api.ExpiryDetail o) {
buildCounterExpiryDetail++;
if (buildCounterExpiryDetail < 3) {
unittest.expect(
o.expireTime!,
unittest.equals('foo'),
);
}
buildCounterExpiryDetail--;
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1AndroidAttributes = 0;
api.GoogleAppsCloudidentityDevicesV1AndroidAttributes
buildGoogleAppsCloudidentityDevicesV1AndroidAttributes() {
final o = api.GoogleAppsCloudidentityDevicesV1AndroidAttributes();
buildCounterGoogleAppsCloudidentityDevicesV1AndroidAttributes++;
if (buildCounterGoogleAppsCloudidentityDevicesV1AndroidAttributes < 3) {
o.ctsProfileMatch = true;
o.enabledUnknownSources = true;
o.hasPotentiallyHarmfulApps = true;
o.ownerProfileAccount = true;
o.ownershipPrivilege = 'foo';
o.supportsWorkProfile = true;
o.verifiedBoot = true;
o.verifyAppsEnabled = true;
}
buildCounterGoogleAppsCloudidentityDevicesV1AndroidAttributes--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1AndroidAttributes(
api.GoogleAppsCloudidentityDevicesV1AndroidAttributes o) {
buildCounterGoogleAppsCloudidentityDevicesV1AndroidAttributes++;
if (buildCounterGoogleAppsCloudidentityDevicesV1AndroidAttributes < 3) {
unittest.expect(o.ctsProfileMatch!, unittest.isTrue);
unittest.expect(o.enabledUnknownSources!, unittest.isTrue);
unittest.expect(o.hasPotentiallyHarmfulApps!, unittest.isTrue);
unittest.expect(o.ownerProfileAccount!, unittest.isTrue);
unittest.expect(
o.ownershipPrivilege!,
unittest.equals('foo'),
);
unittest.expect(o.supportsWorkProfile!, unittest.isTrue);
unittest.expect(o.verifiedBoot!, unittest.isTrue);
unittest.expect(o.verifyAppsEnabled!, unittest.isTrue);
}
buildCounterGoogleAppsCloudidentityDevicesV1AndroidAttributes--;
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest =
0;
api.GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest
buildGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest() {
final o = api.GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest();
buildCounterGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest <
3) {
o.customer = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest(
api.GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest o) {
buildCounterGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest <
3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest--;
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest = 0;
api.GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest
buildGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest() {
final o = api.GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest();
buildCounterGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest < 3) {
o.customer = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest(
api.GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest o) {
buildCounterGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest < 3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest--;
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest =
0;
api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest
buildGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest() {
final o = api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest();
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest < 3) {
o.customer = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest(
api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest o) {
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest < 3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest--;
}
core.int
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest = 0;
api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest
buildGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest() {
final o = api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest();
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest <
3) {
o.customer = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest(
api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest o) {
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest <
3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest--;
}
core.List<core.String> buildUnnamed1() => [
'foo',
'foo',
];
void checkUnnamed1(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.Map<core.String, api.GoogleAppsCloudidentityDevicesV1CustomAttributeValue>
buildUnnamed2() => {
'x': buildGoogleAppsCloudidentityDevicesV1CustomAttributeValue(),
'y': buildGoogleAppsCloudidentityDevicesV1CustomAttributeValue(),
};
void checkUnnamed2(
core.Map<core.String,
api.GoogleAppsCloudidentityDevicesV1CustomAttributeValue>
o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleAppsCloudidentityDevicesV1CustomAttributeValue(o['x']!);
checkGoogleAppsCloudidentityDevicesV1CustomAttributeValue(o['y']!);
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1ClientState = 0;
api.GoogleAppsCloudidentityDevicesV1ClientState
buildGoogleAppsCloudidentityDevicesV1ClientState() {
final o = api.GoogleAppsCloudidentityDevicesV1ClientState();
buildCounterGoogleAppsCloudidentityDevicesV1ClientState++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ClientState < 3) {
o.assetTags = buildUnnamed1();
o.complianceState = 'foo';
o.createTime = 'foo';
o.customId = 'foo';
o.etag = 'foo';
o.healthScore = 'foo';
o.keyValuePairs = buildUnnamed2();
o.lastUpdateTime = 'foo';
o.managed = 'foo';
o.name = 'foo';
o.ownerType = 'foo';
o.scoreReason = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1ClientState--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1ClientState(
api.GoogleAppsCloudidentityDevicesV1ClientState o) {
buildCounterGoogleAppsCloudidentityDevicesV1ClientState++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ClientState < 3) {
checkUnnamed1(o.assetTags!);
unittest.expect(
o.complianceState!,
unittest.equals('foo'),
);
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.customId!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.healthScore!,
unittest.equals('foo'),
);
checkUnnamed2(o.keyValuePairs!);
unittest.expect(
o.lastUpdateTime!,
unittest.equals('foo'),
);
unittest.expect(
o.managed!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.ownerType!,
unittest.equals('foo'),
);
unittest.expect(
o.scoreReason!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1ClientState--;
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1CustomAttributeValue = 0;
api.GoogleAppsCloudidentityDevicesV1CustomAttributeValue
buildGoogleAppsCloudidentityDevicesV1CustomAttributeValue() {
final o = api.GoogleAppsCloudidentityDevicesV1CustomAttributeValue();
buildCounterGoogleAppsCloudidentityDevicesV1CustomAttributeValue++;
if (buildCounterGoogleAppsCloudidentityDevicesV1CustomAttributeValue < 3) {
o.boolValue = true;
o.numberValue = 42.0;
o.stringValue = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1CustomAttributeValue--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1CustomAttributeValue(
api.GoogleAppsCloudidentityDevicesV1CustomAttributeValue o) {
buildCounterGoogleAppsCloudidentityDevicesV1CustomAttributeValue++;
if (buildCounterGoogleAppsCloudidentityDevicesV1CustomAttributeValue < 3) {
unittest.expect(o.boolValue!, unittest.isTrue);
unittest.expect(
o.numberValue!,
unittest.equals(42.0),
);
unittest.expect(
o.stringValue!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1CustomAttributeValue--;
}
core.List<core.String> buildUnnamed3() => [
'foo',
'foo',
];
void checkUnnamed3(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.List<core.String> buildUnnamed4() => [
'foo',
'foo',
];
void checkUnnamed4(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 buildCounterGoogleAppsCloudidentityDevicesV1Device = 0;
api.GoogleAppsCloudidentityDevicesV1Device
buildGoogleAppsCloudidentityDevicesV1Device() {
final o = api.GoogleAppsCloudidentityDevicesV1Device();
buildCounterGoogleAppsCloudidentityDevicesV1Device++;
if (buildCounterGoogleAppsCloudidentityDevicesV1Device < 3) {
o.androidSpecificAttributes =
buildGoogleAppsCloudidentityDevicesV1AndroidAttributes();
o.assetTag = 'foo';
o.basebandVersion = 'foo';
o.bootloaderVersion = 'foo';
o.brand = 'foo';
o.buildNumber = 'foo';
o.compromisedState = 'foo';
o.createTime = 'foo';
o.deviceId = 'foo';
o.deviceType = 'foo';
o.enabledDeveloperOptions = true;
o.enabledUsbDebugging = true;
o.encryptionState = 'foo';
o.hostname = 'foo';
o.imei = 'foo';
o.kernelVersion = 'foo';
o.lastSyncTime = 'foo';
o.managementState = 'foo';
o.manufacturer = 'foo';
o.meid = 'foo';
o.model = 'foo';
o.name = 'foo';
o.networkOperator = 'foo';
o.osVersion = 'foo';
o.otherAccounts = buildUnnamed3();
o.ownerType = 'foo';
o.releaseVersion = 'foo';
o.securityPatchTime = 'foo';
o.serialNumber = 'foo';
o.wifiMacAddresses = buildUnnamed4();
}
buildCounterGoogleAppsCloudidentityDevicesV1Device--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1Device(
api.GoogleAppsCloudidentityDevicesV1Device o) {
buildCounterGoogleAppsCloudidentityDevicesV1Device++;
if (buildCounterGoogleAppsCloudidentityDevicesV1Device < 3) {
checkGoogleAppsCloudidentityDevicesV1AndroidAttributes(
o.androidSpecificAttributes!);
unittest.expect(
o.assetTag!,
unittest.equals('foo'),
);
unittest.expect(
o.basebandVersion!,
unittest.equals('foo'),
);
unittest.expect(
o.bootloaderVersion!,
unittest.equals('foo'),
);
unittest.expect(
o.brand!,
unittest.equals('foo'),
);
unittest.expect(
o.buildNumber!,
unittest.equals('foo'),
);
unittest.expect(
o.compromisedState!,
unittest.equals('foo'),
);
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.deviceId!,
unittest.equals('foo'),
);
unittest.expect(
o.deviceType!,
unittest.equals('foo'),
);
unittest.expect(o.enabledDeveloperOptions!, unittest.isTrue);
unittest.expect(o.enabledUsbDebugging!, unittest.isTrue);
unittest.expect(
o.encryptionState!,
unittest.equals('foo'),
);
unittest.expect(
o.hostname!,
unittest.equals('foo'),
);
unittest.expect(
o.imei!,
unittest.equals('foo'),
);
unittest.expect(
o.kernelVersion!,
unittest.equals('foo'),
);
unittest.expect(
o.lastSyncTime!,
unittest.equals('foo'),
);
unittest.expect(
o.managementState!,
unittest.equals('foo'),
);
unittest.expect(
o.manufacturer!,
unittest.equals('foo'),
);
unittest.expect(
o.meid!,
unittest.equals('foo'),
);
unittest.expect(
o.model!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.networkOperator!,
unittest.equals('foo'),
);
unittest.expect(
o.osVersion!,
unittest.equals('foo'),
);
checkUnnamed3(o.otherAccounts!);
unittest.expect(
o.ownerType!,
unittest.equals('foo'),
);
unittest.expect(
o.releaseVersion!,
unittest.equals('foo'),
);
unittest.expect(
o.securityPatchTime!,
unittest.equals('foo'),
);
unittest.expect(
o.serialNumber!,
unittest.equals('foo'),
);
checkUnnamed4(o.wifiMacAddresses!);
}
buildCounterGoogleAppsCloudidentityDevicesV1Device--;
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1DeviceUser = 0;
api.GoogleAppsCloudidentityDevicesV1DeviceUser
buildGoogleAppsCloudidentityDevicesV1DeviceUser() {
final o = api.GoogleAppsCloudidentityDevicesV1DeviceUser();
buildCounterGoogleAppsCloudidentityDevicesV1DeviceUser++;
if (buildCounterGoogleAppsCloudidentityDevicesV1DeviceUser < 3) {
o.compromisedState = 'foo';
o.createTime = 'foo';
o.firstSyncTime = 'foo';
o.languageCode = 'foo';
o.lastSyncTime = 'foo';
o.managementState = 'foo';
o.name = 'foo';
o.passwordState = 'foo';
o.userAgent = 'foo';
o.userEmail = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1DeviceUser--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1DeviceUser(
api.GoogleAppsCloudidentityDevicesV1DeviceUser o) {
buildCounterGoogleAppsCloudidentityDevicesV1DeviceUser++;
if (buildCounterGoogleAppsCloudidentityDevicesV1DeviceUser < 3) {
unittest.expect(
o.compromisedState!,
unittest.equals('foo'),
);
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.firstSyncTime!,
unittest.equals('foo'),
);
unittest.expect(
o.languageCode!,
unittest.equals('foo'),
);
unittest.expect(
o.lastSyncTime!,
unittest.equals('foo'),
);
unittest.expect(
o.managementState!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.passwordState!,
unittest.equals('foo'),
);
unittest.expect(
o.userAgent!,
unittest.equals('foo'),
);
unittest.expect(
o.userEmail!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1DeviceUser--;
}
core.List<api.GoogleAppsCloudidentityDevicesV1ClientState> buildUnnamed5() => [
buildGoogleAppsCloudidentityDevicesV1ClientState(),
buildGoogleAppsCloudidentityDevicesV1ClientState(),
];
void checkUnnamed5(
core.List<api.GoogleAppsCloudidentityDevicesV1ClientState> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleAppsCloudidentityDevicesV1ClientState(o[0]);
checkGoogleAppsCloudidentityDevicesV1ClientState(o[1]);
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1ListClientStatesResponse =
0;
api.GoogleAppsCloudidentityDevicesV1ListClientStatesResponse
buildGoogleAppsCloudidentityDevicesV1ListClientStatesResponse() {
final o = api.GoogleAppsCloudidentityDevicesV1ListClientStatesResponse();
buildCounterGoogleAppsCloudidentityDevicesV1ListClientStatesResponse++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ListClientStatesResponse <
3) {
o.clientStates = buildUnnamed5();
o.nextPageToken = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1ListClientStatesResponse--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1ListClientStatesResponse(
api.GoogleAppsCloudidentityDevicesV1ListClientStatesResponse o) {
buildCounterGoogleAppsCloudidentityDevicesV1ListClientStatesResponse++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ListClientStatesResponse <
3) {
checkUnnamed5(o.clientStates!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1ListClientStatesResponse--;
}
core.List<api.GoogleAppsCloudidentityDevicesV1DeviceUser> buildUnnamed6() => [
buildGoogleAppsCloudidentityDevicesV1DeviceUser(),
buildGoogleAppsCloudidentityDevicesV1DeviceUser(),
];
void checkUnnamed6(
core.List<api.GoogleAppsCloudidentityDevicesV1DeviceUser> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleAppsCloudidentityDevicesV1DeviceUser(o[0]);
checkGoogleAppsCloudidentityDevicesV1DeviceUser(o[1]);
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse =
0;
api.GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse
buildGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse() {
final o = api.GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse();
buildCounterGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse < 3) {
o.deviceUsers = buildUnnamed6();
o.nextPageToken = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse(
api.GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse o) {
buildCounterGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse < 3) {
checkUnnamed6(o.deviceUsers!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse--;
}
core.List<api.GoogleAppsCloudidentityDevicesV1Device> buildUnnamed7() => [
buildGoogleAppsCloudidentityDevicesV1Device(),
buildGoogleAppsCloudidentityDevicesV1Device(),
];
void checkUnnamed7(core.List<api.GoogleAppsCloudidentityDevicesV1Device> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleAppsCloudidentityDevicesV1Device(o[0]);
checkGoogleAppsCloudidentityDevicesV1Device(o[1]);
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1ListDevicesResponse = 0;
api.GoogleAppsCloudidentityDevicesV1ListDevicesResponse
buildGoogleAppsCloudidentityDevicesV1ListDevicesResponse() {
final o = api.GoogleAppsCloudidentityDevicesV1ListDevicesResponse();
buildCounterGoogleAppsCloudidentityDevicesV1ListDevicesResponse++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ListDevicesResponse < 3) {
o.devices = buildUnnamed7();
o.nextPageToken = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1ListDevicesResponse--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1ListDevicesResponse(
api.GoogleAppsCloudidentityDevicesV1ListDevicesResponse o) {
buildCounterGoogleAppsCloudidentityDevicesV1ListDevicesResponse++;
if (buildCounterGoogleAppsCloudidentityDevicesV1ListDevicesResponse < 3) {
checkUnnamed7(o.devices!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1ListDevicesResponse--;
}
core.List<core.String> buildUnnamed8() => [
'foo',
'foo',
];
void checkUnnamed8(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
buildCounterGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse =
0;
api.GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse
buildGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse() {
final o = api.GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse();
buildCounterGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse++;
if (buildCounterGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse <
3) {
o.customer = 'foo';
o.names = buildUnnamed8();
o.nextPageToken = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse(
api.GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse o) {
buildCounterGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse++;
if (buildCounterGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse <
3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
checkUnnamed8(o.names!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse--;
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceRequest = 0;
api.GoogleAppsCloudidentityDevicesV1WipeDeviceRequest
buildGoogleAppsCloudidentityDevicesV1WipeDeviceRequest() {
final o = api.GoogleAppsCloudidentityDevicesV1WipeDeviceRequest();
buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceRequest < 3) {
o.customer = 'foo';
o.removeResetLock = true;
}
buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceRequest--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1WipeDeviceRequest(
api.GoogleAppsCloudidentityDevicesV1WipeDeviceRequest o) {
buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceRequest < 3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
unittest.expect(o.removeResetLock!, unittest.isTrue);
}
buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceRequest--;
}
core.int buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest = 0;
api.GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest
buildGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest() {
final o = api.GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest();
buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest < 3) {
o.customer = 'foo';
}
buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest--;
return o;
}
void checkGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest(
api.GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest o) {
buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest++;
if (buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest < 3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
}
buildCounterGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest--;
}
core.List<api.EntityKey> buildUnnamed9() => [
buildEntityKey(),
buildEntityKey(),
];
void checkUnnamed9(core.List<api.EntityKey> o) {
unittest.expect(o, unittest.hasLength(2));
checkEntityKey(o[0]);
checkEntityKey(o[1]);
}
core.Map<core.String, core.String> buildUnnamed10() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed10(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 buildCounterGroup = 0;
api.Group buildGroup() {
final o = api.Group();
buildCounterGroup++;
if (buildCounterGroup < 3) {
o.additionalGroupKeys = buildUnnamed9();
o.createTime = 'foo';
o.description = 'foo';
o.displayName = 'foo';
o.dynamicGroupMetadata = buildDynamicGroupMetadata();
o.groupKey = buildEntityKey();
o.labels = buildUnnamed10();
o.name = 'foo';
o.parent = 'foo';
o.updateTime = 'foo';
}
buildCounterGroup--;
return o;
}
void checkGroup(api.Group o) {
buildCounterGroup++;
if (buildCounterGroup < 3) {
checkUnnamed9(o.additionalGroupKeys!);
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
checkDynamicGroupMetadata(o.dynamicGroupMetadata!);
checkEntityKey(o.groupKey!);
checkUnnamed10(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.parent!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterGroup--;
}
core.Map<core.String, core.String> buildUnnamed11() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed11(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.List<api.TransitiveMembershipRole> buildUnnamed12() => [
buildTransitiveMembershipRole(),
buildTransitiveMembershipRole(),
];
void checkUnnamed12(core.List<api.TransitiveMembershipRole> o) {
unittest.expect(o, unittest.hasLength(2));
checkTransitiveMembershipRole(o[0]);
checkTransitiveMembershipRole(o[1]);
}
core.int buildCounterGroupRelation = 0;
api.GroupRelation buildGroupRelation() {
final o = api.GroupRelation();
buildCounterGroupRelation++;
if (buildCounterGroupRelation < 3) {
o.displayName = 'foo';
o.group = 'foo';
o.groupKey = buildEntityKey();
o.labels = buildUnnamed11();
o.relationType = 'foo';
o.roles = buildUnnamed12();
}
buildCounterGroupRelation--;
return o;
}
void checkGroupRelation(api.GroupRelation o) {
buildCounterGroupRelation++;
if (buildCounterGroupRelation < 3) {
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.group!,
unittest.equals('foo'),
);
checkEntityKey(o.groupKey!);
checkUnnamed11(o.labels!);
unittest.expect(
o.relationType!,
unittest.equals('foo'),
);
checkUnnamed12(o.roles!);
}
buildCounterGroupRelation--;
}
core.int buildCounterIdpCredential = 0;
api.IdpCredential buildIdpCredential() {
final o = api.IdpCredential();
buildCounterIdpCredential++;
if (buildCounterIdpCredential < 3) {
o.dsaKeyInfo = buildDsaPublicKeyInfo();
o.name = 'foo';
o.rsaKeyInfo = buildRsaPublicKeyInfo();
o.updateTime = 'foo';
}
buildCounterIdpCredential--;
return o;
}
void checkIdpCredential(api.IdpCredential o) {
buildCounterIdpCredential++;
if (buildCounterIdpCredential < 3) {
checkDsaPublicKeyInfo(o.dsaKeyInfo!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkRsaPublicKeyInfo(o.rsaKeyInfo!);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterIdpCredential--;
}
core.int buildCounterInboundSamlSsoProfile = 0;
api.InboundSamlSsoProfile buildInboundSamlSsoProfile() {
final o = api.InboundSamlSsoProfile();
buildCounterInboundSamlSsoProfile++;
if (buildCounterInboundSamlSsoProfile < 3) {
o.customer = 'foo';
o.displayName = 'foo';
o.idpConfig = buildSamlIdpConfig();
o.name = 'foo';
o.spConfig = buildSamlSpConfig();
}
buildCounterInboundSamlSsoProfile--;
return o;
}
void checkInboundSamlSsoProfile(api.InboundSamlSsoProfile o) {
buildCounterInboundSamlSsoProfile++;
if (buildCounterInboundSamlSsoProfile < 3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
checkSamlIdpConfig(o.idpConfig!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkSamlSpConfig(o.spConfig!);
}
buildCounterInboundSamlSsoProfile--;
}
core.int buildCounterInboundSsoAssignment = 0;
api.InboundSsoAssignment buildInboundSsoAssignment() {
final o = api.InboundSsoAssignment();
buildCounterInboundSsoAssignment++;
if (buildCounterInboundSsoAssignment < 3) {
o.customer = 'foo';
o.name = 'foo';
o.rank = 42;
o.samlSsoInfo = buildSamlSsoInfo();
o.signInBehavior = buildSignInBehavior();
o.ssoMode = 'foo';
o.targetGroup = 'foo';
o.targetOrgUnit = 'foo';
}
buildCounterInboundSsoAssignment--;
return o;
}
void checkInboundSsoAssignment(api.InboundSsoAssignment o) {
buildCounterInboundSsoAssignment++;
if (buildCounterInboundSsoAssignment < 3) {
unittest.expect(
o.customer!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.rank!,
unittest.equals(42),
);
checkSamlSsoInfo(o.samlSsoInfo!);
checkSignInBehavior(o.signInBehavior!);
unittest.expect(
o.ssoMode!,
unittest.equals('foo'),
);
unittest.expect(
o.targetGroup!,
unittest.equals('foo'),
);
unittest.expect(
o.targetOrgUnit!,
unittest.equals('foo'),
);
}
buildCounterInboundSsoAssignment--;
}
core.int buildCounterIsInvitableUserResponse = 0;
api.IsInvitableUserResponse buildIsInvitableUserResponse() {
final o = api.IsInvitableUserResponse();
buildCounterIsInvitableUserResponse++;
if (buildCounterIsInvitableUserResponse < 3) {
o.isInvitableUser = true;
}
buildCounterIsInvitableUserResponse--;
return o;
}
void checkIsInvitableUserResponse(api.IsInvitableUserResponse o) {
buildCounterIsInvitableUserResponse++;
if (buildCounterIsInvitableUserResponse < 3) {
unittest.expect(o.isInvitableUser!, unittest.isTrue);
}
buildCounterIsInvitableUserResponse--;
}
core.List<api.Group> buildUnnamed13() => [
buildGroup(),
buildGroup(),
];
void checkUnnamed13(core.List<api.Group> o) {
unittest.expect(o, unittest.hasLength(2));
checkGroup(o[0]);
checkGroup(o[1]);
}
core.int buildCounterListGroupsResponse = 0;
api.ListGroupsResponse buildListGroupsResponse() {
final o = api.ListGroupsResponse();
buildCounterListGroupsResponse++;
if (buildCounterListGroupsResponse < 3) {
o.groups = buildUnnamed13();
o.nextPageToken = 'foo';
}
buildCounterListGroupsResponse--;
return o;
}
void checkListGroupsResponse(api.ListGroupsResponse o) {
buildCounterListGroupsResponse++;
if (buildCounterListGroupsResponse < 3) {
checkUnnamed13(o.groups!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListGroupsResponse--;
}
core.List<api.IdpCredential> buildUnnamed14() => [
buildIdpCredential(),
buildIdpCredential(),
];
void checkUnnamed14(core.List<api.IdpCredential> o) {
unittest.expect(o, unittest.hasLength(2));
checkIdpCredential(o[0]);
checkIdpCredential(o[1]);
}
core.int buildCounterListIdpCredentialsResponse = 0;
api.ListIdpCredentialsResponse buildListIdpCredentialsResponse() {
final o = api.ListIdpCredentialsResponse();
buildCounterListIdpCredentialsResponse++;
if (buildCounterListIdpCredentialsResponse < 3) {
o.idpCredentials = buildUnnamed14();
o.nextPageToken = 'foo';
}
buildCounterListIdpCredentialsResponse--;
return o;
}
void checkListIdpCredentialsResponse(api.ListIdpCredentialsResponse o) {
buildCounterListIdpCredentialsResponse++;
if (buildCounterListIdpCredentialsResponse < 3) {
checkUnnamed14(o.idpCredentials!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListIdpCredentialsResponse--;
}
core.List<api.InboundSamlSsoProfile> buildUnnamed15() => [
buildInboundSamlSsoProfile(),
buildInboundSamlSsoProfile(),
];
void checkUnnamed15(core.List<api.InboundSamlSsoProfile> o) {
unittest.expect(o, unittest.hasLength(2));
checkInboundSamlSsoProfile(o[0]);
checkInboundSamlSsoProfile(o[1]);
}
core.int buildCounterListInboundSamlSsoProfilesResponse = 0;
api.ListInboundSamlSsoProfilesResponse
buildListInboundSamlSsoProfilesResponse() {
final o = api.ListInboundSamlSsoProfilesResponse();
buildCounterListInboundSamlSsoProfilesResponse++;
if (buildCounterListInboundSamlSsoProfilesResponse < 3) {
o.inboundSamlSsoProfiles = buildUnnamed15();
o.nextPageToken = 'foo';
}
buildCounterListInboundSamlSsoProfilesResponse--;
return o;
}
void checkListInboundSamlSsoProfilesResponse(
api.ListInboundSamlSsoProfilesResponse o) {
buildCounterListInboundSamlSsoProfilesResponse++;
if (buildCounterListInboundSamlSsoProfilesResponse < 3) {
checkUnnamed15(o.inboundSamlSsoProfiles!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListInboundSamlSsoProfilesResponse--;
}
core.List<api.InboundSsoAssignment> buildUnnamed16() => [
buildInboundSsoAssignment(),
buildInboundSsoAssignment(),
];
void checkUnnamed16(core.List<api.InboundSsoAssignment> o) {
unittest.expect(o, unittest.hasLength(2));
checkInboundSsoAssignment(o[0]);
checkInboundSsoAssignment(o[1]);
}
core.int buildCounterListInboundSsoAssignmentsResponse = 0;
api.ListInboundSsoAssignmentsResponse buildListInboundSsoAssignmentsResponse() {
final o = api.ListInboundSsoAssignmentsResponse();
buildCounterListInboundSsoAssignmentsResponse++;
if (buildCounterListInboundSsoAssignmentsResponse < 3) {
o.inboundSsoAssignments = buildUnnamed16();
o.nextPageToken = 'foo';
}
buildCounterListInboundSsoAssignmentsResponse--;
return o;
}
void checkListInboundSsoAssignmentsResponse(
api.ListInboundSsoAssignmentsResponse o) {
buildCounterListInboundSsoAssignmentsResponse++;
if (buildCounterListInboundSsoAssignmentsResponse < 3) {
checkUnnamed16(o.inboundSsoAssignments!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListInboundSsoAssignmentsResponse--;
}
core.List<api.Membership> buildUnnamed17() => [
buildMembership(),
buildMembership(),
];
void checkUnnamed17(core.List<api.Membership> o) {
unittest.expect(o, unittest.hasLength(2));
checkMembership(o[0]);
checkMembership(o[1]);
}
core.int buildCounterListMembershipsResponse = 0;
api.ListMembershipsResponse buildListMembershipsResponse() {
final o = api.ListMembershipsResponse();
buildCounterListMembershipsResponse++;
if (buildCounterListMembershipsResponse < 3) {
o.memberships = buildUnnamed17();
o.nextPageToken = 'foo';
}
buildCounterListMembershipsResponse--;
return o;
}
void checkListMembershipsResponse(api.ListMembershipsResponse o) {
buildCounterListMembershipsResponse++;
if (buildCounterListMembershipsResponse < 3) {
checkUnnamed17(o.memberships!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListMembershipsResponse--;
}
core.List<api.UserInvitation> buildUnnamed18() => [
buildUserInvitation(),
buildUserInvitation(),
];
void checkUnnamed18(core.List<api.UserInvitation> o) {
unittest.expect(o, unittest.hasLength(2));
checkUserInvitation(o[0]);
checkUserInvitation(o[1]);
}
core.int buildCounterListUserInvitationsResponse = 0;
api.ListUserInvitationsResponse buildListUserInvitationsResponse() {
final o = api.ListUserInvitationsResponse();
buildCounterListUserInvitationsResponse++;
if (buildCounterListUserInvitationsResponse < 3) {
o.nextPageToken = 'foo';
o.userInvitations = buildUnnamed18();
}
buildCounterListUserInvitationsResponse--;
return o;
}
void checkListUserInvitationsResponse(api.ListUserInvitationsResponse o) {
buildCounterListUserInvitationsResponse++;
if (buildCounterListUserInvitationsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed18(o.userInvitations!);
}
buildCounterListUserInvitationsResponse--;
}
core.int buildCounterLookupGroupNameResponse = 0;
api.LookupGroupNameResponse buildLookupGroupNameResponse() {
final o = api.LookupGroupNameResponse();
buildCounterLookupGroupNameResponse++;
if (buildCounterLookupGroupNameResponse < 3) {
o.name = 'foo';
}
buildCounterLookupGroupNameResponse--;
return o;
}
void checkLookupGroupNameResponse(api.LookupGroupNameResponse o) {
buildCounterLookupGroupNameResponse++;
if (buildCounterLookupGroupNameResponse < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterLookupGroupNameResponse--;
}
core.int buildCounterLookupMembershipNameResponse = 0;
api.LookupMembershipNameResponse buildLookupMembershipNameResponse() {
final o = api.LookupMembershipNameResponse();
buildCounterLookupMembershipNameResponse++;
if (buildCounterLookupMembershipNameResponse < 3) {
o.name = 'foo';
}
buildCounterLookupMembershipNameResponse--;
return o;
}
void checkLookupMembershipNameResponse(api.LookupMembershipNameResponse o) {
buildCounterLookupMembershipNameResponse++;
if (buildCounterLookupMembershipNameResponse < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterLookupMembershipNameResponse--;
}
core.List<api.EntityKey> buildUnnamed19() => [
buildEntityKey(),
buildEntityKey(),
];
void checkUnnamed19(core.List<api.EntityKey> o) {
unittest.expect(o, unittest.hasLength(2));
checkEntityKey(o[0]);
checkEntityKey(o[1]);
}
core.List<api.TransitiveMembershipRole> buildUnnamed20() => [
buildTransitiveMembershipRole(),
buildTransitiveMembershipRole(),
];
void checkUnnamed20(core.List<api.TransitiveMembershipRole> o) {
unittest.expect(o, unittest.hasLength(2));
checkTransitiveMembershipRole(o[0]);
checkTransitiveMembershipRole(o[1]);
}
core.int buildCounterMemberRelation = 0;
api.MemberRelation buildMemberRelation() {
final o = api.MemberRelation();
buildCounterMemberRelation++;
if (buildCounterMemberRelation < 3) {
o.member = 'foo';
o.preferredMemberKey = buildUnnamed19();
o.relationType = 'foo';
o.roles = buildUnnamed20();
}
buildCounterMemberRelation--;
return o;
}
void checkMemberRelation(api.MemberRelation o) {
buildCounterMemberRelation++;
if (buildCounterMemberRelation < 3) {
unittest.expect(
o.member!,
unittest.equals('foo'),
);
checkUnnamed19(o.preferredMemberKey!);
unittest.expect(
o.relationType!,
unittest.equals('foo'),
);
checkUnnamed20(o.roles!);
}
buildCounterMemberRelation--;
}
core.int buildCounterMemberRestriction = 0;
api.MemberRestriction buildMemberRestriction() {
final o = api.MemberRestriction();
buildCounterMemberRestriction++;
if (buildCounterMemberRestriction < 3) {
o.evaluation = buildRestrictionEvaluation();
o.query = 'foo';
}
buildCounterMemberRestriction--;
return o;
}
void checkMemberRestriction(api.MemberRestriction o) {
buildCounterMemberRestriction++;
if (buildCounterMemberRestriction < 3) {
checkRestrictionEvaluation(o.evaluation!);
unittest.expect(
o.query!,
unittest.equals('foo'),
);
}
buildCounterMemberRestriction--;
}
core.List<api.MembershipRole> buildUnnamed21() => [
buildMembershipRole(),
buildMembershipRole(),
];
void checkUnnamed21(core.List<api.MembershipRole> o) {
unittest.expect(o, unittest.hasLength(2));
checkMembershipRole(o[0]);
checkMembershipRole(o[1]);
}
core.int buildCounterMembership = 0;
api.Membership buildMembership() {
final o = api.Membership();
buildCounterMembership++;
if (buildCounterMembership < 3) {
o.createTime = 'foo';
o.deliverySetting = 'foo';
o.name = 'foo';
o.preferredMemberKey = buildEntityKey();
o.roles = buildUnnamed21();
o.type = 'foo';
o.updateTime = 'foo';
}
buildCounterMembership--;
return o;
}
void checkMembership(api.Membership o) {
buildCounterMembership++;
if (buildCounterMembership < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.deliverySetting!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkEntityKey(o.preferredMemberKey!);
checkUnnamed21(o.roles!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterMembership--;
}
core.Map<core.String, core.String> buildUnnamed22() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed22(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.List<api.MembershipRole> buildUnnamed23() => [
buildMembershipRole(),
buildMembershipRole(),
];
void checkUnnamed23(core.List<api.MembershipRole> o) {
unittest.expect(o, unittest.hasLength(2));
checkMembershipRole(o[0]);
checkMembershipRole(o[1]);
}
core.int buildCounterMembershipRelation = 0;
api.MembershipRelation buildMembershipRelation() {
final o = api.MembershipRelation();
buildCounterMembershipRelation++;
if (buildCounterMembershipRelation < 3) {
o.description = 'foo';
o.displayName = 'foo';
o.group = 'foo';
o.groupKey = buildEntityKey();
o.labels = buildUnnamed22();
o.membership = 'foo';
o.roles = buildUnnamed23();
}
buildCounterMembershipRelation--;
return o;
}
void checkMembershipRelation(api.MembershipRelation o) {
buildCounterMembershipRelation++;
if (buildCounterMembershipRelation < 3) {
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.group!,
unittest.equals('foo'),
);
checkEntityKey(o.groupKey!);
checkUnnamed22(o.labels!);
unittest.expect(
o.membership!,
unittest.equals('foo'),
);
checkUnnamed23(o.roles!);
}
buildCounterMembershipRelation--;
}
core.int buildCounterMembershipRole = 0;
api.MembershipRole buildMembershipRole() {
final o = api.MembershipRole();
buildCounterMembershipRole++;
if (buildCounterMembershipRole < 3) {
o.expiryDetail = buildExpiryDetail();
o.name = 'foo';
o.restrictionEvaluations = buildRestrictionEvaluations();
}
buildCounterMembershipRole--;
return o;
}
void checkMembershipRole(api.MembershipRole o) {
buildCounterMembershipRole++;
if (buildCounterMembershipRole < 3) {
checkExpiryDetail(o.expiryDetail!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkRestrictionEvaluations(o.restrictionEvaluations!);
}
buildCounterMembershipRole--;
}
core.int buildCounterMembershipRoleRestrictionEvaluation = 0;
api.MembershipRoleRestrictionEvaluation
buildMembershipRoleRestrictionEvaluation() {
final o = api.MembershipRoleRestrictionEvaluation();
buildCounterMembershipRoleRestrictionEvaluation++;
if (buildCounterMembershipRoleRestrictionEvaluation < 3) {
o.state = 'foo';
}
buildCounterMembershipRoleRestrictionEvaluation--;
return o;
}
void checkMembershipRoleRestrictionEvaluation(
api.MembershipRoleRestrictionEvaluation o) {
buildCounterMembershipRoleRestrictionEvaluation++;
if (buildCounterMembershipRoleRestrictionEvaluation < 3) {
unittest.expect(
o.state!,
unittest.equals('foo'),
);
}
buildCounterMembershipRoleRestrictionEvaluation--;
}
core.List<api.MembershipRole> buildUnnamed24() => [
buildMembershipRole(),
buildMembershipRole(),
];
void checkUnnamed24(core.List<api.MembershipRole> o) {
unittest.expect(o, unittest.hasLength(2));
checkMembershipRole(o[0]);
checkMembershipRole(o[1]);
}
core.List<core.String> buildUnnamed25() => [
'foo',
'foo',
];
void checkUnnamed25(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.List<api.UpdateMembershipRolesParams> buildUnnamed26() => [
buildUpdateMembershipRolesParams(),
buildUpdateMembershipRolesParams(),
];
void checkUnnamed26(core.List<api.UpdateMembershipRolesParams> o) {
unittest.expect(o, unittest.hasLength(2));
checkUpdateMembershipRolesParams(o[0]);
checkUpdateMembershipRolesParams(o[1]);
}
core.int buildCounterModifyMembershipRolesRequest = 0;
api.ModifyMembershipRolesRequest buildModifyMembershipRolesRequest() {
final o = api.ModifyMembershipRolesRequest();
buildCounterModifyMembershipRolesRequest++;
if (buildCounterModifyMembershipRolesRequest < 3) {
o.addRoles = buildUnnamed24();
o.removeRoles = buildUnnamed25();
o.updateRolesParams = buildUnnamed26();
}
buildCounterModifyMembershipRolesRequest--;
return o;
}
void checkModifyMembershipRolesRequest(api.ModifyMembershipRolesRequest o) {
buildCounterModifyMembershipRolesRequest++;
if (buildCounterModifyMembershipRolesRequest < 3) {
checkUnnamed24(o.addRoles!);
checkUnnamed25(o.removeRoles!);
checkUnnamed26(o.updateRolesParams!);
}
buildCounterModifyMembershipRolesRequest--;
}
core.int buildCounterModifyMembershipRolesResponse = 0;
api.ModifyMembershipRolesResponse buildModifyMembershipRolesResponse() {
final o = api.ModifyMembershipRolesResponse();
buildCounterModifyMembershipRolesResponse++;
if (buildCounterModifyMembershipRolesResponse < 3) {
o.membership = buildMembership();
}
buildCounterModifyMembershipRolesResponse--;
return o;
}
void checkModifyMembershipRolesResponse(api.ModifyMembershipRolesResponse o) {
buildCounterModifyMembershipRolesResponse++;
if (buildCounterModifyMembershipRolesResponse < 3) {
checkMembership(o.membership!);
}
buildCounterModifyMembershipRolesResponse--;
}
core.Map<core.String, core.Object?> buildUnnamed27() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed27(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.Map<core.String, core.Object?> buildUnnamed28() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed28(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;
api.Operation buildOperation() {
final o = api.Operation();
buildCounterOperation++;
if (buildCounterOperation < 3) {
o.done = true;
o.error = buildStatus();
o.metadata = buildUnnamed27();
o.name = 'foo';
o.response = buildUnnamed28();
}
buildCounterOperation--;
return o;
}
void checkOperation(api.Operation o) {
buildCounterOperation++;
if (buildCounterOperation < 3) {
unittest.expect(o.done!, unittest.isTrue);
checkStatus(o.error!);
checkUnnamed27(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed28(o.response!);
}
buildCounterOperation--;
}
core.int buildCounterRestrictionEvaluation = 0;
api.RestrictionEvaluation buildRestrictionEvaluation() {
final o = api.RestrictionEvaluation();
buildCounterRestrictionEvaluation++;
if (buildCounterRestrictionEvaluation < 3) {
o.state = 'foo';
}
buildCounterRestrictionEvaluation--;
return o;
}
void checkRestrictionEvaluation(api.RestrictionEvaluation o) {
buildCounterRestrictionEvaluation++;
if (buildCounterRestrictionEvaluation < 3) {
unittest.expect(
o.state!,
unittest.equals('foo'),
);
}
buildCounterRestrictionEvaluation--;
}
core.int buildCounterRestrictionEvaluations = 0;
api.RestrictionEvaluations buildRestrictionEvaluations() {
final o = api.RestrictionEvaluations();
buildCounterRestrictionEvaluations++;
if (buildCounterRestrictionEvaluations < 3) {
o.memberRestrictionEvaluation = buildMembershipRoleRestrictionEvaluation();
}
buildCounterRestrictionEvaluations--;
return o;
}
void checkRestrictionEvaluations(api.RestrictionEvaluations o) {
buildCounterRestrictionEvaluations++;
if (buildCounterRestrictionEvaluations < 3) {
checkMembershipRoleRestrictionEvaluation(o.memberRestrictionEvaluation!);
}
buildCounterRestrictionEvaluations--;
}
core.int buildCounterRsaPublicKeyInfo = 0;
api.RsaPublicKeyInfo buildRsaPublicKeyInfo() {
final o = api.RsaPublicKeyInfo();
buildCounterRsaPublicKeyInfo++;
if (buildCounterRsaPublicKeyInfo < 3) {
o.keySize = 42;
}
buildCounterRsaPublicKeyInfo--;
return o;
}
void checkRsaPublicKeyInfo(api.RsaPublicKeyInfo o) {
buildCounterRsaPublicKeyInfo++;
if (buildCounterRsaPublicKeyInfo < 3) {
unittest.expect(
o.keySize!,
unittest.equals(42),
);
}
buildCounterRsaPublicKeyInfo--;
}
core.int buildCounterSamlIdpConfig = 0;
api.SamlIdpConfig buildSamlIdpConfig() {
final o = api.SamlIdpConfig();
buildCounterSamlIdpConfig++;
if (buildCounterSamlIdpConfig < 3) {
o.changePasswordUri = 'foo';
o.entityId = 'foo';
o.logoutRedirectUri = 'foo';
o.singleSignOnServiceUri = 'foo';
}
buildCounterSamlIdpConfig--;
return o;
}
void checkSamlIdpConfig(api.SamlIdpConfig o) {
buildCounterSamlIdpConfig++;
if (buildCounterSamlIdpConfig < 3) {
unittest.expect(
o.changePasswordUri!,
unittest.equals('foo'),
);
unittest.expect(
o.entityId!,
unittest.equals('foo'),
);
unittest.expect(
o.logoutRedirectUri!,
unittest.equals('foo'),
);
unittest.expect(
o.singleSignOnServiceUri!,
unittest.equals('foo'),
);
}
buildCounterSamlIdpConfig--;
}
core.int buildCounterSamlSpConfig = 0;
api.SamlSpConfig buildSamlSpConfig() {
final o = api.SamlSpConfig();
buildCounterSamlSpConfig++;
if (buildCounterSamlSpConfig < 3) {
o.assertionConsumerServiceUri = 'foo';
o.entityId = 'foo';
}
buildCounterSamlSpConfig--;
return o;
}
void checkSamlSpConfig(api.SamlSpConfig o) {
buildCounterSamlSpConfig++;
if (buildCounterSamlSpConfig < 3) {
unittest.expect(
o.assertionConsumerServiceUri!,
unittest.equals('foo'),
);
unittest.expect(
o.entityId!,
unittest.equals('foo'),
);
}
buildCounterSamlSpConfig--;
}
core.int buildCounterSamlSsoInfo = 0;
api.SamlSsoInfo buildSamlSsoInfo() {
final o = api.SamlSsoInfo();
buildCounterSamlSsoInfo++;
if (buildCounterSamlSsoInfo < 3) {
o.inboundSamlSsoProfile = 'foo';
}
buildCounterSamlSsoInfo--;
return o;
}
void checkSamlSsoInfo(api.SamlSsoInfo o) {
buildCounterSamlSsoInfo++;
if (buildCounterSamlSsoInfo < 3) {
unittest.expect(
o.inboundSamlSsoProfile!,
unittest.equals('foo'),
);
}
buildCounterSamlSsoInfo--;
}
core.List<api.MembershipRelation> buildUnnamed29() => [
buildMembershipRelation(),
buildMembershipRelation(),
];
void checkUnnamed29(core.List<api.MembershipRelation> o) {
unittest.expect(o, unittest.hasLength(2));
checkMembershipRelation(o[0]);
checkMembershipRelation(o[1]);
}
core.int buildCounterSearchDirectGroupsResponse = 0;
api.SearchDirectGroupsResponse buildSearchDirectGroupsResponse() {
final o = api.SearchDirectGroupsResponse();
buildCounterSearchDirectGroupsResponse++;
if (buildCounterSearchDirectGroupsResponse < 3) {
o.memberships = buildUnnamed29();
o.nextPageToken = 'foo';
}
buildCounterSearchDirectGroupsResponse--;
return o;
}
void checkSearchDirectGroupsResponse(api.SearchDirectGroupsResponse o) {
buildCounterSearchDirectGroupsResponse++;
if (buildCounterSearchDirectGroupsResponse < 3) {
checkUnnamed29(o.memberships!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterSearchDirectGroupsResponse--;
}
core.List<api.Group> buildUnnamed30() => [
buildGroup(),
buildGroup(),
];
void checkUnnamed30(core.List<api.Group> o) {
unittest.expect(o, unittest.hasLength(2));
checkGroup(o[0]);
checkGroup(o[1]);
}
core.int buildCounterSearchGroupsResponse = 0;
api.SearchGroupsResponse buildSearchGroupsResponse() {
final o = api.SearchGroupsResponse();
buildCounterSearchGroupsResponse++;
if (buildCounterSearchGroupsResponse < 3) {
o.groups = buildUnnamed30();
o.nextPageToken = 'foo';
}
buildCounterSearchGroupsResponse--;
return o;
}
void checkSearchGroupsResponse(api.SearchGroupsResponse o) {
buildCounterSearchGroupsResponse++;
if (buildCounterSearchGroupsResponse < 3) {
checkUnnamed30(o.groups!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterSearchGroupsResponse--;
}
core.List<api.GroupRelation> buildUnnamed31() => [
buildGroupRelation(),
buildGroupRelation(),
];
void checkUnnamed31(core.List<api.GroupRelation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGroupRelation(o[0]);
checkGroupRelation(o[1]);
}
core.int buildCounterSearchTransitiveGroupsResponse = 0;
api.SearchTransitiveGroupsResponse buildSearchTransitiveGroupsResponse() {
final o = api.SearchTransitiveGroupsResponse();
buildCounterSearchTransitiveGroupsResponse++;
if (buildCounterSearchTransitiveGroupsResponse < 3) {
o.memberships = buildUnnamed31();
o.nextPageToken = 'foo';
}
buildCounterSearchTransitiveGroupsResponse--;
return o;
}
void checkSearchTransitiveGroupsResponse(api.SearchTransitiveGroupsResponse o) {
buildCounterSearchTransitiveGroupsResponse++;
if (buildCounterSearchTransitiveGroupsResponse < 3) {
checkUnnamed31(o.memberships!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterSearchTransitiveGroupsResponse--;
}
core.List<api.MemberRelation> buildUnnamed32() => [
buildMemberRelation(),
buildMemberRelation(),
];
void checkUnnamed32(core.List<api.MemberRelation> o) {
unittest.expect(o, unittest.hasLength(2));
checkMemberRelation(o[0]);
checkMemberRelation(o[1]);
}
core.int buildCounterSearchTransitiveMembershipsResponse = 0;
api.SearchTransitiveMembershipsResponse
buildSearchTransitiveMembershipsResponse() {
final o = api.SearchTransitiveMembershipsResponse();
buildCounterSearchTransitiveMembershipsResponse++;
if (buildCounterSearchTransitiveMembershipsResponse < 3) {
o.memberships = buildUnnamed32();
o.nextPageToken = 'foo';
}
buildCounterSearchTransitiveMembershipsResponse--;
return o;
}
void checkSearchTransitiveMembershipsResponse(
api.SearchTransitiveMembershipsResponse o) {
buildCounterSearchTransitiveMembershipsResponse++;
if (buildCounterSearchTransitiveMembershipsResponse < 3) {
checkUnnamed32(o.memberships!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterSearchTransitiveMembershipsResponse--;
}
core.int buildCounterSecuritySettings = 0;
api.SecuritySettings buildSecuritySettings() {
final o = api.SecuritySettings();
buildCounterSecuritySettings++;
if (buildCounterSecuritySettings < 3) {
o.memberRestriction = buildMemberRestriction();
o.name = 'foo';
}
buildCounterSecuritySettings--;
return o;
}
void checkSecuritySettings(api.SecuritySettings o) {
buildCounterSecuritySettings++;
if (buildCounterSecuritySettings < 3) {
checkMemberRestriction(o.memberRestriction!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterSecuritySettings--;
}
core.int buildCounterSendUserInvitationRequest = 0;
api.SendUserInvitationRequest buildSendUserInvitationRequest() {
final o = api.SendUserInvitationRequest();
buildCounterSendUserInvitationRequest++;
if (buildCounterSendUserInvitationRequest < 3) {}
buildCounterSendUserInvitationRequest--;
return o;
}
void checkSendUserInvitationRequest(api.SendUserInvitationRequest o) {
buildCounterSendUserInvitationRequest++;
if (buildCounterSendUserInvitationRequest < 3) {}
buildCounterSendUserInvitationRequest--;
}
core.int buildCounterSignInBehavior = 0;
api.SignInBehavior buildSignInBehavior() {
final o = api.SignInBehavior();
buildCounterSignInBehavior++;
if (buildCounterSignInBehavior < 3) {
o.redirectCondition = 'foo';
}
buildCounterSignInBehavior--;
return o;
}
void checkSignInBehavior(api.SignInBehavior o) {
buildCounterSignInBehavior++;
if (buildCounterSignInBehavior < 3) {
unittest.expect(
o.redirectCondition!,
unittest.equals('foo'),
);
}
buildCounterSignInBehavior--;
}
core.Map<core.String, core.Object?> buildUnnamed33() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed33(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.List<core.Map<core.String, core.Object?>> buildUnnamed34() => [
buildUnnamed33(),
buildUnnamed33(),
];
void checkUnnamed34(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed33(o[0]);
checkUnnamed33(o[1]);
}
core.int buildCounterStatus = 0;
api.Status buildStatus() {
final o = api.Status();
buildCounterStatus++;
if (buildCounterStatus < 3) {
o.code = 42;
o.details = buildUnnamed34();
o.message = 'foo';
}
buildCounterStatus--;
return o;
}
void checkStatus(api.Status o) {
buildCounterStatus++;
if (buildCounterStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed34(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterStatus--;
}
core.int buildCounterTransitiveMembershipRole = 0;
api.TransitiveMembershipRole buildTransitiveMembershipRole() {
final o = api.TransitiveMembershipRole();
buildCounterTransitiveMembershipRole++;
if (buildCounterTransitiveMembershipRole < 3) {
o.role = 'foo';
}
buildCounterTransitiveMembershipRole--;
return o;
}
void checkTransitiveMembershipRole(api.TransitiveMembershipRole o) {
buildCounterTransitiveMembershipRole++;
if (buildCounterTransitiveMembershipRole < 3) {
unittest.expect(
o.role!,
unittest.equals('foo'),
);
}
buildCounterTransitiveMembershipRole--;
}
core.int buildCounterUpdateMembershipRolesParams = 0;
api.UpdateMembershipRolesParams buildUpdateMembershipRolesParams() {
final o = api.UpdateMembershipRolesParams();
buildCounterUpdateMembershipRolesParams++;
if (buildCounterUpdateMembershipRolesParams < 3) {
o.fieldMask = 'foo';
o.membershipRole = buildMembershipRole();
}
buildCounterUpdateMembershipRolesParams--;
return o;
}
void checkUpdateMembershipRolesParams(api.UpdateMembershipRolesParams o) {
buildCounterUpdateMembershipRolesParams++;
if (buildCounterUpdateMembershipRolesParams < 3) {
unittest.expect(
o.fieldMask!,
unittest.equals('foo'),
);
checkMembershipRole(o.membershipRole!);
}
buildCounterUpdateMembershipRolesParams--;
}
core.int buildCounterUserInvitation = 0;
api.UserInvitation buildUserInvitation() {
final o = api.UserInvitation();
buildCounterUserInvitation++;
if (buildCounterUserInvitation < 3) {
o.mailsSentCount = 'foo';
o.name = 'foo';
o.state = 'foo';
o.updateTime = 'foo';
}
buildCounterUserInvitation--;
return o;
}
void checkUserInvitation(api.UserInvitation o) {
buildCounterUserInvitation++;
if (buildCounterUserInvitation < 3) {
unittest.expect(
o.mailsSentCount!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterUserInvitation--;
}
void main() {
unittest.group('obj-schema-AddIdpCredentialRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddIdpCredentialRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddIdpCredentialRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddIdpCredentialRequest(od);
});
});
unittest.group('obj-schema-CancelUserInvitationRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildCancelUserInvitationRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CancelUserInvitationRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCancelUserInvitationRequest(od);
});
});
unittest.group('obj-schema-CheckTransitiveMembershipResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildCheckTransitiveMembershipResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CheckTransitiveMembershipResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCheckTransitiveMembershipResponse(od);
});
});
unittest.group('obj-schema-DsaPublicKeyInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildDsaPublicKeyInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DsaPublicKeyInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDsaPublicKeyInfo(od);
});
});
unittest.group('obj-schema-DynamicGroupMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildDynamicGroupMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DynamicGroupMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDynamicGroupMetadata(od);
});
});
unittest.group('obj-schema-DynamicGroupQuery', () {
unittest.test('to-json--from-json', () async {
final o = buildDynamicGroupQuery();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DynamicGroupQuery.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDynamicGroupQuery(od);
});
});
unittest.group('obj-schema-DynamicGroupStatus', () {
unittest.test('to-json--from-json', () async {
final o = buildDynamicGroupStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DynamicGroupStatus.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDynamicGroupStatus(od);
});
});
unittest.group('obj-schema-EntityKey', () {
unittest.test('to-json--from-json', () async {
final o = buildEntityKey();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.EntityKey.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkEntityKey(od);
});
});
unittest.group('obj-schema-ExpiryDetail', () {
unittest.test('to-json--from-json', () async {
final o = buildExpiryDetail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ExpiryDetail.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkExpiryDetail(od);
});
});
unittest.group('obj-schema-GoogleAppsCloudidentityDevicesV1AndroidAttributes',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1AndroidAttributes();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAppsCloudidentityDevicesV1AndroidAttributes.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1AndroidAttributes(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest',
() {
unittest.test('to-json--from-json', () async {
final o =
buildGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest
.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest(od);
});
});
unittest.group('obj-schema-GoogleAppsCloudidentityDevicesV1ClientState', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1ClientState();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAppsCloudidentityDevicesV1ClientState.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1ClientState(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1CustomAttributeValue', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1CustomAttributeValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1CustomAttributeValue.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1CustomAttributeValue(od);
});
});
unittest.group('obj-schema-GoogleAppsCloudidentityDevicesV1Device', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1Device();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAppsCloudidentityDevicesV1Device.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1Device(od);
});
});
unittest.group('obj-schema-GoogleAppsCloudidentityDevicesV1DeviceUser', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1DeviceUser();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAppsCloudidentityDevicesV1DeviceUser.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1DeviceUser(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1ListClientStatesResponse',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1ListClientStatesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1ListClientStatesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1ListClientStatesResponse(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1ListDevicesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1ListDevicesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1ListDevicesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1ListDevicesResponse(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse',
() {
unittest.test('to-json--from-json', () async {
final o =
buildGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse
.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse(od);
});
});
unittest.group('obj-schema-GoogleAppsCloudidentityDevicesV1WipeDeviceRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1WipeDeviceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAppsCloudidentityDevicesV1WipeDeviceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1WipeDeviceRequest(od);
});
});
unittest.group(
'obj-schema-GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest(od);
});
});
unittest.group('obj-schema-Group', () {
unittest.test('to-json--from-json', () async {
final o = buildGroup();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Group.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGroup(od);
});
});
unittest.group('obj-schema-GroupRelation', () {
unittest.test('to-json--from-json', () async {
final o = buildGroupRelation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GroupRelation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGroupRelation(od);
});
});
unittest.group('obj-schema-IdpCredential', () {
unittest.test('to-json--from-json', () async {
final o = buildIdpCredential();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IdpCredential.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIdpCredential(od);
});
});
unittest.group('obj-schema-InboundSamlSsoProfile', () {
unittest.test('to-json--from-json', () async {
final o = buildInboundSamlSsoProfile();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InboundSamlSsoProfile.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInboundSamlSsoProfile(od);
});
});
unittest.group('obj-schema-InboundSsoAssignment', () {
unittest.test('to-json--from-json', () async {
final o = buildInboundSsoAssignment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InboundSsoAssignment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInboundSsoAssignment(od);
});
});
unittest.group('obj-schema-IsInvitableUserResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildIsInvitableUserResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IsInvitableUserResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIsInvitableUserResponse(od);
});
});
unittest.group('obj-schema-ListGroupsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListGroupsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListGroupsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListGroupsResponse(od);
});
});
unittest.group('obj-schema-ListIdpCredentialsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListIdpCredentialsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListIdpCredentialsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListIdpCredentialsResponse(od);
});
});
unittest.group('obj-schema-ListInboundSamlSsoProfilesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListInboundSamlSsoProfilesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListInboundSamlSsoProfilesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListInboundSamlSsoProfilesResponse(od);
});
});
unittest.group('obj-schema-ListInboundSsoAssignmentsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListInboundSsoAssignmentsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListInboundSsoAssignmentsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListInboundSsoAssignmentsResponse(od);
});
});
unittest.group('obj-schema-ListMembershipsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListMembershipsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListMembershipsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListMembershipsResponse(od);
});
});
unittest.group('obj-schema-ListUserInvitationsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListUserInvitationsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListUserInvitationsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListUserInvitationsResponse(od);
});
});
unittest.group('obj-schema-LookupGroupNameResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildLookupGroupNameResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LookupGroupNameResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLookupGroupNameResponse(od);
});
});
unittest.group('obj-schema-LookupMembershipNameResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildLookupMembershipNameResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LookupMembershipNameResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLookupMembershipNameResponse(od);
});
});
unittest.group('obj-schema-MemberRelation', () {
unittest.test('to-json--from-json', () async {
final o = buildMemberRelation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MemberRelation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMemberRelation(od);
});
});
unittest.group('obj-schema-MemberRestriction', () {
unittest.test('to-json--from-json', () async {
final o = buildMemberRestriction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MemberRestriction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMemberRestriction(od);
});
});
unittest.group('obj-schema-Membership', () {
unittest.test('to-json--from-json', () async {
final o = buildMembership();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Membership.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkMembership(od);
});
});
unittest.group('obj-schema-MembershipRelation', () {
unittest.test('to-json--from-json', () async {
final o = buildMembershipRelation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MembershipRelation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMembershipRelation(od);
});
});
unittest.group('obj-schema-MembershipRole', () {
unittest.test('to-json--from-json', () async {
final o = buildMembershipRole();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MembershipRole.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMembershipRole(od);
});
});
unittest.group('obj-schema-MembershipRoleRestrictionEvaluation', () {
unittest.test('to-json--from-json', () async {
final o = buildMembershipRoleRestrictionEvaluation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MembershipRoleRestrictionEvaluation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMembershipRoleRestrictionEvaluation(od);
});
});
unittest.group('obj-schema-ModifyMembershipRolesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildModifyMembershipRolesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ModifyMembershipRolesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkModifyMembershipRolesRequest(od);
});
});
unittest.group('obj-schema-ModifyMembershipRolesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildModifyMembershipRolesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ModifyMembershipRolesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkModifyMembershipRolesResponse(od);
});
});
unittest.group('obj-schema-Operation', () {
unittest.test('to-json--from-json', () async {
final o = buildOperation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Operation.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkOperation(od);
});
});
unittest.group('obj-schema-RestrictionEvaluation', () {
unittest.test('to-json--from-json', () async {
final o = buildRestrictionEvaluation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RestrictionEvaluation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRestrictionEvaluation(od);
});
});
unittest.group('obj-schema-RestrictionEvaluations', () {
unittest.test('to-json--from-json', () async {
final o = buildRestrictionEvaluations();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RestrictionEvaluations.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRestrictionEvaluations(od);
});
});
unittest.group('obj-schema-RsaPublicKeyInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildRsaPublicKeyInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RsaPublicKeyInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRsaPublicKeyInfo(od);
});
});
unittest.group('obj-schema-SamlIdpConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildSamlIdpConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SamlIdpConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSamlIdpConfig(od);
});
});
unittest.group('obj-schema-SamlSpConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildSamlSpConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SamlSpConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSamlSpConfig(od);
});
});
unittest.group('obj-schema-SamlSsoInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildSamlSsoInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SamlSsoInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSamlSsoInfo(od);
});
});
unittest.group('obj-schema-SearchDirectGroupsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSearchDirectGroupsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SearchDirectGroupsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSearchDirectGroupsResponse(od);
});
});
unittest.group('obj-schema-SearchGroupsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSearchGroupsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SearchGroupsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSearchGroupsResponse(od);
});
});
unittest.group('obj-schema-SearchTransitiveGroupsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSearchTransitiveGroupsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SearchTransitiveGroupsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSearchTransitiveGroupsResponse(od);
});
});
unittest.group('obj-schema-SearchTransitiveMembershipsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSearchTransitiveMembershipsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SearchTransitiveMembershipsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSearchTransitiveMembershipsResponse(od);
});
});
unittest.group('obj-schema-SecuritySettings', () {
unittest.test('to-json--from-json', () async {
final o = buildSecuritySettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SecuritySettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSecuritySettings(od);
});
});
unittest.group('obj-schema-SendUserInvitationRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSendUserInvitationRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SendUserInvitationRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSendUserInvitationRequest(od);
});
});
unittest.group('obj-schema-SignInBehavior', () {
unittest.test('to-json--from-json', () async {
final o = buildSignInBehavior();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SignInBehavior.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSignInBehavior(od);
});
});
unittest.group('obj-schema-Status', () {
unittest.test('to-json--from-json', () async {
final o = buildStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Status.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStatus(od);
});
});
unittest.group('obj-schema-TransitiveMembershipRole', () {
unittest.test('to-json--from-json', () async {
final o = buildTransitiveMembershipRole();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TransitiveMembershipRole.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTransitiveMembershipRole(od);
});
});
unittest.group('obj-schema-UpdateMembershipRolesParams', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateMembershipRolesParams();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateMembershipRolesParams.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateMembershipRolesParams(od);
});
});
unittest.group('obj-schema-UserInvitation', () {
unittest.test('to-json--from-json', () async {
final o = buildUserInvitation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UserInvitation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUserInvitation(od);
});
});
unittest.group('resource-CustomersUserinvitationsResource', () {
unittest.test('method--cancel', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).customers.userinvitations;
final arg_request = buildCancelUserInvitationRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CancelUserInvitationRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCancelUserInvitationRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.cancel(arg_request, arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).customers.userinvitations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildUserInvitation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkUserInvitation(response as api.UserInvitation);
});
unittest.test('method--isInvitableUser', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).customers.userinvitations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildIsInvitableUserResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.isInvitableUser(arg_name, $fields: arg_$fields);
checkIsInvitableUserResponse(response as api.IsInvitableUserResponse);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).customers.userinvitations;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListUserInvitationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListUserInvitationsResponse(
response as api.ListUserInvitationsResponse);
});
unittest.test('method--send', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).customers.userinvitations;
final arg_request = buildSendUserInvitationRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SendUserInvitationRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSendUserInvitationRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.send(arg_request, arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-DevicesResource', () {
unittest.test('method--cancelWipe', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices;
final arg_request =
buildGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest
.fromJson(json as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.cancelWipe(arg_request, arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices;
final arg_request = buildGoogleAppsCloudidentityDevicesV1Device();
final arg_customer = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleAppsCloudidentityDevicesV1Device.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1Device(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('v1/devices'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request,
customer: arg_customer, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices;
final arg_name = 'foo';
final arg_customer = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
customer: arg_customer, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices;
final arg_name = 'foo';
final arg_customer = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleAppsCloudidentityDevicesV1Device());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_name, customer: arg_customer, $fields: arg_$fields);
checkGoogleAppsCloudidentityDevicesV1Device(
response as api.GoogleAppsCloudidentityDevicesV1Device);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices;
final arg_customer = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('v1/devices'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['filter']!.first,
unittest.equals(arg_filter),
);
unittest.expect(
queryMap['orderBy']!.first,
unittest.equals(arg_orderBy),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildGoogleAppsCloudidentityDevicesV1ListDevicesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
customer: arg_customer,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
view: arg_view,
$fields: arg_$fields);
checkGoogleAppsCloudidentityDevicesV1ListDevicesResponse(
response as api.GoogleAppsCloudidentityDevicesV1ListDevicesResponse);
});
unittest.test('method--wipe', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices;
final arg_request =
buildGoogleAppsCloudidentityDevicesV1WipeDeviceRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.GoogleAppsCloudidentityDevicesV1WipeDeviceRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1WipeDeviceRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.wipe(arg_request, arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-DevicesDeviceUsersResource', () {
unittest.test('method--approve', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers;
final arg_request =
buildGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest
.fromJson(json as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.approve(arg_request, arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--block', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers;
final arg_request =
buildGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.block(arg_request, arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--cancelWipe', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers;
final arg_request =
buildGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest
.fromJson(json as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.cancelWipe(arg_request, arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers;
final arg_name = 'foo';
final arg_customer = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
customer: arg_customer, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers;
final arg_name = 'foo';
final arg_customer = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildGoogleAppsCloudidentityDevicesV1DeviceUser());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_name, customer: arg_customer, $fields: arg_$fields);
checkGoogleAppsCloudidentityDevicesV1DeviceUser(
response as api.GoogleAppsCloudidentityDevicesV1DeviceUser);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers;
final arg_parent = 'foo';
final arg_customer = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['filter']!.first,
unittest.equals(arg_filter),
);
unittest.expect(
queryMap['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(
buildGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
customer: arg_customer,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse(response
as api.GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse);
});
unittest.test('method--lookup', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers;
final arg_parent = 'foo';
final arg_androidId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_rawResourceId = 'foo';
final arg_userId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['androidId']!.first,
unittest.equals(arg_androidId),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['rawResourceId']!.first,
unittest.equals(arg_rawResourceId),
);
unittest.expect(
queryMap['userId']!.first,
unittest.equals(arg_userId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(
buildGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.lookup(arg_parent,
androidId: arg_androidId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
rawResourceId: arg_rawResourceId,
userId: arg_userId,
$fields: arg_$fields);
checkGoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse(
response as api
.GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse);
});
unittest.test('method--wipe', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers;
final arg_request =
buildGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.wipe(arg_request, arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-DevicesDeviceUsersClientStatesResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers.clientStates;
final arg_name = 'foo';
final arg_customer = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildGoogleAppsCloudidentityDevicesV1ClientState());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_name, customer: arg_customer, $fields: arg_$fields);
checkGoogleAppsCloudidentityDevicesV1ClientState(
response as api.GoogleAppsCloudidentityDevicesV1ClientState);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers.clientStates;
final arg_parent = 'foo';
final arg_customer = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['filter']!.first,
unittest.equals(arg_filter),
);
unittest.expect(
queryMap['orderBy']!.first,
unittest.equals(arg_orderBy),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(
buildGoogleAppsCloudidentityDevicesV1ListClientStatesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
customer: arg_customer,
filter: arg_filter,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleAppsCloudidentityDevicesV1ListClientStatesResponse(response
as api.GoogleAppsCloudidentityDevicesV1ListClientStatesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).devices.deviceUsers.clientStates;
final arg_request = buildGoogleAppsCloudidentityDevicesV1ClientState();
final arg_name = 'foo';
final arg_customer = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleAppsCloudidentityDevicesV1ClientState.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleAppsCloudidentityDevicesV1ClientState(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['customer']!.first,
unittest.equals(arg_customer),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
customer: arg_customer,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-GroupsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_request = buildGroup();
final arg_initialGroupConfig = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Group.fromJson(json as core.Map<core.String, core.dynamic>);
checkGroup(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('v1/groups'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['initialGroupConfig']!.first,
unittest.equals(arg_initialGroupConfig),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request,
initialGroupConfig: arg_initialGroupConfig, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGroup());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGroup(response as api.Group);
});
unittest.test('method--getSecuritySettings', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_name = 'foo';
final arg_readMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['readMask']!.first,
unittest.equals(arg_readMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSecuritySettings());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getSecuritySettings(arg_name,
readMask: arg_readMask, $fields: arg_$fields);
checkSecuritySettings(response as api.SecuritySettings);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_parent = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('v1/groups'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['parent']!.first,
unittest.equals(arg_parent),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListGroupsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
pageSize: arg_pageSize,
pageToken: arg_pageToken,
parent: arg_parent,
view: arg_view,
$fields: arg_$fields);
checkListGroupsResponse(response as api.ListGroupsResponse);
});
unittest.test('method--lookup', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_groupKey_id = 'foo';
final arg_groupKey_namespace = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v1/groups:lookup'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['groupKey.id']!.first,
unittest.equals(arg_groupKey_id),
);
unittest.expect(
queryMap['groupKey.namespace']!.first,
unittest.equals(arg_groupKey_namespace),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLookupGroupNameResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.lookup(
groupKey_id: arg_groupKey_id,
groupKey_namespace: arg_groupKey_namespace,
$fields: arg_$fields);
checkLookupGroupNameResponse(response as api.LookupGroupNameResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_request = buildGroup();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Group.fromJson(json as core.Map<core.String, core.dynamic>);
checkGroup(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--search', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_query = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v1/groups:search'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['query']!.first,
unittest.equals(arg_query),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSearchGroupsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.search(
pageSize: arg_pageSize,
pageToken: arg_pageToken,
query: arg_query,
view: arg_view,
$fields: arg_$fields);
checkSearchGroupsResponse(response as api.SearchGroupsResponse);
});
unittest.test('method--updateSecuritySettings', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups;
final arg_request = buildSecuritySettings();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SecuritySettings.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSecuritySettings(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.updateSecuritySettings(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-GroupsMembershipsResource', () {
unittest.test('method--checkTransitiveMembership', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_parent = 'foo';
final arg_query = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['query']!.first,
unittest.equals(arg_query),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildCheckTransitiveMembershipResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.checkTransitiveMembership(arg_parent,
query: arg_query, $fields: arg_$fields);
checkCheckTransitiveMembershipResponse(
response as api.CheckTransitiveMembershipResponse);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_request = buildMembership();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.Membership.fromJson(
json as core.Map<core.String, core.dynamic>);
checkMembership(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.create(arg_request, arg_parent, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildMembership());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkMembership(response as api.Membership);
});
unittest.test('method--getMembershipGraph', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_parent = 'foo';
final arg_query = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['query']!.first,
unittest.equals(arg_query),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getMembershipGraph(arg_parent,
query: arg_query, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListMembershipsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
view: arg_view,
$fields: arg_$fields);
checkListMembershipsResponse(response as api.ListMembershipsResponse);
});
unittest.test('method--lookup', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_parent = 'foo';
final arg_memberKey_id = 'foo';
final arg_memberKey_namespace = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['memberKey.id']!.first,
unittest.equals(arg_memberKey_id),
);
unittest.expect(
queryMap['memberKey.namespace']!.first,
unittest.equals(arg_memberKey_namespace),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLookupMembershipNameResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.lookup(arg_parent,
memberKey_id: arg_memberKey_id,
memberKey_namespace: arg_memberKey_namespace,
$fields: arg_$fields);
checkLookupMembershipNameResponse(
response as api.LookupMembershipNameResponse);
});
unittest.test('method--modifyMembershipRoles', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_request = buildModifyMembershipRolesRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ModifyMembershipRolesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkModifyMembershipRolesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildModifyMembershipRolesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.modifyMembershipRoles(arg_request, arg_name,
$fields: arg_$fields);
checkModifyMembershipRolesResponse(
response as api.ModifyMembershipRolesResponse);
});
unittest.test('method--searchDirectGroups', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_parent = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_query = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['orderBy']!.first,
unittest.equals(arg_orderBy),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['query']!.first,
unittest.equals(arg_query),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSearchDirectGroupsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.searchDirectGroups(arg_parent,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
query: arg_query,
$fields: arg_$fields);
checkSearchDirectGroupsResponse(
response as api.SearchDirectGroupsResponse);
});
unittest.test('method--searchTransitiveGroups', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_query = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['query']!.first,
unittest.equals(arg_query),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSearchTransitiveGroupsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.searchTransitiveGroups(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
query: arg_query,
$fields: arg_$fields);
checkSearchTransitiveGroupsResponse(
response as api.SearchTransitiveGroupsResponse);
});
unittest.test('method--searchTransitiveMemberships', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).groups.memberships;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildSearchTransitiveMembershipsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.searchTransitiveMemberships(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkSearchTransitiveMembershipsResponse(
response as api.SearchTransitiveMembershipsResponse);
});
});
unittest.group('resource-InboundSamlSsoProfilesResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSamlSsoProfiles;
final arg_request = buildInboundSamlSsoProfile();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.InboundSamlSsoProfile.fromJson(
json as core.Map<core.String, core.dynamic>);
checkInboundSamlSsoProfile(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 25),
unittest.equals('v1/inboundSamlSsoProfiles'),
);
pathOffset += 25;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSamlSsoProfiles;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSamlSsoProfiles;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildInboundSamlSsoProfile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkInboundSamlSsoProfile(response as api.InboundSamlSsoProfile);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSamlSsoProfiles;
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 25),
unittest.equals('v1/inboundSamlSsoProfiles'),
);
pathOffset += 25;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildListInboundSamlSsoProfilesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListInboundSamlSsoProfilesResponse(
response as api.ListInboundSamlSsoProfilesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSamlSsoProfiles;
final arg_request = buildInboundSamlSsoProfile();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.InboundSamlSsoProfile.fromJson(
json as core.Map<core.String, core.dynamic>);
checkInboundSamlSsoProfile(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-InboundSamlSsoProfilesIdpCredentialsResource', () {
unittest.test('method--add', () async {
final mock = HttpServerMock();
final res =
api.CloudIdentityApi(mock).inboundSamlSsoProfiles.idpCredentials;
final arg_request = buildAddIdpCredentialRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.AddIdpCredentialRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkAddIdpCredentialRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.add(arg_request, arg_parent, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res =
api.CloudIdentityApi(mock).inboundSamlSsoProfiles.idpCredentials;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.CloudIdentityApi(mock).inboundSamlSsoProfiles.idpCredentials;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildIdpCredential());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkIdpCredential(response as api.IdpCredential);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.CloudIdentityApi(mock).inboundSamlSsoProfiles.idpCredentials;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListIdpCredentialsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListIdpCredentialsResponse(
response as api.ListIdpCredentialsResponse);
});
});
unittest.group('resource-InboundSsoAssignmentsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSsoAssignments;
final arg_request = buildInboundSsoAssignment();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.InboundSsoAssignment.fromJson(
json as core.Map<core.String, core.dynamic>);
checkInboundSsoAssignment(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 24),
unittest.equals('v1/inboundSsoAssignments'),
);
pathOffset += 24;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSsoAssignments;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSsoAssignments;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildInboundSsoAssignment());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkInboundSsoAssignment(response as api.InboundSsoAssignment);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSsoAssignments;
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 24),
unittest.equals('v1/inboundSsoAssignments'),
);
pathOffset += 24;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildListInboundSsoAssignmentsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListInboundSsoAssignmentsResponse(
response as api.ListInboundSsoAssignmentsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.CloudIdentityApi(mock).inboundSsoAssignments;
final arg_request = buildInboundSsoAssignment();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.InboundSsoAssignment.fromJson(
json as core.Map<core.String, core.dynamic>);
checkInboundSsoAssignment(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
}
| googleapis.dart/generated/googleapis/test/cloudidentity/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/cloudidentity/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 95451} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/dfareporting/v3_5.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterClickTag = 0;
api.ClickTag buildClickTag() {
final o = api.ClickTag();
buildCounterClickTag++;
if (buildCounterClickTag < 3) {
o.clickThroughUrl = buildCreativeClickThroughUrl();
o.eventName = 'foo';
o.name = 'foo';
}
buildCounterClickTag--;
return o;
}
void checkClickTag(api.ClickTag o) {
buildCounterClickTag++;
if (buildCounterClickTag < 3) {
checkCreativeClickThroughUrl(o.clickThroughUrl!);
unittest.expect(
o.eventName!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterClickTag--;
}
core.int buildCounterCreativeAssetId = 0;
api.CreativeAssetId buildCreativeAssetId() {
final o = api.CreativeAssetId();
buildCounterCreativeAssetId++;
if (buildCounterCreativeAssetId < 3) {
o.name = 'foo';
o.type = 'foo';
}
buildCounterCreativeAssetId--;
return o;
}
void checkCreativeAssetId(api.CreativeAssetId o) {
buildCounterCreativeAssetId++;
if (buildCounterCreativeAssetId < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterCreativeAssetId--;
}
core.List<api.ClickTag> buildUnnamed0() => [
buildClickTag(),
buildClickTag(),
];
void checkUnnamed0(core.List<api.ClickTag> o) {
unittest.expect(o, unittest.hasLength(2));
checkClickTag(o[0]);
checkClickTag(o[1]);
}
core.List<api.CreativeCustomEvent> buildUnnamed1() => [
buildCreativeCustomEvent(),
buildCreativeCustomEvent(),
];
void checkUnnamed1(core.List<api.CreativeCustomEvent> o) {
unittest.expect(o, unittest.hasLength(2));
checkCreativeCustomEvent(o[0]);
checkCreativeCustomEvent(o[1]);
}
core.List<core.String> buildUnnamed2() => [
'foo',
'foo',
];
void checkUnnamed2(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.List<api.CreativeCustomEvent> buildUnnamed3() => [
buildCreativeCustomEvent(),
buildCreativeCustomEvent(),
];
void checkUnnamed3(core.List<api.CreativeCustomEvent> o) {
unittest.expect(o, unittest.hasLength(2));
checkCreativeCustomEvent(o[0]);
checkCreativeCustomEvent(o[1]);
}
core.List<api.CreativeCustomEvent> buildUnnamed4() => [
buildCreativeCustomEvent(),
buildCreativeCustomEvent(),
];
void checkUnnamed4(core.List<api.CreativeCustomEvent> o) {
unittest.expect(o, unittest.hasLength(2));
checkCreativeCustomEvent(o[0]);
checkCreativeCustomEvent(o[1]);
}
core.List<core.String> buildUnnamed5() => [
'foo',
'foo',
];
void checkUnnamed5(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 buildCounterCreativeAssetMetadata = 0;
api.CreativeAssetMetadata buildCreativeAssetMetadata() {
final o = api.CreativeAssetMetadata();
buildCounterCreativeAssetMetadata++;
if (buildCounterCreativeAssetMetadata < 3) {
o.assetIdentifier = buildCreativeAssetId();
o.clickTags = buildUnnamed0();
o.counterCustomEvents = buildUnnamed1();
o.detectedFeatures = buildUnnamed2();
o.exitCustomEvents = buildUnnamed3();
o.id = 'foo';
o.idDimensionValue = buildDimensionValue();
o.kind = 'foo';
o.mediaRequestInfo = buildMediaRequestInfo();
o.mediaResponseInfo = buildMediaResponseInfo();
o.richMedia = true;
o.timerCustomEvents = buildUnnamed4();
o.warnedValidationRules = buildUnnamed5();
}
buildCounterCreativeAssetMetadata--;
return o;
}
void checkCreativeAssetMetadata(api.CreativeAssetMetadata o) {
buildCounterCreativeAssetMetadata++;
if (buildCounterCreativeAssetMetadata < 3) {
checkCreativeAssetId(o.assetIdentifier!);
checkUnnamed0(o.clickTags!);
checkUnnamed1(o.counterCustomEvents!);
checkUnnamed2(o.detectedFeatures!);
checkUnnamed3(o.exitCustomEvents!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkDimensionValue(o.idDimensionValue!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
checkMediaRequestInfo(o.mediaRequestInfo!);
checkMediaResponseInfo(o.mediaResponseInfo!);
unittest.expect(o.richMedia!, unittest.isTrue);
checkUnnamed4(o.timerCustomEvents!);
checkUnnamed5(o.warnedValidationRules!);
}
buildCounterCreativeAssetMetadata--;
}
core.int buildCounterCreativeClickThroughUrl = 0;
api.CreativeClickThroughUrl buildCreativeClickThroughUrl() {
final o = api.CreativeClickThroughUrl();
buildCounterCreativeClickThroughUrl++;
if (buildCounterCreativeClickThroughUrl < 3) {
o.computedClickThroughUrl = 'foo';
o.customClickThroughUrl = 'foo';
o.landingPageId = 'foo';
}
buildCounterCreativeClickThroughUrl--;
return o;
}
void checkCreativeClickThroughUrl(api.CreativeClickThroughUrl o) {
buildCounterCreativeClickThroughUrl++;
if (buildCounterCreativeClickThroughUrl < 3) {
unittest.expect(
o.computedClickThroughUrl!,
unittest.equals('foo'),
);
unittest.expect(
o.customClickThroughUrl!,
unittest.equals('foo'),
);
unittest.expect(
o.landingPageId!,
unittest.equals('foo'),
);
}
buildCounterCreativeClickThroughUrl--;
}
core.int buildCounterCreativeCustomEvent = 0;
api.CreativeCustomEvent buildCreativeCustomEvent() {
final o = api.CreativeCustomEvent();
buildCounterCreativeCustomEvent++;
if (buildCounterCreativeCustomEvent < 3) {
o.advertiserCustomEventId = 'foo';
o.advertiserCustomEventName = 'foo';
o.advertiserCustomEventType = 'foo';
o.artworkLabel = 'foo';
o.artworkType = 'foo';
o.exitClickThroughUrl = buildCreativeClickThroughUrl();
o.id = 'foo';
o.popupWindowProperties = buildPopupWindowProperties();
o.targetType = 'foo';
o.videoReportingId = 'foo';
}
buildCounterCreativeCustomEvent--;
return o;
}
void checkCreativeCustomEvent(api.CreativeCustomEvent o) {
buildCounterCreativeCustomEvent++;
if (buildCounterCreativeCustomEvent < 3) {
unittest.expect(
o.advertiserCustomEventId!,
unittest.equals('foo'),
);
unittest.expect(
o.advertiserCustomEventName!,
unittest.equals('foo'),
);
unittest.expect(
o.advertiserCustomEventType!,
unittest.equals('foo'),
);
unittest.expect(
o.artworkLabel!,
unittest.equals('foo'),
);
unittest.expect(
o.artworkType!,
unittest.equals('foo'),
);
checkCreativeClickThroughUrl(o.exitClickThroughUrl!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkPopupWindowProperties(o.popupWindowProperties!);
unittest.expect(
o.targetType!,
unittest.equals('foo'),
);
unittest.expect(
o.videoReportingId!,
unittest.equals('foo'),
);
}
buildCounterCreativeCustomEvent--;
}
core.int buildCounterDimensionValue = 0;
api.DimensionValue buildDimensionValue() {
final o = api.DimensionValue();
buildCounterDimensionValue++;
if (buildCounterDimensionValue < 3) {
o.dimensionName = 'foo';
o.etag = 'foo';
o.id = 'foo';
o.kind = 'foo';
o.matchType = 'foo';
o.value = 'foo';
}
buildCounterDimensionValue--;
return o;
}
void checkDimensionValue(api.DimensionValue o) {
buildCounterDimensionValue++;
if (buildCounterDimensionValue < 3) {
unittest.expect(
o.dimensionName!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.matchType!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterDimensionValue--;
}
core.int buildCounterMediaRequestInfo = 0;
api.MediaRequestInfo buildMediaRequestInfo() {
final o = api.MediaRequestInfo();
buildCounterMediaRequestInfo++;
if (buildCounterMediaRequestInfo < 3) {
o.currentBytes = 'foo';
o.customData = 'foo';
o.diffObjectVersion = 'foo';
o.finalStatus = 42;
o.notificationType = 'foo';
o.requestId = 'foo';
o.requestReceivedParamsServingInfo = 'foo';
o.totalBytes = 'foo';
o.totalBytesIsEstimated = true;
}
buildCounterMediaRequestInfo--;
return o;
}
void checkMediaRequestInfo(api.MediaRequestInfo o) {
buildCounterMediaRequestInfo++;
if (buildCounterMediaRequestInfo < 3) {
unittest.expect(
o.currentBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.customData!,
unittest.equals('foo'),
);
unittest.expect(
o.diffObjectVersion!,
unittest.equals('foo'),
);
unittest.expect(
o.finalStatus!,
unittest.equals(42),
);
unittest.expect(
o.notificationType!,
unittest.equals('foo'),
);
unittest.expect(
o.requestId!,
unittest.equals('foo'),
);
unittest.expect(
o.requestReceivedParamsServingInfo!,
unittest.equals('foo'),
);
unittest.expect(
o.totalBytes!,
unittest.equals('foo'),
);
unittest.expect(o.totalBytesIsEstimated!, unittest.isTrue);
}
buildCounterMediaRequestInfo--;
}
core.int buildCounterMediaResponseInfo = 0;
api.MediaResponseInfo buildMediaResponseInfo() {
final o = api.MediaResponseInfo();
buildCounterMediaResponseInfo++;
if (buildCounterMediaResponseInfo < 3) {
o.customData = 'foo';
o.dataStorageTransform = 'foo';
o.dynamicDropTarget = 'foo';
o.dynamicDropzone = 'foo';
o.requestClass = 'foo';
o.scottyAgentUserId = 'foo';
o.scottyCustomerLog = 'foo';
o.trafficClassField = 'foo';
o.verifyHashFromHeader = true;
}
buildCounterMediaResponseInfo--;
return o;
}
void checkMediaResponseInfo(api.MediaResponseInfo o) {
buildCounterMediaResponseInfo++;
if (buildCounterMediaResponseInfo < 3) {
unittest.expect(
o.customData!,
unittest.equals('foo'),
);
unittest.expect(
o.dataStorageTransform!,
unittest.equals('foo'),
);
unittest.expect(
o.dynamicDropTarget!,
unittest.equals('foo'),
);
unittest.expect(
o.dynamicDropzone!,
unittest.equals('foo'),
);
unittest.expect(
o.requestClass!,
unittest.equals('foo'),
);
unittest.expect(
o.scottyAgentUserId!,
unittest.equals('foo'),
);
unittest.expect(
o.scottyCustomerLog!,
unittest.equals('foo'),
);
unittest.expect(
o.trafficClassField!,
unittest.equals('foo'),
);
unittest.expect(o.verifyHashFromHeader!, unittest.isTrue);
}
buildCounterMediaResponseInfo--;
}
core.int buildCounterOffsetPosition = 0;
api.OffsetPosition buildOffsetPosition() {
final o = api.OffsetPosition();
buildCounterOffsetPosition++;
if (buildCounterOffsetPosition < 3) {
o.left = 42;
o.top = 42;
}
buildCounterOffsetPosition--;
return o;
}
void checkOffsetPosition(api.OffsetPosition o) {
buildCounterOffsetPosition++;
if (buildCounterOffsetPosition < 3) {
unittest.expect(
o.left!,
unittest.equals(42),
);
unittest.expect(
o.top!,
unittest.equals(42),
);
}
buildCounterOffsetPosition--;
}
core.int buildCounterPopupWindowProperties = 0;
api.PopupWindowProperties buildPopupWindowProperties() {
final o = api.PopupWindowProperties();
buildCounterPopupWindowProperties++;
if (buildCounterPopupWindowProperties < 3) {
o.dimension = buildSize();
o.offset = buildOffsetPosition();
o.positionType = 'foo';
o.showAddressBar = true;
o.showMenuBar = true;
o.showScrollBar = true;
o.showStatusBar = true;
o.showToolBar = true;
o.title = 'foo';
}
buildCounterPopupWindowProperties--;
return o;
}
void checkPopupWindowProperties(api.PopupWindowProperties o) {
buildCounterPopupWindowProperties++;
if (buildCounterPopupWindowProperties < 3) {
checkSize(o.dimension!);
checkOffsetPosition(o.offset!);
unittest.expect(
o.positionType!,
unittest.equals('foo'),
);
unittest.expect(o.showAddressBar!, unittest.isTrue);
unittest.expect(o.showMenuBar!, unittest.isTrue);
unittest.expect(o.showScrollBar!, unittest.isTrue);
unittest.expect(o.showStatusBar!, unittest.isTrue);
unittest.expect(o.showToolBar!, unittest.isTrue);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
}
buildCounterPopupWindowProperties--;
}
core.int buildCounterSize = 0;
api.Size buildSize() {
final o = api.Size();
buildCounterSize++;
if (buildCounterSize < 3) {
o.height = 42;
o.iab = true;
o.id = 'foo';
o.kind = 'foo';
o.width = 42;
}
buildCounterSize--;
return o;
}
void checkSize(api.Size o) {
buildCounterSize++;
if (buildCounterSize < 3) {
unittest.expect(
o.height!,
unittest.equals(42),
);
unittest.expect(o.iab!, unittest.isTrue);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.width!,
unittest.equals(42),
);
}
buildCounterSize--;
}
void main() {
unittest.group('obj-schema-ClickTag', () {
unittest.test('to-json--from-json', () async {
final o = buildClickTag();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ClickTag.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkClickTag(od);
});
});
unittest.group('obj-schema-CreativeAssetId', () {
unittest.test('to-json--from-json', () async {
final o = buildCreativeAssetId();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CreativeAssetId.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCreativeAssetId(od);
});
});
unittest.group('obj-schema-CreativeAssetMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildCreativeAssetMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CreativeAssetMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCreativeAssetMetadata(od);
});
});
unittest.group('obj-schema-CreativeClickThroughUrl', () {
unittest.test('to-json--from-json', () async {
final o = buildCreativeClickThroughUrl();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CreativeClickThroughUrl.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCreativeClickThroughUrl(od);
});
});
unittest.group('obj-schema-CreativeCustomEvent', () {
unittest.test('to-json--from-json', () async {
final o = buildCreativeCustomEvent();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CreativeCustomEvent.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCreativeCustomEvent(od);
});
});
unittest.group('obj-schema-DimensionValue', () {
unittest.test('to-json--from-json', () async {
final o = buildDimensionValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DimensionValue.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDimensionValue(od);
});
});
unittest.group('obj-schema-MediaRequestInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildMediaRequestInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MediaRequestInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMediaRequestInfo(od);
});
});
unittest.group('obj-schema-MediaResponseInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildMediaResponseInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MediaResponseInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMediaResponseInfo(od);
});
});
unittest.group('obj-schema-OffsetPosition', () {
unittest.test('to-json--from-json', () async {
final o = buildOffsetPosition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.OffsetPosition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkOffsetPosition(od);
});
});
unittest.group('obj-schema-PopupWindowProperties', () {
unittest.test('to-json--from-json', () async {
final o = buildPopupWindowProperties();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PopupWindowProperties.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPopupWindowProperties(od);
});
});
unittest.group('obj-schema-Size', () {
unittest.test('to-json--from-json', () async {
final o = buildSize();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Size.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSize(od);
});
});
unittest.group('resource-MediaResource', () {
unittest.test('method--upload', () async {
// TODO: Implement tests for media upload;
// TODO: Implement tests for media download;
final mock = HttpServerMock();
final res = api.DfareportingApi(mock).media;
final arg_request = buildCreativeAssetMetadata();
final arg_profileId = 'foo';
final arg_advertiserId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CreativeAssetMetadata.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCreativeAssetMetadata(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 18),
unittest.equals('dfareporting/v3.5/'),
);
pathOffset += 18;
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('userprofiles/'),
);
pathOffset += 13;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildCreativeAssetMetadata());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.upload(
arg_request, arg_profileId, arg_advertiserId,
$fields: arg_$fields);
checkCreativeAssetMetadata(response as api.CreativeAssetMetadata);
});
});
}
| googleapis.dart/generated/googleapis/test/dfareporting/v3_5_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/dfareporting/v3_5_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 8722} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/drive/v2.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.List<core.String> buildUnnamed0() => [
'foo',
'foo',
];
void checkUnnamed0(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 buildCounterAboutAdditionalRoleInfoRoleSets = 0;
api.AboutAdditionalRoleInfoRoleSets buildAboutAdditionalRoleInfoRoleSets() {
final o = api.AboutAdditionalRoleInfoRoleSets();
buildCounterAboutAdditionalRoleInfoRoleSets++;
if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) {
o.additionalRoles = buildUnnamed0();
o.primaryRole = 'foo';
}
buildCounterAboutAdditionalRoleInfoRoleSets--;
return o;
}
void checkAboutAdditionalRoleInfoRoleSets(
api.AboutAdditionalRoleInfoRoleSets o) {
buildCounterAboutAdditionalRoleInfoRoleSets++;
if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) {
checkUnnamed0(o.additionalRoles!);
unittest.expect(
o.primaryRole!,
unittest.equals('foo'),
);
}
buildCounterAboutAdditionalRoleInfoRoleSets--;
}
core.List<api.AboutAdditionalRoleInfoRoleSets> buildUnnamed1() => [
buildAboutAdditionalRoleInfoRoleSets(),
buildAboutAdditionalRoleInfoRoleSets(),
];
void checkUnnamed1(core.List<api.AboutAdditionalRoleInfoRoleSets> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutAdditionalRoleInfoRoleSets(o[0]);
checkAboutAdditionalRoleInfoRoleSets(o[1]);
}
core.int buildCounterAboutAdditionalRoleInfo = 0;
api.AboutAdditionalRoleInfo buildAboutAdditionalRoleInfo() {
final o = api.AboutAdditionalRoleInfo();
buildCounterAboutAdditionalRoleInfo++;
if (buildCounterAboutAdditionalRoleInfo < 3) {
o.roleSets = buildUnnamed1();
o.type = 'foo';
}
buildCounterAboutAdditionalRoleInfo--;
return o;
}
void checkAboutAdditionalRoleInfo(api.AboutAdditionalRoleInfo o) {
buildCounterAboutAdditionalRoleInfo++;
if (buildCounterAboutAdditionalRoleInfo < 3) {
checkUnnamed1(o.roleSets!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterAboutAdditionalRoleInfo--;
}
core.List<api.AboutAdditionalRoleInfo> buildUnnamed2() => [
buildAboutAdditionalRoleInfo(),
buildAboutAdditionalRoleInfo(),
];
void checkUnnamed2(core.List<api.AboutAdditionalRoleInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutAdditionalRoleInfo(o[0]);
checkAboutAdditionalRoleInfo(o[1]);
}
core.int buildCounterAboutDriveThemes = 0;
api.AboutDriveThemes buildAboutDriveThemes() {
final o = api.AboutDriveThemes();
buildCounterAboutDriveThemes++;
if (buildCounterAboutDriveThemes < 3) {
o.backgroundImageLink = 'foo';
o.colorRgb = 'foo';
o.id = 'foo';
}
buildCounterAboutDriveThemes--;
return o;
}
void checkAboutDriveThemes(api.AboutDriveThemes o) {
buildCounterAboutDriveThemes++;
if (buildCounterAboutDriveThemes < 3) {
unittest.expect(
o.backgroundImageLink!,
unittest.equals('foo'),
);
unittest.expect(
o.colorRgb!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
}
buildCounterAboutDriveThemes--;
}
core.List<api.AboutDriveThemes> buildUnnamed3() => [
buildAboutDriveThemes(),
buildAboutDriveThemes(),
];
void checkUnnamed3(core.List<api.AboutDriveThemes> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutDriveThemes(o[0]);
checkAboutDriveThemes(o[1]);
}
core.List<core.String> buildUnnamed4() => [
'foo',
'foo',
];
void checkUnnamed4(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 buildCounterAboutExportFormats = 0;
api.AboutExportFormats buildAboutExportFormats() {
final o = api.AboutExportFormats();
buildCounterAboutExportFormats++;
if (buildCounterAboutExportFormats < 3) {
o.source = 'foo';
o.targets = buildUnnamed4();
}
buildCounterAboutExportFormats--;
return o;
}
void checkAboutExportFormats(api.AboutExportFormats o) {
buildCounterAboutExportFormats++;
if (buildCounterAboutExportFormats < 3) {
unittest.expect(
o.source!,
unittest.equals('foo'),
);
checkUnnamed4(o.targets!);
}
buildCounterAboutExportFormats--;
}
core.List<api.AboutExportFormats> buildUnnamed5() => [
buildAboutExportFormats(),
buildAboutExportFormats(),
];
void checkUnnamed5(core.List<api.AboutExportFormats> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutExportFormats(o[0]);
checkAboutExportFormats(o[1]);
}
core.int buildCounterAboutFeatures = 0;
api.AboutFeatures buildAboutFeatures() {
final o = api.AboutFeatures();
buildCounterAboutFeatures++;
if (buildCounterAboutFeatures < 3) {
o.featureName = 'foo';
o.featureRate = 42.0;
}
buildCounterAboutFeatures--;
return o;
}
void checkAboutFeatures(api.AboutFeatures o) {
buildCounterAboutFeatures++;
if (buildCounterAboutFeatures < 3) {
unittest.expect(
o.featureName!,
unittest.equals('foo'),
);
unittest.expect(
o.featureRate!,
unittest.equals(42.0),
);
}
buildCounterAboutFeatures--;
}
core.List<api.AboutFeatures> buildUnnamed6() => [
buildAboutFeatures(),
buildAboutFeatures(),
];
void checkUnnamed6(core.List<api.AboutFeatures> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutFeatures(o[0]);
checkAboutFeatures(o[1]);
}
core.List<core.String> buildUnnamed7() => [
'foo',
'foo',
];
void checkUnnamed7(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.List<core.String> buildUnnamed8() => [
'foo',
'foo',
];
void checkUnnamed8(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 buildCounterAboutImportFormats = 0;
api.AboutImportFormats buildAboutImportFormats() {
final o = api.AboutImportFormats();
buildCounterAboutImportFormats++;
if (buildCounterAboutImportFormats < 3) {
o.source = 'foo';
o.targets = buildUnnamed8();
}
buildCounterAboutImportFormats--;
return o;
}
void checkAboutImportFormats(api.AboutImportFormats o) {
buildCounterAboutImportFormats++;
if (buildCounterAboutImportFormats < 3) {
unittest.expect(
o.source!,
unittest.equals('foo'),
);
checkUnnamed8(o.targets!);
}
buildCounterAboutImportFormats--;
}
core.List<api.AboutImportFormats> buildUnnamed9() => [
buildAboutImportFormats(),
buildAboutImportFormats(),
];
void checkUnnamed9(core.List<api.AboutImportFormats> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutImportFormats(o[0]);
checkAboutImportFormats(o[1]);
}
core.int buildCounterAboutMaxUploadSizes = 0;
api.AboutMaxUploadSizes buildAboutMaxUploadSizes() {
final o = api.AboutMaxUploadSizes();
buildCounterAboutMaxUploadSizes++;
if (buildCounterAboutMaxUploadSizes < 3) {
o.size = 'foo';
o.type = 'foo';
}
buildCounterAboutMaxUploadSizes--;
return o;
}
void checkAboutMaxUploadSizes(api.AboutMaxUploadSizes o) {
buildCounterAboutMaxUploadSizes++;
if (buildCounterAboutMaxUploadSizes < 3) {
unittest.expect(
o.size!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterAboutMaxUploadSizes--;
}
core.List<api.AboutMaxUploadSizes> buildUnnamed10() => [
buildAboutMaxUploadSizes(),
buildAboutMaxUploadSizes(),
];
void checkUnnamed10(core.List<api.AboutMaxUploadSizes> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutMaxUploadSizes(o[0]);
checkAboutMaxUploadSizes(o[1]);
}
core.int buildCounterAboutQuotaBytesByService = 0;
api.AboutQuotaBytesByService buildAboutQuotaBytesByService() {
final o = api.AboutQuotaBytesByService();
buildCounterAboutQuotaBytesByService++;
if (buildCounterAboutQuotaBytesByService < 3) {
o.bytesUsed = 'foo';
o.serviceName = 'foo';
}
buildCounterAboutQuotaBytesByService--;
return o;
}
void checkAboutQuotaBytesByService(api.AboutQuotaBytesByService o) {
buildCounterAboutQuotaBytesByService++;
if (buildCounterAboutQuotaBytesByService < 3) {
unittest.expect(
o.bytesUsed!,
unittest.equals('foo'),
);
unittest.expect(
o.serviceName!,
unittest.equals('foo'),
);
}
buildCounterAboutQuotaBytesByService--;
}
core.List<api.AboutQuotaBytesByService> buildUnnamed11() => [
buildAboutQuotaBytesByService(),
buildAboutQuotaBytesByService(),
];
void checkUnnamed11(core.List<api.AboutQuotaBytesByService> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutQuotaBytesByService(o[0]);
checkAboutQuotaBytesByService(o[1]);
}
core.int buildCounterAboutTeamDriveThemes = 0;
api.AboutTeamDriveThemes buildAboutTeamDriveThemes() {
final o = api.AboutTeamDriveThemes();
buildCounterAboutTeamDriveThemes++;
if (buildCounterAboutTeamDriveThemes < 3) {
o.backgroundImageLink = 'foo';
o.colorRgb = 'foo';
o.id = 'foo';
}
buildCounterAboutTeamDriveThemes--;
return o;
}
void checkAboutTeamDriveThemes(api.AboutTeamDriveThemes o) {
buildCounterAboutTeamDriveThemes++;
if (buildCounterAboutTeamDriveThemes < 3) {
unittest.expect(
o.backgroundImageLink!,
unittest.equals('foo'),
);
unittest.expect(
o.colorRgb!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
}
buildCounterAboutTeamDriveThemes--;
}
core.List<api.AboutTeamDriveThemes> buildUnnamed12() => [
buildAboutTeamDriveThemes(),
buildAboutTeamDriveThemes(),
];
void checkUnnamed12(core.List<api.AboutTeamDriveThemes> o) {
unittest.expect(o, unittest.hasLength(2));
checkAboutTeamDriveThemes(o[0]);
checkAboutTeamDriveThemes(o[1]);
}
core.int buildCounterAbout = 0;
api.About buildAbout() {
final o = api.About();
buildCounterAbout++;
if (buildCounterAbout < 3) {
o.additionalRoleInfo = buildUnnamed2();
o.canCreateDrives = true;
o.canCreateTeamDrives = true;
o.domainSharingPolicy = 'foo';
o.driveThemes = buildUnnamed3();
o.etag = 'foo';
o.exportFormats = buildUnnamed5();
o.features = buildUnnamed6();
o.folderColorPalette = buildUnnamed7();
o.importFormats = buildUnnamed9();
o.isCurrentAppInstalled = true;
o.kind = 'foo';
o.languageCode = 'foo';
o.largestChangeId = 'foo';
o.maxUploadSizes = buildUnnamed10();
o.name = 'foo';
o.permissionId = 'foo';
o.quotaBytesByService = buildUnnamed11();
o.quotaBytesTotal = 'foo';
o.quotaBytesUsed = 'foo';
o.quotaBytesUsedAggregate = 'foo';
o.quotaBytesUsedInTrash = 'foo';
o.quotaType = 'foo';
o.remainingChangeIds = 'foo';
o.rootFolderId = 'foo';
o.selfLink = 'foo';
o.teamDriveThemes = buildUnnamed12();
o.user = buildUser();
}
buildCounterAbout--;
return o;
}
void checkAbout(api.About o) {
buildCounterAbout++;
if (buildCounterAbout < 3) {
checkUnnamed2(o.additionalRoleInfo!);
unittest.expect(o.canCreateDrives!, unittest.isTrue);
unittest.expect(o.canCreateTeamDrives!, unittest.isTrue);
unittest.expect(
o.domainSharingPolicy!,
unittest.equals('foo'),
);
checkUnnamed3(o.driveThemes!);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed5(o.exportFormats!);
checkUnnamed6(o.features!);
checkUnnamed7(o.folderColorPalette!);
checkUnnamed9(o.importFormats!);
unittest.expect(o.isCurrentAppInstalled!, unittest.isTrue);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.languageCode!,
unittest.equals('foo'),
);
unittest.expect(
o.largestChangeId!,
unittest.equals('foo'),
);
checkUnnamed10(o.maxUploadSizes!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.permissionId!,
unittest.equals('foo'),
);
checkUnnamed11(o.quotaBytesByService!);
unittest.expect(
o.quotaBytesTotal!,
unittest.equals('foo'),
);
unittest.expect(
o.quotaBytesUsed!,
unittest.equals('foo'),
);
unittest.expect(
o.quotaBytesUsedAggregate!,
unittest.equals('foo'),
);
unittest.expect(
o.quotaBytesUsedInTrash!,
unittest.equals('foo'),
);
unittest.expect(
o.quotaType!,
unittest.equals('foo'),
);
unittest.expect(
o.remainingChangeIds!,
unittest.equals('foo'),
);
unittest.expect(
o.rootFolderId!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
checkUnnamed12(o.teamDriveThemes!);
checkUser(o.user!);
}
buildCounterAbout--;
}
core.int buildCounterAppIcons = 0;
api.AppIcons buildAppIcons() {
final o = api.AppIcons();
buildCounterAppIcons++;
if (buildCounterAppIcons < 3) {
o.category = 'foo';
o.iconUrl = 'foo';
o.size = 42;
}
buildCounterAppIcons--;
return o;
}
void checkAppIcons(api.AppIcons o) {
buildCounterAppIcons++;
if (buildCounterAppIcons < 3) {
unittest.expect(
o.category!,
unittest.equals('foo'),
);
unittest.expect(
o.iconUrl!,
unittest.equals('foo'),
);
unittest.expect(
o.size!,
unittest.equals(42),
);
}
buildCounterAppIcons--;
}
core.List<api.AppIcons> buildUnnamed13() => [
buildAppIcons(),
buildAppIcons(),
];
void checkUnnamed13(core.List<api.AppIcons> o) {
unittest.expect(o, unittest.hasLength(2));
checkAppIcons(o[0]);
checkAppIcons(o[1]);
}
core.List<core.String> buildUnnamed14() => [
'foo',
'foo',
];
void checkUnnamed14(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.List<core.String> buildUnnamed15() => [
'foo',
'foo',
];
void checkUnnamed15(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.List<core.String> buildUnnamed16() => [
'foo',
'foo',
];
void checkUnnamed16(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.List<core.String> buildUnnamed17() => [
'foo',
'foo',
];
void checkUnnamed17(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 buildCounterApp = 0;
api.App buildApp() {
final o = api.App();
buildCounterApp++;
if (buildCounterApp < 3) {
o.authorized = true;
o.createInFolderTemplate = 'foo';
o.createUrl = 'foo';
o.hasDriveWideScope = true;
o.icons = buildUnnamed13();
o.id = 'foo';
o.installed = true;
o.kind = 'foo';
o.longDescription = 'foo';
o.name = 'foo';
o.objectType = 'foo';
o.openUrlTemplate = 'foo';
o.primaryFileExtensions = buildUnnamed14();
o.primaryMimeTypes = buildUnnamed15();
o.productId = 'foo';
o.productUrl = 'foo';
o.secondaryFileExtensions = buildUnnamed16();
o.secondaryMimeTypes = buildUnnamed17();
o.shortDescription = 'foo';
o.supportsCreate = true;
o.supportsImport = true;
o.supportsMultiOpen = true;
o.supportsOfflineCreate = true;
o.useByDefault = true;
}
buildCounterApp--;
return o;
}
void checkApp(api.App o) {
buildCounterApp++;
if (buildCounterApp < 3) {
unittest.expect(o.authorized!, unittest.isTrue);
unittest.expect(
o.createInFolderTemplate!,
unittest.equals('foo'),
);
unittest.expect(
o.createUrl!,
unittest.equals('foo'),
);
unittest.expect(o.hasDriveWideScope!, unittest.isTrue);
checkUnnamed13(o.icons!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(o.installed!, unittest.isTrue);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.longDescription!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.objectType!,
unittest.equals('foo'),
);
unittest.expect(
o.openUrlTemplate!,
unittest.equals('foo'),
);
checkUnnamed14(o.primaryFileExtensions!);
checkUnnamed15(o.primaryMimeTypes!);
unittest.expect(
o.productId!,
unittest.equals('foo'),
);
unittest.expect(
o.productUrl!,
unittest.equals('foo'),
);
checkUnnamed16(o.secondaryFileExtensions!);
checkUnnamed17(o.secondaryMimeTypes!);
unittest.expect(
o.shortDescription!,
unittest.equals('foo'),
);
unittest.expect(o.supportsCreate!, unittest.isTrue);
unittest.expect(o.supportsImport!, unittest.isTrue);
unittest.expect(o.supportsMultiOpen!, unittest.isTrue);
unittest.expect(o.supportsOfflineCreate!, unittest.isTrue);
unittest.expect(o.useByDefault!, unittest.isTrue);
}
buildCounterApp--;
}
core.List<core.String> buildUnnamed18() => [
'foo',
'foo',
];
void checkUnnamed18(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.List<api.App> buildUnnamed19() => [
buildApp(),
buildApp(),
];
void checkUnnamed19(core.List<api.App> o) {
unittest.expect(o, unittest.hasLength(2));
checkApp(o[0]);
checkApp(o[1]);
}
core.int buildCounterAppList = 0;
api.AppList buildAppList() {
final o = api.AppList();
buildCounterAppList++;
if (buildCounterAppList < 3) {
o.defaultAppIds = buildUnnamed18();
o.etag = 'foo';
o.items = buildUnnamed19();
o.kind = 'foo';
o.selfLink = 'foo';
}
buildCounterAppList--;
return o;
}
void checkAppList(api.AppList o) {
buildCounterAppList++;
if (buildCounterAppList < 3) {
checkUnnamed18(o.defaultAppIds!);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed19(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterAppList--;
}
core.int buildCounterChange = 0;
api.Change buildChange() {
final o = api.Change();
buildCounterChange++;
if (buildCounterChange < 3) {
o.changeType = 'foo';
o.deleted = true;
o.drive = buildDrive();
o.driveId = 'foo';
o.file = buildFile();
o.fileId = 'foo';
o.id = 'foo';
o.kind = 'foo';
o.modificationDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.selfLink = 'foo';
o.teamDrive = buildTeamDrive();
o.teamDriveId = 'foo';
o.type = 'foo';
}
buildCounterChange--;
return o;
}
void checkChange(api.Change o) {
buildCounterChange++;
if (buildCounterChange < 3) {
unittest.expect(
o.changeType!,
unittest.equals('foo'),
);
unittest.expect(o.deleted!, unittest.isTrue);
checkDrive(o.drive!);
unittest.expect(
o.driveId!,
unittest.equals('foo'),
);
checkFile(o.file!);
unittest.expect(
o.fileId!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.modificationDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
checkTeamDrive(o.teamDrive!);
unittest.expect(
o.teamDriveId!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterChange--;
}
core.List<api.Change> buildUnnamed20() => [
buildChange(),
buildChange(),
];
void checkUnnamed20(core.List<api.Change> o) {
unittest.expect(o, unittest.hasLength(2));
checkChange(o[0]);
checkChange(o[1]);
}
core.int buildCounterChangeList = 0;
api.ChangeList buildChangeList() {
final o = api.ChangeList();
buildCounterChangeList++;
if (buildCounterChangeList < 3) {
o.etag = 'foo';
o.items = buildUnnamed20();
o.kind = 'foo';
o.largestChangeId = 'foo';
o.newStartPageToken = 'foo';
o.nextLink = 'foo';
o.nextPageToken = 'foo';
o.selfLink = 'foo';
}
buildCounterChangeList--;
return o;
}
void checkChangeList(api.ChangeList o) {
buildCounterChangeList++;
if (buildCounterChangeList < 3) {
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed20(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.largestChangeId!,
unittest.equals('foo'),
);
unittest.expect(
o.newStartPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.nextLink!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterChangeList--;
}
core.Map<core.String, core.String> buildUnnamed21() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed21(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 buildCounterChannel = 0;
api.Channel buildChannel() {
final o = api.Channel();
buildCounterChannel++;
if (buildCounterChannel < 3) {
o.address = 'foo';
o.expiration = 'foo';
o.id = 'foo';
o.kind = 'foo';
o.params = buildUnnamed21();
o.payload = true;
o.resourceId = 'foo';
o.resourceUri = 'foo';
o.token = 'foo';
o.type = 'foo';
}
buildCounterChannel--;
return o;
}
void checkChannel(api.Channel o) {
buildCounterChannel++;
if (buildCounterChannel < 3) {
unittest.expect(
o.address!,
unittest.equals('foo'),
);
unittest.expect(
o.expiration!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
checkUnnamed21(o.params!);
unittest.expect(o.payload!, unittest.isTrue);
unittest.expect(
o.resourceId!,
unittest.equals('foo'),
);
unittest.expect(
o.resourceUri!,
unittest.equals('foo'),
);
unittest.expect(
o.token!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterChannel--;
}
core.List<api.ChildReference> buildUnnamed22() => [
buildChildReference(),
buildChildReference(),
];
void checkUnnamed22(core.List<api.ChildReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkChildReference(o[0]);
checkChildReference(o[1]);
}
core.int buildCounterChildList = 0;
api.ChildList buildChildList() {
final o = api.ChildList();
buildCounterChildList++;
if (buildCounterChildList < 3) {
o.etag = 'foo';
o.items = buildUnnamed22();
o.kind = 'foo';
o.nextLink = 'foo';
o.nextPageToken = 'foo';
o.selfLink = 'foo';
}
buildCounterChildList--;
return o;
}
void checkChildList(api.ChildList o) {
buildCounterChildList++;
if (buildCounterChildList < 3) {
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed22(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextLink!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterChildList--;
}
core.int buildCounterChildReference = 0;
api.ChildReference buildChildReference() {
final o = api.ChildReference();
buildCounterChildReference++;
if (buildCounterChildReference < 3) {
o.childLink = 'foo';
o.id = 'foo';
o.kind = 'foo';
o.selfLink = 'foo';
}
buildCounterChildReference--;
return o;
}
void checkChildReference(api.ChildReference o) {
buildCounterChildReference++;
if (buildCounterChildReference < 3) {
unittest.expect(
o.childLink!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterChildReference--;
}
core.int buildCounterCommentContext = 0;
api.CommentContext buildCommentContext() {
final o = api.CommentContext();
buildCounterCommentContext++;
if (buildCounterCommentContext < 3) {
o.type = 'foo';
o.value = 'foo';
}
buildCounterCommentContext--;
return o;
}
void checkCommentContext(api.CommentContext o) {
buildCounterCommentContext++;
if (buildCounterCommentContext < 3) {
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterCommentContext--;
}
core.List<api.CommentReply> buildUnnamed23() => [
buildCommentReply(),
buildCommentReply(),
];
void checkUnnamed23(core.List<api.CommentReply> o) {
unittest.expect(o, unittest.hasLength(2));
checkCommentReply(o[0]);
checkCommentReply(o[1]);
}
core.int buildCounterComment = 0;
api.Comment buildComment() {
final o = api.Comment();
buildCounterComment++;
if (buildCounterComment < 3) {
o.anchor = 'foo';
o.author = buildUser();
o.commentId = 'foo';
o.content = 'foo';
o.context = buildCommentContext();
o.createdDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.deleted = true;
o.fileId = 'foo';
o.fileTitle = 'foo';
o.htmlContent = 'foo';
o.kind = 'foo';
o.modifiedDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.replies = buildUnnamed23();
o.selfLink = 'foo';
o.status = 'foo';
}
buildCounterComment--;
return o;
}
void checkComment(api.Comment o) {
buildCounterComment++;
if (buildCounterComment < 3) {
unittest.expect(
o.anchor!,
unittest.equals('foo'),
);
checkUser(o.author!);
unittest.expect(
o.commentId!,
unittest.equals('foo'),
);
unittest.expect(
o.content!,
unittest.equals('foo'),
);
checkCommentContext(o.context!);
unittest.expect(
o.createdDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(o.deleted!, unittest.isTrue);
unittest.expect(
o.fileId!,
unittest.equals('foo'),
);
unittest.expect(
o.fileTitle!,
unittest.equals('foo'),
);
unittest.expect(
o.htmlContent!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.modifiedDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
checkUnnamed23(o.replies!);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
unittest.expect(
o.status!,
unittest.equals('foo'),
);
}
buildCounterComment--;
}
core.List<api.Comment> buildUnnamed24() => [
buildComment(),
buildComment(),
];
void checkUnnamed24(core.List<api.Comment> o) {
unittest.expect(o, unittest.hasLength(2));
checkComment(o[0]);
checkComment(o[1]);
}
core.int buildCounterCommentList = 0;
api.CommentList buildCommentList() {
final o = api.CommentList();
buildCounterCommentList++;
if (buildCounterCommentList < 3) {
o.items = buildUnnamed24();
o.kind = 'foo';
o.nextLink = 'foo';
o.nextPageToken = 'foo';
o.selfLink = 'foo';
}
buildCounterCommentList--;
return o;
}
void checkCommentList(api.CommentList o) {
buildCounterCommentList++;
if (buildCounterCommentList < 3) {
checkUnnamed24(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextLink!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterCommentList--;
}
core.int buildCounterCommentReply = 0;
api.CommentReply buildCommentReply() {
final o = api.CommentReply();
buildCounterCommentReply++;
if (buildCounterCommentReply < 3) {
o.author = buildUser();
o.content = 'foo';
o.createdDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.deleted = true;
o.htmlContent = 'foo';
o.kind = 'foo';
o.modifiedDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.replyId = 'foo';
o.verb = 'foo';
}
buildCounterCommentReply--;
return o;
}
void checkCommentReply(api.CommentReply o) {
buildCounterCommentReply++;
if (buildCounterCommentReply < 3) {
checkUser(o.author!);
unittest.expect(
o.content!,
unittest.equals('foo'),
);
unittest.expect(
o.createdDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(o.deleted!, unittest.isTrue);
unittest.expect(
o.htmlContent!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.modifiedDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.replyId!,
unittest.equals('foo'),
);
unittest.expect(
o.verb!,
unittest.equals('foo'),
);
}
buildCounterCommentReply--;
}
core.List<api.CommentReply> buildUnnamed25() => [
buildCommentReply(),
buildCommentReply(),
];
void checkUnnamed25(core.List<api.CommentReply> o) {
unittest.expect(o, unittest.hasLength(2));
checkCommentReply(o[0]);
checkCommentReply(o[1]);
}
core.int buildCounterCommentReplyList = 0;
api.CommentReplyList buildCommentReplyList() {
final o = api.CommentReplyList();
buildCounterCommentReplyList++;
if (buildCounterCommentReplyList < 3) {
o.items = buildUnnamed25();
o.kind = 'foo';
o.nextLink = 'foo';
o.nextPageToken = 'foo';
o.selfLink = 'foo';
}
buildCounterCommentReplyList--;
return o;
}
void checkCommentReplyList(api.CommentReplyList o) {
buildCounterCommentReplyList++;
if (buildCounterCommentReplyList < 3) {
checkUnnamed25(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextLink!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterCommentReplyList--;
}
core.int buildCounterContentRestriction = 0;
api.ContentRestriction buildContentRestriction() {
final o = api.ContentRestriction();
buildCounterContentRestriction++;
if (buildCounterContentRestriction < 3) {
o.ownerRestricted = true;
o.readOnly = true;
o.reason = 'foo';
o.restrictingUser = buildUser();
o.restrictionDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.type = 'foo';
}
buildCounterContentRestriction--;
return o;
}
void checkContentRestriction(api.ContentRestriction o) {
buildCounterContentRestriction++;
if (buildCounterContentRestriction < 3) {
unittest.expect(o.ownerRestricted!, unittest.isTrue);
unittest.expect(o.readOnly!, unittest.isTrue);
unittest.expect(
o.reason!,
unittest.equals('foo'),
);
checkUser(o.restrictingUser!);
unittest.expect(
o.restrictionDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterContentRestriction--;
}
core.int buildCounterDriveBackgroundImageFile = 0;
api.DriveBackgroundImageFile buildDriveBackgroundImageFile() {
final o = api.DriveBackgroundImageFile();
buildCounterDriveBackgroundImageFile++;
if (buildCounterDriveBackgroundImageFile < 3) {
o.id = 'foo';
o.width = 42.0;
o.xCoordinate = 42.0;
o.yCoordinate = 42.0;
}
buildCounterDriveBackgroundImageFile--;
return o;
}
void checkDriveBackgroundImageFile(api.DriveBackgroundImageFile o) {
buildCounterDriveBackgroundImageFile++;
if (buildCounterDriveBackgroundImageFile < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.width!,
unittest.equals(42.0),
);
unittest.expect(
o.xCoordinate!,
unittest.equals(42.0),
);
unittest.expect(
o.yCoordinate!,
unittest.equals(42.0),
);
}
buildCounterDriveBackgroundImageFile--;
}
core.int buildCounterDriveCapabilities = 0;
api.DriveCapabilities buildDriveCapabilities() {
final o = api.DriveCapabilities();
buildCounterDriveCapabilities++;
if (buildCounterDriveCapabilities < 3) {
o.canAddChildren = true;
o.canChangeCopyRequiresWriterPermissionRestriction = true;
o.canChangeDomainUsersOnlyRestriction = true;
o.canChangeDriveBackground = true;
o.canChangeDriveMembersOnlyRestriction = true;
o.canChangeSharingFoldersRequiresOrganizerPermissionRestriction = true;
o.canComment = true;
o.canCopy = true;
o.canDeleteChildren = true;
o.canDeleteDrive = true;
o.canDownload = true;
o.canEdit = true;
o.canListChildren = true;
o.canManageMembers = true;
o.canReadRevisions = true;
o.canRename = true;
o.canRenameDrive = true;
o.canResetDriveRestrictions = true;
o.canShare = true;
o.canTrashChildren = true;
}
buildCounterDriveCapabilities--;
return o;
}
void checkDriveCapabilities(api.DriveCapabilities o) {
buildCounterDriveCapabilities++;
if (buildCounterDriveCapabilities < 3) {
unittest.expect(o.canAddChildren!, unittest.isTrue);
unittest.expect(
o.canChangeCopyRequiresWriterPermissionRestriction!, unittest.isTrue);
unittest.expect(o.canChangeDomainUsersOnlyRestriction!, unittest.isTrue);
unittest.expect(o.canChangeDriveBackground!, unittest.isTrue);
unittest.expect(o.canChangeDriveMembersOnlyRestriction!, unittest.isTrue);
unittest.expect(
o.canChangeSharingFoldersRequiresOrganizerPermissionRestriction!,
unittest.isTrue);
unittest.expect(o.canComment!, unittest.isTrue);
unittest.expect(o.canCopy!, unittest.isTrue);
unittest.expect(o.canDeleteChildren!, unittest.isTrue);
unittest.expect(o.canDeleteDrive!, unittest.isTrue);
unittest.expect(o.canDownload!, unittest.isTrue);
unittest.expect(o.canEdit!, unittest.isTrue);
unittest.expect(o.canListChildren!, unittest.isTrue);
unittest.expect(o.canManageMembers!, unittest.isTrue);
unittest.expect(o.canReadRevisions!, unittest.isTrue);
unittest.expect(o.canRename!, unittest.isTrue);
unittest.expect(o.canRenameDrive!, unittest.isTrue);
unittest.expect(o.canResetDriveRestrictions!, unittest.isTrue);
unittest.expect(o.canShare!, unittest.isTrue);
unittest.expect(o.canTrashChildren!, unittest.isTrue);
}
buildCounterDriveCapabilities--;
}
core.int buildCounterDriveRestrictions = 0;
api.DriveRestrictions buildDriveRestrictions() {
final o = api.DriveRestrictions();
buildCounterDriveRestrictions++;
if (buildCounterDriveRestrictions < 3) {
o.adminManagedRestrictions = true;
o.copyRequiresWriterPermission = true;
o.domainUsersOnly = true;
o.driveMembersOnly = true;
o.sharingFoldersRequiresOrganizerPermission = true;
}
buildCounterDriveRestrictions--;
return o;
}
void checkDriveRestrictions(api.DriveRestrictions o) {
buildCounterDriveRestrictions++;
if (buildCounterDriveRestrictions < 3) {
unittest.expect(o.adminManagedRestrictions!, unittest.isTrue);
unittest.expect(o.copyRequiresWriterPermission!, unittest.isTrue);
unittest.expect(o.domainUsersOnly!, unittest.isTrue);
unittest.expect(o.driveMembersOnly!, unittest.isTrue);
unittest.expect(
o.sharingFoldersRequiresOrganizerPermission!, unittest.isTrue);
}
buildCounterDriveRestrictions--;
}
core.int buildCounterDrive = 0;
api.Drive buildDrive() {
final o = api.Drive();
buildCounterDrive++;
if (buildCounterDrive < 3) {
o.backgroundImageFile = buildDriveBackgroundImageFile();
o.backgroundImageLink = 'foo';
o.capabilities = buildDriveCapabilities();
o.colorRgb = 'foo';
o.createdDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.hidden = true;
o.id = 'foo';
o.kind = 'foo';
o.name = 'foo';
o.orgUnitId = 'foo';
o.restrictions = buildDriveRestrictions();
o.themeId = 'foo';
}
buildCounterDrive--;
return o;
}
void checkDrive(api.Drive o) {
buildCounterDrive++;
if (buildCounterDrive < 3) {
checkDriveBackgroundImageFile(o.backgroundImageFile!);
unittest.expect(
o.backgroundImageLink!,
unittest.equals('foo'),
);
checkDriveCapabilities(o.capabilities!);
unittest.expect(
o.colorRgb!,
unittest.equals('foo'),
);
unittest.expect(
o.createdDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(o.hidden!, unittest.isTrue);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.orgUnitId!,
unittest.equals('foo'),
);
checkDriveRestrictions(o.restrictions!);
unittest.expect(
o.themeId!,
unittest.equals('foo'),
);
}
buildCounterDrive--;
}
core.List<api.Drive> buildUnnamed26() => [
buildDrive(),
buildDrive(),
];
void checkUnnamed26(core.List<api.Drive> o) {
unittest.expect(o, unittest.hasLength(2));
checkDrive(o[0]);
checkDrive(o[1]);
}
core.int buildCounterDriveList = 0;
api.DriveList buildDriveList() {
final o = api.DriveList();
buildCounterDriveList++;
if (buildCounterDriveList < 3) {
o.items = buildUnnamed26();
o.kind = 'foo';
o.nextPageToken = 'foo';
}
buildCounterDriveList--;
return o;
}
void checkDriveList(api.DriveList o) {
buildCounterDriveList++;
if (buildCounterDriveList < 3) {
checkUnnamed26(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterDriveList--;
}
core.int buildCounterFileCapabilities = 0;
api.FileCapabilities buildFileCapabilities() {
final o = api.FileCapabilities();
buildCounterFileCapabilities++;
if (buildCounterFileCapabilities < 3) {
o.canAcceptOwnership = true;
o.canAddChildren = true;
o.canAddFolderFromAnotherDrive = true;
o.canAddMyDriveParent = true;
o.canChangeCopyRequiresWriterPermission = true;
o.canChangeRestrictedDownload = true;
o.canChangeSecurityUpdateEnabled = true;
o.canComment = true;
o.canCopy = true;
o.canDelete = true;
o.canDeleteChildren = true;
o.canDownload = true;
o.canEdit = true;
o.canListChildren = true;
o.canModifyContent = true;
o.canModifyContentRestriction = true;
o.canModifyEditorContentRestriction = true;
o.canModifyLabels = true;
o.canModifyOwnerContentRestriction = true;
o.canMoveChildrenOutOfDrive = true;
o.canMoveChildrenOutOfTeamDrive = true;
o.canMoveChildrenWithinDrive = true;
o.canMoveChildrenWithinTeamDrive = true;
o.canMoveItemIntoTeamDrive = true;
o.canMoveItemOutOfDrive = true;
o.canMoveItemOutOfTeamDrive = true;
o.canMoveItemWithinDrive = true;
o.canMoveItemWithinTeamDrive = true;
o.canMoveTeamDriveItem = true;
o.canReadDrive = true;
o.canReadLabels = true;
o.canReadRevisions = true;
o.canReadTeamDrive = true;
o.canRemoveChildren = true;
o.canRemoveContentRestriction = true;
o.canRemoveMyDriveParent = true;
o.canRename = true;
o.canShare = true;
o.canTrash = true;
o.canTrashChildren = true;
o.canUntrash = true;
}
buildCounterFileCapabilities--;
return o;
}
void checkFileCapabilities(api.FileCapabilities o) {
buildCounterFileCapabilities++;
if (buildCounterFileCapabilities < 3) {
unittest.expect(o.canAcceptOwnership!, unittest.isTrue);
unittest.expect(o.canAddChildren!, unittest.isTrue);
unittest.expect(o.canAddFolderFromAnotherDrive!, unittest.isTrue);
unittest.expect(o.canAddMyDriveParent!, unittest.isTrue);
unittest.expect(o.canChangeCopyRequiresWriterPermission!, unittest.isTrue);
unittest.expect(o.canChangeRestrictedDownload!, unittest.isTrue);
unittest.expect(o.canChangeSecurityUpdateEnabled!, unittest.isTrue);
unittest.expect(o.canComment!, unittest.isTrue);
unittest.expect(o.canCopy!, unittest.isTrue);
unittest.expect(o.canDelete!, unittest.isTrue);
unittest.expect(o.canDeleteChildren!, unittest.isTrue);
unittest.expect(o.canDownload!, unittest.isTrue);
unittest.expect(o.canEdit!, unittest.isTrue);
unittest.expect(o.canListChildren!, unittest.isTrue);
unittest.expect(o.canModifyContent!, unittest.isTrue);
unittest.expect(o.canModifyContentRestriction!, unittest.isTrue);
unittest.expect(o.canModifyEditorContentRestriction!, unittest.isTrue);
unittest.expect(o.canModifyLabels!, unittest.isTrue);
unittest.expect(o.canModifyOwnerContentRestriction!, unittest.isTrue);
unittest.expect(o.canMoveChildrenOutOfDrive!, unittest.isTrue);
unittest.expect(o.canMoveChildrenOutOfTeamDrive!, unittest.isTrue);
unittest.expect(o.canMoveChildrenWithinDrive!, unittest.isTrue);
unittest.expect(o.canMoveChildrenWithinTeamDrive!, unittest.isTrue);
unittest.expect(o.canMoveItemIntoTeamDrive!, unittest.isTrue);
unittest.expect(o.canMoveItemOutOfDrive!, unittest.isTrue);
unittest.expect(o.canMoveItemOutOfTeamDrive!, unittest.isTrue);
unittest.expect(o.canMoveItemWithinDrive!, unittest.isTrue);
unittest.expect(o.canMoveItemWithinTeamDrive!, unittest.isTrue);
unittest.expect(o.canMoveTeamDriveItem!, unittest.isTrue);
unittest.expect(o.canReadDrive!, unittest.isTrue);
unittest.expect(o.canReadLabels!, unittest.isTrue);
unittest.expect(o.canReadRevisions!, unittest.isTrue);
unittest.expect(o.canReadTeamDrive!, unittest.isTrue);
unittest.expect(o.canRemoveChildren!, unittest.isTrue);
unittest.expect(o.canRemoveContentRestriction!, unittest.isTrue);
unittest.expect(o.canRemoveMyDriveParent!, unittest.isTrue);
unittest.expect(o.canRename!, unittest.isTrue);
unittest.expect(o.canShare!, unittest.isTrue);
unittest.expect(o.canTrash!, unittest.isTrue);
unittest.expect(o.canTrashChildren!, unittest.isTrue);
unittest.expect(o.canUntrash!, unittest.isTrue);
}
buildCounterFileCapabilities--;
}
core.List<api.ContentRestriction> buildUnnamed27() => [
buildContentRestriction(),
buildContentRestriction(),
];
void checkUnnamed27(core.List<api.ContentRestriction> o) {
unittest.expect(o, unittest.hasLength(2));
checkContentRestriction(o[0]);
checkContentRestriction(o[1]);
}
core.Map<core.String, core.String> buildUnnamed28() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed28(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 buildCounterFileImageMediaMetadataLocation = 0;
api.FileImageMediaMetadataLocation buildFileImageMediaMetadataLocation() {
final o = api.FileImageMediaMetadataLocation();
buildCounterFileImageMediaMetadataLocation++;
if (buildCounterFileImageMediaMetadataLocation < 3) {
o.altitude = 42.0;
o.latitude = 42.0;
o.longitude = 42.0;
}
buildCounterFileImageMediaMetadataLocation--;
return o;
}
void checkFileImageMediaMetadataLocation(api.FileImageMediaMetadataLocation o) {
buildCounterFileImageMediaMetadataLocation++;
if (buildCounterFileImageMediaMetadataLocation < 3) {
unittest.expect(
o.altitude!,
unittest.equals(42.0),
);
unittest.expect(
o.latitude!,
unittest.equals(42.0),
);
unittest.expect(
o.longitude!,
unittest.equals(42.0),
);
}
buildCounterFileImageMediaMetadataLocation--;
}
core.int buildCounterFileImageMediaMetadata = 0;
api.FileImageMediaMetadata buildFileImageMediaMetadata() {
final o = api.FileImageMediaMetadata();
buildCounterFileImageMediaMetadata++;
if (buildCounterFileImageMediaMetadata < 3) {
o.aperture = 42.0;
o.cameraMake = 'foo';
o.cameraModel = 'foo';
o.colorSpace = 'foo';
o.date = 'foo';
o.exposureBias = 42.0;
o.exposureMode = 'foo';
o.exposureTime = 42.0;
o.flashUsed = true;
o.focalLength = 42.0;
o.height = 42;
o.isoSpeed = 42;
o.lens = 'foo';
o.location = buildFileImageMediaMetadataLocation();
o.maxApertureValue = 42.0;
o.meteringMode = 'foo';
o.rotation = 42;
o.sensor = 'foo';
o.subjectDistance = 42;
o.whiteBalance = 'foo';
o.width = 42;
}
buildCounterFileImageMediaMetadata--;
return o;
}
void checkFileImageMediaMetadata(api.FileImageMediaMetadata o) {
buildCounterFileImageMediaMetadata++;
if (buildCounterFileImageMediaMetadata < 3) {
unittest.expect(
o.aperture!,
unittest.equals(42.0),
);
unittest.expect(
o.cameraMake!,
unittest.equals('foo'),
);
unittest.expect(
o.cameraModel!,
unittest.equals('foo'),
);
unittest.expect(
o.colorSpace!,
unittest.equals('foo'),
);
unittest.expect(
o.date!,
unittest.equals('foo'),
);
unittest.expect(
o.exposureBias!,
unittest.equals(42.0),
);
unittest.expect(
o.exposureMode!,
unittest.equals('foo'),
);
unittest.expect(
o.exposureTime!,
unittest.equals(42.0),
);
unittest.expect(o.flashUsed!, unittest.isTrue);
unittest.expect(
o.focalLength!,
unittest.equals(42.0),
);
unittest.expect(
o.height!,
unittest.equals(42),
);
unittest.expect(
o.isoSpeed!,
unittest.equals(42),
);
unittest.expect(
o.lens!,
unittest.equals('foo'),
);
checkFileImageMediaMetadataLocation(o.location!);
unittest.expect(
o.maxApertureValue!,
unittest.equals(42.0),
);
unittest.expect(
o.meteringMode!,
unittest.equals('foo'),
);
unittest.expect(
o.rotation!,
unittest.equals(42),
);
unittest.expect(
o.sensor!,
unittest.equals('foo'),
);
unittest.expect(
o.subjectDistance!,
unittest.equals(42),
);
unittest.expect(
o.whiteBalance!,
unittest.equals('foo'),
);
unittest.expect(
o.width!,
unittest.equals(42),
);
}
buildCounterFileImageMediaMetadata--;
}
core.int buildCounterFileIndexableText = 0;
api.FileIndexableText buildFileIndexableText() {
final o = api.FileIndexableText();
buildCounterFileIndexableText++;
if (buildCounterFileIndexableText < 3) {
o.text = 'foo';
}
buildCounterFileIndexableText--;
return o;
}
void checkFileIndexableText(api.FileIndexableText o) {
buildCounterFileIndexableText++;
if (buildCounterFileIndexableText < 3) {
unittest.expect(
o.text!,
unittest.equals('foo'),
);
}
buildCounterFileIndexableText--;
}
core.List<api.Label> buildUnnamed29() => [
buildLabel(),
buildLabel(),
];
void checkUnnamed29(core.List<api.Label> o) {
unittest.expect(o, unittest.hasLength(2));
checkLabel(o[0]);
checkLabel(o[1]);
}
core.int buildCounterFileLabelInfo = 0;
api.FileLabelInfo buildFileLabelInfo() {
final o = api.FileLabelInfo();
buildCounterFileLabelInfo++;
if (buildCounterFileLabelInfo < 3) {
o.labels = buildUnnamed29();
}
buildCounterFileLabelInfo--;
return o;
}
void checkFileLabelInfo(api.FileLabelInfo o) {
buildCounterFileLabelInfo++;
if (buildCounterFileLabelInfo < 3) {
checkUnnamed29(o.labels!);
}
buildCounterFileLabelInfo--;
}
core.int buildCounterFileLabels = 0;
api.FileLabels buildFileLabels() {
final o = api.FileLabels();
buildCounterFileLabels++;
if (buildCounterFileLabels < 3) {
o.hidden = true;
o.modified = true;
o.restricted = true;
o.starred = true;
o.trashed = true;
o.viewed = true;
}
buildCounterFileLabels--;
return o;
}
void checkFileLabels(api.FileLabels o) {
buildCounterFileLabels++;
if (buildCounterFileLabels < 3) {
unittest.expect(o.hidden!, unittest.isTrue);
unittest.expect(o.modified!, unittest.isTrue);
unittest.expect(o.restricted!, unittest.isTrue);
unittest.expect(o.starred!, unittest.isTrue);
unittest.expect(o.trashed!, unittest.isTrue);
unittest.expect(o.viewed!, unittest.isTrue);
}
buildCounterFileLabels--;
}
core.int buildCounterFileLinkShareMetadata = 0;
api.FileLinkShareMetadata buildFileLinkShareMetadata() {
final o = api.FileLinkShareMetadata();
buildCounterFileLinkShareMetadata++;
if (buildCounterFileLinkShareMetadata < 3) {
o.securityUpdateEligible = true;
o.securityUpdateEnabled = true;
}
buildCounterFileLinkShareMetadata--;
return o;
}
void checkFileLinkShareMetadata(api.FileLinkShareMetadata o) {
buildCounterFileLinkShareMetadata++;
if (buildCounterFileLinkShareMetadata < 3) {
unittest.expect(o.securityUpdateEligible!, unittest.isTrue);
unittest.expect(o.securityUpdateEnabled!, unittest.isTrue);
}
buildCounterFileLinkShareMetadata--;
}
core.Map<core.String, core.String> buildUnnamed30() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed30(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.List<core.String> buildUnnamed31() => [
'foo',
'foo',
];
void checkUnnamed31(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.List<api.User> buildUnnamed32() => [
buildUser(),
buildUser(),
];
void checkUnnamed32(core.List<api.User> o) {
unittest.expect(o, unittest.hasLength(2));
checkUser(o[0]);
checkUser(o[1]);
}
core.List<api.ParentReference> buildUnnamed33() => [
buildParentReference(),
buildParentReference(),
];
void checkUnnamed33(core.List<api.ParentReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkParentReference(o[0]);
checkParentReference(o[1]);
}
core.List<core.String> buildUnnamed34() => [
'foo',
'foo',
];
void checkUnnamed34(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.List<api.Permission> buildUnnamed35() => [
buildPermission(),
buildPermission(),
];
void checkUnnamed35(core.List<api.Permission> o) {
unittest.expect(o, unittest.hasLength(2));
checkPermission(o[0]);
checkPermission(o[1]);
}
core.List<api.Property> buildUnnamed36() => [
buildProperty(),
buildProperty(),
];
void checkUnnamed36(core.List<api.Property> o) {
unittest.expect(o, unittest.hasLength(2));
checkProperty(o[0]);
checkProperty(o[1]);
}
core.int buildCounterFileShortcutDetails = 0;
api.FileShortcutDetails buildFileShortcutDetails() {
final o = api.FileShortcutDetails();
buildCounterFileShortcutDetails++;
if (buildCounterFileShortcutDetails < 3) {
o.targetId = 'foo';
o.targetMimeType = 'foo';
o.targetResourceKey = 'foo';
}
buildCounterFileShortcutDetails--;
return o;
}
void checkFileShortcutDetails(api.FileShortcutDetails o) {
buildCounterFileShortcutDetails++;
if (buildCounterFileShortcutDetails < 3) {
unittest.expect(
o.targetId!,
unittest.equals('foo'),
);
unittest.expect(
o.targetMimeType!,
unittest.equals('foo'),
);
unittest.expect(
o.targetResourceKey!,
unittest.equals('foo'),
);
}
buildCounterFileShortcutDetails--;
}
core.List<core.String> buildUnnamed37() => [
'foo',
'foo',
];
void checkUnnamed37(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 buildCounterFileThumbnail = 0;
api.FileThumbnail buildFileThumbnail() {
final o = api.FileThumbnail();
buildCounterFileThumbnail++;
if (buildCounterFileThumbnail < 3) {
o.image = 'foo';
o.mimeType = 'foo';
}
buildCounterFileThumbnail--;
return o;
}
void checkFileThumbnail(api.FileThumbnail o) {
buildCounterFileThumbnail++;
if (buildCounterFileThumbnail < 3) {
unittest.expect(
o.image!,
unittest.equals('foo'),
);
unittest.expect(
o.mimeType!,
unittest.equals('foo'),
);
}
buildCounterFileThumbnail--;
}
core.int buildCounterFileVideoMediaMetadata = 0;
api.FileVideoMediaMetadata buildFileVideoMediaMetadata() {
final o = api.FileVideoMediaMetadata();
buildCounterFileVideoMediaMetadata++;
if (buildCounterFileVideoMediaMetadata < 3) {
o.durationMillis = 'foo';
o.height = 42;
o.width = 42;
}
buildCounterFileVideoMediaMetadata--;
return o;
}
void checkFileVideoMediaMetadata(api.FileVideoMediaMetadata o) {
buildCounterFileVideoMediaMetadata++;
if (buildCounterFileVideoMediaMetadata < 3) {
unittest.expect(
o.durationMillis!,
unittest.equals('foo'),
);
unittest.expect(
o.height!,
unittest.equals(42),
);
unittest.expect(
o.width!,
unittest.equals(42),
);
}
buildCounterFileVideoMediaMetadata--;
}
core.int buildCounterFile = 0;
api.File buildFile() {
final o = api.File();
buildCounterFile++;
if (buildCounterFile < 3) {
o.alternateLink = 'foo';
o.appDataContents = true;
o.canComment = true;
o.canReadRevisions = true;
o.capabilities = buildFileCapabilities();
o.contentRestrictions = buildUnnamed27();
o.copyRequiresWriterPermission = true;
o.copyable = true;
o.createdDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.defaultOpenWithLink = 'foo';
o.description = 'foo';
o.downloadUrl = 'foo';
o.driveId = 'foo';
o.editable = true;
o.embedLink = 'foo';
o.etag = 'foo';
o.explicitlyTrashed = true;
o.exportLinks = buildUnnamed28();
o.fileExtension = 'foo';
o.fileSize = 'foo';
o.folderColorRgb = 'foo';
o.fullFileExtension = 'foo';
o.hasAugmentedPermissions = true;
o.hasThumbnail = true;
o.headRevisionId = 'foo';
o.iconLink = 'foo';
o.id = 'foo';
o.imageMediaMetadata = buildFileImageMediaMetadata();
o.indexableText = buildFileIndexableText();
o.isAppAuthorized = true;
o.kind = 'foo';
o.labelInfo = buildFileLabelInfo();
o.labels = buildFileLabels();
o.lastModifyingUser = buildUser();
o.lastModifyingUserName = 'foo';
o.lastViewedByMeDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.linkShareMetadata = buildFileLinkShareMetadata();
o.markedViewedByMeDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.md5Checksum = 'foo';
o.mimeType = 'foo';
o.modifiedByMeDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.modifiedDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.openWithLinks = buildUnnamed30();
o.originalFilename = 'foo';
o.ownedByMe = true;
o.ownerNames = buildUnnamed31();
o.owners = buildUnnamed32();
o.parents = buildUnnamed33();
o.permissionIds = buildUnnamed34();
o.permissions = buildUnnamed35();
o.properties = buildUnnamed36();
o.quotaBytesUsed = 'foo';
o.resourceKey = 'foo';
o.selfLink = 'foo';
o.sha1Checksum = 'foo';
o.sha256Checksum = 'foo';
o.shareable = true;
o.shared = true;
o.sharedWithMeDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.sharingUser = buildUser();
o.shortcutDetails = buildFileShortcutDetails();
o.spaces = buildUnnamed37();
o.teamDriveId = 'foo';
o.thumbnail = buildFileThumbnail();
o.thumbnailLink = 'foo';
o.thumbnailVersion = 'foo';
o.title = 'foo';
o.trashedDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.trashingUser = buildUser();
o.userPermission = buildPermission();
o.version = 'foo';
o.videoMediaMetadata = buildFileVideoMediaMetadata();
o.webContentLink = 'foo';
o.webViewLink = 'foo';
o.writersCanShare = true;
}
buildCounterFile--;
return o;
}
void checkFile(api.File o) {
buildCounterFile++;
if (buildCounterFile < 3) {
unittest.expect(
o.alternateLink!,
unittest.equals('foo'),
);
unittest.expect(o.appDataContents!, unittest.isTrue);
unittest.expect(o.canComment!, unittest.isTrue);
unittest.expect(o.canReadRevisions!, unittest.isTrue);
checkFileCapabilities(o.capabilities!);
checkUnnamed27(o.contentRestrictions!);
unittest.expect(o.copyRequiresWriterPermission!, unittest.isTrue);
unittest.expect(o.copyable!, unittest.isTrue);
unittest.expect(
o.createdDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.defaultOpenWithLink!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.downloadUrl!,
unittest.equals('foo'),
);
unittest.expect(
o.driveId!,
unittest.equals('foo'),
);
unittest.expect(o.editable!, unittest.isTrue);
unittest.expect(
o.embedLink!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(o.explicitlyTrashed!, unittest.isTrue);
checkUnnamed28(o.exportLinks!);
unittest.expect(
o.fileExtension!,
unittest.equals('foo'),
);
unittest.expect(
o.fileSize!,
unittest.equals('foo'),
);
unittest.expect(
o.folderColorRgb!,
unittest.equals('foo'),
);
unittest.expect(
o.fullFileExtension!,
unittest.equals('foo'),
);
unittest.expect(o.hasAugmentedPermissions!, unittest.isTrue);
unittest.expect(o.hasThumbnail!, unittest.isTrue);
unittest.expect(
o.headRevisionId!,
unittest.equals('foo'),
);
unittest.expect(
o.iconLink!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkFileImageMediaMetadata(o.imageMediaMetadata!);
checkFileIndexableText(o.indexableText!);
unittest.expect(o.isAppAuthorized!, unittest.isTrue);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
checkFileLabelInfo(o.labelInfo!);
checkFileLabels(o.labels!);
checkUser(o.lastModifyingUser!);
unittest.expect(
o.lastModifyingUserName!,
unittest.equals('foo'),
);
unittest.expect(
o.lastViewedByMeDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
checkFileLinkShareMetadata(o.linkShareMetadata!);
unittest.expect(
o.markedViewedByMeDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.md5Checksum!,
unittest.equals('foo'),
);
unittest.expect(
o.mimeType!,
unittest.equals('foo'),
);
unittest.expect(
o.modifiedByMeDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.modifiedDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
checkUnnamed30(o.openWithLinks!);
unittest.expect(
o.originalFilename!,
unittest.equals('foo'),
);
unittest.expect(o.ownedByMe!, unittest.isTrue);
checkUnnamed31(o.ownerNames!);
checkUnnamed32(o.owners!);
checkUnnamed33(o.parents!);
checkUnnamed34(o.permissionIds!);
checkUnnamed35(o.permissions!);
checkUnnamed36(o.properties!);
unittest.expect(
o.quotaBytesUsed!,
unittest.equals('foo'),
);
unittest.expect(
o.resourceKey!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
unittest.expect(
o.sha1Checksum!,
unittest.equals('foo'),
);
unittest.expect(
o.sha256Checksum!,
unittest.equals('foo'),
);
unittest.expect(o.shareable!, unittest.isTrue);
unittest.expect(o.shared!, unittest.isTrue);
unittest.expect(
o.sharedWithMeDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
checkUser(o.sharingUser!);
checkFileShortcutDetails(o.shortcutDetails!);
checkUnnamed37(o.spaces!);
unittest.expect(
o.teamDriveId!,
unittest.equals('foo'),
);
checkFileThumbnail(o.thumbnail!);
unittest.expect(
o.thumbnailLink!,
unittest.equals('foo'),
);
unittest.expect(
o.thumbnailVersion!,
unittest.equals('foo'),
);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
unittest.expect(
o.trashedDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
checkUser(o.trashingUser!);
checkPermission(o.userPermission!);
unittest.expect(
o.version!,
unittest.equals('foo'),
);
checkFileVideoMediaMetadata(o.videoMediaMetadata!);
unittest.expect(
o.webContentLink!,
unittest.equals('foo'),
);
unittest.expect(
o.webViewLink!,
unittest.equals('foo'),
);
unittest.expect(o.writersCanShare!, unittest.isTrue);
}
buildCounterFile--;
}
core.List<api.File> buildUnnamed38() => [
buildFile(),
buildFile(),
];
void checkUnnamed38(core.List<api.File> o) {
unittest.expect(o, unittest.hasLength(2));
checkFile(o[0]);
checkFile(o[1]);
}
core.int buildCounterFileList = 0;
api.FileList buildFileList() {
final o = api.FileList();
buildCounterFileList++;
if (buildCounterFileList < 3) {
o.etag = 'foo';
o.incompleteSearch = true;
o.items = buildUnnamed38();
o.kind = 'foo';
o.nextLink = 'foo';
o.nextPageToken = 'foo';
o.selfLink = 'foo';
}
buildCounterFileList--;
return o;
}
void checkFileList(api.FileList o) {
buildCounterFileList++;
if (buildCounterFileList < 3) {
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(o.incompleteSearch!, unittest.isTrue);
checkUnnamed38(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextLink!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterFileList--;
}
core.List<core.String> buildUnnamed39() => [
'foo',
'foo',
];
void checkUnnamed39(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 buildCounterGeneratedIds = 0;
api.GeneratedIds buildGeneratedIds() {
final o = api.GeneratedIds();
buildCounterGeneratedIds++;
if (buildCounterGeneratedIds < 3) {
o.ids = buildUnnamed39();
o.kind = 'foo';
o.space = 'foo';
}
buildCounterGeneratedIds--;
return o;
}
void checkGeneratedIds(api.GeneratedIds o) {
buildCounterGeneratedIds++;
if (buildCounterGeneratedIds < 3) {
checkUnnamed39(o.ids!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.space!,
unittest.equals('foo'),
);
}
buildCounterGeneratedIds--;
}
core.Map<core.String, api.LabelField> buildUnnamed40() => {
'x': buildLabelField(),
'y': buildLabelField(),
};
void checkUnnamed40(core.Map<core.String, api.LabelField> o) {
unittest.expect(o, unittest.hasLength(2));
checkLabelField(o['x']!);
checkLabelField(o['y']!);
}
core.int buildCounterLabel = 0;
api.Label buildLabel() {
final o = api.Label();
buildCounterLabel++;
if (buildCounterLabel < 3) {
o.fields = buildUnnamed40();
o.id = 'foo';
o.kind = 'foo';
o.revisionId = 'foo';
}
buildCounterLabel--;
return o;
}
void checkLabel(api.Label o) {
buildCounterLabel++;
if (buildCounterLabel < 3) {
checkUnnamed40(o.fields!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.revisionId!,
unittest.equals('foo'),
);
}
buildCounterLabel--;
}
core.List<core.DateTime> buildUnnamed41() => [
core.DateTime.parse('2002-02-27T14:01:02Z'),
core.DateTime.parse('2002-02-27T14:01:02Z'),
];
void checkUnnamed41(core.List<core.DateTime> o) {
unittest.expect(o, unittest.hasLength(2));
unittest.expect(
o[0],
unittest.equals(core.DateTime.parse('2002-02-27T00:00:00')),
);
unittest.expect(
o[1],
unittest.equals(core.DateTime.parse('2002-02-27T00:00:00')),
);
}
core.List<core.String> buildUnnamed42() => [
'foo',
'foo',
];
void checkUnnamed42(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.List<core.String> buildUnnamed43() => [
'foo',
'foo',
];
void checkUnnamed43(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.List<core.String> buildUnnamed44() => [
'foo',
'foo',
];
void checkUnnamed44(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.List<api.User> buildUnnamed45() => [
buildUser(),
buildUser(),
];
void checkUnnamed45(core.List<api.User> o) {
unittest.expect(o, unittest.hasLength(2));
checkUser(o[0]);
checkUser(o[1]);
}
core.int buildCounterLabelField = 0;
api.LabelField buildLabelField() {
final o = api.LabelField();
buildCounterLabelField++;
if (buildCounterLabelField < 3) {
o.dateString = buildUnnamed41();
o.id = 'foo';
o.integer = buildUnnamed42();
o.kind = 'foo';
o.selection = buildUnnamed43();
o.text = buildUnnamed44();
o.user = buildUnnamed45();
o.valueType = 'foo';
}
buildCounterLabelField--;
return o;
}
void checkLabelField(api.LabelField o) {
buildCounterLabelField++;
if (buildCounterLabelField < 3) {
checkUnnamed41(o.dateString!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkUnnamed42(o.integer!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
checkUnnamed43(o.selection!);
checkUnnamed44(o.text!);
checkUnnamed45(o.user!);
unittest.expect(
o.valueType!,
unittest.equals('foo'),
);
}
buildCounterLabelField--;
}
core.List<core.DateTime> buildUnnamed46() => [
core.DateTime.parse('2002-02-27T14:01:02Z'),
core.DateTime.parse('2002-02-27T14:01:02Z'),
];
void checkUnnamed46(core.List<core.DateTime> o) {
unittest.expect(o, unittest.hasLength(2));
unittest.expect(
o[0],
unittest.equals(core.DateTime.parse('2002-02-27T00:00:00')),
);
unittest.expect(
o[1],
unittest.equals(core.DateTime.parse('2002-02-27T00:00:00')),
);
}
core.List<core.String> buildUnnamed47() => [
'foo',
'foo',
];
void checkUnnamed47(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.List<core.String> buildUnnamed48() => [
'foo',
'foo',
];
void checkUnnamed48(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.List<core.String> buildUnnamed49() => [
'foo',
'foo',
];
void checkUnnamed49(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.List<core.String> buildUnnamed50() => [
'foo',
'foo',
];
void checkUnnamed50(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 buildCounterLabelFieldModification = 0;
api.LabelFieldModification buildLabelFieldModification() {
final o = api.LabelFieldModification();
buildCounterLabelFieldModification++;
if (buildCounterLabelFieldModification < 3) {
o.fieldId = 'foo';
o.kind = 'foo';
o.setDateValues = buildUnnamed46();
o.setIntegerValues = buildUnnamed47();
o.setSelectionValues = buildUnnamed48();
o.setTextValues = buildUnnamed49();
o.setUserValues = buildUnnamed50();
o.unsetValues = true;
}
buildCounterLabelFieldModification--;
return o;
}
void checkLabelFieldModification(api.LabelFieldModification o) {
buildCounterLabelFieldModification++;
if (buildCounterLabelFieldModification < 3) {
unittest.expect(
o.fieldId!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
checkUnnamed46(o.setDateValues!);
checkUnnamed47(o.setIntegerValues!);
checkUnnamed48(o.setSelectionValues!);
checkUnnamed49(o.setTextValues!);
checkUnnamed50(o.setUserValues!);
unittest.expect(o.unsetValues!, unittest.isTrue);
}
buildCounterLabelFieldModification--;
}
core.List<api.Label> buildUnnamed51() => [
buildLabel(),
buildLabel(),
];
void checkUnnamed51(core.List<api.Label> o) {
unittest.expect(o, unittest.hasLength(2));
checkLabel(o[0]);
checkLabel(o[1]);
}
core.int buildCounterLabelList = 0;
api.LabelList buildLabelList() {
final o = api.LabelList();
buildCounterLabelList++;
if (buildCounterLabelList < 3) {
o.items = buildUnnamed51();
o.kind = 'foo';
o.nextPageToken = 'foo';
}
buildCounterLabelList--;
return o;
}
void checkLabelList(api.LabelList o) {
buildCounterLabelList++;
if (buildCounterLabelList < 3) {
checkUnnamed51(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterLabelList--;
}
core.List<api.LabelFieldModification> buildUnnamed52() => [
buildLabelFieldModification(),
buildLabelFieldModification(),
];
void checkUnnamed52(core.List<api.LabelFieldModification> o) {
unittest.expect(o, unittest.hasLength(2));
checkLabelFieldModification(o[0]);
checkLabelFieldModification(o[1]);
}
core.int buildCounterLabelModification = 0;
api.LabelModification buildLabelModification() {
final o = api.LabelModification();
buildCounterLabelModification++;
if (buildCounterLabelModification < 3) {
o.fieldModifications = buildUnnamed52();
o.kind = 'foo';
o.labelId = 'foo';
o.removeLabel = true;
}
buildCounterLabelModification--;
return o;
}
void checkLabelModification(api.LabelModification o) {
buildCounterLabelModification++;
if (buildCounterLabelModification < 3) {
checkUnnamed52(o.fieldModifications!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.labelId!,
unittest.equals('foo'),
);
unittest.expect(o.removeLabel!, unittest.isTrue);
}
buildCounterLabelModification--;
}
core.List<api.LabelModification> buildUnnamed53() => [
buildLabelModification(),
buildLabelModification(),
];
void checkUnnamed53(core.List<api.LabelModification> o) {
unittest.expect(o, unittest.hasLength(2));
checkLabelModification(o[0]);
checkLabelModification(o[1]);
}
core.int buildCounterModifyLabelsRequest = 0;
api.ModifyLabelsRequest buildModifyLabelsRequest() {
final o = api.ModifyLabelsRequest();
buildCounterModifyLabelsRequest++;
if (buildCounterModifyLabelsRequest < 3) {
o.kind = 'foo';
o.labelModifications = buildUnnamed53();
}
buildCounterModifyLabelsRequest--;
return o;
}
void checkModifyLabelsRequest(api.ModifyLabelsRequest o) {
buildCounterModifyLabelsRequest++;
if (buildCounterModifyLabelsRequest < 3) {
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
checkUnnamed53(o.labelModifications!);
}
buildCounterModifyLabelsRequest--;
}
core.List<api.Label> buildUnnamed54() => [
buildLabel(),
buildLabel(),
];
void checkUnnamed54(core.List<api.Label> o) {
unittest.expect(o, unittest.hasLength(2));
checkLabel(o[0]);
checkLabel(o[1]);
}
core.int buildCounterModifyLabelsResponse = 0;
api.ModifyLabelsResponse buildModifyLabelsResponse() {
final o = api.ModifyLabelsResponse();
buildCounterModifyLabelsResponse++;
if (buildCounterModifyLabelsResponse < 3) {
o.kind = 'foo';
o.modifiedLabels = buildUnnamed54();
}
buildCounterModifyLabelsResponse--;
return o;
}
void checkModifyLabelsResponse(api.ModifyLabelsResponse o) {
buildCounterModifyLabelsResponse++;
if (buildCounterModifyLabelsResponse < 3) {
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
checkUnnamed54(o.modifiedLabels!);
}
buildCounterModifyLabelsResponse--;
}
core.List<api.ParentReference> buildUnnamed55() => [
buildParentReference(),
buildParentReference(),
];
void checkUnnamed55(core.List<api.ParentReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkParentReference(o[0]);
checkParentReference(o[1]);
}
core.int buildCounterParentList = 0;
api.ParentList buildParentList() {
final o = api.ParentList();
buildCounterParentList++;
if (buildCounterParentList < 3) {
o.etag = 'foo';
o.items = buildUnnamed55();
o.kind = 'foo';
o.selfLink = 'foo';
}
buildCounterParentList--;
return o;
}
void checkParentList(api.ParentList o) {
buildCounterParentList++;
if (buildCounterParentList < 3) {
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed55(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterParentList--;
}
core.int buildCounterParentReference = 0;
api.ParentReference buildParentReference() {
final o = api.ParentReference();
buildCounterParentReference++;
if (buildCounterParentReference < 3) {
o.id = 'foo';
o.isRoot = true;
o.kind = 'foo';
o.parentLink = 'foo';
o.selfLink = 'foo';
}
buildCounterParentReference--;
return o;
}
void checkParentReference(api.ParentReference o) {
buildCounterParentReference++;
if (buildCounterParentReference < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(o.isRoot!, unittest.isTrue);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.parentLink!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterParentReference--;
}
core.List<core.String> buildUnnamed56() => [
'foo',
'foo',
];
void checkUnnamed56(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.List<core.String> buildUnnamed57() => [
'foo',
'foo',
];
void checkUnnamed57(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 buildCounterPermissionPermissionDetails = 0;
api.PermissionPermissionDetails buildPermissionPermissionDetails() {
final o = api.PermissionPermissionDetails();
buildCounterPermissionPermissionDetails++;
if (buildCounterPermissionPermissionDetails < 3) {
o.additionalRoles = buildUnnamed57();
o.inherited = true;
o.inheritedFrom = 'foo';
o.permissionType = 'foo';
o.role = 'foo';
}
buildCounterPermissionPermissionDetails--;
return o;
}
void checkPermissionPermissionDetails(api.PermissionPermissionDetails o) {
buildCounterPermissionPermissionDetails++;
if (buildCounterPermissionPermissionDetails < 3) {
checkUnnamed57(o.additionalRoles!);
unittest.expect(o.inherited!, unittest.isTrue);
unittest.expect(
o.inheritedFrom!,
unittest.equals('foo'),
);
unittest.expect(
o.permissionType!,
unittest.equals('foo'),
);
unittest.expect(
o.role!,
unittest.equals('foo'),
);
}
buildCounterPermissionPermissionDetails--;
}
core.List<api.PermissionPermissionDetails> buildUnnamed58() => [
buildPermissionPermissionDetails(),
buildPermissionPermissionDetails(),
];
void checkUnnamed58(core.List<api.PermissionPermissionDetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkPermissionPermissionDetails(o[0]);
checkPermissionPermissionDetails(o[1]);
}
core.List<core.String> buildUnnamed59() => [
'foo',
'foo',
];
void checkUnnamed59(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 buildCounterPermissionTeamDrivePermissionDetails = 0;
api.PermissionTeamDrivePermissionDetails
buildPermissionTeamDrivePermissionDetails() {
final o = api.PermissionTeamDrivePermissionDetails();
buildCounterPermissionTeamDrivePermissionDetails++;
if (buildCounterPermissionTeamDrivePermissionDetails < 3) {
o.additionalRoles = buildUnnamed59();
o.inherited = true;
o.inheritedFrom = 'foo';
o.role = 'foo';
o.teamDrivePermissionType = 'foo';
}
buildCounterPermissionTeamDrivePermissionDetails--;
return o;
}
void checkPermissionTeamDrivePermissionDetails(
api.PermissionTeamDrivePermissionDetails o) {
buildCounterPermissionTeamDrivePermissionDetails++;
if (buildCounterPermissionTeamDrivePermissionDetails < 3) {
checkUnnamed59(o.additionalRoles!);
unittest.expect(o.inherited!, unittest.isTrue);
unittest.expect(
o.inheritedFrom!,
unittest.equals('foo'),
);
unittest.expect(
o.role!,
unittest.equals('foo'),
);
unittest.expect(
o.teamDrivePermissionType!,
unittest.equals('foo'),
);
}
buildCounterPermissionTeamDrivePermissionDetails--;
}
core.List<api.PermissionTeamDrivePermissionDetails> buildUnnamed60() => [
buildPermissionTeamDrivePermissionDetails(),
buildPermissionTeamDrivePermissionDetails(),
];
void checkUnnamed60(core.List<api.PermissionTeamDrivePermissionDetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkPermissionTeamDrivePermissionDetails(o[0]);
checkPermissionTeamDrivePermissionDetails(o[1]);
}
core.int buildCounterPermission = 0;
api.Permission buildPermission() {
final o = api.Permission();
buildCounterPermission++;
if (buildCounterPermission < 3) {
o.additionalRoles = buildUnnamed56();
o.authKey = 'foo';
o.deleted = true;
o.domain = 'foo';
o.emailAddress = 'foo';
o.etag = 'foo';
o.expirationDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.id = 'foo';
o.kind = 'foo';
o.name = 'foo';
o.pendingOwner = true;
o.permissionDetails = buildUnnamed58();
o.photoLink = 'foo';
o.role = 'foo';
o.selfLink = 'foo';
o.teamDrivePermissionDetails = buildUnnamed60();
o.type = 'foo';
o.value = 'foo';
o.view = 'foo';
o.withLink = true;
}
buildCounterPermission--;
return o;
}
void checkPermission(api.Permission o) {
buildCounterPermission++;
if (buildCounterPermission < 3) {
checkUnnamed56(o.additionalRoles!);
unittest.expect(
o.authKey!,
unittest.equals('foo'),
);
unittest.expect(o.deleted!, unittest.isTrue);
unittest.expect(
o.domain!,
unittest.equals('foo'),
);
unittest.expect(
o.emailAddress!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.expirationDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(o.pendingOwner!, unittest.isTrue);
checkUnnamed58(o.permissionDetails!);
unittest.expect(
o.photoLink!,
unittest.equals('foo'),
);
unittest.expect(
o.role!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
checkUnnamed60(o.teamDrivePermissionDetails!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
unittest.expect(
o.view!,
unittest.equals('foo'),
);
unittest.expect(o.withLink!, unittest.isTrue);
}
buildCounterPermission--;
}
core.int buildCounterPermissionId = 0;
api.PermissionId buildPermissionId() {
final o = api.PermissionId();
buildCounterPermissionId++;
if (buildCounterPermissionId < 3) {
o.id = 'foo';
o.kind = 'foo';
}
buildCounterPermissionId--;
return o;
}
void checkPermissionId(api.PermissionId o) {
buildCounterPermissionId++;
if (buildCounterPermissionId < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
}
buildCounterPermissionId--;
}
core.List<api.Permission> buildUnnamed61() => [
buildPermission(),
buildPermission(),
];
void checkUnnamed61(core.List<api.Permission> o) {
unittest.expect(o, unittest.hasLength(2));
checkPermission(o[0]);
checkPermission(o[1]);
}
core.int buildCounterPermissionList = 0;
api.PermissionList buildPermissionList() {
final o = api.PermissionList();
buildCounterPermissionList++;
if (buildCounterPermissionList < 3) {
o.etag = 'foo';
o.items = buildUnnamed61();
o.kind = 'foo';
o.nextPageToken = 'foo';
o.selfLink = 'foo';
}
buildCounterPermissionList--;
return o;
}
void checkPermissionList(api.PermissionList o) {
buildCounterPermissionList++;
if (buildCounterPermissionList < 3) {
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed61(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterPermissionList--;
}
core.int buildCounterProperty = 0;
api.Property buildProperty() {
final o = api.Property();
buildCounterProperty++;
if (buildCounterProperty < 3) {
o.etag = 'foo';
o.key = 'foo';
o.kind = 'foo';
o.selfLink = 'foo';
o.value = 'foo';
o.visibility = 'foo';
}
buildCounterProperty--;
return o;
}
void checkProperty(api.Property o) {
buildCounterProperty++;
if (buildCounterProperty < 3) {
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
unittest.expect(
o.visibility!,
unittest.equals('foo'),
);
}
buildCounterProperty--;
}
core.List<api.Property> buildUnnamed62() => [
buildProperty(),
buildProperty(),
];
void checkUnnamed62(core.List<api.Property> o) {
unittest.expect(o, unittest.hasLength(2));
checkProperty(o[0]);
checkProperty(o[1]);
}
core.int buildCounterPropertyList = 0;
api.PropertyList buildPropertyList() {
final o = api.PropertyList();
buildCounterPropertyList++;
if (buildCounterPropertyList < 3) {
o.etag = 'foo';
o.items = buildUnnamed62();
o.kind = 'foo';
o.selfLink = 'foo';
}
buildCounterPropertyList--;
return o;
}
void checkPropertyList(api.PropertyList o) {
buildCounterPropertyList++;
if (buildCounterPropertyList < 3) {
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed62(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterPropertyList--;
}
core.Map<core.String, core.String> buildUnnamed63() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed63(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 buildCounterRevision = 0;
api.Revision buildRevision() {
final o = api.Revision();
buildCounterRevision++;
if (buildCounterRevision < 3) {
o.downloadUrl = 'foo';
o.etag = 'foo';
o.exportLinks = buildUnnamed63();
o.fileSize = 'foo';
o.id = 'foo';
o.kind = 'foo';
o.lastModifyingUser = buildUser();
o.lastModifyingUserName = 'foo';
o.md5Checksum = 'foo';
o.mimeType = 'foo';
o.modifiedDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.originalFilename = 'foo';
o.pinned = true;
o.publishAuto = true;
o.published = true;
o.publishedLink = 'foo';
o.publishedOutsideDomain = true;
o.selfLink = 'foo';
}
buildCounterRevision--;
return o;
}
void checkRevision(api.Revision o) {
buildCounterRevision++;
if (buildCounterRevision < 3) {
unittest.expect(
o.downloadUrl!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed63(o.exportLinks!);
unittest.expect(
o.fileSize!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
checkUser(o.lastModifyingUser!);
unittest.expect(
o.lastModifyingUserName!,
unittest.equals('foo'),
);
unittest.expect(
o.md5Checksum!,
unittest.equals('foo'),
);
unittest.expect(
o.mimeType!,
unittest.equals('foo'),
);
unittest.expect(
o.modifiedDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.originalFilename!,
unittest.equals('foo'),
);
unittest.expect(o.pinned!, unittest.isTrue);
unittest.expect(o.publishAuto!, unittest.isTrue);
unittest.expect(o.published!, unittest.isTrue);
unittest.expect(
o.publishedLink!,
unittest.equals('foo'),
);
unittest.expect(o.publishedOutsideDomain!, unittest.isTrue);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterRevision--;
}
core.List<api.Revision> buildUnnamed64() => [
buildRevision(),
buildRevision(),
];
void checkUnnamed64(core.List<api.Revision> o) {
unittest.expect(o, unittest.hasLength(2));
checkRevision(o[0]);
checkRevision(o[1]);
}
core.int buildCounterRevisionList = 0;
api.RevisionList buildRevisionList() {
final o = api.RevisionList();
buildCounterRevisionList++;
if (buildCounterRevisionList < 3) {
o.etag = 'foo';
o.items = buildUnnamed64();
o.kind = 'foo';
o.nextPageToken = 'foo';
o.selfLink = 'foo';
}
buildCounterRevisionList--;
return o;
}
void checkRevisionList(api.RevisionList o) {
buildCounterRevisionList++;
if (buildCounterRevisionList < 3) {
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed64(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.selfLink!,
unittest.equals('foo'),
);
}
buildCounterRevisionList--;
}
core.int buildCounterStartPageToken = 0;
api.StartPageToken buildStartPageToken() {
final o = api.StartPageToken();
buildCounterStartPageToken++;
if (buildCounterStartPageToken < 3) {
o.kind = 'foo';
o.startPageToken = 'foo';
}
buildCounterStartPageToken--;
return o;
}
void checkStartPageToken(api.StartPageToken o) {
buildCounterStartPageToken++;
if (buildCounterStartPageToken < 3) {
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.startPageToken!,
unittest.equals('foo'),
);
}
buildCounterStartPageToken--;
}
core.int buildCounterTeamDriveBackgroundImageFile = 0;
api.TeamDriveBackgroundImageFile buildTeamDriveBackgroundImageFile() {
final o = api.TeamDriveBackgroundImageFile();
buildCounterTeamDriveBackgroundImageFile++;
if (buildCounterTeamDriveBackgroundImageFile < 3) {
o.id = 'foo';
o.width = 42.0;
o.xCoordinate = 42.0;
o.yCoordinate = 42.0;
}
buildCounterTeamDriveBackgroundImageFile--;
return o;
}
void checkTeamDriveBackgroundImageFile(api.TeamDriveBackgroundImageFile o) {
buildCounterTeamDriveBackgroundImageFile++;
if (buildCounterTeamDriveBackgroundImageFile < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.width!,
unittest.equals(42.0),
);
unittest.expect(
o.xCoordinate!,
unittest.equals(42.0),
);
unittest.expect(
o.yCoordinate!,
unittest.equals(42.0),
);
}
buildCounterTeamDriveBackgroundImageFile--;
}
core.int buildCounterTeamDriveCapabilities = 0;
api.TeamDriveCapabilities buildTeamDriveCapabilities() {
final o = api.TeamDriveCapabilities();
buildCounterTeamDriveCapabilities++;
if (buildCounterTeamDriveCapabilities < 3) {
o.canAddChildren = true;
o.canChangeCopyRequiresWriterPermissionRestriction = true;
o.canChangeDomainUsersOnlyRestriction = true;
o.canChangeSharingFoldersRequiresOrganizerPermissionRestriction = true;
o.canChangeTeamDriveBackground = true;
o.canChangeTeamMembersOnlyRestriction = true;
o.canComment = true;
o.canCopy = true;
o.canDeleteChildren = true;
o.canDeleteTeamDrive = true;
o.canDownload = true;
o.canEdit = true;
o.canListChildren = true;
o.canManageMembers = true;
o.canReadRevisions = true;
o.canRemoveChildren = true;
o.canRename = true;
o.canRenameTeamDrive = true;
o.canResetTeamDriveRestrictions = true;
o.canShare = true;
o.canTrashChildren = true;
}
buildCounterTeamDriveCapabilities--;
return o;
}
void checkTeamDriveCapabilities(api.TeamDriveCapabilities o) {
buildCounterTeamDriveCapabilities++;
if (buildCounterTeamDriveCapabilities < 3) {
unittest.expect(o.canAddChildren!, unittest.isTrue);
unittest.expect(
o.canChangeCopyRequiresWriterPermissionRestriction!, unittest.isTrue);
unittest.expect(o.canChangeDomainUsersOnlyRestriction!, unittest.isTrue);
unittest.expect(
o.canChangeSharingFoldersRequiresOrganizerPermissionRestriction!,
unittest.isTrue);
unittest.expect(o.canChangeTeamDriveBackground!, unittest.isTrue);
unittest.expect(o.canChangeTeamMembersOnlyRestriction!, unittest.isTrue);
unittest.expect(o.canComment!, unittest.isTrue);
unittest.expect(o.canCopy!, unittest.isTrue);
unittest.expect(o.canDeleteChildren!, unittest.isTrue);
unittest.expect(o.canDeleteTeamDrive!, unittest.isTrue);
unittest.expect(o.canDownload!, unittest.isTrue);
unittest.expect(o.canEdit!, unittest.isTrue);
unittest.expect(o.canListChildren!, unittest.isTrue);
unittest.expect(o.canManageMembers!, unittest.isTrue);
unittest.expect(o.canReadRevisions!, unittest.isTrue);
unittest.expect(o.canRemoveChildren!, unittest.isTrue);
unittest.expect(o.canRename!, unittest.isTrue);
unittest.expect(o.canRenameTeamDrive!, unittest.isTrue);
unittest.expect(o.canResetTeamDriveRestrictions!, unittest.isTrue);
unittest.expect(o.canShare!, unittest.isTrue);
unittest.expect(o.canTrashChildren!, unittest.isTrue);
}
buildCounterTeamDriveCapabilities--;
}
core.int buildCounterTeamDriveRestrictions = 0;
api.TeamDriveRestrictions buildTeamDriveRestrictions() {
final o = api.TeamDriveRestrictions();
buildCounterTeamDriveRestrictions++;
if (buildCounterTeamDriveRestrictions < 3) {
o.adminManagedRestrictions = true;
o.copyRequiresWriterPermission = true;
o.domainUsersOnly = true;
o.sharingFoldersRequiresOrganizerPermission = true;
o.teamMembersOnly = true;
}
buildCounterTeamDriveRestrictions--;
return o;
}
void checkTeamDriveRestrictions(api.TeamDriveRestrictions o) {
buildCounterTeamDriveRestrictions++;
if (buildCounterTeamDriveRestrictions < 3) {
unittest.expect(o.adminManagedRestrictions!, unittest.isTrue);
unittest.expect(o.copyRequiresWriterPermission!, unittest.isTrue);
unittest.expect(o.domainUsersOnly!, unittest.isTrue);
unittest.expect(
o.sharingFoldersRequiresOrganizerPermission!, unittest.isTrue);
unittest.expect(o.teamMembersOnly!, unittest.isTrue);
}
buildCounterTeamDriveRestrictions--;
}
core.int buildCounterTeamDrive = 0;
api.TeamDrive buildTeamDrive() {
final o = api.TeamDrive();
buildCounterTeamDrive++;
if (buildCounterTeamDrive < 3) {
o.backgroundImageFile = buildTeamDriveBackgroundImageFile();
o.backgroundImageLink = 'foo';
o.capabilities = buildTeamDriveCapabilities();
o.colorRgb = 'foo';
o.createdDate = core.DateTime.parse('2002-02-27T14:01:02Z');
o.id = 'foo';
o.kind = 'foo';
o.name = 'foo';
o.orgUnitId = 'foo';
o.restrictions = buildTeamDriveRestrictions();
o.themeId = 'foo';
}
buildCounterTeamDrive--;
return o;
}
void checkTeamDrive(api.TeamDrive o) {
buildCounterTeamDrive++;
if (buildCounterTeamDrive < 3) {
checkTeamDriveBackgroundImageFile(o.backgroundImageFile!);
unittest.expect(
o.backgroundImageLink!,
unittest.equals('foo'),
);
checkTeamDriveCapabilities(o.capabilities!);
unittest.expect(
o.colorRgb!,
unittest.equals('foo'),
);
unittest.expect(
o.createdDate!,
unittest.equals(core.DateTime.parse('2002-02-27T14:01:02Z')),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.orgUnitId!,
unittest.equals('foo'),
);
checkTeamDriveRestrictions(o.restrictions!);
unittest.expect(
o.themeId!,
unittest.equals('foo'),
);
}
buildCounterTeamDrive--;
}
core.List<api.TeamDrive> buildUnnamed65() => [
buildTeamDrive(),
buildTeamDrive(),
];
void checkUnnamed65(core.List<api.TeamDrive> o) {
unittest.expect(o, unittest.hasLength(2));
checkTeamDrive(o[0]);
checkTeamDrive(o[1]);
}
core.int buildCounterTeamDriveList = 0;
api.TeamDriveList buildTeamDriveList() {
final o = api.TeamDriveList();
buildCounterTeamDriveList++;
if (buildCounterTeamDriveList < 3) {
o.items = buildUnnamed65();
o.kind = 'foo';
o.nextPageToken = 'foo';
}
buildCounterTeamDriveList--;
return o;
}
void checkTeamDriveList(api.TeamDriveList o) {
buildCounterTeamDriveList++;
if (buildCounterTeamDriveList < 3) {
checkUnnamed65(o.items!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterTeamDriveList--;
}
core.int buildCounterUserPicture = 0;
api.UserPicture buildUserPicture() {
final o = api.UserPicture();
buildCounterUserPicture++;
if (buildCounterUserPicture < 3) {
o.url = 'foo';
}
buildCounterUserPicture--;
return o;
}
void checkUserPicture(api.UserPicture o) {
buildCounterUserPicture++;
if (buildCounterUserPicture < 3) {
unittest.expect(
o.url!,
unittest.equals('foo'),
);
}
buildCounterUserPicture--;
}
core.int buildCounterUser = 0;
api.User buildUser() {
final o = api.User();
buildCounterUser++;
if (buildCounterUser < 3) {
o.displayName = 'foo';
o.emailAddress = 'foo';
o.isAuthenticatedUser = true;
o.kind = 'foo';
o.permissionId = 'foo';
o.picture = buildUserPicture();
}
buildCounterUser--;
return o;
}
void checkUser(api.User o) {
buildCounterUser++;
if (buildCounterUser < 3) {
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.emailAddress!,
unittest.equals('foo'),
);
unittest.expect(o.isAuthenticatedUser!, unittest.isTrue);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.permissionId!,
unittest.equals('foo'),
);
checkUserPicture(o.picture!);
}
buildCounterUser--;
}
void main() {
unittest.group('obj-schema-AboutAdditionalRoleInfoRoleSets', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutAdditionalRoleInfoRoleSets();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutAdditionalRoleInfoRoleSets.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutAdditionalRoleInfoRoleSets(od);
});
});
unittest.group('obj-schema-AboutAdditionalRoleInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutAdditionalRoleInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutAdditionalRoleInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutAdditionalRoleInfo(od);
});
});
unittest.group('obj-schema-AboutDriveThemes', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutDriveThemes();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutDriveThemes.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutDriveThemes(od);
});
});
unittest.group('obj-schema-AboutExportFormats', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutExportFormats();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutExportFormats.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutExportFormats(od);
});
});
unittest.group('obj-schema-AboutFeatures', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutFeatures();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutFeatures.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutFeatures(od);
});
});
unittest.group('obj-schema-AboutImportFormats', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutImportFormats();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutImportFormats.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutImportFormats(od);
});
});
unittest.group('obj-schema-AboutMaxUploadSizes', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutMaxUploadSizes();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutMaxUploadSizes.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutMaxUploadSizes(od);
});
});
unittest.group('obj-schema-AboutQuotaBytesByService', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutQuotaBytesByService();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutQuotaBytesByService.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutQuotaBytesByService(od);
});
});
unittest.group('obj-schema-AboutTeamDriveThemes', () {
unittest.test('to-json--from-json', () async {
final o = buildAboutTeamDriveThemes();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AboutTeamDriveThemes.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAboutTeamDriveThemes(od);
});
});
unittest.group('obj-schema-About', () {
unittest.test('to-json--from-json', () async {
final o = buildAbout();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.About.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkAbout(od);
});
});
unittest.group('obj-schema-AppIcons', () {
unittest.test('to-json--from-json', () async {
final o = buildAppIcons();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.AppIcons.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkAppIcons(od);
});
});
unittest.group('obj-schema-App', () {
unittest.test('to-json--from-json', () async {
final o = buildApp();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.App.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkApp(od);
});
});
unittest.group('obj-schema-AppList', () {
unittest.test('to-json--from-json', () async {
final o = buildAppList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.AppList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkAppList(od);
});
});
unittest.group('obj-schema-Change', () {
unittest.test('to-json--from-json', () async {
final o = buildChange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Change.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkChange(od);
});
});
unittest.group('obj-schema-ChangeList', () {
unittest.test('to-json--from-json', () async {
final o = buildChangeList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ChangeList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkChangeList(od);
});
});
unittest.group('obj-schema-Channel', () {
unittest.test('to-json--from-json', () async {
final o = buildChannel();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Channel.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkChannel(od);
});
});
unittest.group('obj-schema-ChildList', () {
unittest.test('to-json--from-json', () async {
final o = buildChildList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ChildList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkChildList(od);
});
});
unittest.group('obj-schema-ChildReference', () {
unittest.test('to-json--from-json', () async {
final o = buildChildReference();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ChildReference.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkChildReference(od);
});
});
unittest.group('obj-schema-CommentContext', () {
unittest.test('to-json--from-json', () async {
final o = buildCommentContext();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CommentContext.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCommentContext(od);
});
});
unittest.group('obj-schema-Comment', () {
unittest.test('to-json--from-json', () async {
final o = buildComment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Comment.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkComment(od);
});
});
unittest.group('obj-schema-CommentList', () {
unittest.test('to-json--from-json', () async {
final o = buildCommentList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CommentList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCommentList(od);
});
});
unittest.group('obj-schema-CommentReply', () {
unittest.test('to-json--from-json', () async {
final o = buildCommentReply();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CommentReply.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCommentReply(od);
});
});
unittest.group('obj-schema-CommentReplyList', () {
unittest.test('to-json--from-json', () async {
final o = buildCommentReplyList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CommentReplyList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCommentReplyList(od);
});
});
unittest.group('obj-schema-ContentRestriction', () {
unittest.test('to-json--from-json', () async {
final o = buildContentRestriction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ContentRestriction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkContentRestriction(od);
});
});
unittest.group('obj-schema-DriveBackgroundImageFile', () {
unittest.test('to-json--from-json', () async {
final o = buildDriveBackgroundImageFile();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DriveBackgroundImageFile.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDriveBackgroundImageFile(od);
});
});
unittest.group('obj-schema-DriveCapabilities', () {
unittest.test('to-json--from-json', () async {
final o = buildDriveCapabilities();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DriveCapabilities.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDriveCapabilities(od);
});
});
unittest.group('obj-schema-DriveRestrictions', () {
unittest.test('to-json--from-json', () async {
final o = buildDriveRestrictions();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DriveRestrictions.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDriveRestrictions(od);
});
});
unittest.group('obj-schema-Drive', () {
unittest.test('to-json--from-json', () async {
final o = buildDrive();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Drive.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDrive(od);
});
});
unittest.group('obj-schema-DriveList', () {
unittest.test('to-json--from-json', () async {
final o = buildDriveList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DriveList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDriveList(od);
});
});
unittest.group('obj-schema-FileCapabilities', () {
unittest.test('to-json--from-json', () async {
final o = buildFileCapabilities();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileCapabilities.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileCapabilities(od);
});
});
unittest.group('obj-schema-FileImageMediaMetadataLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildFileImageMediaMetadataLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileImageMediaMetadataLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileImageMediaMetadataLocation(od);
});
});
unittest.group('obj-schema-FileImageMediaMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildFileImageMediaMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileImageMediaMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileImageMediaMetadata(od);
});
});
unittest.group('obj-schema-FileIndexableText', () {
unittest.test('to-json--from-json', () async {
final o = buildFileIndexableText();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileIndexableText.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileIndexableText(od);
});
});
unittest.group('obj-schema-FileLabelInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildFileLabelInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileLabelInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileLabelInfo(od);
});
});
unittest.group('obj-schema-FileLabels', () {
unittest.test('to-json--from-json', () async {
final o = buildFileLabels();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.FileLabels.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkFileLabels(od);
});
});
unittest.group('obj-schema-FileLinkShareMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildFileLinkShareMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileLinkShareMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileLinkShareMetadata(od);
});
});
unittest.group('obj-schema-FileShortcutDetails', () {
unittest.test('to-json--from-json', () async {
final o = buildFileShortcutDetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileShortcutDetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileShortcutDetails(od);
});
});
unittest.group('obj-schema-FileThumbnail', () {
unittest.test('to-json--from-json', () async {
final o = buildFileThumbnail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileThumbnail.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileThumbnail(od);
});
});
unittest.group('obj-schema-FileVideoMediaMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildFileVideoMediaMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileVideoMediaMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileVideoMediaMetadata(od);
});
});
unittest.group('obj-schema-File', () {
unittest.test('to-json--from-json', () async {
final o = buildFile();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.File.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkFile(od);
});
});
unittest.group('obj-schema-FileList', () {
unittest.test('to-json--from-json', () async {
final o = buildFileList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.FileList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkFileList(od);
});
});
unittest.group('obj-schema-GeneratedIds', () {
unittest.test('to-json--from-json', () async {
final o = buildGeneratedIds();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GeneratedIds.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGeneratedIds(od);
});
});
unittest.group('obj-schema-Label', () {
unittest.test('to-json--from-json', () async {
final o = buildLabel();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Label.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkLabel(od);
});
});
unittest.group('obj-schema-LabelField', () {
unittest.test('to-json--from-json', () async {
final o = buildLabelField();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.LabelField.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkLabelField(od);
});
});
unittest.group('obj-schema-LabelFieldModification', () {
unittest.test('to-json--from-json', () async {
final o = buildLabelFieldModification();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LabelFieldModification.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLabelFieldModification(od);
});
});
unittest.group('obj-schema-LabelList', () {
unittest.test('to-json--from-json', () async {
final o = buildLabelList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.LabelList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkLabelList(od);
});
});
unittest.group('obj-schema-LabelModification', () {
unittest.test('to-json--from-json', () async {
final o = buildLabelModification();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LabelModification.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLabelModification(od);
});
});
unittest.group('obj-schema-ModifyLabelsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildModifyLabelsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ModifyLabelsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkModifyLabelsRequest(od);
});
});
unittest.group('obj-schema-ModifyLabelsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildModifyLabelsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ModifyLabelsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkModifyLabelsResponse(od);
});
});
unittest.group('obj-schema-ParentList', () {
unittest.test('to-json--from-json', () async {
final o = buildParentList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ParentList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkParentList(od);
});
});
unittest.group('obj-schema-ParentReference', () {
unittest.test('to-json--from-json', () async {
final o = buildParentReference();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ParentReference.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkParentReference(od);
});
});
unittest.group('obj-schema-PermissionPermissionDetails', () {
unittest.test('to-json--from-json', () async {
final o = buildPermissionPermissionDetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PermissionPermissionDetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPermissionPermissionDetails(od);
});
});
unittest.group('obj-schema-PermissionTeamDrivePermissionDetails', () {
unittest.test('to-json--from-json', () async {
final o = buildPermissionTeamDrivePermissionDetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PermissionTeamDrivePermissionDetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPermissionTeamDrivePermissionDetails(od);
});
});
unittest.group('obj-schema-Permission', () {
unittest.test('to-json--from-json', () async {
final o = buildPermission();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Permission.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPermission(od);
});
});
unittest.group('obj-schema-PermissionId', () {
unittest.test('to-json--from-json', () async {
final o = buildPermissionId();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PermissionId.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPermissionId(od);
});
});
unittest.group('obj-schema-PermissionList', () {
unittest.test('to-json--from-json', () async {
final o = buildPermissionList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PermissionList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPermissionList(od);
});
});
unittest.group('obj-schema-Property', () {
unittest.test('to-json--from-json', () async {
final o = buildProperty();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Property.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkProperty(od);
});
});
unittest.group('obj-schema-PropertyList', () {
unittest.test('to-json--from-json', () async {
final o = buildPropertyList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PropertyList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPropertyList(od);
});
});
unittest.group('obj-schema-Revision', () {
unittest.test('to-json--from-json', () async {
final o = buildRevision();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Revision.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkRevision(od);
});
});
unittest.group('obj-schema-RevisionList', () {
unittest.test('to-json--from-json', () async {
final o = buildRevisionList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RevisionList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRevisionList(od);
});
});
unittest.group('obj-schema-StartPageToken', () {
unittest.test('to-json--from-json', () async {
final o = buildStartPageToken();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StartPageToken.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStartPageToken(od);
});
});
unittest.group('obj-schema-TeamDriveBackgroundImageFile', () {
unittest.test('to-json--from-json', () async {
final o = buildTeamDriveBackgroundImageFile();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TeamDriveBackgroundImageFile.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTeamDriveBackgroundImageFile(od);
});
});
unittest.group('obj-schema-TeamDriveCapabilities', () {
unittest.test('to-json--from-json', () async {
final o = buildTeamDriveCapabilities();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TeamDriveCapabilities.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTeamDriveCapabilities(od);
});
});
unittest.group('obj-schema-TeamDriveRestrictions', () {
unittest.test('to-json--from-json', () async {
final o = buildTeamDriveRestrictions();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TeamDriveRestrictions.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTeamDriveRestrictions(od);
});
});
unittest.group('obj-schema-TeamDrive', () {
unittest.test('to-json--from-json', () async {
final o = buildTeamDrive();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.TeamDrive.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTeamDrive(od);
});
});
unittest.group('obj-schema-TeamDriveList', () {
unittest.test('to-json--from-json', () async {
final o = buildTeamDriveList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TeamDriveList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTeamDriveList(od);
});
});
unittest.group('obj-schema-UserPicture', () {
unittest.test('to-json--from-json', () async {
final o = buildUserPicture();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UserPicture.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUserPicture(od);
});
});
unittest.group('obj-schema-User', () {
unittest.test('to-json--from-json', () async {
final o = buildUser();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.User.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkUser(od);
});
});
unittest.group('resource-AboutResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).about;
final arg_includeSubscribed = true;
final arg_maxChangeIdCount = 'foo';
final arg_startChangeId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 5),
unittest.equals('about'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeSubscribed']!.first,
unittest.equals('$arg_includeSubscribed'),
);
unittest.expect(
queryMap['maxChangeIdCount']!.first,
unittest.equals(arg_maxChangeIdCount),
);
unittest.expect(
queryMap['startChangeId']!.first,
unittest.equals(arg_startChangeId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildAbout());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(
includeSubscribed: arg_includeSubscribed,
maxChangeIdCount: arg_maxChangeIdCount,
startChangeId: arg_startChangeId,
$fields: arg_$fields);
checkAbout(response as api.About);
});
});
unittest.group('resource-AppsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).apps;
final arg_appId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 5),
unittest.equals('apps/'),
);
pathOffset += 5;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_appId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildApp());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_appId, $fields: arg_$fields);
checkApp(response as api.App);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).apps;
final arg_appFilterExtensions = 'foo';
final arg_appFilterMimeTypes = 'foo';
final arg_languageCode = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 4),
unittest.equals('apps'),
);
pathOffset += 4;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['appFilterExtensions']!.first,
unittest.equals(arg_appFilterExtensions),
);
unittest.expect(
queryMap['appFilterMimeTypes']!.first,
unittest.equals(arg_appFilterMimeTypes),
);
unittest.expect(
queryMap['languageCode']!.first,
unittest.equals(arg_languageCode),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildAppList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
appFilterExtensions: arg_appFilterExtensions,
appFilterMimeTypes: arg_appFilterMimeTypes,
languageCode: arg_languageCode,
$fields: arg_$fields);
checkAppList(response as api.AppList);
});
});
unittest.group('resource-ChangesResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).changes;
final arg_changeId = 'foo';
final arg_driveId = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_teamDriveId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('changes/'),
);
pathOffset += 8;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_changeId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['driveId']!.first,
unittest.equals(arg_driveId),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['teamDriveId']!.first,
unittest.equals(arg_teamDriveId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildChange());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_changeId,
driveId: arg_driveId,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
teamDriveId: arg_teamDriveId,
$fields: arg_$fields);
checkChange(response as api.Change);
});
unittest.test('method--getStartPageToken', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).changes;
final arg_driveId = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_teamDriveId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 22),
unittest.equals('changes/startPageToken'),
);
pathOffset += 22;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['driveId']!.first,
unittest.equals(arg_driveId),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['teamDriveId']!.first,
unittest.equals(arg_teamDriveId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildStartPageToken());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getStartPageToken(
driveId: arg_driveId,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
teamDriveId: arg_teamDriveId,
$fields: arg_$fields);
checkStartPageToken(response as api.StartPageToken);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).changes;
final arg_driveId = 'foo';
final arg_includeCorpusRemovals = true;
final arg_includeDeleted = true;
final arg_includeItemsFromAllDrives = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_includeSubscribed = true;
final arg_includeTeamDriveItems = true;
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_spaces = 'foo';
final arg_startChangeId = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_teamDriveId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('changes'),
);
pathOffset += 7;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['driveId']!.first,
unittest.equals(arg_driveId),
);
unittest.expect(
queryMap['includeCorpusRemovals']!.first,
unittest.equals('$arg_includeCorpusRemovals'),
);
unittest.expect(
queryMap['includeDeleted']!.first,
unittest.equals('$arg_includeDeleted'),
);
unittest.expect(
queryMap['includeItemsFromAllDrives']!.first,
unittest.equals('$arg_includeItemsFromAllDrives'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['includeSubscribed']!.first,
unittest.equals('$arg_includeSubscribed'),
);
unittest.expect(
queryMap['includeTeamDriveItems']!.first,
unittest.equals('$arg_includeTeamDriveItems'),
);
unittest.expect(
core.int.parse(queryMap['maxResults']!.first),
unittest.equals(arg_maxResults),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['spaces']!.first,
unittest.equals(arg_spaces),
);
unittest.expect(
queryMap['startChangeId']!.first,
unittest.equals(arg_startChangeId),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['teamDriveId']!.first,
unittest.equals(arg_teamDriveId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildChangeList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
driveId: arg_driveId,
includeCorpusRemovals: arg_includeCorpusRemovals,
includeDeleted: arg_includeDeleted,
includeItemsFromAllDrives: arg_includeItemsFromAllDrives,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
includeSubscribed: arg_includeSubscribed,
includeTeamDriveItems: arg_includeTeamDriveItems,
maxResults: arg_maxResults,
pageToken: arg_pageToken,
spaces: arg_spaces,
startChangeId: arg_startChangeId,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
teamDriveId: arg_teamDriveId,
$fields: arg_$fields);
checkChangeList(response as api.ChangeList);
});
unittest.test('method--watch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).changes;
final arg_request = buildChannel();
final arg_driveId = 'foo';
final arg_includeCorpusRemovals = true;
final arg_includeDeleted = true;
final arg_includeItemsFromAllDrives = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_includeSubscribed = true;
final arg_includeTeamDriveItems = true;
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_spaces = 'foo';
final arg_startChangeId = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_teamDriveId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Channel.fromJson(json as core.Map<core.String, core.dynamic>);
checkChannel(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('changes/watch'),
);
pathOffset += 13;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['driveId']!.first,
unittest.equals(arg_driveId),
);
unittest.expect(
queryMap['includeCorpusRemovals']!.first,
unittest.equals('$arg_includeCorpusRemovals'),
);
unittest.expect(
queryMap['includeDeleted']!.first,
unittest.equals('$arg_includeDeleted'),
);
unittest.expect(
queryMap['includeItemsFromAllDrives']!.first,
unittest.equals('$arg_includeItemsFromAllDrives'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['includeSubscribed']!.first,
unittest.equals('$arg_includeSubscribed'),
);
unittest.expect(
queryMap['includeTeamDriveItems']!.first,
unittest.equals('$arg_includeTeamDriveItems'),
);
unittest.expect(
core.int.parse(queryMap['maxResults']!.first),
unittest.equals(arg_maxResults),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['spaces']!.first,
unittest.equals(arg_spaces),
);
unittest.expect(
queryMap['startChangeId']!.first,
unittest.equals(arg_startChangeId),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['teamDriveId']!.first,
unittest.equals(arg_teamDriveId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildChannel());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.watch(arg_request,
driveId: arg_driveId,
includeCorpusRemovals: arg_includeCorpusRemovals,
includeDeleted: arg_includeDeleted,
includeItemsFromAllDrives: arg_includeItemsFromAllDrives,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
includeSubscribed: arg_includeSubscribed,
includeTeamDriveItems: arg_includeTeamDriveItems,
maxResults: arg_maxResults,
pageToken: arg_pageToken,
spaces: arg_spaces,
startChangeId: arg_startChangeId,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
teamDriveId: arg_teamDriveId,
$fields: arg_$fields);
checkChannel(response as api.Channel);
});
});
unittest.group('resource-ChannelsResource', () {
unittest.test('method--stop', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).channels;
final arg_request = buildChannel();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Channel.fromJson(json as core.Map<core.String, core.dynamic>);
checkChannel(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('channels/stop'),
);
pathOffset += 13;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.stop(arg_request, $fields: arg_$fields);
});
});
unittest.group('resource-ChildrenResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).children;
final arg_folderId = 'foo';
final arg_childId = 'foo';
final arg_enforceSingleParent = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/children/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_folderId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/children/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_childId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_folderId, arg_childId,
enforceSingleParent: arg_enforceSingleParent, $fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).children;
final arg_folderId = 'foo';
final arg_childId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/children/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_folderId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/children/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_childId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildChildReference());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_folderId, arg_childId, $fields: arg_$fields);
checkChildReference(response as api.ChildReference);
});
unittest.test('method--insert', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).children;
final arg_request = buildChildReference();
final arg_folderId = 'foo';
final arg_enforceSingleParent = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ChildReference.fromJson(
json as core.Map<core.String, core.dynamic>);
checkChildReference(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/children', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_folderId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/children'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildChildReference());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.insert(arg_request, arg_folderId,
enforceSingleParent: arg_enforceSingleParent,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
$fields: arg_$fields);
checkChildReference(response as api.ChildReference);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).children;
final arg_folderId = 'foo';
final arg_maxResults = 42;
final arg_orderBy = 'foo';
final arg_pageToken = 'foo';
final arg_q = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/children', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_folderId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/children'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['q']!.first,
unittest.equals(arg_q),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildChildList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_folderId,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
q: arg_q,
$fields: arg_$fields);
checkChildList(response as api.ChildList);
});
});
unittest.group('resource-CommentsResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).comments;
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_fileId, arg_commentId, $fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).comments;
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_includeDeleted = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeDeleted']!.first,
unittest.equals('$arg_includeDeleted'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildComment());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_fileId, arg_commentId,
includeDeleted: arg_includeDeleted, $fields: arg_$fields);
checkComment(response as api.Comment);
});
unittest.test('method--insert', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).comments;
final arg_request = buildComment();
final arg_fileId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Comment.fromJson(json as core.Map<core.String, core.dynamic>);
checkComment(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/comments'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildComment());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.insert(arg_request, arg_fileId, $fields: arg_$fields);
checkComment(response as api.Comment);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).comments;
final arg_fileId = 'foo';
final arg_includeDeleted = true;
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_updatedMin = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/comments'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeDeleted']!.first,
unittest.equals('$arg_includeDeleted'),
);
unittest.expect(
core.int.parse(queryMap['maxResults']!.first),
unittest.equals(arg_maxResults),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['updatedMin']!.first,
unittest.equals(arg_updatedMin),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildCommentList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_fileId,
includeDeleted: arg_includeDeleted,
maxResults: arg_maxResults,
pageToken: arg_pageToken,
updatedMin: arg_updatedMin,
$fields: arg_$fields);
checkCommentList(response as api.CommentList);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).comments;
final arg_request = buildComment();
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Comment.fromJson(json as core.Map<core.String, core.dynamic>);
checkComment(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildComment());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_fileId, arg_commentId,
$fields: arg_$fields);
checkComment(response as api.Comment);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).comments;
final arg_request = buildComment();
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Comment.fromJson(json as core.Map<core.String, core.dynamic>);
checkComment(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildComment());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(arg_request, arg_fileId, arg_commentId,
$fields: arg_$fields);
checkComment(response as api.Comment);
});
});
unittest.group('resource-DrivesResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).drives;
final arg_driveId = 'foo';
final arg_allowItemDeletion = true;
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('drives/'),
);
pathOffset += 7;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_driveId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['allowItemDeletion']!.first,
unittest.equals('$arg_allowItemDeletion'),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_driveId,
allowItemDeletion: arg_allowItemDeletion,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).drives;
final arg_driveId = 'foo';
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('drives/'),
);
pathOffset += 7;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_driveId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDrive());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_driveId,
useDomainAdminAccess: arg_useDomainAdminAccess, $fields: arg_$fields);
checkDrive(response as api.Drive);
});
unittest.test('method--hide', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).drives;
final arg_driveId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('drives/'),
);
pathOffset += 7;
index = path.indexOf('/hide', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_driveId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 5),
unittest.equals('/hide'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDrive());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.hide(arg_driveId, $fields: arg_$fields);
checkDrive(response as api.Drive);
});
unittest.test('method--insert', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).drives;
final arg_request = buildDrive();
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Drive.fromJson(json as core.Map<core.String, core.dynamic>);
checkDrive(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('drives'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDrive());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.insert(arg_request, arg_requestId, $fields: arg_$fields);
checkDrive(response as api.Drive);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).drives;
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_q = 'foo';
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('drives'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['q']!.first,
unittest.equals(arg_q),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDriveList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
maxResults: arg_maxResults,
pageToken: arg_pageToken,
q: arg_q,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
checkDriveList(response as api.DriveList);
});
unittest.test('method--unhide', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).drives;
final arg_driveId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('drives/'),
);
pathOffset += 7;
index = path.indexOf('/unhide', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_driveId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/unhide'),
);
pathOffset += 7;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDrive());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.unhide(arg_driveId, $fields: arg_$fields);
checkDrive(response as api.Drive);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).drives;
final arg_request = buildDrive();
final arg_driveId = 'foo';
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Drive.fromJson(json as core.Map<core.String, core.dynamic>);
checkDrive(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('drives/'),
);
pathOffset += 7;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_driveId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDrive());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(arg_request, arg_driveId,
useDomainAdminAccess: arg_useDomainAdminAccess, $fields: arg_$fields);
checkDrive(response as api.Drive);
});
});
unittest.group('resource-FilesResource', () {
unittest.test('method--copy', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_request = buildFile();
final arg_fileId = 'foo';
final arg_convert = true;
final arg_enforceSingleParent = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_ocr = true;
final arg_ocrLanguage = 'foo';
final arg_pinned = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_timedTextLanguage = 'foo';
final arg_timedTextTrackName = 'foo';
final arg_visibility = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.File.fromJson(json as core.Map<core.String, core.dynamic>);
checkFile(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/copy', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 5),
unittest.equals('/copy'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['convert']!.first,
unittest.equals('$arg_convert'),
);
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['ocr']!.first,
unittest.equals('$arg_ocr'),
);
unittest.expect(
queryMap['ocrLanguage']!.first,
unittest.equals(arg_ocrLanguage),
);
unittest.expect(
queryMap['pinned']!.first,
unittest.equals('$arg_pinned'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['timedTextLanguage']!.first,
unittest.equals(arg_timedTextLanguage),
);
unittest.expect(
queryMap['timedTextTrackName']!.first,
unittest.equals(arg_timedTextTrackName),
);
unittest.expect(
queryMap['visibility']!.first,
unittest.equals(arg_visibility),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.copy(arg_request, arg_fileId,
convert: arg_convert,
enforceSingleParent: arg_enforceSingleParent,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
ocr: arg_ocr,
ocrLanguage: arg_ocrLanguage,
pinned: arg_pinned,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
timedTextLanguage: arg_timedTextLanguage,
timedTextTrackName: arg_timedTextTrackName,
visibility: arg_visibility,
$fields: arg_$fields);
checkFile(response as api.File);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_fileId = 'foo';
final arg_enforceSingleParent = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_fileId,
enforceSingleParent: arg_enforceSingleParent,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
$fields: arg_$fields);
});
unittest.test('method--emptyTrash', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_driveId = 'foo';
final arg_enforceSingleParent = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('files/trash'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['driveId']!.first,
unittest.equals(arg_driveId),
);
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.emptyTrash(
driveId: arg_driveId,
enforceSingleParent: arg_enforceSingleParent,
$fields: arg_$fields);
});
unittest.test('method--export', () async {
// TODO: Implement tests for media upload;
// TODO: Implement tests for media download;
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_fileId = 'foo';
final arg_mimeType = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
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_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/export'),
);
pathOffset += 7;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['mimeType']!.first,
unittest.equals(arg_mimeType),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.export(arg_fileId, arg_mimeType, $fields: arg_$fields);
});
unittest.test('method--generateIds', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_maxResults = 42;
final arg_space = 'foo';
final arg_type = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 17),
unittest.equals('files/generateIds'),
);
pathOffset += 17;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['space']!.first,
unittest.equals(arg_space),
);
unittest.expect(
queryMap['type']!.first,
unittest.equals(arg_type),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGeneratedIds());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.generateIds(
maxResults: arg_maxResults,
space: arg_space,
type: arg_type,
$fields: arg_$fields);
checkGeneratedIds(response as api.GeneratedIds);
});
unittest.test('method--get', () async {
// TODO: Implement tests for media upload;
// TODO: Implement tests for media download;
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_fileId = 'foo';
final arg_acknowledgeAbuse = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_projection = 'foo';
final arg_revisionId = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_updateViewedDate = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['acknowledgeAbuse']!.first,
unittest.equals('$arg_acknowledgeAbuse'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['projection']!.first,
unittest.equals(arg_projection),
);
unittest.expect(
queryMap['revisionId']!.first,
unittest.equals(arg_revisionId),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['updateViewedDate']!.first,
unittest.equals('$arg_updateViewedDate'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_fileId,
acknowledgeAbuse: arg_acknowledgeAbuse,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
projection: arg_projection,
revisionId: arg_revisionId,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
updateViewedDate: arg_updateViewedDate,
$fields: arg_$fields);
checkFile(response as api.File);
});
unittest.test('method--insert', () async {
// TODO: Implement tests for media upload;
// TODO: Implement tests for media download;
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_request = buildFile();
final arg_convert = true;
final arg_enforceSingleParent = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_ocr = true;
final arg_ocrLanguage = 'foo';
final arg_pinned = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_timedTextLanguage = 'foo';
final arg_timedTextTrackName = 'foo';
final arg_useContentAsIndexableText = true;
final arg_visibility = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.File.fromJson(json as core.Map<core.String, core.dynamic>);
checkFile(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 5),
unittest.equals('files'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['convert']!.first,
unittest.equals('$arg_convert'),
);
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['ocr']!.first,
unittest.equals('$arg_ocr'),
);
unittest.expect(
queryMap['ocrLanguage']!.first,
unittest.equals(arg_ocrLanguage),
);
unittest.expect(
queryMap['pinned']!.first,
unittest.equals('$arg_pinned'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['timedTextLanguage']!.first,
unittest.equals(arg_timedTextLanguage),
);
unittest.expect(
queryMap['timedTextTrackName']!.first,
unittest.equals(arg_timedTextTrackName),
);
unittest.expect(
queryMap['useContentAsIndexableText']!.first,
unittest.equals('$arg_useContentAsIndexableText'),
);
unittest.expect(
queryMap['visibility']!.first,
unittest.equals(arg_visibility),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.insert(arg_request,
convert: arg_convert,
enforceSingleParent: arg_enforceSingleParent,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
ocr: arg_ocr,
ocrLanguage: arg_ocrLanguage,
pinned: arg_pinned,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
timedTextLanguage: arg_timedTextLanguage,
timedTextTrackName: arg_timedTextTrackName,
useContentAsIndexableText: arg_useContentAsIndexableText,
visibility: arg_visibility,
$fields: arg_$fields);
checkFile(response as api.File);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_corpora = 'foo';
final arg_corpus = 'foo';
final arg_driveId = 'foo';
final arg_includeItemsFromAllDrives = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_includeTeamDriveItems = true;
final arg_maxResults = 42;
final arg_orderBy = 'foo';
final arg_pageToken = 'foo';
final arg_projection = 'foo';
final arg_q = 'foo';
final arg_spaces = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_teamDriveId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 5),
unittest.equals('files'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['corpora']!.first,
unittest.equals(arg_corpora),
);
unittest.expect(
queryMap['corpus']!.first,
unittest.equals(arg_corpus),
);
unittest.expect(
queryMap['driveId']!.first,
unittest.equals(arg_driveId),
);
unittest.expect(
queryMap['includeItemsFromAllDrives']!.first,
unittest.equals('$arg_includeItemsFromAllDrives'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['includeTeamDriveItems']!.first,
unittest.equals('$arg_includeTeamDriveItems'),
);
unittest.expect(
core.int.parse(queryMap['maxResults']!.first),
unittest.equals(arg_maxResults),
);
unittest.expect(
queryMap['orderBy']!.first,
unittest.equals(arg_orderBy),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['projection']!.first,
unittest.equals(arg_projection),
);
unittest.expect(
queryMap['q']!.first,
unittest.equals(arg_q),
);
unittest.expect(
queryMap['spaces']!.first,
unittest.equals(arg_spaces),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['teamDriveId']!.first,
unittest.equals(arg_teamDriveId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFileList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
corpora: arg_corpora,
corpus: arg_corpus,
driveId: arg_driveId,
includeItemsFromAllDrives: arg_includeItemsFromAllDrives,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
includeTeamDriveItems: arg_includeTeamDriveItems,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
projection: arg_projection,
q: arg_q,
spaces: arg_spaces,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
teamDriveId: arg_teamDriveId,
$fields: arg_$fields);
checkFileList(response as api.FileList);
});
unittest.test('method--listLabels', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_fileId = 'foo';
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/listLabels', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/listLabels'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLabelList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.listLabels(arg_fileId,
maxResults: arg_maxResults,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkLabelList(response as api.LabelList);
});
unittest.test('method--modifyLabels', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_request = buildModifyLabelsRequest();
final arg_fileId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ModifyLabelsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkModifyLabelsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/modifyLabels', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('/modifyLabels'),
);
pathOffset += 13;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildModifyLabelsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.modifyLabels(arg_request, arg_fileId, $fields: arg_$fields);
checkModifyLabelsResponse(response as api.ModifyLabelsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_request = buildFile();
final arg_fileId = 'foo';
final arg_addParents = 'foo';
final arg_convert = true;
final arg_enforceSingleParent = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_modifiedDateBehavior = 'foo';
final arg_newRevision = true;
final arg_ocr = true;
final arg_ocrLanguage = 'foo';
final arg_pinned = true;
final arg_removeParents = 'foo';
final arg_setModifiedDate = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_timedTextLanguage = 'foo';
final arg_timedTextTrackName = 'foo';
final arg_updateViewedDate = true;
final arg_useContentAsIndexableText = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.File.fromJson(json as core.Map<core.String, core.dynamic>);
checkFile(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['addParents']!.first,
unittest.equals(arg_addParents),
);
unittest.expect(
queryMap['convert']!.first,
unittest.equals('$arg_convert'),
);
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['modifiedDateBehavior']!.first,
unittest.equals(arg_modifiedDateBehavior),
);
unittest.expect(
queryMap['newRevision']!.first,
unittest.equals('$arg_newRevision'),
);
unittest.expect(
queryMap['ocr']!.first,
unittest.equals('$arg_ocr'),
);
unittest.expect(
queryMap['ocrLanguage']!.first,
unittest.equals(arg_ocrLanguage),
);
unittest.expect(
queryMap['pinned']!.first,
unittest.equals('$arg_pinned'),
);
unittest.expect(
queryMap['removeParents']!.first,
unittest.equals(arg_removeParents),
);
unittest.expect(
queryMap['setModifiedDate']!.first,
unittest.equals('$arg_setModifiedDate'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['timedTextLanguage']!.first,
unittest.equals(arg_timedTextLanguage),
);
unittest.expect(
queryMap['timedTextTrackName']!.first,
unittest.equals(arg_timedTextTrackName),
);
unittest.expect(
queryMap['updateViewedDate']!.first,
unittest.equals('$arg_updateViewedDate'),
);
unittest.expect(
queryMap['useContentAsIndexableText']!.first,
unittest.equals('$arg_useContentAsIndexableText'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_fileId,
addParents: arg_addParents,
convert: arg_convert,
enforceSingleParent: arg_enforceSingleParent,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
modifiedDateBehavior: arg_modifiedDateBehavior,
newRevision: arg_newRevision,
ocr: arg_ocr,
ocrLanguage: arg_ocrLanguage,
pinned: arg_pinned,
removeParents: arg_removeParents,
setModifiedDate: arg_setModifiedDate,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
timedTextLanguage: arg_timedTextLanguage,
timedTextTrackName: arg_timedTextTrackName,
updateViewedDate: arg_updateViewedDate,
useContentAsIndexableText: arg_useContentAsIndexableText,
$fields: arg_$fields);
checkFile(response as api.File);
});
unittest.test('method--touch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_fileId = 'foo';
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/touch', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('/touch'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.touch(arg_fileId,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
$fields: arg_$fields);
checkFile(response as api.File);
});
unittest.test('method--trash', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_fileId = 'foo';
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/trash', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('/trash'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.trash(arg_fileId,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
$fields: arg_$fields);
checkFile(response as api.File);
});
unittest.test('method--untrash', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_fileId = 'foo';
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/untrash', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/untrash'),
);
pathOffset += 8;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.untrash(arg_fileId,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
$fields: arg_$fields);
checkFile(response as api.File);
});
unittest.test('method--update', () async {
// TODO: Implement tests for media upload;
// TODO: Implement tests for media download;
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_request = buildFile();
final arg_fileId = 'foo';
final arg_addParents = 'foo';
final arg_convert = true;
final arg_enforceSingleParent = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_modifiedDateBehavior = 'foo';
final arg_newRevision = true;
final arg_ocr = true;
final arg_ocrLanguage = 'foo';
final arg_pinned = true;
final arg_removeParents = 'foo';
final arg_setModifiedDate = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_timedTextLanguage = 'foo';
final arg_timedTextTrackName = 'foo';
final arg_updateViewedDate = true;
final arg_useContentAsIndexableText = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.File.fromJson(json as core.Map<core.String, core.dynamic>);
checkFile(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['addParents']!.first,
unittest.equals(arg_addParents),
);
unittest.expect(
queryMap['convert']!.first,
unittest.equals('$arg_convert'),
);
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['modifiedDateBehavior']!.first,
unittest.equals(arg_modifiedDateBehavior),
);
unittest.expect(
queryMap['newRevision']!.first,
unittest.equals('$arg_newRevision'),
);
unittest.expect(
queryMap['ocr']!.first,
unittest.equals('$arg_ocr'),
);
unittest.expect(
queryMap['ocrLanguage']!.first,
unittest.equals(arg_ocrLanguage),
);
unittest.expect(
queryMap['pinned']!.first,
unittest.equals('$arg_pinned'),
);
unittest.expect(
queryMap['removeParents']!.first,
unittest.equals(arg_removeParents),
);
unittest.expect(
queryMap['setModifiedDate']!.first,
unittest.equals('$arg_setModifiedDate'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['timedTextLanguage']!.first,
unittest.equals(arg_timedTextLanguage),
);
unittest.expect(
queryMap['timedTextTrackName']!.first,
unittest.equals(arg_timedTextTrackName),
);
unittest.expect(
queryMap['updateViewedDate']!.first,
unittest.equals('$arg_updateViewedDate'),
);
unittest.expect(
queryMap['useContentAsIndexableText']!.first,
unittest.equals('$arg_useContentAsIndexableText'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildFile());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(arg_request, arg_fileId,
addParents: arg_addParents,
convert: arg_convert,
enforceSingleParent: arg_enforceSingleParent,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
modifiedDateBehavior: arg_modifiedDateBehavior,
newRevision: arg_newRevision,
ocr: arg_ocr,
ocrLanguage: arg_ocrLanguage,
pinned: arg_pinned,
removeParents: arg_removeParents,
setModifiedDate: arg_setModifiedDate,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
timedTextLanguage: arg_timedTextLanguage,
timedTextTrackName: arg_timedTextTrackName,
updateViewedDate: arg_updateViewedDate,
useContentAsIndexableText: arg_useContentAsIndexableText,
$fields: arg_$fields);
checkFile(response as api.File);
});
unittest.test('method--watch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).files;
final arg_request = buildChannel();
final arg_fileId = 'foo';
final arg_acknowledgeAbuse = true;
final arg_includeLabels = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_projection = 'foo';
final arg_revisionId = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_updateViewedDate = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Channel.fromJson(json as core.Map<core.String, core.dynamic>);
checkChannel(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/watch', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('/watch'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['acknowledgeAbuse']!.first,
unittest.equals('$arg_acknowledgeAbuse'),
);
unittest.expect(
queryMap['includeLabels']!.first,
unittest.equals(arg_includeLabels),
);
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
queryMap['projection']!.first,
unittest.equals(arg_projection),
);
unittest.expect(
queryMap['revisionId']!.first,
unittest.equals(arg_revisionId),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['updateViewedDate']!.first,
unittest.equals('$arg_updateViewedDate'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildChannel());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.watch(arg_request, arg_fileId,
acknowledgeAbuse: arg_acknowledgeAbuse,
includeLabels: arg_includeLabels,
includePermissionsForView: arg_includePermissionsForView,
projection: arg_projection,
revisionId: arg_revisionId,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
updateViewedDate: arg_updateViewedDate,
$fields: arg_$fields);
checkChannel(response as api.Channel);
});
});
unittest.group('resource-ParentsResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).parents;
final arg_fileId = 'foo';
final arg_parentId = 'foo';
final arg_enforceSingleParent = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/parents/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/parents/'),
);
pathOffset += 9;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_parentId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_fileId, arg_parentId,
enforceSingleParent: arg_enforceSingleParent, $fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).parents;
final arg_fileId = 'foo';
final arg_parentId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/parents/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/parents/'),
);
pathOffset += 9;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_parentId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildParentReference());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_fileId, arg_parentId, $fields: arg_$fields);
checkParentReference(response as api.ParentReference);
});
unittest.test('method--insert', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).parents;
final arg_request = buildParentReference();
final arg_fileId = 'foo';
final arg_enforceSingleParent = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ParentReference.fromJson(
json as core.Map<core.String, core.dynamic>);
checkParentReference(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/parents', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/parents'),
);
pathOffset += 8;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildParentReference());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.insert(arg_request, arg_fileId,
enforceSingleParent: arg_enforceSingleParent,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
$fields: arg_$fields);
checkParentReference(response as api.ParentReference);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).parents;
final arg_fileId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/parents', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/parents'),
);
pathOffset += 8;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildParentList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_fileId, $fields: arg_$fields);
checkParentList(response as api.ParentList);
});
});
unittest.group('resource-PermissionsResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).permissions;
final arg_fileId = 'foo';
final arg_permissionId = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/permissions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('/permissions/'),
);
pathOffset += 13;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_permissionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_fileId, arg_permissionId,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).permissions;
final arg_fileId = 'foo';
final arg_permissionId = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/permissions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('/permissions/'),
);
pathOffset += 13;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_permissionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPermission());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_fileId, arg_permissionId,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
checkPermission(response as api.Permission);
});
unittest.test('method--getIdForEmail', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).permissions;
final arg_email = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 14),
unittest.equals('permissionIds/'),
);
pathOffset += 14;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_email'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPermissionId());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getIdForEmail(arg_email, $fields: arg_$fields);
checkPermissionId(response as api.PermissionId);
});
unittest.test('method--insert', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).permissions;
final arg_request = buildPermission();
final arg_fileId = 'foo';
final arg_emailMessage = 'foo';
final arg_enforceSingleParent = true;
final arg_moveToNewOwnersRoot = true;
final arg_sendNotificationEmails = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.Permission.fromJson(
json as core.Map<core.String, core.dynamic>);
checkPermission(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/permissions', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/permissions'),
);
pathOffset += 12;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['emailMessage']!.first,
unittest.equals(arg_emailMessage),
);
unittest.expect(
queryMap['enforceSingleParent']!.first,
unittest.equals('$arg_enforceSingleParent'),
);
unittest.expect(
queryMap['moveToNewOwnersRoot']!.first,
unittest.equals('$arg_moveToNewOwnersRoot'),
);
unittest.expect(
queryMap['sendNotificationEmails']!.first,
unittest.equals('$arg_sendNotificationEmails'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPermission());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.insert(arg_request, arg_fileId,
emailMessage: arg_emailMessage,
enforceSingleParent: arg_enforceSingleParent,
moveToNewOwnersRoot: arg_moveToNewOwnersRoot,
sendNotificationEmails: arg_sendNotificationEmails,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
checkPermission(response as api.Permission);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).permissions;
final arg_fileId = 'foo';
final arg_includePermissionsForView = 'foo';
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/permissions', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/permissions'),
);
pathOffset += 12;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includePermissionsForView']!.first,
unittest.equals(arg_includePermissionsForView),
);
unittest.expect(
core.int.parse(queryMap['maxResults']!.first),
unittest.equals(arg_maxResults),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPermissionList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_fileId,
includePermissionsForView: arg_includePermissionsForView,
maxResults: arg_maxResults,
pageToken: arg_pageToken,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
checkPermissionList(response as api.PermissionList);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).permissions;
final arg_request = buildPermission();
final arg_fileId = 'foo';
final arg_permissionId = 'foo';
final arg_removeExpiration = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_transferOwnership = true;
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.Permission.fromJson(
json as core.Map<core.String, core.dynamic>);
checkPermission(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/permissions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('/permissions/'),
);
pathOffset += 13;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_permissionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['removeExpiration']!.first,
unittest.equals('$arg_removeExpiration'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['transferOwnership']!.first,
unittest.equals('$arg_transferOwnership'),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPermission());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(
arg_request, arg_fileId, arg_permissionId,
removeExpiration: arg_removeExpiration,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
transferOwnership: arg_transferOwnership,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
checkPermission(response as api.Permission);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).permissions;
final arg_request = buildPermission();
final arg_fileId = 'foo';
final arg_permissionId = 'foo';
final arg_removeExpiration = true;
final arg_supportsAllDrives = true;
final arg_supportsTeamDrives = true;
final arg_transferOwnership = true;
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.Permission.fromJson(
json as core.Map<core.String, core.dynamic>);
checkPermission(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/permissions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('/permissions/'),
);
pathOffset += 13;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_permissionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['removeExpiration']!.first,
unittest.equals('$arg_removeExpiration'),
);
unittest.expect(
queryMap['supportsAllDrives']!.first,
unittest.equals('$arg_supportsAllDrives'),
);
unittest.expect(
queryMap['supportsTeamDrives']!.first,
unittest.equals('$arg_supportsTeamDrives'),
);
unittest.expect(
queryMap['transferOwnership']!.first,
unittest.equals('$arg_transferOwnership'),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPermission());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(
arg_request, arg_fileId, arg_permissionId,
removeExpiration: arg_removeExpiration,
supportsAllDrives: arg_supportsAllDrives,
supportsTeamDrives: arg_supportsTeamDrives,
transferOwnership: arg_transferOwnership,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
checkPermission(response as api.Permission);
});
});
unittest.group('resource-PropertiesResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).properties;
final arg_fileId = 'foo';
final arg_propertyKey = 'foo';
final arg_visibility = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/properties/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/properties/'),
);
pathOffset += 12;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_propertyKey'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['visibility']!.first,
unittest.equals(arg_visibility),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_fileId, arg_propertyKey,
visibility: arg_visibility, $fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).properties;
final arg_fileId = 'foo';
final arg_propertyKey = 'foo';
final arg_visibility = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/properties/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/properties/'),
);
pathOffset += 12;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_propertyKey'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['visibility']!.first,
unittest.equals(arg_visibility),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildProperty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_fileId, arg_propertyKey,
visibility: arg_visibility, $fields: arg_$fields);
checkProperty(response as api.Property);
});
unittest.test('method--insert', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).properties;
final arg_request = buildProperty();
final arg_fileId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Property.fromJson(json as core.Map<core.String, core.dynamic>);
checkProperty(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/properties', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/properties'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildProperty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.insert(arg_request, arg_fileId, $fields: arg_$fields);
checkProperty(response as api.Property);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).properties;
final arg_fileId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/properties', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/properties'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPropertyList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_fileId, $fields: arg_$fields);
checkPropertyList(response as api.PropertyList);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).properties;
final arg_request = buildProperty();
final arg_fileId = 'foo';
final arg_propertyKey = 'foo';
final arg_visibility = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Property.fromJson(json as core.Map<core.String, core.dynamic>);
checkProperty(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/properties/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/properties/'),
);
pathOffset += 12;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_propertyKey'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['visibility']!.first,
unittest.equals(arg_visibility),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildProperty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_fileId, arg_propertyKey,
visibility: arg_visibility, $fields: arg_$fields);
checkProperty(response as api.Property);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).properties;
final arg_request = buildProperty();
final arg_fileId = 'foo';
final arg_propertyKey = 'foo';
final arg_visibility = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Property.fromJson(json as core.Map<core.String, core.dynamic>);
checkProperty(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/properties/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/properties/'),
);
pathOffset += 12;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_propertyKey'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['visibility']!.first,
unittest.equals(arg_visibility),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildProperty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(
arg_request, arg_fileId, arg_propertyKey,
visibility: arg_visibility, $fields: arg_$fields);
checkProperty(response as api.Property);
});
});
unittest.group('resource-RepliesResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).replies;
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_replyId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
index = path.indexOf('/replies/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/replies/'),
);
pathOffset += 9;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_replyId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_fileId, arg_commentId, arg_replyId,
$fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).replies;
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_replyId = 'foo';
final arg_includeDeleted = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
index = path.indexOf('/replies/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/replies/'),
);
pathOffset += 9;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_replyId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeDeleted']!.first,
unittest.equals('$arg_includeDeleted'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildCommentReply());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_fileId, arg_commentId, arg_replyId,
includeDeleted: arg_includeDeleted, $fields: arg_$fields);
checkCommentReply(response as api.CommentReply);
});
unittest.test('method--insert', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).replies;
final arg_request = buildCommentReply();
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CommentReply.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCommentReply(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
index = path.indexOf('/replies', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/replies'),
);
pathOffset += 8;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildCommentReply());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.insert(arg_request, arg_fileId, arg_commentId,
$fields: arg_$fields);
checkCommentReply(response as api.CommentReply);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).replies;
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_includeDeleted = true;
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
index = path.indexOf('/replies', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/replies'),
);
pathOffset += 8;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeDeleted']!.first,
unittest.equals('$arg_includeDeleted'),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildCommentReplyList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_fileId, arg_commentId,
includeDeleted: arg_includeDeleted,
maxResults: arg_maxResults,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkCommentReplyList(response as api.CommentReplyList);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).replies;
final arg_request = buildCommentReply();
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_replyId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CommentReply.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCommentReply(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
index = path.indexOf('/replies/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/replies/'),
);
pathOffset += 9;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_replyId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildCommentReply());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(
arg_request, arg_fileId, arg_commentId, arg_replyId,
$fields: arg_$fields);
checkCommentReply(response as api.CommentReply);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).replies;
final arg_request = buildCommentReply();
final arg_fileId = 'foo';
final arg_commentId = 'foo';
final arg_replyId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CommentReply.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCommentReply(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/comments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/comments/'),
);
pathOffset += 10;
index = path.indexOf('/replies/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_commentId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/replies/'),
);
pathOffset += 9;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_replyId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildCommentReply());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(
arg_request, arg_fileId, arg_commentId, arg_replyId,
$fields: arg_$fields);
checkCommentReply(response as api.CommentReply);
});
});
unittest.group('resource-RevisionsResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).revisions;
final arg_fileId = 'foo';
final arg_revisionId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/revisions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/revisions/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_revisionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_fileId, arg_revisionId, $fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).revisions;
final arg_fileId = 'foo';
final arg_revisionId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/revisions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/revisions/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_revisionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildRevision());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_fileId, arg_revisionId, $fields: arg_$fields);
checkRevision(response as api.Revision);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).revisions;
final arg_fileId = 'foo';
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/revisions', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/revisions'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildRevisionList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_fileId,
maxResults: arg_maxResults,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkRevisionList(response as api.RevisionList);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).revisions;
final arg_request = buildRevision();
final arg_fileId = 'foo';
final arg_revisionId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Revision.fromJson(json as core.Map<core.String, core.dynamic>);
checkRevision(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/revisions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/revisions/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_revisionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildRevision());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_fileId, arg_revisionId,
$fields: arg_$fields);
checkRevision(response as api.Revision);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).revisions;
final arg_request = buildRevision();
final arg_fileId = 'foo';
final arg_revisionId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Revision.fromJson(json as core.Map<core.String, core.dynamic>);
checkRevision(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('files/'),
);
pathOffset += 6;
index = path.indexOf('/revisions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_fileId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/revisions/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_revisionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildRevision());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(arg_request, arg_fileId, arg_revisionId,
$fields: arg_$fields);
checkRevision(response as api.Revision);
});
});
unittest.group('resource-TeamdrivesResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).teamdrives;
final arg_teamDriveId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('teamdrives/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_teamDriveId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_teamDriveId, $fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).teamdrives;
final arg_teamDriveId = 'foo';
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('teamdrives/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_teamDriveId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTeamDrive());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_teamDriveId,
useDomainAdminAccess: arg_useDomainAdminAccess, $fields: arg_$fields);
checkTeamDrive(response as api.TeamDrive);
});
unittest.test('method--insert', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).teamdrives;
final arg_request = buildTeamDrive();
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.TeamDrive.fromJson(json as core.Map<core.String, core.dynamic>);
checkTeamDrive(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('teamdrives'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTeamDrive());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.insert(arg_request, arg_requestId, $fields: arg_$fields);
checkTeamDrive(response as api.TeamDrive);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).teamdrives;
final arg_maxResults = 42;
final arg_pageToken = 'foo';
final arg_q = 'foo';
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('teamdrives'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['q']!.first,
unittest.equals(arg_q),
);
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTeamDriveList());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
maxResults: arg_maxResults,
pageToken: arg_pageToken,
q: arg_q,
useDomainAdminAccess: arg_useDomainAdminAccess,
$fields: arg_$fields);
checkTeamDriveList(response as api.TeamDriveList);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DriveApi(mock).teamdrives;
final arg_request = buildTeamDrive();
final arg_teamDriveId = 'foo';
final arg_useDomainAdminAccess = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.TeamDrive.fromJson(json as core.Map<core.String, core.dynamic>);
checkTeamDrive(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('drive/v2/'),
);
pathOffset += 9;
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('teamdrives/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_teamDriveId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['useDomainAdminAccess']!.first,
unittest.equals('$arg_useDomainAdminAccess'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTeamDrive());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(arg_request, arg_teamDriveId,
useDomainAdminAccess: arg_useDomainAdminAccess, $fields: arg_$fields);
checkTeamDrive(response as api.TeamDrive);
});
});
}
| googleapis.dart/generated/googleapis/test/drive/v2_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/drive/v2_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 164418} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/fitness/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.List<api.Dataset> buildUnnamed0() => [
buildDataset(),
buildDataset(),
];
void checkUnnamed0(core.List<api.Dataset> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataset(o[0]);
checkDataset(o[1]);
}
core.int buildCounterAggregateBucket = 0;
api.AggregateBucket buildAggregateBucket() {
final o = api.AggregateBucket();
buildCounterAggregateBucket++;
if (buildCounterAggregateBucket < 3) {
o.activity = 42;
o.dataset = buildUnnamed0();
o.endTimeMillis = 'foo';
o.session = buildSession();
o.startTimeMillis = 'foo';
o.type = 'foo';
}
buildCounterAggregateBucket--;
return o;
}
void checkAggregateBucket(api.AggregateBucket o) {
buildCounterAggregateBucket++;
if (buildCounterAggregateBucket < 3) {
unittest.expect(
o.activity!,
unittest.equals(42),
);
checkUnnamed0(o.dataset!);
unittest.expect(
o.endTimeMillis!,
unittest.equals('foo'),
);
checkSession(o.session!);
unittest.expect(
o.startTimeMillis!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterAggregateBucket--;
}
core.int buildCounterAggregateBy = 0;
api.AggregateBy buildAggregateBy() {
final o = api.AggregateBy();
buildCounterAggregateBy++;
if (buildCounterAggregateBy < 3) {
o.dataSourceId = 'foo';
o.dataTypeName = 'foo';
}
buildCounterAggregateBy--;
return o;
}
void checkAggregateBy(api.AggregateBy o) {
buildCounterAggregateBy++;
if (buildCounterAggregateBy < 3) {
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
unittest.expect(
o.dataTypeName!,
unittest.equals('foo'),
);
}
buildCounterAggregateBy--;
}
core.List<api.AggregateBy> buildUnnamed1() => [
buildAggregateBy(),
buildAggregateBy(),
];
void checkUnnamed1(core.List<api.AggregateBy> o) {
unittest.expect(o, unittest.hasLength(2));
checkAggregateBy(o[0]);
checkAggregateBy(o[1]);
}
core.List<core.String> buildUnnamed2() => [
'foo',
'foo',
];
void checkUnnamed2(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 buildCounterAggregateRequest = 0;
api.AggregateRequest buildAggregateRequest() {
final o = api.AggregateRequest();
buildCounterAggregateRequest++;
if (buildCounterAggregateRequest < 3) {
o.aggregateBy = buildUnnamed1();
o.bucketByActivitySegment = buildBucketByActivity();
o.bucketByActivityType = buildBucketByActivity();
o.bucketBySession = buildBucketBySession();
o.bucketByTime = buildBucketByTime();
o.endTimeMillis = 'foo';
o.filteredDataQualityStandard = buildUnnamed2();
o.startTimeMillis = 'foo';
}
buildCounterAggregateRequest--;
return o;
}
void checkAggregateRequest(api.AggregateRequest o) {
buildCounterAggregateRequest++;
if (buildCounterAggregateRequest < 3) {
checkUnnamed1(o.aggregateBy!);
checkBucketByActivity(o.bucketByActivitySegment!);
checkBucketByActivity(o.bucketByActivityType!);
checkBucketBySession(o.bucketBySession!);
checkBucketByTime(o.bucketByTime!);
unittest.expect(
o.endTimeMillis!,
unittest.equals('foo'),
);
checkUnnamed2(o.filteredDataQualityStandard!);
unittest.expect(
o.startTimeMillis!,
unittest.equals('foo'),
);
}
buildCounterAggregateRequest--;
}
core.List<api.AggregateBucket> buildUnnamed3() => [
buildAggregateBucket(),
buildAggregateBucket(),
];
void checkUnnamed3(core.List<api.AggregateBucket> o) {
unittest.expect(o, unittest.hasLength(2));
checkAggregateBucket(o[0]);
checkAggregateBucket(o[1]);
}
core.int buildCounterAggregateResponse = 0;
api.AggregateResponse buildAggregateResponse() {
final o = api.AggregateResponse();
buildCounterAggregateResponse++;
if (buildCounterAggregateResponse < 3) {
o.bucket = buildUnnamed3();
}
buildCounterAggregateResponse--;
return o;
}
void checkAggregateResponse(api.AggregateResponse o) {
buildCounterAggregateResponse++;
if (buildCounterAggregateResponse < 3) {
checkUnnamed3(o.bucket!);
}
buildCounterAggregateResponse--;
}
core.int buildCounterApplication = 0;
api.Application buildApplication() {
final o = api.Application();
buildCounterApplication++;
if (buildCounterApplication < 3) {
o.detailsUrl = 'foo';
o.name = 'foo';
o.packageName = 'foo';
o.version = 'foo';
}
buildCounterApplication--;
return o;
}
void checkApplication(api.Application o) {
buildCounterApplication++;
if (buildCounterApplication < 3) {
unittest.expect(
o.detailsUrl!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.packageName!,
unittest.equals('foo'),
);
unittest.expect(
o.version!,
unittest.equals('foo'),
);
}
buildCounterApplication--;
}
core.int buildCounterBucketByActivity = 0;
api.BucketByActivity buildBucketByActivity() {
final o = api.BucketByActivity();
buildCounterBucketByActivity++;
if (buildCounterBucketByActivity < 3) {
o.activityDataSourceId = 'foo';
o.minDurationMillis = 'foo';
}
buildCounterBucketByActivity--;
return o;
}
void checkBucketByActivity(api.BucketByActivity o) {
buildCounterBucketByActivity++;
if (buildCounterBucketByActivity < 3) {
unittest.expect(
o.activityDataSourceId!,
unittest.equals('foo'),
);
unittest.expect(
o.minDurationMillis!,
unittest.equals('foo'),
);
}
buildCounterBucketByActivity--;
}
core.int buildCounterBucketBySession = 0;
api.BucketBySession buildBucketBySession() {
final o = api.BucketBySession();
buildCounterBucketBySession++;
if (buildCounterBucketBySession < 3) {
o.minDurationMillis = 'foo';
}
buildCounterBucketBySession--;
return o;
}
void checkBucketBySession(api.BucketBySession o) {
buildCounterBucketBySession++;
if (buildCounterBucketBySession < 3) {
unittest.expect(
o.minDurationMillis!,
unittest.equals('foo'),
);
}
buildCounterBucketBySession--;
}
core.int buildCounterBucketByTime = 0;
api.BucketByTime buildBucketByTime() {
final o = api.BucketByTime();
buildCounterBucketByTime++;
if (buildCounterBucketByTime < 3) {
o.durationMillis = 'foo';
o.period = buildBucketByTimePeriod();
}
buildCounterBucketByTime--;
return o;
}
void checkBucketByTime(api.BucketByTime o) {
buildCounterBucketByTime++;
if (buildCounterBucketByTime < 3) {
unittest.expect(
o.durationMillis!,
unittest.equals('foo'),
);
checkBucketByTimePeriod(o.period!);
}
buildCounterBucketByTime--;
}
core.int buildCounterBucketByTimePeriod = 0;
api.BucketByTimePeriod buildBucketByTimePeriod() {
final o = api.BucketByTimePeriod();
buildCounterBucketByTimePeriod++;
if (buildCounterBucketByTimePeriod < 3) {
o.timeZoneId = 'foo';
o.type = 'foo';
o.value = 42;
}
buildCounterBucketByTimePeriod--;
return o;
}
void checkBucketByTimePeriod(api.BucketByTimePeriod o) {
buildCounterBucketByTimePeriod++;
if (buildCounterBucketByTimePeriod < 3) {
unittest.expect(
o.timeZoneId!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals(42),
);
}
buildCounterBucketByTimePeriod--;
}
core.List<api.Value> buildUnnamed4() => [
buildValue(),
buildValue(),
];
void checkUnnamed4(core.List<api.Value> o) {
unittest.expect(o, unittest.hasLength(2));
checkValue(o[0]);
checkValue(o[1]);
}
core.int buildCounterDataPoint = 0;
api.DataPoint buildDataPoint() {
final o = api.DataPoint();
buildCounterDataPoint++;
if (buildCounterDataPoint < 3) {
o.computationTimeMillis = 'foo';
o.dataTypeName = 'foo';
o.endTimeNanos = 'foo';
o.modifiedTimeMillis = 'foo';
o.originDataSourceId = 'foo';
o.rawTimestampNanos = 'foo';
o.startTimeNanos = 'foo';
o.value = buildUnnamed4();
}
buildCounterDataPoint--;
return o;
}
void checkDataPoint(api.DataPoint o) {
buildCounterDataPoint++;
if (buildCounterDataPoint < 3) {
unittest.expect(
o.computationTimeMillis!,
unittest.equals('foo'),
);
unittest.expect(
o.dataTypeName!,
unittest.equals('foo'),
);
unittest.expect(
o.endTimeNanos!,
unittest.equals('foo'),
);
unittest.expect(
o.modifiedTimeMillis!,
unittest.equals('foo'),
);
unittest.expect(
o.originDataSourceId!,
unittest.equals('foo'),
);
unittest.expect(
o.rawTimestampNanos!,
unittest.equals('foo'),
);
unittest.expect(
o.startTimeNanos!,
unittest.equals('foo'),
);
checkUnnamed4(o.value!);
}
buildCounterDataPoint--;
}
core.List<core.String> buildUnnamed5() => [
'foo',
'foo',
];
void checkUnnamed5(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 buildCounterDataSource = 0;
api.DataSource buildDataSource() {
final o = api.DataSource();
buildCounterDataSource++;
if (buildCounterDataSource < 3) {
o.application = buildApplication();
o.dataQualityStandard = buildUnnamed5();
o.dataStreamId = 'foo';
o.dataStreamName = 'foo';
o.dataType = buildDataType();
o.device = buildDevice();
o.name = 'foo';
o.type = 'foo';
}
buildCounterDataSource--;
return o;
}
void checkDataSource(api.DataSource o) {
buildCounterDataSource++;
if (buildCounterDataSource < 3) {
checkApplication(o.application!);
checkUnnamed5(o.dataQualityStandard!);
unittest.expect(
o.dataStreamId!,
unittest.equals('foo'),
);
unittest.expect(
o.dataStreamName!,
unittest.equals('foo'),
);
checkDataType(o.dataType!);
checkDevice(o.device!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterDataSource--;
}
core.List<api.DataTypeField> buildUnnamed6() => [
buildDataTypeField(),
buildDataTypeField(),
];
void checkUnnamed6(core.List<api.DataTypeField> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataTypeField(o[0]);
checkDataTypeField(o[1]);
}
core.int buildCounterDataType = 0;
api.DataType buildDataType() {
final o = api.DataType();
buildCounterDataType++;
if (buildCounterDataType < 3) {
o.field = buildUnnamed6();
o.name = 'foo';
}
buildCounterDataType--;
return o;
}
void checkDataType(api.DataType o) {
buildCounterDataType++;
if (buildCounterDataType < 3) {
checkUnnamed6(o.field!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterDataType--;
}
core.int buildCounterDataTypeField = 0;
api.DataTypeField buildDataTypeField() {
final o = api.DataTypeField();
buildCounterDataTypeField++;
if (buildCounterDataTypeField < 3) {
o.format = 'foo';
o.name = 'foo';
o.optional = true;
}
buildCounterDataTypeField--;
return o;
}
void checkDataTypeField(api.DataTypeField o) {
buildCounterDataTypeField++;
if (buildCounterDataTypeField < 3) {
unittest.expect(
o.format!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(o.optional!, unittest.isTrue);
}
buildCounterDataTypeField--;
}
core.List<api.DataPoint> buildUnnamed7() => [
buildDataPoint(),
buildDataPoint(),
];
void checkUnnamed7(core.List<api.DataPoint> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataPoint(o[0]);
checkDataPoint(o[1]);
}
core.int buildCounterDataset = 0;
api.Dataset buildDataset() {
final o = api.Dataset();
buildCounterDataset++;
if (buildCounterDataset < 3) {
o.dataSourceId = 'foo';
o.maxEndTimeNs = 'foo';
o.minStartTimeNs = 'foo';
o.nextPageToken = 'foo';
o.point = buildUnnamed7();
}
buildCounterDataset--;
return o;
}
void checkDataset(api.Dataset o) {
buildCounterDataset++;
if (buildCounterDataset < 3) {
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
unittest.expect(
o.maxEndTimeNs!,
unittest.equals('foo'),
);
unittest.expect(
o.minStartTimeNs!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed7(o.point!);
}
buildCounterDataset--;
}
core.int buildCounterDevice = 0;
api.Device buildDevice() {
final o = api.Device();
buildCounterDevice++;
if (buildCounterDevice < 3) {
o.manufacturer = 'foo';
o.model = 'foo';
o.type = 'foo';
o.uid = 'foo';
o.version = 'foo';
}
buildCounterDevice--;
return o;
}
void checkDevice(api.Device o) {
buildCounterDevice++;
if (buildCounterDevice < 3) {
unittest.expect(
o.manufacturer!,
unittest.equals('foo'),
);
unittest.expect(
o.model!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.uid!,
unittest.equals('foo'),
);
unittest.expect(
o.version!,
unittest.equals('foo'),
);
}
buildCounterDevice--;
}
core.List<api.DataPoint> buildUnnamed8() => [
buildDataPoint(),
buildDataPoint(),
];
void checkUnnamed8(core.List<api.DataPoint> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataPoint(o[0]);
checkDataPoint(o[1]);
}
core.List<api.DataPoint> buildUnnamed9() => [
buildDataPoint(),
buildDataPoint(),
];
void checkUnnamed9(core.List<api.DataPoint> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataPoint(o[0]);
checkDataPoint(o[1]);
}
core.int buildCounterListDataPointChangesResponse = 0;
api.ListDataPointChangesResponse buildListDataPointChangesResponse() {
final o = api.ListDataPointChangesResponse();
buildCounterListDataPointChangesResponse++;
if (buildCounterListDataPointChangesResponse < 3) {
o.dataSourceId = 'foo';
o.deletedDataPoint = buildUnnamed8();
o.insertedDataPoint = buildUnnamed9();
o.nextPageToken = 'foo';
}
buildCounterListDataPointChangesResponse--;
return o;
}
void checkListDataPointChangesResponse(api.ListDataPointChangesResponse o) {
buildCounterListDataPointChangesResponse++;
if (buildCounterListDataPointChangesResponse < 3) {
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
checkUnnamed8(o.deletedDataPoint!);
checkUnnamed9(o.insertedDataPoint!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListDataPointChangesResponse--;
}
core.List<api.DataSource> buildUnnamed10() => [
buildDataSource(),
buildDataSource(),
];
void checkUnnamed10(core.List<api.DataSource> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSource(o[0]);
checkDataSource(o[1]);
}
core.int buildCounterListDataSourcesResponse = 0;
api.ListDataSourcesResponse buildListDataSourcesResponse() {
final o = api.ListDataSourcesResponse();
buildCounterListDataSourcesResponse++;
if (buildCounterListDataSourcesResponse < 3) {
o.dataSource = buildUnnamed10();
}
buildCounterListDataSourcesResponse--;
return o;
}
void checkListDataSourcesResponse(api.ListDataSourcesResponse o) {
buildCounterListDataSourcesResponse++;
if (buildCounterListDataSourcesResponse < 3) {
checkUnnamed10(o.dataSource!);
}
buildCounterListDataSourcesResponse--;
}
core.List<api.Session> buildUnnamed11() => [
buildSession(),
buildSession(),
];
void checkUnnamed11(core.List<api.Session> o) {
unittest.expect(o, unittest.hasLength(2));
checkSession(o[0]);
checkSession(o[1]);
}
core.List<api.Session> buildUnnamed12() => [
buildSession(),
buildSession(),
];
void checkUnnamed12(core.List<api.Session> o) {
unittest.expect(o, unittest.hasLength(2));
checkSession(o[0]);
checkSession(o[1]);
}
core.int buildCounterListSessionsResponse = 0;
api.ListSessionsResponse buildListSessionsResponse() {
final o = api.ListSessionsResponse();
buildCounterListSessionsResponse++;
if (buildCounterListSessionsResponse < 3) {
o.deletedSession = buildUnnamed11();
o.hasMoreData = true;
o.nextPageToken = 'foo';
o.session = buildUnnamed12();
}
buildCounterListSessionsResponse--;
return o;
}
void checkListSessionsResponse(api.ListSessionsResponse o) {
buildCounterListSessionsResponse++;
if (buildCounterListSessionsResponse < 3) {
checkUnnamed11(o.deletedSession!);
unittest.expect(o.hasMoreData!, unittest.isTrue);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed12(o.session!);
}
buildCounterListSessionsResponse--;
}
core.int buildCounterMapValue = 0;
api.MapValue buildMapValue() {
final o = api.MapValue();
buildCounterMapValue++;
if (buildCounterMapValue < 3) {
o.fpVal = 42.0;
}
buildCounterMapValue--;
return o;
}
void checkMapValue(api.MapValue o) {
buildCounterMapValue++;
if (buildCounterMapValue < 3) {
unittest.expect(
o.fpVal!,
unittest.equals(42.0),
);
}
buildCounterMapValue--;
}
core.int buildCounterSession = 0;
api.Session buildSession() {
final o = api.Session();
buildCounterSession++;
if (buildCounterSession < 3) {
o.activeTimeMillis = 'foo';
o.activityType = 42;
o.application = buildApplication();
o.description = 'foo';
o.endTimeMillis = 'foo';
o.id = 'foo';
o.modifiedTimeMillis = 'foo';
o.name = 'foo';
o.startTimeMillis = 'foo';
}
buildCounterSession--;
return o;
}
void checkSession(api.Session o) {
buildCounterSession++;
if (buildCounterSession < 3) {
unittest.expect(
o.activeTimeMillis!,
unittest.equals('foo'),
);
unittest.expect(
o.activityType!,
unittest.equals(42),
);
checkApplication(o.application!);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.endTimeMillis!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.modifiedTimeMillis!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.startTimeMillis!,
unittest.equals('foo'),
);
}
buildCounterSession--;
}
core.List<api.ValueMapValEntry> buildUnnamed13() => [
buildValueMapValEntry(),
buildValueMapValEntry(),
];
void checkUnnamed13(core.List<api.ValueMapValEntry> o) {
unittest.expect(o, unittest.hasLength(2));
checkValueMapValEntry(o[0]);
checkValueMapValEntry(o[1]);
}
core.int buildCounterValue = 0;
api.Value buildValue() {
final o = api.Value();
buildCounterValue++;
if (buildCounterValue < 3) {
o.fpVal = 42.0;
o.intVal = 42;
o.mapVal = buildUnnamed13();
o.stringVal = 'foo';
}
buildCounterValue--;
return o;
}
void checkValue(api.Value o) {
buildCounterValue++;
if (buildCounterValue < 3) {
unittest.expect(
o.fpVal!,
unittest.equals(42.0),
);
unittest.expect(
o.intVal!,
unittest.equals(42),
);
checkUnnamed13(o.mapVal!);
unittest.expect(
o.stringVal!,
unittest.equals('foo'),
);
}
buildCounterValue--;
}
core.int buildCounterValueMapValEntry = 0;
api.ValueMapValEntry buildValueMapValEntry() {
final o = api.ValueMapValEntry();
buildCounterValueMapValEntry++;
if (buildCounterValueMapValEntry < 3) {
o.key = 'foo';
o.value = buildMapValue();
}
buildCounterValueMapValEntry--;
return o;
}
void checkValueMapValEntry(api.ValueMapValEntry o) {
buildCounterValueMapValEntry++;
if (buildCounterValueMapValEntry < 3) {
unittest.expect(
o.key!,
unittest.equals('foo'),
);
checkMapValue(o.value!);
}
buildCounterValueMapValEntry--;
}
core.List<core.String> buildUnnamed14() => [
'foo',
'foo',
];
void checkUnnamed14(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.List<core.int> buildUnnamed15() => [
42,
42,
];
void checkUnnamed15(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),
);
}
void main() {
unittest.group('obj-schema-AggregateBucket', () {
unittest.test('to-json--from-json', () async {
final o = buildAggregateBucket();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AggregateBucket.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAggregateBucket(od);
});
});
unittest.group('obj-schema-AggregateBy', () {
unittest.test('to-json--from-json', () async {
final o = buildAggregateBy();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AggregateBy.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAggregateBy(od);
});
});
unittest.group('obj-schema-AggregateRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAggregateRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AggregateRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAggregateRequest(od);
});
});
unittest.group('obj-schema-AggregateResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAggregateResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AggregateResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAggregateResponse(od);
});
});
unittest.group('obj-schema-Application', () {
unittest.test('to-json--from-json', () async {
final o = buildApplication();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Application.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkApplication(od);
});
});
unittest.group('obj-schema-BucketByActivity', () {
unittest.test('to-json--from-json', () async {
final o = buildBucketByActivity();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BucketByActivity.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBucketByActivity(od);
});
});
unittest.group('obj-schema-BucketBySession', () {
unittest.test('to-json--from-json', () async {
final o = buildBucketBySession();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BucketBySession.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBucketBySession(od);
});
});
unittest.group('obj-schema-BucketByTime', () {
unittest.test('to-json--from-json', () async {
final o = buildBucketByTime();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BucketByTime.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBucketByTime(od);
});
});
unittest.group('obj-schema-BucketByTimePeriod', () {
unittest.test('to-json--from-json', () async {
final o = buildBucketByTimePeriod();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BucketByTimePeriod.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBucketByTimePeriod(od);
});
});
unittest.group('obj-schema-DataPoint', () {
unittest.test('to-json--from-json', () async {
final o = buildDataPoint();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DataPoint.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDataPoint(od);
});
});
unittest.group('obj-schema-DataSource', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DataSource.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDataSource(od);
});
});
unittest.group('obj-schema-DataType', () {
unittest.test('to-json--from-json', () async {
final o = buildDataType();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DataType.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDataType(od);
});
});
unittest.group('obj-schema-DataTypeField', () {
unittest.test('to-json--from-json', () async {
final o = buildDataTypeField();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataTypeField.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataTypeField(od);
});
});
unittest.group('obj-schema-Dataset', () {
unittest.test('to-json--from-json', () async {
final o = buildDataset();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Dataset.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDataset(od);
});
});
unittest.group('obj-schema-Device', () {
unittest.test('to-json--from-json', () async {
final o = buildDevice();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Device.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDevice(od);
});
});
unittest.group('obj-schema-ListDataPointChangesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListDataPointChangesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListDataPointChangesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListDataPointChangesResponse(od);
});
});
unittest.group('obj-schema-ListDataSourcesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListDataSourcesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListDataSourcesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListDataSourcesResponse(od);
});
});
unittest.group('obj-schema-ListSessionsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListSessionsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListSessionsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListSessionsResponse(od);
});
});
unittest.group('obj-schema-MapValue', () {
unittest.test('to-json--from-json', () async {
final o = buildMapValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.MapValue.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkMapValue(od);
});
});
unittest.group('obj-schema-Session', () {
unittest.test('to-json--from-json', () async {
final o = buildSession();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Session.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSession(od);
});
});
unittest.group('obj-schema-Value', () {
unittest.test('to-json--from-json', () async {
final o = buildValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Value.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkValue(od);
});
});
unittest.group('obj-schema-ValueMapValEntry', () {
unittest.test('to-json--from-json', () async {
final o = buildValueMapValEntry();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ValueMapValEntry.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkValueMapValEntry(od);
});
});
unittest.group('resource-UsersDataSourcesResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources;
final arg_request = buildDataSource();
final arg_userId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.DataSource.fromJson(
json as core.Map<core.String, core.dynamic>);
checkDataSource(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDataSource());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.create(arg_request, arg_userId, $fields: arg_$fields);
checkDataSource(response as api.DataSource);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources;
final arg_userId = 'foo';
final arg_dataSourceId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDataSource());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.delete(arg_userId, arg_dataSourceId, $fields: arg_$fields);
checkDataSource(response as api.DataSource);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources;
final arg_userId = 'foo';
final arg_dataSourceId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDataSource());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_userId, arg_dataSourceId, $fields: arg_$fields);
checkDataSource(response as api.DataSource);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources;
final arg_userId = 'foo';
final arg_dataTypeName = buildUnnamed14();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['dataTypeName']!,
unittest.equals(arg_dataTypeName),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListDataSourcesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_userId,
dataTypeName: arg_dataTypeName, $fields: arg_$fields);
checkListDataSourcesResponse(response as api.ListDataSourcesResponse);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources;
final arg_request = buildDataSource();
final arg_userId = 'foo';
final arg_dataSourceId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.DataSource.fromJson(
json as core.Map<core.String, core.dynamic>);
checkDataSource(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDataSource());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(
arg_request, arg_userId, arg_dataSourceId,
$fields: arg_$fields);
checkDataSource(response as api.DataSource);
});
});
unittest.group('resource-UsersDataSourcesDataPointChangesResource', () {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources.dataPointChanges;
final arg_userId = 'foo';
final arg_dataSourceId = 'foo';
final arg_limit = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['limit']!.first),
unittest.equals(arg_limit),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListDataPointChangesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_userId, arg_dataSourceId,
limit: arg_limit, pageToken: arg_pageToken, $fields: arg_$fields);
checkListDataPointChangesResponse(
response as api.ListDataPointChangesResponse);
});
});
unittest.group('resource-UsersDataSourcesDatasetsResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources.datasets;
final arg_userId = 'foo';
final arg_dataSourceId = 'foo';
final arg_datasetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_userId, arg_dataSourceId, arg_datasetId,
$fields: arg_$fields);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources.datasets;
final arg_userId = 'foo';
final arg_dataSourceId = 'foo';
final arg_datasetId = 'foo';
final arg_limit = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['limit']!.first),
unittest.equals(arg_limit),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDataset());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(
arg_userId, arg_dataSourceId, arg_datasetId,
limit: arg_limit, pageToken: arg_pageToken, $fields: arg_$fields);
checkDataset(response as api.Dataset);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataSources.datasets;
final arg_request = buildDataset();
final arg_userId = 'foo';
final arg_dataSourceId = 'foo';
final arg_datasetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Dataset.fromJson(json as core.Map<core.String, core.dynamic>);
checkDataset(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDataset());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(
arg_request, arg_userId, arg_dataSourceId, arg_datasetId,
$fields: arg_$fields);
checkDataset(response as api.Dataset);
});
});
unittest.group('resource-UsersDatasetResource', () {
unittest.test('method--aggregate', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.dataset;
final arg_request = buildAggregateRequest();
final arg_userId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.AggregateRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkAggregateRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildAggregateResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.aggregate(arg_request, arg_userId, $fields: arg_$fields);
checkAggregateResponse(response as api.AggregateResponse);
});
});
unittest.group('resource-UsersSessionsResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.sessions;
final arg_userId = 'foo';
final arg_sessionId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = '';
return async.Future.value(stringResponse(200, h, resp));
}), true);
await res.delete(arg_userId, arg_sessionId, $fields: arg_$fields);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.sessions;
final arg_userId = 'foo';
final arg_activityType = buildUnnamed15();
final arg_endTime = 'foo';
final arg_includeDeleted = true;
final arg_pageToken = 'foo';
final arg_startTime = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['activityType']!.map(core.int.parse).toList(),
unittest.equals(arg_activityType),
);
unittest.expect(
queryMap['endTime']!.first,
unittest.equals(arg_endTime),
);
unittest.expect(
queryMap['includeDeleted']!.first,
unittest.equals('$arg_includeDeleted'),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['startTime']!.first,
unittest.equals(arg_startTime),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListSessionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_userId,
activityType: arg_activityType,
endTime: arg_endTime,
includeDeleted: arg_includeDeleted,
pageToken: arg_pageToken,
startTime: arg_startTime,
$fields: arg_$fields);
checkListSessionsResponse(response as api.ListSessionsResponse);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.FitnessApi(mock).users.sessions;
final arg_request = buildSession();
final arg_userId = 'foo';
final arg_sessionId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Session.fromJson(json as core.Map<core.String, core.dynamic>);
checkSession(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSession());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(arg_request, arg_userId, arg_sessionId,
$fields: arg_$fields);
checkSession(response as api.Session);
});
});
}
| googleapis.dart/generated/googleapis/test/fitness/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/fitness/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 23902} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/iam/v2.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.List<core.String> buildUnnamed0() => [
'foo',
'foo',
];
void checkUnnamed0(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.List<core.String> buildUnnamed1() => [
'foo',
'foo',
];
void checkUnnamed1(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.List<core.String> buildUnnamed2() => [
'foo',
'foo',
];
void checkUnnamed2(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.List<core.String> buildUnnamed3() => [
'foo',
'foo',
];
void checkUnnamed3(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 buildCounterGoogleIamV2DenyRule = 0;
api.GoogleIamV2DenyRule buildGoogleIamV2DenyRule() {
final o = api.GoogleIamV2DenyRule();
buildCounterGoogleIamV2DenyRule++;
if (buildCounterGoogleIamV2DenyRule < 3) {
o.denialCondition = buildGoogleTypeExpr();
o.deniedPermissions = buildUnnamed0();
o.deniedPrincipals = buildUnnamed1();
o.exceptionPermissions = buildUnnamed2();
o.exceptionPrincipals = buildUnnamed3();
}
buildCounterGoogleIamV2DenyRule--;
return o;
}
void checkGoogleIamV2DenyRule(api.GoogleIamV2DenyRule o) {
buildCounterGoogleIamV2DenyRule++;
if (buildCounterGoogleIamV2DenyRule < 3) {
checkGoogleTypeExpr(o.denialCondition!);
checkUnnamed0(o.deniedPermissions!);
checkUnnamed1(o.deniedPrincipals!);
checkUnnamed2(o.exceptionPermissions!);
checkUnnamed3(o.exceptionPrincipals!);
}
buildCounterGoogleIamV2DenyRule--;
}
core.List<api.GoogleIamV2Policy> buildUnnamed4() => [
buildGoogleIamV2Policy(),
buildGoogleIamV2Policy(),
];
void checkUnnamed4(core.List<api.GoogleIamV2Policy> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleIamV2Policy(o[0]);
checkGoogleIamV2Policy(o[1]);
}
core.int buildCounterGoogleIamV2ListPoliciesResponse = 0;
api.GoogleIamV2ListPoliciesResponse buildGoogleIamV2ListPoliciesResponse() {
final o = api.GoogleIamV2ListPoliciesResponse();
buildCounterGoogleIamV2ListPoliciesResponse++;
if (buildCounterGoogleIamV2ListPoliciesResponse < 3) {
o.nextPageToken = 'foo';
o.policies = buildUnnamed4();
}
buildCounterGoogleIamV2ListPoliciesResponse--;
return o;
}
void checkGoogleIamV2ListPoliciesResponse(
api.GoogleIamV2ListPoliciesResponse o) {
buildCounterGoogleIamV2ListPoliciesResponse++;
if (buildCounterGoogleIamV2ListPoliciesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed4(o.policies!);
}
buildCounterGoogleIamV2ListPoliciesResponse--;
}
core.Map<core.String, core.String> buildUnnamed5() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed5(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.List<api.GoogleIamV2PolicyRule> buildUnnamed6() => [
buildGoogleIamV2PolicyRule(),
buildGoogleIamV2PolicyRule(),
];
void checkUnnamed6(core.List<api.GoogleIamV2PolicyRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleIamV2PolicyRule(o[0]);
checkGoogleIamV2PolicyRule(o[1]);
}
core.int buildCounterGoogleIamV2Policy = 0;
api.GoogleIamV2Policy buildGoogleIamV2Policy() {
final o = api.GoogleIamV2Policy();
buildCounterGoogleIamV2Policy++;
if (buildCounterGoogleIamV2Policy < 3) {
o.annotations = buildUnnamed5();
o.createTime = 'foo';
o.deleteTime = 'foo';
o.displayName = 'foo';
o.etag = 'foo';
o.kind = 'foo';
o.name = 'foo';
o.rules = buildUnnamed6();
o.uid = 'foo';
o.updateTime = 'foo';
}
buildCounterGoogleIamV2Policy--;
return o;
}
void checkGoogleIamV2Policy(api.GoogleIamV2Policy o) {
buildCounterGoogleIamV2Policy++;
if (buildCounterGoogleIamV2Policy < 3) {
checkUnnamed5(o.annotations!);
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.deleteTime!,
unittest.equals('foo'),
);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed6(o.rules!);
unittest.expect(
o.uid!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterGoogleIamV2Policy--;
}
core.int buildCounterGoogleIamV2PolicyRule = 0;
api.GoogleIamV2PolicyRule buildGoogleIamV2PolicyRule() {
final o = api.GoogleIamV2PolicyRule();
buildCounterGoogleIamV2PolicyRule++;
if (buildCounterGoogleIamV2PolicyRule < 3) {
o.denyRule = buildGoogleIamV2DenyRule();
o.description = 'foo';
}
buildCounterGoogleIamV2PolicyRule--;
return o;
}
void checkGoogleIamV2PolicyRule(api.GoogleIamV2PolicyRule o) {
buildCounterGoogleIamV2PolicyRule++;
if (buildCounterGoogleIamV2PolicyRule < 3) {
checkGoogleIamV2DenyRule(o.denyRule!);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
}
buildCounterGoogleIamV2PolicyRule--;
}
core.Map<core.String, core.Object?> buildUnnamed7() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed7(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.Map<core.String, core.Object?> buildUnnamed8() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed8(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 buildCounterGoogleLongrunningOperation = 0;
api.GoogleLongrunningOperation buildGoogleLongrunningOperation() {
final o = api.GoogleLongrunningOperation();
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
o.done = true;
o.error = buildGoogleRpcStatus();
o.metadata = buildUnnamed7();
o.name = 'foo';
o.response = buildUnnamed8();
}
buildCounterGoogleLongrunningOperation--;
return o;
}
void checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) {
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
unittest.expect(o.done!, unittest.isTrue);
checkGoogleRpcStatus(o.error!);
checkUnnamed7(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed8(o.response!);
}
buildCounterGoogleLongrunningOperation--;
}
core.Map<core.String, core.Object?> buildUnnamed9() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed9(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.List<core.Map<core.String, core.Object?>> buildUnnamed10() => [
buildUnnamed9(),
buildUnnamed9(),
];
void checkUnnamed10(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed9(o[0]);
checkUnnamed9(o[1]);
}
core.int buildCounterGoogleRpcStatus = 0;
api.GoogleRpcStatus buildGoogleRpcStatus() {
final o = api.GoogleRpcStatus();
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
o.code = 42;
o.details = buildUnnamed10();
o.message = 'foo';
}
buildCounterGoogleRpcStatus--;
return o;
}
void checkGoogleRpcStatus(api.GoogleRpcStatus o) {
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed10(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterGoogleRpcStatus--;
}
core.int buildCounterGoogleTypeExpr = 0;
api.GoogleTypeExpr buildGoogleTypeExpr() {
final o = api.GoogleTypeExpr();
buildCounterGoogleTypeExpr++;
if (buildCounterGoogleTypeExpr < 3) {
o.description = 'foo';
o.expression = 'foo';
o.location = 'foo';
o.title = 'foo';
}
buildCounterGoogleTypeExpr--;
return o;
}
void checkGoogleTypeExpr(api.GoogleTypeExpr o) {
buildCounterGoogleTypeExpr++;
if (buildCounterGoogleTypeExpr < 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'),
);
}
buildCounterGoogleTypeExpr--;
}
void main() {
unittest.group('obj-schema-GoogleIamV2DenyRule', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleIamV2DenyRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleIamV2DenyRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleIamV2DenyRule(od);
});
});
unittest.group('obj-schema-GoogleIamV2ListPoliciesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleIamV2ListPoliciesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleIamV2ListPoliciesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleIamV2ListPoliciesResponse(od);
});
});
unittest.group('obj-schema-GoogleIamV2Policy', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleIamV2Policy();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleIamV2Policy.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleIamV2Policy(od);
});
});
unittest.group('obj-schema-GoogleIamV2PolicyRule', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleIamV2PolicyRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleIamV2PolicyRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleIamV2PolicyRule(od);
});
});
unittest.group('obj-schema-GoogleLongrunningOperation', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningOperation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningOperation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningOperation(od);
});
});
unittest.group('obj-schema-GoogleRpcStatus', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleRpcStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleRpcStatus.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleRpcStatus(od);
});
});
unittest.group('obj-schema-GoogleTypeExpr', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleTypeExpr();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleTypeExpr.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleTypeExpr(od);
});
});
unittest.group('resource-PoliciesResource', () {
unittest.test('method--createPolicy', () async {
final mock = HttpServerMock();
final res = api.IamApi(mock).policies;
final arg_request = buildGoogleIamV2Policy();
final arg_parent = 'foo';
final arg_policyId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleIamV2Policy.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleIamV2Policy(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['policyId']!.first,
unittest.equals(arg_policyId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.createPolicy(arg_request, arg_parent,
policyId: arg_policyId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.IamApi(mock).policies;
final arg_name = 'foo';
final arg_etag = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['etag']!.first,
unittest.equals(arg_etag),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.delete(arg_name, etag: arg_etag, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.IamApi(mock).policies;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleIamV2Policy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleIamV2Policy(response as api.GoogleIamV2Policy);
});
unittest.test('method--listPolicies', () async {
final mock = HttpServerMock();
final res = api.IamApi(mock).policies;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleIamV2ListPoliciesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.listPolicies(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleIamV2ListPoliciesResponse(
response as api.GoogleIamV2ListPoliciesResponse);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.IamApi(mock).policies;
final arg_request = buildGoogleIamV2Policy();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleIamV2Policy.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleIamV2Policy(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.update(arg_request, arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
});
unittest.group('resource-PoliciesOperationsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.IamApi(mock).policies.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
});
}
| googleapis.dart/generated/googleapis/test/iam/v2_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/iam/v2_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 12501} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/localservices/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterGoogleAdsHomeservicesLocalservicesV1AccountReport = 0;
api.GoogleAdsHomeservicesLocalservicesV1AccountReport
buildGoogleAdsHomeservicesLocalservicesV1AccountReport() {
final o = api.GoogleAdsHomeservicesLocalservicesV1AccountReport();
buildCounterGoogleAdsHomeservicesLocalservicesV1AccountReport++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1AccountReport < 3) {
o.accountId = 'foo';
o.aggregatorInfo =
buildGoogleAdsHomeservicesLocalservicesV1AggregatorInfo();
o.averageFiveStarRating = 42.0;
o.averageWeeklyBudget = 42.0;
o.businessName = 'foo';
o.currencyCode = 'foo';
o.currentPeriodChargedLeads = 'foo';
o.currentPeriodConnectedPhoneCalls = 'foo';
o.currentPeriodPhoneCalls = 'foo';
o.currentPeriodTotalCost = 42.0;
o.impressionsLastTwoDays = 'foo';
o.phoneLeadResponsiveness = 42.0;
o.previousPeriodChargedLeads = 'foo';
o.previousPeriodConnectedPhoneCalls = 'foo';
o.previousPeriodPhoneCalls = 'foo';
o.previousPeriodTotalCost = 42.0;
o.totalReview = 42;
}
buildCounterGoogleAdsHomeservicesLocalservicesV1AccountReport--;
return o;
}
void checkGoogleAdsHomeservicesLocalservicesV1AccountReport(
api.GoogleAdsHomeservicesLocalservicesV1AccountReport o) {
buildCounterGoogleAdsHomeservicesLocalservicesV1AccountReport++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1AccountReport < 3) {
unittest.expect(
o.accountId!,
unittest.equals('foo'),
);
checkGoogleAdsHomeservicesLocalservicesV1AggregatorInfo(o.aggregatorInfo!);
unittest.expect(
o.averageFiveStarRating!,
unittest.equals(42.0),
);
unittest.expect(
o.averageWeeklyBudget!,
unittest.equals(42.0),
);
unittest.expect(
o.businessName!,
unittest.equals('foo'),
);
unittest.expect(
o.currencyCode!,
unittest.equals('foo'),
);
unittest.expect(
o.currentPeriodChargedLeads!,
unittest.equals('foo'),
);
unittest.expect(
o.currentPeriodConnectedPhoneCalls!,
unittest.equals('foo'),
);
unittest.expect(
o.currentPeriodPhoneCalls!,
unittest.equals('foo'),
);
unittest.expect(
o.currentPeriodTotalCost!,
unittest.equals(42.0),
);
unittest.expect(
o.impressionsLastTwoDays!,
unittest.equals('foo'),
);
unittest.expect(
o.phoneLeadResponsiveness!,
unittest.equals(42.0),
);
unittest.expect(
o.previousPeriodChargedLeads!,
unittest.equals('foo'),
);
unittest.expect(
o.previousPeriodConnectedPhoneCalls!,
unittest.equals('foo'),
);
unittest.expect(
o.previousPeriodPhoneCalls!,
unittest.equals('foo'),
);
unittest.expect(
o.previousPeriodTotalCost!,
unittest.equals(42.0),
);
unittest.expect(
o.totalReview!,
unittest.equals(42),
);
}
buildCounterGoogleAdsHomeservicesLocalservicesV1AccountReport--;
}
core.int buildCounterGoogleAdsHomeservicesLocalservicesV1AggregatorInfo = 0;
api.GoogleAdsHomeservicesLocalservicesV1AggregatorInfo
buildGoogleAdsHomeservicesLocalservicesV1AggregatorInfo() {
final o = api.GoogleAdsHomeservicesLocalservicesV1AggregatorInfo();
buildCounterGoogleAdsHomeservicesLocalservicesV1AggregatorInfo++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1AggregatorInfo < 3) {
o.aggregatorProviderId = 'foo';
}
buildCounterGoogleAdsHomeservicesLocalservicesV1AggregatorInfo--;
return o;
}
void checkGoogleAdsHomeservicesLocalservicesV1AggregatorInfo(
api.GoogleAdsHomeservicesLocalservicesV1AggregatorInfo o) {
buildCounterGoogleAdsHomeservicesLocalservicesV1AggregatorInfo++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1AggregatorInfo < 3) {
unittest.expect(
o.aggregatorProviderId!,
unittest.equals('foo'),
);
}
buildCounterGoogleAdsHomeservicesLocalservicesV1AggregatorInfo--;
}
core.int buildCounterGoogleAdsHomeservicesLocalservicesV1BookingLead = 0;
api.GoogleAdsHomeservicesLocalservicesV1BookingLead
buildGoogleAdsHomeservicesLocalservicesV1BookingLead() {
final o = api.GoogleAdsHomeservicesLocalservicesV1BookingLead();
buildCounterGoogleAdsHomeservicesLocalservicesV1BookingLead++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1BookingLead < 3) {
o.bookingAppointmentTimestamp = 'foo';
o.consumerEmail = 'foo';
o.consumerPhoneNumber = 'foo';
o.customerName = 'foo';
o.jobType = 'foo';
}
buildCounterGoogleAdsHomeservicesLocalservicesV1BookingLead--;
return o;
}
void checkGoogleAdsHomeservicesLocalservicesV1BookingLead(
api.GoogleAdsHomeservicesLocalservicesV1BookingLead o) {
buildCounterGoogleAdsHomeservicesLocalservicesV1BookingLead++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1BookingLead < 3) {
unittest.expect(
o.bookingAppointmentTimestamp!,
unittest.equals('foo'),
);
unittest.expect(
o.consumerEmail!,
unittest.equals('foo'),
);
unittest.expect(
o.consumerPhoneNumber!,
unittest.equals('foo'),
);
unittest.expect(
o.customerName!,
unittest.equals('foo'),
);
unittest.expect(
o.jobType!,
unittest.equals('foo'),
);
}
buildCounterGoogleAdsHomeservicesLocalservicesV1BookingLead--;
}
core.int buildCounterGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport = 0;
api.GoogleAdsHomeservicesLocalservicesV1DetailedLeadReport
buildGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport() {
final o = api.GoogleAdsHomeservicesLocalservicesV1DetailedLeadReport();
buildCounterGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport < 3) {
o.accountId = 'foo';
o.aggregatorInfo =
buildGoogleAdsHomeservicesLocalservicesV1AggregatorInfo();
o.bookingLead = buildGoogleAdsHomeservicesLocalservicesV1BookingLead();
o.businessName = 'foo';
o.chargeStatus = 'foo';
o.currencyCode = 'foo';
o.disputeStatus = 'foo';
o.geo = 'foo';
o.leadCategory = 'foo';
o.leadCreationTimestamp = 'foo';
o.leadId = 'foo';
o.leadPrice = 42.0;
o.leadType = 'foo';
o.messageLead = buildGoogleAdsHomeservicesLocalservicesV1MessageLead();
o.phoneLead = buildGoogleAdsHomeservicesLocalservicesV1PhoneLead();
o.timezone = buildGoogleTypeTimeZone();
}
buildCounterGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport--;
return o;
}
void checkGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport(
api.GoogleAdsHomeservicesLocalservicesV1DetailedLeadReport o) {
buildCounterGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport < 3) {
unittest.expect(
o.accountId!,
unittest.equals('foo'),
);
checkGoogleAdsHomeservicesLocalservicesV1AggregatorInfo(o.aggregatorInfo!);
checkGoogleAdsHomeservicesLocalservicesV1BookingLead(o.bookingLead!);
unittest.expect(
o.businessName!,
unittest.equals('foo'),
);
unittest.expect(
o.chargeStatus!,
unittest.equals('foo'),
);
unittest.expect(
o.currencyCode!,
unittest.equals('foo'),
);
unittest.expect(
o.disputeStatus!,
unittest.equals('foo'),
);
unittest.expect(
o.geo!,
unittest.equals('foo'),
);
unittest.expect(
o.leadCategory!,
unittest.equals('foo'),
);
unittest.expect(
o.leadCreationTimestamp!,
unittest.equals('foo'),
);
unittest.expect(
o.leadId!,
unittest.equals('foo'),
);
unittest.expect(
o.leadPrice!,
unittest.equals(42.0),
);
unittest.expect(
o.leadType!,
unittest.equals('foo'),
);
checkGoogleAdsHomeservicesLocalservicesV1MessageLead(o.messageLead!);
checkGoogleAdsHomeservicesLocalservicesV1PhoneLead(o.phoneLead!);
checkGoogleTypeTimeZone(o.timezone!);
}
buildCounterGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport--;
}
core.int buildCounterGoogleAdsHomeservicesLocalservicesV1MessageLead = 0;
api.GoogleAdsHomeservicesLocalservicesV1MessageLead
buildGoogleAdsHomeservicesLocalservicesV1MessageLead() {
final o = api.GoogleAdsHomeservicesLocalservicesV1MessageLead();
buildCounterGoogleAdsHomeservicesLocalservicesV1MessageLead++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1MessageLead < 3) {
o.consumerPhoneNumber = 'foo';
o.customerName = 'foo';
o.jobType = 'foo';
o.postalCode = 'foo';
}
buildCounterGoogleAdsHomeservicesLocalservicesV1MessageLead--;
return o;
}
void checkGoogleAdsHomeservicesLocalservicesV1MessageLead(
api.GoogleAdsHomeservicesLocalservicesV1MessageLead o) {
buildCounterGoogleAdsHomeservicesLocalservicesV1MessageLead++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1MessageLead < 3) {
unittest.expect(
o.consumerPhoneNumber!,
unittest.equals('foo'),
);
unittest.expect(
o.customerName!,
unittest.equals('foo'),
);
unittest.expect(
o.jobType!,
unittest.equals('foo'),
);
unittest.expect(
o.postalCode!,
unittest.equals('foo'),
);
}
buildCounterGoogleAdsHomeservicesLocalservicesV1MessageLead--;
}
core.int buildCounterGoogleAdsHomeservicesLocalservicesV1PhoneLead = 0;
api.GoogleAdsHomeservicesLocalservicesV1PhoneLead
buildGoogleAdsHomeservicesLocalservicesV1PhoneLead() {
final o = api.GoogleAdsHomeservicesLocalservicesV1PhoneLead();
buildCounterGoogleAdsHomeservicesLocalservicesV1PhoneLead++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1PhoneLead < 3) {
o.chargedCallTimestamp = 'foo';
o.chargedConnectedCallDurationSeconds = 'foo';
o.consumerPhoneNumber = 'foo';
}
buildCounterGoogleAdsHomeservicesLocalservicesV1PhoneLead--;
return o;
}
void checkGoogleAdsHomeservicesLocalservicesV1PhoneLead(
api.GoogleAdsHomeservicesLocalservicesV1PhoneLead o) {
buildCounterGoogleAdsHomeservicesLocalservicesV1PhoneLead++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1PhoneLead < 3) {
unittest.expect(
o.chargedCallTimestamp!,
unittest.equals('foo'),
);
unittest.expect(
o.chargedConnectedCallDurationSeconds!,
unittest.equals('foo'),
);
unittest.expect(
o.consumerPhoneNumber!,
unittest.equals('foo'),
);
}
buildCounterGoogleAdsHomeservicesLocalservicesV1PhoneLead--;
}
core.List<api.GoogleAdsHomeservicesLocalservicesV1AccountReport>
buildUnnamed0() => [
buildGoogleAdsHomeservicesLocalservicesV1AccountReport(),
buildGoogleAdsHomeservicesLocalservicesV1AccountReport(),
];
void checkUnnamed0(
core.List<api.GoogleAdsHomeservicesLocalservicesV1AccountReport> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleAdsHomeservicesLocalservicesV1AccountReport(o[0]);
checkGoogleAdsHomeservicesLocalservicesV1AccountReport(o[1]);
}
core.int
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse =
0;
api.GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse
buildGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse() {
final o =
api.GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse();
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse <
3) {
o.accountReports = buildUnnamed0();
o.nextPageToken = 'foo';
}
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse--;
return o;
}
void checkGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse(
api.GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse o) {
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse <
3) {
checkUnnamed0(o.accountReports!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse--;
}
core.List<api.GoogleAdsHomeservicesLocalservicesV1DetailedLeadReport>
buildUnnamed1() => [
buildGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport(),
buildGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport(),
];
void checkUnnamed1(
core.List<api.GoogleAdsHomeservicesLocalservicesV1DetailedLeadReport> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport(o[0]);
checkGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport(o[1]);
}
core.int
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse =
0;
api.GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse
buildGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse() {
final o = api
.GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse();
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse <
3) {
o.detailedLeadReports = buildUnnamed1();
o.nextPageToken = 'foo';
}
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse--;
return o;
}
void checkGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse(
api.GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse
o) {
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse++;
if (buildCounterGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse <
3) {
checkUnnamed1(o.detailedLeadReports!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse--;
}
core.int buildCounterGoogleTypeTimeZone = 0;
api.GoogleTypeTimeZone buildGoogleTypeTimeZone() {
final o = api.GoogleTypeTimeZone();
buildCounterGoogleTypeTimeZone++;
if (buildCounterGoogleTypeTimeZone < 3) {
o.id = 'foo';
o.version = 'foo';
}
buildCounterGoogleTypeTimeZone--;
return o;
}
void checkGoogleTypeTimeZone(api.GoogleTypeTimeZone o) {
buildCounterGoogleTypeTimeZone++;
if (buildCounterGoogleTypeTimeZone < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.version!,
unittest.equals('foo'),
);
}
buildCounterGoogleTypeTimeZone--;
}
void main() {
unittest.group('obj-schema-GoogleAdsHomeservicesLocalservicesV1AccountReport',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAdsHomeservicesLocalservicesV1AccountReport();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAdsHomeservicesLocalservicesV1AccountReport.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAdsHomeservicesLocalservicesV1AccountReport(od);
});
});
unittest.group(
'obj-schema-GoogleAdsHomeservicesLocalservicesV1AggregatorInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAdsHomeservicesLocalservicesV1AggregatorInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAdsHomeservicesLocalservicesV1AggregatorInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAdsHomeservicesLocalservicesV1AggregatorInfo(od);
});
});
unittest.group('obj-schema-GoogleAdsHomeservicesLocalservicesV1BookingLead',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAdsHomeservicesLocalservicesV1BookingLead();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAdsHomeservicesLocalservicesV1BookingLead.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAdsHomeservicesLocalservicesV1BookingLead(od);
});
});
unittest.group(
'obj-schema-GoogleAdsHomeservicesLocalservicesV1DetailedLeadReport', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAdsHomeservicesLocalservicesV1DetailedLeadReport.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAdsHomeservicesLocalservicesV1DetailedLeadReport(od);
});
});
unittest.group('obj-schema-GoogleAdsHomeservicesLocalservicesV1MessageLead',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAdsHomeservicesLocalservicesV1MessageLead();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAdsHomeservicesLocalservicesV1MessageLead.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAdsHomeservicesLocalservicesV1MessageLead(od);
});
});
unittest.group('obj-schema-GoogleAdsHomeservicesLocalservicesV1PhoneLead',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleAdsHomeservicesLocalservicesV1PhoneLead();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleAdsHomeservicesLocalservicesV1PhoneLead.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleAdsHomeservicesLocalservicesV1PhoneLead(od);
});
});
unittest.group(
'obj-schema-GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse',
() {
unittest.test('to-json--from-json', () async {
final o =
buildGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse
.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse(od);
});
});
unittest.group(
'obj-schema-GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse',
() {
unittest.test('to-json--from-json', () async {
final o =
buildGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse
.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse(
od);
});
});
unittest.group('obj-schema-GoogleTypeTimeZone', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleTypeTimeZone();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleTypeTimeZone.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleTypeTimeZone(od);
});
});
unittest.group('resource-AccountReportsResource', () {
unittest.test('method--search', () async {
final mock = HttpServerMock();
final res = api.LocalservicesApi(mock).accountReports;
final arg_endDate_day = 42;
final arg_endDate_month = 42;
final arg_endDate_year = 42;
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_query = 'foo';
final arg_startDate_day = 42;
final arg_startDate_month = 42;
final arg_startDate_year = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 24),
unittest.equals('v1/accountReports:search'),
);
pathOffset += 24;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['endDate.day']!.first),
unittest.equals(arg_endDate_day),
);
unittest.expect(
core.int.parse(queryMap['endDate.month']!.first),
unittest.equals(arg_endDate_month),
);
unittest.expect(
core.int.parse(queryMap['endDate.year']!.first),
unittest.equals(arg_endDate_year),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['query']!.first,
unittest.equals(arg_query),
);
unittest.expect(
core.int.parse(queryMap['startDate.day']!.first),
unittest.equals(arg_startDate_day),
);
unittest.expect(
core.int.parse(queryMap['startDate.month']!.first),
unittest.equals(arg_startDate_month),
);
unittest.expect(
core.int.parse(queryMap['startDate.year']!.first),
unittest.equals(arg_startDate_year),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(
buildGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.search(
endDate_day: arg_endDate_day,
endDate_month: arg_endDate_month,
endDate_year: arg_endDate_year,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
query: arg_query,
startDate_day: arg_startDate_day,
startDate_month: arg_startDate_month,
startDate_year: arg_startDate_year,
$fields: arg_$fields);
checkGoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse(
response as api
.GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse);
});
});
unittest.group('resource-DetailedLeadReportsResource', () {
unittest.test('method--search', () async {
final mock = HttpServerMock();
final res = api.LocalservicesApi(mock).detailedLeadReports;
final arg_endDate_day = 42;
final arg_endDate_month = 42;
final arg_endDate_year = 42;
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_query = 'foo';
final arg_startDate_day = 42;
final arg_startDate_month = 42;
final arg_startDate_year = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('v1/detailedLeadReports:search'),
);
pathOffset += 29;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['endDate.day']!.first),
unittest.equals(arg_endDate_day),
);
unittest.expect(
core.int.parse(queryMap['endDate.month']!.first),
unittest.equals(arg_endDate_month),
);
unittest.expect(
core.int.parse(queryMap['endDate.year']!.first),
unittest.equals(arg_endDate_year),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['query']!.first,
unittest.equals(arg_query),
);
unittest.expect(
core.int.parse(queryMap['startDate.day']!.first),
unittest.equals(arg_startDate_day),
);
unittest.expect(
core.int.parse(queryMap['startDate.month']!.first),
unittest.equals(arg_startDate_month),
);
unittest.expect(
core.int.parse(queryMap['startDate.year']!.first),
unittest.equals(arg_startDate_year),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(
buildGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.search(
endDate_day: arg_endDate_day,
endDate_month: arg_endDate_month,
endDate_year: arg_endDate_year,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
query: arg_query,
startDate_day: arg_startDate_day,
startDate_month: arg_startDate_month,
startDate_year: arg_startDate_year,
$fields: arg_$fields);
checkGoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse(
response as api
.GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/localservices/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/localservices/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 11952} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/networkconnectivity/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterAcceptSpokeRequest = 0;
api.AcceptSpokeRequest buildAcceptSpokeRequest() {
final o = api.AcceptSpokeRequest();
buildCounterAcceptSpokeRequest++;
if (buildCounterAcceptSpokeRequest < 3) {
o.requestId = 'foo';
}
buildCounterAcceptSpokeRequest--;
return o;
}
void checkAcceptSpokeRequest(api.AcceptSpokeRequest o) {
buildCounterAcceptSpokeRequest++;
if (buildCounterAcceptSpokeRequest < 3) {
unittest.expect(
o.requestId!,
unittest.equals('foo'),
);
}
buildCounterAcceptSpokeRequest--;
}
core.List<api.AuditLogConfig> buildUnnamed0() => [
buildAuditLogConfig(),
buildAuditLogConfig(),
];
void checkUnnamed0(core.List<api.AuditLogConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkAuditLogConfig(o[0]);
checkAuditLogConfig(o[1]);
}
core.int buildCounterAuditConfig = 0;
api.AuditConfig buildAuditConfig() {
final o = api.AuditConfig();
buildCounterAuditConfig++;
if (buildCounterAuditConfig < 3) {
o.auditLogConfigs = buildUnnamed0();
o.service = 'foo';
}
buildCounterAuditConfig--;
return o;
}
void checkAuditConfig(api.AuditConfig o) {
buildCounterAuditConfig++;
if (buildCounterAuditConfig < 3) {
checkUnnamed0(o.auditLogConfigs!);
unittest.expect(
o.service!,
unittest.equals('foo'),
);
}
buildCounterAuditConfig--;
}
core.List<core.String> buildUnnamed1() => [
'foo',
'foo',
];
void checkUnnamed1(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;
api.AuditLogConfig buildAuditLogConfig() {
final o = api.AuditLogConfig();
buildCounterAuditLogConfig++;
if (buildCounterAuditLogConfig < 3) {
o.exemptedMembers = buildUnnamed1();
o.logType = 'foo';
}
buildCounterAuditLogConfig--;
return o;
}
void checkAuditLogConfig(api.AuditLogConfig o) {
buildCounterAuditLogConfig++;
if (buildCounterAuditLogConfig < 3) {
checkUnnamed1(o.exemptedMembers!);
unittest.expect(
o.logType!,
unittest.equals('foo'),
);
}
buildCounterAuditLogConfig--;
}
core.List<core.String> buildUnnamed2() => [
'foo',
'foo',
];
void checkUnnamed2(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;
api.Binding buildBinding() {
final o = api.Binding();
buildCounterBinding++;
if (buildCounterBinding < 3) {
o.condition = buildExpr();
o.members = buildUnnamed2();
o.role = 'foo';
}
buildCounterBinding--;
return o;
}
void checkBinding(api.Binding o) {
buildCounterBinding++;
if (buildCounterBinding < 3) {
checkExpr(o.condition!);
checkUnnamed2(o.members!);
unittest.expect(
o.role!,
unittest.equals('foo'),
);
}
buildCounterBinding--;
}
core.int buildCounterConsumerPscConfig = 0;
api.ConsumerPscConfig buildConsumerPscConfig() {
final o = api.ConsumerPscConfig();
buildCounterConsumerPscConfig++;
if (buildCounterConsumerPscConfig < 3) {
o.disableGlobalAccess = true;
o.network = 'foo';
o.project = 'foo';
o.state = 'foo';
}
buildCounterConsumerPscConfig--;
return o;
}
void checkConsumerPscConfig(api.ConsumerPscConfig o) {
buildCounterConsumerPscConfig++;
if (buildCounterConsumerPscConfig < 3) {
unittest.expect(o.disableGlobalAccess!, unittest.isTrue);
unittest.expect(
o.network!,
unittest.equals('foo'),
);
unittest.expect(
o.project!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
}
buildCounterConsumerPscConfig--;
}
core.int buildCounterConsumerPscConnection = 0;
api.ConsumerPscConnection buildConsumerPscConnection() {
final o = api.ConsumerPscConnection();
buildCounterConsumerPscConnection++;
if (buildCounterConsumerPscConnection < 3) {
o.error = buildGoogleRpcStatus();
o.errorInfo = buildGoogleRpcErrorInfo();
o.errorType = 'foo';
o.forwardingRule = 'foo';
o.gceOperation = 'foo';
o.ip = 'foo';
o.network = 'foo';
o.project = 'foo';
o.pscConnectionId = 'foo';
o.serviceAttachmentUri = 'foo';
o.state = 'foo';
}
buildCounterConsumerPscConnection--;
return o;
}
void checkConsumerPscConnection(api.ConsumerPscConnection o) {
buildCounterConsumerPscConnection++;
if (buildCounterConsumerPscConnection < 3) {
checkGoogleRpcStatus(o.error!);
checkGoogleRpcErrorInfo(o.errorInfo!);
unittest.expect(
o.errorType!,
unittest.equals('foo'),
);
unittest.expect(
o.forwardingRule!,
unittest.equals('foo'),
);
unittest.expect(
o.gceOperation!,
unittest.equals('foo'),
);
unittest.expect(
o.ip!,
unittest.equals('foo'),
);
unittest.expect(
o.network!,
unittest.equals('foo'),
);
unittest.expect(
o.project!,
unittest.equals('foo'),
);
unittest.expect(
o.pscConnectionId!,
unittest.equals('foo'),
);
unittest.expect(
o.serviceAttachmentUri!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
}
buildCounterConsumerPscConnection--;
}
core.int buildCounterEmpty = 0;
api.Empty buildEmpty() {
final o = api.Empty();
buildCounterEmpty++;
if (buildCounterEmpty < 3) {}
buildCounterEmpty--;
return o;
}
void checkEmpty(api.Empty o) {
buildCounterEmpty++;
if (buildCounterEmpty < 3) {}
buildCounterEmpty--;
}
core.int buildCounterExpr = 0;
api.Expr buildExpr() {
final o = api.Expr();
buildCounterExpr++;
if (buildCounterExpr < 3) {
o.description = 'foo';
o.expression = 'foo';
o.location = 'foo';
o.title = 'foo';
}
buildCounterExpr--;
return o;
}
void 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 buildCounterGoogleLongrunningCancelOperationRequest = 0;
api.GoogleLongrunningCancelOperationRequest
buildGoogleLongrunningCancelOperationRequest() {
final o = api.GoogleLongrunningCancelOperationRequest();
buildCounterGoogleLongrunningCancelOperationRequest++;
if (buildCounterGoogleLongrunningCancelOperationRequest < 3) {}
buildCounterGoogleLongrunningCancelOperationRequest--;
return o;
}
void checkGoogleLongrunningCancelOperationRequest(
api.GoogleLongrunningCancelOperationRequest o) {
buildCounterGoogleLongrunningCancelOperationRequest++;
if (buildCounterGoogleLongrunningCancelOperationRequest < 3) {}
buildCounterGoogleLongrunningCancelOperationRequest--;
}
core.List<api.GoogleLongrunningOperation> buildUnnamed3() => [
buildGoogleLongrunningOperation(),
buildGoogleLongrunningOperation(),
];
void checkUnnamed3(core.List<api.GoogleLongrunningOperation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleLongrunningOperation(o[0]);
checkGoogleLongrunningOperation(o[1]);
}
core.int buildCounterGoogleLongrunningListOperationsResponse = 0;
api.GoogleLongrunningListOperationsResponse
buildGoogleLongrunningListOperationsResponse() {
final o = api.GoogleLongrunningListOperationsResponse();
buildCounterGoogleLongrunningListOperationsResponse++;
if (buildCounterGoogleLongrunningListOperationsResponse < 3) {
o.nextPageToken = 'foo';
o.operations = buildUnnamed3();
}
buildCounterGoogleLongrunningListOperationsResponse--;
return o;
}
void checkGoogleLongrunningListOperationsResponse(
api.GoogleLongrunningListOperationsResponse o) {
buildCounterGoogleLongrunningListOperationsResponse++;
if (buildCounterGoogleLongrunningListOperationsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed3(o.operations!);
}
buildCounterGoogleLongrunningListOperationsResponse--;
}
core.Map<core.String, core.Object?> buildUnnamed4() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed4(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.Map<core.String, core.Object?> buildUnnamed5() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed5(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 buildCounterGoogleLongrunningOperation = 0;
api.GoogleLongrunningOperation buildGoogleLongrunningOperation() {
final o = api.GoogleLongrunningOperation();
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
o.done = true;
o.error = buildGoogleRpcStatus();
o.metadata = buildUnnamed4();
o.name = 'foo';
o.response = buildUnnamed5();
}
buildCounterGoogleLongrunningOperation--;
return o;
}
void checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) {
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
unittest.expect(o.done!, unittest.isTrue);
checkGoogleRpcStatus(o.error!);
checkUnnamed4(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed5(o.response!);
}
buildCounterGoogleLongrunningOperation--;
}
core.Map<core.String, core.String> buildUnnamed6() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed6(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 buildCounterGoogleRpcErrorInfo = 0;
api.GoogleRpcErrorInfo buildGoogleRpcErrorInfo() {
final o = api.GoogleRpcErrorInfo();
buildCounterGoogleRpcErrorInfo++;
if (buildCounterGoogleRpcErrorInfo < 3) {
o.domain = 'foo';
o.metadata = buildUnnamed6();
o.reason = 'foo';
}
buildCounterGoogleRpcErrorInfo--;
return o;
}
void checkGoogleRpcErrorInfo(api.GoogleRpcErrorInfo o) {
buildCounterGoogleRpcErrorInfo++;
if (buildCounterGoogleRpcErrorInfo < 3) {
unittest.expect(
o.domain!,
unittest.equals('foo'),
);
checkUnnamed6(o.metadata!);
unittest.expect(
o.reason!,
unittest.equals('foo'),
);
}
buildCounterGoogleRpcErrorInfo--;
}
core.Map<core.String, core.Object?> buildUnnamed7() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed7(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.List<core.Map<core.String, core.Object?>> buildUnnamed8() => [
buildUnnamed7(),
buildUnnamed7(),
];
void checkUnnamed8(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed7(o[0]);
checkUnnamed7(o[1]);
}
core.int buildCounterGoogleRpcStatus = 0;
api.GoogleRpcStatus buildGoogleRpcStatus() {
final o = api.GoogleRpcStatus();
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
o.code = 42;
o.details = buildUnnamed8();
o.message = 'foo';
}
buildCounterGoogleRpcStatus--;
return o;
}
void checkGoogleRpcStatus(api.GoogleRpcStatus o) {
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed8(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterGoogleRpcStatus--;
}
core.Map<core.String, core.String> buildUnnamed9() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed9(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 buildCounterGroup = 0;
api.Group buildGroup() {
final o = api.Group();
buildCounterGroup++;
if (buildCounterGroup < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.labels = buildUnnamed9();
o.name = 'foo';
o.state = 'foo';
o.uid = 'foo';
o.updateTime = 'foo';
}
buildCounterGroup--;
return o;
}
void checkGroup(api.Group o) {
buildCounterGroup++;
if (buildCounterGroup < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
checkUnnamed9(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.uid!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterGroup--;
}
core.Map<core.String, core.String> buildUnnamed10() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed10(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.List<core.String> buildUnnamed11() => [
'foo',
'foo',
];
void checkUnnamed11(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.List<api.RoutingVPC> buildUnnamed12() => [
buildRoutingVPC(),
buildRoutingVPC(),
];
void checkUnnamed12(core.List<api.RoutingVPC> o) {
unittest.expect(o, unittest.hasLength(2));
checkRoutingVPC(o[0]);
checkRoutingVPC(o[1]);
}
core.int buildCounterHub = 0;
api.Hub buildHub() {
final o = api.Hub();
buildCounterHub++;
if (buildCounterHub < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.labels = buildUnnamed10();
o.name = 'foo';
o.routeTables = buildUnnamed11();
o.routingVpcs = buildUnnamed12();
o.spokeSummary = buildSpokeSummary();
o.state = 'foo';
o.uniqueId = 'foo';
o.updateTime = 'foo';
}
buildCounterHub--;
return o;
}
void checkHub(api.Hub o) {
buildCounterHub++;
if (buildCounterHub < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
checkUnnamed10(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed11(o.routeTables!);
checkUnnamed12(o.routingVpcs!);
checkSpokeSummary(o.spokeSummary!);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.uniqueId!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterHub--;
}
core.Map<core.String, core.String> buildUnnamed13() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed13(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.List<core.String> buildUnnamed14() => [
'foo',
'foo',
];
void checkUnnamed14(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.List<core.String> buildUnnamed15() => [
'foo',
'foo',
];
void checkUnnamed15(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.List<core.String> buildUnnamed16() => [
'foo',
'foo',
];
void checkUnnamed16(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 buildCounterInternalRange = 0;
api.InternalRange buildInternalRange() {
final o = api.InternalRange();
buildCounterInternalRange++;
if (buildCounterInternalRange < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.ipCidrRange = 'foo';
o.labels = buildUnnamed13();
o.name = 'foo';
o.network = 'foo';
o.overlaps = buildUnnamed14();
o.peering = 'foo';
o.prefixLength = 42;
o.targetCidrRange = buildUnnamed15();
o.updateTime = 'foo';
o.usage = 'foo';
o.users = buildUnnamed16();
}
buildCounterInternalRange--;
return o;
}
void checkInternalRange(api.InternalRange o) {
buildCounterInternalRange++;
if (buildCounterInternalRange < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.ipCidrRange!,
unittest.equals('foo'),
);
checkUnnamed13(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.network!,
unittest.equals('foo'),
);
checkUnnamed14(o.overlaps!);
unittest.expect(
o.peering!,
unittest.equals('foo'),
);
unittest.expect(
o.prefixLength!,
unittest.equals(42),
);
checkUnnamed15(o.targetCidrRange!);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
unittest.expect(
o.usage!,
unittest.equals('foo'),
);
checkUnnamed16(o.users!);
}
buildCounterInternalRange--;
}
core.List<core.String> buildUnnamed17() => [
'foo',
'foo',
];
void checkUnnamed17(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 buildCounterLinkedInterconnectAttachments = 0;
api.LinkedInterconnectAttachments buildLinkedInterconnectAttachments() {
final o = api.LinkedInterconnectAttachments();
buildCounterLinkedInterconnectAttachments++;
if (buildCounterLinkedInterconnectAttachments < 3) {
o.siteToSiteDataTransfer = true;
o.uris = buildUnnamed17();
o.vpcNetwork = 'foo';
}
buildCounterLinkedInterconnectAttachments--;
return o;
}
void checkLinkedInterconnectAttachments(api.LinkedInterconnectAttachments o) {
buildCounterLinkedInterconnectAttachments++;
if (buildCounterLinkedInterconnectAttachments < 3) {
unittest.expect(o.siteToSiteDataTransfer!, unittest.isTrue);
checkUnnamed17(o.uris!);
unittest.expect(
o.vpcNetwork!,
unittest.equals('foo'),
);
}
buildCounterLinkedInterconnectAttachments--;
}
core.List<api.RouterApplianceInstance> buildUnnamed18() => [
buildRouterApplianceInstance(),
buildRouterApplianceInstance(),
];
void checkUnnamed18(core.List<api.RouterApplianceInstance> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouterApplianceInstance(o[0]);
checkRouterApplianceInstance(o[1]);
}
core.int buildCounterLinkedRouterApplianceInstances = 0;
api.LinkedRouterApplianceInstances buildLinkedRouterApplianceInstances() {
final o = api.LinkedRouterApplianceInstances();
buildCounterLinkedRouterApplianceInstances++;
if (buildCounterLinkedRouterApplianceInstances < 3) {
o.instances = buildUnnamed18();
o.siteToSiteDataTransfer = true;
o.vpcNetwork = 'foo';
}
buildCounterLinkedRouterApplianceInstances--;
return o;
}
void checkLinkedRouterApplianceInstances(api.LinkedRouterApplianceInstances o) {
buildCounterLinkedRouterApplianceInstances++;
if (buildCounterLinkedRouterApplianceInstances < 3) {
checkUnnamed18(o.instances!);
unittest.expect(o.siteToSiteDataTransfer!, unittest.isTrue);
unittest.expect(
o.vpcNetwork!,
unittest.equals('foo'),
);
}
buildCounterLinkedRouterApplianceInstances--;
}
core.List<core.String> buildUnnamed19() => [
'foo',
'foo',
];
void checkUnnamed19(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 buildCounterLinkedVpcNetwork = 0;
api.LinkedVpcNetwork buildLinkedVpcNetwork() {
final o = api.LinkedVpcNetwork();
buildCounterLinkedVpcNetwork++;
if (buildCounterLinkedVpcNetwork < 3) {
o.excludeExportRanges = buildUnnamed19();
o.uri = 'foo';
}
buildCounterLinkedVpcNetwork--;
return o;
}
void checkLinkedVpcNetwork(api.LinkedVpcNetwork o) {
buildCounterLinkedVpcNetwork++;
if (buildCounterLinkedVpcNetwork < 3) {
checkUnnamed19(o.excludeExportRanges!);
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
}
buildCounterLinkedVpcNetwork--;
}
core.List<core.String> buildUnnamed20() => [
'foo',
'foo',
];
void checkUnnamed20(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 buildCounterLinkedVpnTunnels = 0;
api.LinkedVpnTunnels buildLinkedVpnTunnels() {
final o = api.LinkedVpnTunnels();
buildCounterLinkedVpnTunnels++;
if (buildCounterLinkedVpnTunnels < 3) {
o.siteToSiteDataTransfer = true;
o.uris = buildUnnamed20();
o.vpcNetwork = 'foo';
}
buildCounterLinkedVpnTunnels--;
return o;
}
void checkLinkedVpnTunnels(api.LinkedVpnTunnels o) {
buildCounterLinkedVpnTunnels++;
if (buildCounterLinkedVpnTunnels < 3) {
unittest.expect(o.siteToSiteDataTransfer!, unittest.isTrue);
checkUnnamed20(o.uris!);
unittest.expect(
o.vpcNetwork!,
unittest.equals('foo'),
);
}
buildCounterLinkedVpnTunnels--;
}
core.List<api.Group> buildUnnamed21() => [
buildGroup(),
buildGroup(),
];
void checkUnnamed21(core.List<api.Group> o) {
unittest.expect(o, unittest.hasLength(2));
checkGroup(o[0]);
checkGroup(o[1]);
}
core.List<core.String> buildUnnamed22() => [
'foo',
'foo',
];
void checkUnnamed22(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 buildCounterListGroupsResponse = 0;
api.ListGroupsResponse buildListGroupsResponse() {
final o = api.ListGroupsResponse();
buildCounterListGroupsResponse++;
if (buildCounterListGroupsResponse < 3) {
o.groups = buildUnnamed21();
o.nextPageToken = 'foo';
o.unreachable = buildUnnamed22();
}
buildCounterListGroupsResponse--;
return o;
}
void checkListGroupsResponse(api.ListGroupsResponse o) {
buildCounterListGroupsResponse++;
if (buildCounterListGroupsResponse < 3) {
checkUnnamed21(o.groups!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed22(o.unreachable!);
}
buildCounterListGroupsResponse--;
}
core.List<api.Spoke> buildUnnamed23() => [
buildSpoke(),
buildSpoke(),
];
void checkUnnamed23(core.List<api.Spoke> o) {
unittest.expect(o, unittest.hasLength(2));
checkSpoke(o[0]);
checkSpoke(o[1]);
}
core.List<core.String> buildUnnamed24() => [
'foo',
'foo',
];
void checkUnnamed24(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 buildCounterListHubSpokesResponse = 0;
api.ListHubSpokesResponse buildListHubSpokesResponse() {
final o = api.ListHubSpokesResponse();
buildCounterListHubSpokesResponse++;
if (buildCounterListHubSpokesResponse < 3) {
o.nextPageToken = 'foo';
o.spokes = buildUnnamed23();
o.unreachable = buildUnnamed24();
}
buildCounterListHubSpokesResponse--;
return o;
}
void checkListHubSpokesResponse(api.ListHubSpokesResponse o) {
buildCounterListHubSpokesResponse++;
if (buildCounterListHubSpokesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed23(o.spokes!);
checkUnnamed24(o.unreachable!);
}
buildCounterListHubSpokesResponse--;
}
core.List<api.Hub> buildUnnamed25() => [
buildHub(),
buildHub(),
];
void checkUnnamed25(core.List<api.Hub> o) {
unittest.expect(o, unittest.hasLength(2));
checkHub(o[0]);
checkHub(o[1]);
}
core.List<core.String> buildUnnamed26() => [
'foo',
'foo',
];
void checkUnnamed26(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 buildCounterListHubsResponse = 0;
api.ListHubsResponse buildListHubsResponse() {
final o = api.ListHubsResponse();
buildCounterListHubsResponse++;
if (buildCounterListHubsResponse < 3) {
o.hubs = buildUnnamed25();
o.nextPageToken = 'foo';
o.unreachable = buildUnnamed26();
}
buildCounterListHubsResponse--;
return o;
}
void checkListHubsResponse(api.ListHubsResponse o) {
buildCounterListHubsResponse++;
if (buildCounterListHubsResponse < 3) {
checkUnnamed25(o.hubs!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed26(o.unreachable!);
}
buildCounterListHubsResponse--;
}
core.List<api.InternalRange> buildUnnamed27() => [
buildInternalRange(),
buildInternalRange(),
];
void checkUnnamed27(core.List<api.InternalRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkInternalRange(o[0]);
checkInternalRange(o[1]);
}
core.List<core.String> buildUnnamed28() => [
'foo',
'foo',
];
void checkUnnamed28(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 buildCounterListInternalRangesResponse = 0;
api.ListInternalRangesResponse buildListInternalRangesResponse() {
final o = api.ListInternalRangesResponse();
buildCounterListInternalRangesResponse++;
if (buildCounterListInternalRangesResponse < 3) {
o.internalRanges = buildUnnamed27();
o.nextPageToken = 'foo';
o.unreachable = buildUnnamed28();
}
buildCounterListInternalRangesResponse--;
return o;
}
void checkListInternalRangesResponse(api.ListInternalRangesResponse o) {
buildCounterListInternalRangesResponse++;
if (buildCounterListInternalRangesResponse < 3) {
checkUnnamed27(o.internalRanges!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed28(o.unreachable!);
}
buildCounterListInternalRangesResponse--;
}
core.List<api.Location> buildUnnamed29() => [
buildLocation(),
buildLocation(),
];
void checkUnnamed29(core.List<api.Location> o) {
unittest.expect(o, unittest.hasLength(2));
checkLocation(o[0]);
checkLocation(o[1]);
}
core.int buildCounterListLocationsResponse = 0;
api.ListLocationsResponse buildListLocationsResponse() {
final o = api.ListLocationsResponse();
buildCounterListLocationsResponse++;
if (buildCounterListLocationsResponse < 3) {
o.locations = buildUnnamed29();
o.nextPageToken = 'foo';
}
buildCounterListLocationsResponse--;
return o;
}
void checkListLocationsResponse(api.ListLocationsResponse o) {
buildCounterListLocationsResponse++;
if (buildCounterListLocationsResponse < 3) {
checkUnnamed29(o.locations!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListLocationsResponse--;
}
core.List<api.RouteTable> buildUnnamed30() => [
buildRouteTable(),
buildRouteTable(),
];
void checkUnnamed30(core.List<api.RouteTable> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouteTable(o[0]);
checkRouteTable(o[1]);
}
core.List<core.String> buildUnnamed31() => [
'foo',
'foo',
];
void checkUnnamed31(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 buildCounterListRouteTablesResponse = 0;
api.ListRouteTablesResponse buildListRouteTablesResponse() {
final o = api.ListRouteTablesResponse();
buildCounterListRouteTablesResponse++;
if (buildCounterListRouteTablesResponse < 3) {
o.nextPageToken = 'foo';
o.routeTables = buildUnnamed30();
o.unreachable = buildUnnamed31();
}
buildCounterListRouteTablesResponse--;
return o;
}
void checkListRouteTablesResponse(api.ListRouteTablesResponse o) {
buildCounterListRouteTablesResponse++;
if (buildCounterListRouteTablesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed30(o.routeTables!);
checkUnnamed31(o.unreachable!);
}
buildCounterListRouteTablesResponse--;
}
core.List<api.Route> buildUnnamed32() => [
buildRoute(),
buildRoute(),
];
void checkUnnamed32(core.List<api.Route> o) {
unittest.expect(o, unittest.hasLength(2));
checkRoute(o[0]);
checkRoute(o[1]);
}
core.List<core.String> buildUnnamed33() => [
'foo',
'foo',
];
void checkUnnamed33(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 buildCounterListRoutesResponse = 0;
api.ListRoutesResponse buildListRoutesResponse() {
final o = api.ListRoutesResponse();
buildCounterListRoutesResponse++;
if (buildCounterListRoutesResponse < 3) {
o.nextPageToken = 'foo';
o.routes = buildUnnamed32();
o.unreachable = buildUnnamed33();
}
buildCounterListRoutesResponse--;
return o;
}
void checkListRoutesResponse(api.ListRoutesResponse o) {
buildCounterListRoutesResponse++;
if (buildCounterListRoutesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed32(o.routes!);
checkUnnamed33(o.unreachable!);
}
buildCounterListRoutesResponse--;
}
core.List<api.ServiceClass> buildUnnamed34() => [
buildServiceClass(),
buildServiceClass(),
];
void checkUnnamed34(core.List<api.ServiceClass> o) {
unittest.expect(o, unittest.hasLength(2));
checkServiceClass(o[0]);
checkServiceClass(o[1]);
}
core.List<core.String> buildUnnamed35() => [
'foo',
'foo',
];
void checkUnnamed35(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 buildCounterListServiceClassesResponse = 0;
api.ListServiceClassesResponse buildListServiceClassesResponse() {
final o = api.ListServiceClassesResponse();
buildCounterListServiceClassesResponse++;
if (buildCounterListServiceClassesResponse < 3) {
o.nextPageToken = 'foo';
o.serviceClasses = buildUnnamed34();
o.unreachable = buildUnnamed35();
}
buildCounterListServiceClassesResponse--;
return o;
}
void checkListServiceClassesResponse(api.ListServiceClassesResponse o) {
buildCounterListServiceClassesResponse++;
if (buildCounterListServiceClassesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed34(o.serviceClasses!);
checkUnnamed35(o.unreachable!);
}
buildCounterListServiceClassesResponse--;
}
core.List<api.ServiceConnectionMap> buildUnnamed36() => [
buildServiceConnectionMap(),
buildServiceConnectionMap(),
];
void checkUnnamed36(core.List<api.ServiceConnectionMap> o) {
unittest.expect(o, unittest.hasLength(2));
checkServiceConnectionMap(o[0]);
checkServiceConnectionMap(o[1]);
}
core.List<core.String> buildUnnamed37() => [
'foo',
'foo',
];
void checkUnnamed37(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 buildCounterListServiceConnectionMapsResponse = 0;
api.ListServiceConnectionMapsResponse buildListServiceConnectionMapsResponse() {
final o = api.ListServiceConnectionMapsResponse();
buildCounterListServiceConnectionMapsResponse++;
if (buildCounterListServiceConnectionMapsResponse < 3) {
o.nextPageToken = 'foo';
o.serviceConnectionMaps = buildUnnamed36();
o.unreachable = buildUnnamed37();
}
buildCounterListServiceConnectionMapsResponse--;
return o;
}
void checkListServiceConnectionMapsResponse(
api.ListServiceConnectionMapsResponse o) {
buildCounterListServiceConnectionMapsResponse++;
if (buildCounterListServiceConnectionMapsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed36(o.serviceConnectionMaps!);
checkUnnamed37(o.unreachable!);
}
buildCounterListServiceConnectionMapsResponse--;
}
core.List<api.ServiceConnectionPolicy> buildUnnamed38() => [
buildServiceConnectionPolicy(),
buildServiceConnectionPolicy(),
];
void checkUnnamed38(core.List<api.ServiceConnectionPolicy> o) {
unittest.expect(o, unittest.hasLength(2));
checkServiceConnectionPolicy(o[0]);
checkServiceConnectionPolicy(o[1]);
}
core.List<core.String> buildUnnamed39() => [
'foo',
'foo',
];
void checkUnnamed39(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 buildCounterListServiceConnectionPoliciesResponse = 0;
api.ListServiceConnectionPoliciesResponse
buildListServiceConnectionPoliciesResponse() {
final o = api.ListServiceConnectionPoliciesResponse();
buildCounterListServiceConnectionPoliciesResponse++;
if (buildCounterListServiceConnectionPoliciesResponse < 3) {
o.nextPageToken = 'foo';
o.serviceConnectionPolicies = buildUnnamed38();
o.unreachable = buildUnnamed39();
}
buildCounterListServiceConnectionPoliciesResponse--;
return o;
}
void checkListServiceConnectionPoliciesResponse(
api.ListServiceConnectionPoliciesResponse o) {
buildCounterListServiceConnectionPoliciesResponse++;
if (buildCounterListServiceConnectionPoliciesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed38(o.serviceConnectionPolicies!);
checkUnnamed39(o.unreachable!);
}
buildCounterListServiceConnectionPoliciesResponse--;
}
core.List<api.ServiceConnectionToken> buildUnnamed40() => [
buildServiceConnectionToken(),
buildServiceConnectionToken(),
];
void checkUnnamed40(core.List<api.ServiceConnectionToken> o) {
unittest.expect(o, unittest.hasLength(2));
checkServiceConnectionToken(o[0]);
checkServiceConnectionToken(o[1]);
}
core.List<core.String> buildUnnamed41() => [
'foo',
'foo',
];
void checkUnnamed41(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 buildCounterListServiceConnectionTokensResponse = 0;
api.ListServiceConnectionTokensResponse
buildListServiceConnectionTokensResponse() {
final o = api.ListServiceConnectionTokensResponse();
buildCounterListServiceConnectionTokensResponse++;
if (buildCounterListServiceConnectionTokensResponse < 3) {
o.nextPageToken = 'foo';
o.serviceConnectionTokens = buildUnnamed40();
o.unreachable = buildUnnamed41();
}
buildCounterListServiceConnectionTokensResponse--;
return o;
}
void checkListServiceConnectionTokensResponse(
api.ListServiceConnectionTokensResponse o) {
buildCounterListServiceConnectionTokensResponse++;
if (buildCounterListServiceConnectionTokensResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed40(o.serviceConnectionTokens!);
checkUnnamed41(o.unreachable!);
}
buildCounterListServiceConnectionTokensResponse--;
}
core.List<api.Spoke> buildUnnamed42() => [
buildSpoke(),
buildSpoke(),
];
void checkUnnamed42(core.List<api.Spoke> o) {
unittest.expect(o, unittest.hasLength(2));
checkSpoke(o[0]);
checkSpoke(o[1]);
}
core.List<core.String> buildUnnamed43() => [
'foo',
'foo',
];
void checkUnnamed43(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 buildCounterListSpokesResponse = 0;
api.ListSpokesResponse buildListSpokesResponse() {
final o = api.ListSpokesResponse();
buildCounterListSpokesResponse++;
if (buildCounterListSpokesResponse < 3) {
o.nextPageToken = 'foo';
o.spokes = buildUnnamed42();
o.unreachable = buildUnnamed43();
}
buildCounterListSpokesResponse--;
return o;
}
void checkListSpokesResponse(api.ListSpokesResponse o) {
buildCounterListSpokesResponse++;
if (buildCounterListSpokesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed42(o.spokes!);
checkUnnamed43(o.unreachable!);
}
buildCounterListSpokesResponse--;
}
core.Map<core.String, core.String> buildUnnamed44() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed44(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.Map<core.String, core.Object?> buildUnnamed45() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed45(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'),
);
}
core.int buildCounterLocation = 0;
api.Location buildLocation() {
final o = api.Location();
buildCounterLocation++;
if (buildCounterLocation < 3) {
o.displayName = 'foo';
o.labels = buildUnnamed44();
o.locationId = 'foo';
o.metadata = buildUnnamed45();
o.name = 'foo';
}
buildCounterLocation--;
return o;
}
void checkLocation(api.Location o) {
buildCounterLocation++;
if (buildCounterLocation < 3) {
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
checkUnnamed44(o.labels!);
unittest.expect(
o.locationId!,
unittest.equals('foo'),
);
checkUnnamed45(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterLocation--;
}
core.int buildCounterNextHopVpcNetwork = 0;
api.NextHopVpcNetwork buildNextHopVpcNetwork() {
final o = api.NextHopVpcNetwork();
buildCounterNextHopVpcNetwork++;
if (buildCounterNextHopVpcNetwork < 3) {
o.uri = 'foo';
}
buildCounterNextHopVpcNetwork--;
return o;
}
void checkNextHopVpcNetwork(api.NextHopVpcNetwork o) {
buildCounterNextHopVpcNetwork++;
if (buildCounterNextHopVpcNetwork < 3) {
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
}
buildCounterNextHopVpcNetwork--;
}
core.List<api.AuditConfig> buildUnnamed46() => [
buildAuditConfig(),
buildAuditConfig(),
];
void checkUnnamed46(core.List<api.AuditConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkAuditConfig(o[0]);
checkAuditConfig(o[1]);
}
core.List<api.Binding> buildUnnamed47() => [
buildBinding(),
buildBinding(),
];
void checkUnnamed47(core.List<api.Binding> o) {
unittest.expect(o, unittest.hasLength(2));
checkBinding(o[0]);
checkBinding(o[1]);
}
core.int buildCounterPolicy = 0;
api.Policy buildPolicy() {
final o = api.Policy();
buildCounterPolicy++;
if (buildCounterPolicy < 3) {
o.auditConfigs = buildUnnamed46();
o.bindings = buildUnnamed47();
o.etag = 'foo';
o.version = 42;
}
buildCounterPolicy--;
return o;
}
void checkPolicy(api.Policy o) {
buildCounterPolicy++;
if (buildCounterPolicy < 3) {
checkUnnamed46(o.auditConfigs!);
checkUnnamed47(o.bindings!);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.version!,
unittest.equals(42),
);
}
buildCounterPolicy--;
}
core.int buildCounterProducerPscConfig = 0;
api.ProducerPscConfig buildProducerPscConfig() {
final o = api.ProducerPscConfig();
buildCounterProducerPscConfig++;
if (buildCounterProducerPscConfig < 3) {
o.serviceAttachmentUri = 'foo';
}
buildCounterProducerPscConfig--;
return o;
}
void checkProducerPscConfig(api.ProducerPscConfig o) {
buildCounterProducerPscConfig++;
if (buildCounterProducerPscConfig < 3) {
unittest.expect(
o.serviceAttachmentUri!,
unittest.equals('foo'),
);
}
buildCounterProducerPscConfig--;
}
core.List<core.String> buildUnnamed48() => [
'foo',
'foo',
];
void checkUnnamed48(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 buildCounterPscConfig = 0;
api.PscConfig buildPscConfig() {
final o = api.PscConfig();
buildCounterPscConfig++;
if (buildCounterPscConfig < 3) {
o.limit = 'foo';
o.subnetworks = buildUnnamed48();
}
buildCounterPscConfig--;
return o;
}
void checkPscConfig(api.PscConfig o) {
buildCounterPscConfig++;
if (buildCounterPscConfig < 3) {
unittest.expect(
o.limit!,
unittest.equals('foo'),
);
checkUnnamed48(o.subnetworks!);
}
buildCounterPscConfig--;
}
core.int buildCounterPscConnection = 0;
api.PscConnection buildPscConnection() {
final o = api.PscConnection();
buildCounterPscConnection++;
if (buildCounterPscConnection < 3) {
o.consumerAddress = 'foo';
o.consumerForwardingRule = 'foo';
o.consumerTargetProject = 'foo';
o.error = buildGoogleRpcStatus();
o.errorInfo = buildGoogleRpcErrorInfo();
o.errorType = 'foo';
o.gceOperation = 'foo';
o.pscConnectionId = 'foo';
o.state = 'foo';
}
buildCounterPscConnection--;
return o;
}
void checkPscConnection(api.PscConnection o) {
buildCounterPscConnection++;
if (buildCounterPscConnection < 3) {
unittest.expect(
o.consumerAddress!,
unittest.equals('foo'),
);
unittest.expect(
o.consumerForwardingRule!,
unittest.equals('foo'),
);
unittest.expect(
o.consumerTargetProject!,
unittest.equals('foo'),
);
checkGoogleRpcStatus(o.error!);
checkGoogleRpcErrorInfo(o.errorInfo!);
unittest.expect(
o.errorType!,
unittest.equals('foo'),
);
unittest.expect(
o.gceOperation!,
unittest.equals('foo'),
);
unittest.expect(
o.pscConnectionId!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
}
buildCounterPscConnection--;
}
core.int buildCounterRejectSpokeRequest = 0;
api.RejectSpokeRequest buildRejectSpokeRequest() {
final o = api.RejectSpokeRequest();
buildCounterRejectSpokeRequest++;
if (buildCounterRejectSpokeRequest < 3) {
o.details = 'foo';
o.requestId = 'foo';
}
buildCounterRejectSpokeRequest--;
return o;
}
void checkRejectSpokeRequest(api.RejectSpokeRequest o) {
buildCounterRejectSpokeRequest++;
if (buildCounterRejectSpokeRequest < 3) {
unittest.expect(
o.details!,
unittest.equals('foo'),
);
unittest.expect(
o.requestId!,
unittest.equals('foo'),
);
}
buildCounterRejectSpokeRequest--;
}
core.Map<core.String, core.String> buildUnnamed49() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed49(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 buildCounterRoute = 0;
api.Route buildRoute() {
final o = api.Route();
buildCounterRoute++;
if (buildCounterRoute < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.ipCidrRange = 'foo';
o.labels = buildUnnamed49();
o.location = 'foo';
o.name = 'foo';
o.nextHopVpcNetwork = buildNextHopVpcNetwork();
o.spoke = 'foo';
o.state = 'foo';
o.type = 'foo';
o.uid = 'foo';
o.updateTime = 'foo';
}
buildCounterRoute--;
return o;
}
void checkRoute(api.Route o) {
buildCounterRoute++;
if (buildCounterRoute < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.ipCidrRange!,
unittest.equals('foo'),
);
checkUnnamed49(o.labels!);
unittest.expect(
o.location!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkNextHopVpcNetwork(o.nextHopVpcNetwork!);
unittest.expect(
o.spoke!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.uid!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterRoute--;
}
core.Map<core.String, core.String> buildUnnamed50() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed50(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 buildCounterRouteTable = 0;
api.RouteTable buildRouteTable() {
final o = api.RouteTable();
buildCounterRouteTable++;
if (buildCounterRouteTable < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.labels = buildUnnamed50();
o.name = 'foo';
o.state = 'foo';
o.uid = 'foo';
o.updateTime = 'foo';
}
buildCounterRouteTable--;
return o;
}
void checkRouteTable(api.RouteTable o) {
buildCounterRouteTable++;
if (buildCounterRouteTable < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
checkUnnamed50(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.uid!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterRouteTable--;
}
core.int buildCounterRouterApplianceInstance = 0;
api.RouterApplianceInstance buildRouterApplianceInstance() {
final o = api.RouterApplianceInstance();
buildCounterRouterApplianceInstance++;
if (buildCounterRouterApplianceInstance < 3) {
o.ipAddress = 'foo';
o.virtualMachine = 'foo';
}
buildCounterRouterApplianceInstance--;
return o;
}
void checkRouterApplianceInstance(api.RouterApplianceInstance o) {
buildCounterRouterApplianceInstance++;
if (buildCounterRouterApplianceInstance < 3) {
unittest.expect(
o.ipAddress!,
unittest.equals('foo'),
);
unittest.expect(
o.virtualMachine!,
unittest.equals('foo'),
);
}
buildCounterRouterApplianceInstance--;
}
core.int buildCounterRoutingVPC = 0;
api.RoutingVPC buildRoutingVPC() {
final o = api.RoutingVPC();
buildCounterRoutingVPC++;
if (buildCounterRoutingVPC < 3) {
o.requiredForNewSiteToSiteDataTransferSpokes = true;
o.uri = 'foo';
}
buildCounterRoutingVPC--;
return o;
}
void checkRoutingVPC(api.RoutingVPC o) {
buildCounterRoutingVPC++;
if (buildCounterRoutingVPC < 3) {
unittest.expect(
o.requiredForNewSiteToSiteDataTransferSpokes!, unittest.isTrue);
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
}
buildCounterRoutingVPC--;
}
core.Map<core.String, core.String> buildUnnamed51() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed51(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 buildCounterServiceClass = 0;
api.ServiceClass buildServiceClass() {
final o = api.ServiceClass();
buildCounterServiceClass++;
if (buildCounterServiceClass < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.etag = 'foo';
o.labels = buildUnnamed51();
o.name = 'foo';
o.serviceClass = 'foo';
o.updateTime = 'foo';
}
buildCounterServiceClass--;
return o;
}
void checkServiceClass(api.ServiceClass o) {
buildCounterServiceClass++;
if (buildCounterServiceClass < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
checkUnnamed51(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.serviceClass!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterServiceClass--;
}
core.List<api.ConsumerPscConfig> buildUnnamed52() => [
buildConsumerPscConfig(),
buildConsumerPscConfig(),
];
void checkUnnamed52(core.List<api.ConsumerPscConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkConsumerPscConfig(o[0]);
checkConsumerPscConfig(o[1]);
}
core.List<api.ConsumerPscConnection> buildUnnamed53() => [
buildConsumerPscConnection(),
buildConsumerPscConnection(),
];
void checkUnnamed53(core.List<api.ConsumerPscConnection> o) {
unittest.expect(o, unittest.hasLength(2));
checkConsumerPscConnection(o[0]);
checkConsumerPscConnection(o[1]);
}
core.Map<core.String, core.String> buildUnnamed54() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed54(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.List<api.ProducerPscConfig> buildUnnamed55() => [
buildProducerPscConfig(),
buildProducerPscConfig(),
];
void checkUnnamed55(core.List<api.ProducerPscConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkProducerPscConfig(o[0]);
checkProducerPscConfig(o[1]);
}
core.int buildCounterServiceConnectionMap = 0;
api.ServiceConnectionMap buildServiceConnectionMap() {
final o = api.ServiceConnectionMap();
buildCounterServiceConnectionMap++;
if (buildCounterServiceConnectionMap < 3) {
o.consumerPscConfigs = buildUnnamed52();
o.consumerPscConnections = buildUnnamed53();
o.createTime = 'foo';
o.description = 'foo';
o.etag = 'foo';
o.infrastructure = 'foo';
o.labels = buildUnnamed54();
o.name = 'foo';
o.producerPscConfigs = buildUnnamed55();
o.serviceClass = 'foo';
o.serviceClassUri = 'foo';
o.token = 'foo';
o.updateTime = 'foo';
}
buildCounterServiceConnectionMap--;
return o;
}
void checkServiceConnectionMap(api.ServiceConnectionMap o) {
buildCounterServiceConnectionMap++;
if (buildCounterServiceConnectionMap < 3) {
checkUnnamed52(o.consumerPscConfigs!);
checkUnnamed53(o.consumerPscConnections!);
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.infrastructure!,
unittest.equals('foo'),
);
checkUnnamed54(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed55(o.producerPscConfigs!);
unittest.expect(
o.serviceClass!,
unittest.equals('foo'),
);
unittest.expect(
o.serviceClassUri!,
unittest.equals('foo'),
);
unittest.expect(
o.token!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterServiceConnectionMap--;
}
core.Map<core.String, core.String> buildUnnamed56() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed56(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.List<api.PscConnection> buildUnnamed57() => [
buildPscConnection(),
buildPscConnection(),
];
void checkUnnamed57(core.List<api.PscConnection> o) {
unittest.expect(o, unittest.hasLength(2));
checkPscConnection(o[0]);
checkPscConnection(o[1]);
}
core.int buildCounterServiceConnectionPolicy = 0;
api.ServiceConnectionPolicy buildServiceConnectionPolicy() {
final o = api.ServiceConnectionPolicy();
buildCounterServiceConnectionPolicy++;
if (buildCounterServiceConnectionPolicy < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.etag = 'foo';
o.infrastructure = 'foo';
o.labels = buildUnnamed56();
o.name = 'foo';
o.network = 'foo';
o.pscConfig = buildPscConfig();
o.pscConnections = buildUnnamed57();
o.serviceClass = 'foo';
o.updateTime = 'foo';
}
buildCounterServiceConnectionPolicy--;
return o;
}
void checkServiceConnectionPolicy(api.ServiceConnectionPolicy o) {
buildCounterServiceConnectionPolicy++;
if (buildCounterServiceConnectionPolicy < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.infrastructure!,
unittest.equals('foo'),
);
checkUnnamed56(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.network!,
unittest.equals('foo'),
);
checkPscConfig(o.pscConfig!);
checkUnnamed57(o.pscConnections!);
unittest.expect(
o.serviceClass!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterServiceConnectionPolicy--;
}
core.Map<core.String, core.String> buildUnnamed58() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed58(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 buildCounterServiceConnectionToken = 0;
api.ServiceConnectionToken buildServiceConnectionToken() {
final o = api.ServiceConnectionToken();
buildCounterServiceConnectionToken++;
if (buildCounterServiceConnectionToken < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.etag = 'foo';
o.expireTime = 'foo';
o.labels = buildUnnamed58();
o.name = 'foo';
o.network = 'foo';
o.token = 'foo';
o.updateTime = 'foo';
}
buildCounterServiceConnectionToken--;
return o;
}
void checkServiceConnectionToken(api.ServiceConnectionToken o) {
buildCounterServiceConnectionToken++;
if (buildCounterServiceConnectionToken < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.etag!,
unittest.equals('foo'),
);
unittest.expect(
o.expireTime!,
unittest.equals('foo'),
);
checkUnnamed58(o.labels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.network!,
unittest.equals('foo'),
);
unittest.expect(
o.token!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterServiceConnectionToken--;
}
core.int buildCounterSetIamPolicyRequest = 0;
api.SetIamPolicyRequest buildSetIamPolicyRequest() {
final o = api.SetIamPolicyRequest();
buildCounterSetIamPolicyRequest++;
if (buildCounterSetIamPolicyRequest < 3) {
o.policy = buildPolicy();
o.updateMask = 'foo';
}
buildCounterSetIamPolicyRequest--;
return o;
}
void checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
buildCounterSetIamPolicyRequest++;
if (buildCounterSetIamPolicyRequest < 3) {
checkPolicy(o.policy!);
unittest.expect(
o.updateMask!,
unittest.equals('foo'),
);
}
buildCounterSetIamPolicyRequest--;
}
core.Map<core.String, core.String> buildUnnamed59() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed59(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.List<api.StateReason> buildUnnamed60() => [
buildStateReason(),
buildStateReason(),
];
void checkUnnamed60(core.List<api.StateReason> o) {
unittest.expect(o, unittest.hasLength(2));
checkStateReason(o[0]);
checkStateReason(o[1]);
}
core.int buildCounterSpoke = 0;
api.Spoke buildSpoke() {
final o = api.Spoke();
buildCounterSpoke++;
if (buildCounterSpoke < 3) {
o.createTime = 'foo';
o.description = 'foo';
o.group = 'foo';
o.hub = 'foo';
o.labels = buildUnnamed59();
o.linkedInterconnectAttachments = buildLinkedInterconnectAttachments();
o.linkedRouterApplianceInstances = buildLinkedRouterApplianceInstances();
o.linkedVpcNetwork = buildLinkedVpcNetwork();
o.linkedVpnTunnels = buildLinkedVpnTunnels();
o.name = 'foo';
o.reasons = buildUnnamed60();
o.spokeType = 'foo';
o.state = 'foo';
o.uniqueId = 'foo';
o.updateTime = 'foo';
}
buildCounterSpoke--;
return o;
}
void checkSpoke(api.Spoke o) {
buildCounterSpoke++;
if (buildCounterSpoke < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.group!,
unittest.equals('foo'),
);
unittest.expect(
o.hub!,
unittest.equals('foo'),
);
checkUnnamed59(o.labels!);
checkLinkedInterconnectAttachments(o.linkedInterconnectAttachments!);
checkLinkedRouterApplianceInstances(o.linkedRouterApplianceInstances!);
checkLinkedVpcNetwork(o.linkedVpcNetwork!);
checkLinkedVpnTunnels(o.linkedVpnTunnels!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed60(o.reasons!);
unittest.expect(
o.spokeType!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.uniqueId!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterSpoke--;
}
core.int buildCounterSpokeStateCount = 0;
api.SpokeStateCount buildSpokeStateCount() {
final o = api.SpokeStateCount();
buildCounterSpokeStateCount++;
if (buildCounterSpokeStateCount < 3) {
o.count = 'foo';
o.state = 'foo';
}
buildCounterSpokeStateCount--;
return o;
}
void checkSpokeStateCount(api.SpokeStateCount o) {
buildCounterSpokeStateCount++;
if (buildCounterSpokeStateCount < 3) {
unittest.expect(
o.count!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
}
buildCounterSpokeStateCount--;
}
core.int buildCounterSpokeStateReasonCount = 0;
api.SpokeStateReasonCount buildSpokeStateReasonCount() {
final o = api.SpokeStateReasonCount();
buildCounterSpokeStateReasonCount++;
if (buildCounterSpokeStateReasonCount < 3) {
o.count = 'foo';
o.stateReasonCode = 'foo';
}
buildCounterSpokeStateReasonCount--;
return o;
}
void checkSpokeStateReasonCount(api.SpokeStateReasonCount o) {
buildCounterSpokeStateReasonCount++;
if (buildCounterSpokeStateReasonCount < 3) {
unittest.expect(
o.count!,
unittest.equals('foo'),
);
unittest.expect(
o.stateReasonCode!,
unittest.equals('foo'),
);
}
buildCounterSpokeStateReasonCount--;
}
core.List<api.SpokeStateCount> buildUnnamed61() => [
buildSpokeStateCount(),
buildSpokeStateCount(),
];
void checkUnnamed61(core.List<api.SpokeStateCount> o) {
unittest.expect(o, unittest.hasLength(2));
checkSpokeStateCount(o[0]);
checkSpokeStateCount(o[1]);
}
core.List<api.SpokeStateReasonCount> buildUnnamed62() => [
buildSpokeStateReasonCount(),
buildSpokeStateReasonCount(),
];
void checkUnnamed62(core.List<api.SpokeStateReasonCount> o) {
unittest.expect(o, unittest.hasLength(2));
checkSpokeStateReasonCount(o[0]);
checkSpokeStateReasonCount(o[1]);
}
core.List<api.SpokeTypeCount> buildUnnamed63() => [
buildSpokeTypeCount(),
buildSpokeTypeCount(),
];
void checkUnnamed63(core.List<api.SpokeTypeCount> o) {
unittest.expect(o, unittest.hasLength(2));
checkSpokeTypeCount(o[0]);
checkSpokeTypeCount(o[1]);
}
core.int buildCounterSpokeSummary = 0;
api.SpokeSummary buildSpokeSummary() {
final o = api.SpokeSummary();
buildCounterSpokeSummary++;
if (buildCounterSpokeSummary < 3) {
o.spokeStateCounts = buildUnnamed61();
o.spokeStateReasonCounts = buildUnnamed62();
o.spokeTypeCounts = buildUnnamed63();
}
buildCounterSpokeSummary--;
return o;
}
void checkSpokeSummary(api.SpokeSummary o) {
buildCounterSpokeSummary++;
if (buildCounterSpokeSummary < 3) {
checkUnnamed61(o.spokeStateCounts!);
checkUnnamed62(o.spokeStateReasonCounts!);
checkUnnamed63(o.spokeTypeCounts!);
}
buildCounterSpokeSummary--;
}
core.int buildCounterSpokeTypeCount = 0;
api.SpokeTypeCount buildSpokeTypeCount() {
final o = api.SpokeTypeCount();
buildCounterSpokeTypeCount++;
if (buildCounterSpokeTypeCount < 3) {
o.count = 'foo';
o.spokeType = 'foo';
}
buildCounterSpokeTypeCount--;
return o;
}
void checkSpokeTypeCount(api.SpokeTypeCount o) {
buildCounterSpokeTypeCount++;
if (buildCounterSpokeTypeCount < 3) {
unittest.expect(
o.count!,
unittest.equals('foo'),
);
unittest.expect(
o.spokeType!,
unittest.equals('foo'),
);
}
buildCounterSpokeTypeCount--;
}
core.int buildCounterStateReason = 0;
api.StateReason buildStateReason() {
final o = api.StateReason();
buildCounterStateReason++;
if (buildCounterStateReason < 3) {
o.code = 'foo';
o.message = 'foo';
o.userDetails = 'foo';
}
buildCounterStateReason--;
return o;
}
void checkStateReason(api.StateReason o) {
buildCounterStateReason++;
if (buildCounterStateReason < 3) {
unittest.expect(
o.code!,
unittest.equals('foo'),
);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
unittest.expect(
o.userDetails!,
unittest.equals('foo'),
);
}
buildCounterStateReason--;
}
core.List<core.String> buildUnnamed64() => [
'foo',
'foo',
];
void checkUnnamed64(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;
api.TestIamPermissionsRequest buildTestIamPermissionsRequest() {
final o = api.TestIamPermissionsRequest();
buildCounterTestIamPermissionsRequest++;
if (buildCounterTestIamPermissionsRequest < 3) {
o.permissions = buildUnnamed64();
}
buildCounterTestIamPermissionsRequest--;
return o;
}
void checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
buildCounterTestIamPermissionsRequest++;
if (buildCounterTestIamPermissionsRequest < 3) {
checkUnnamed64(o.permissions!);
}
buildCounterTestIamPermissionsRequest--;
}
core.List<core.String> buildUnnamed65() => [
'foo',
'foo',
];
void checkUnnamed65(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;
api.TestIamPermissionsResponse buildTestIamPermissionsResponse() {
final o = api.TestIamPermissionsResponse();
buildCounterTestIamPermissionsResponse++;
if (buildCounterTestIamPermissionsResponse < 3) {
o.permissions = buildUnnamed65();
}
buildCounterTestIamPermissionsResponse--;
return o;
}
void checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
buildCounterTestIamPermissionsResponse++;
if (buildCounterTestIamPermissionsResponse < 3) {
checkUnnamed65(o.permissions!);
}
buildCounterTestIamPermissionsResponse--;
}
core.List<core.String> buildUnnamed66() => [
'foo',
'foo',
];
void checkUnnamed66(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'),
);
}
void main() {
unittest.group('obj-schema-AcceptSpokeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAcceptSpokeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AcceptSpokeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAcceptSpokeRequest(od);
});
});
unittest.group('obj-schema-AuditConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildAuditConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AuditConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAuditConfig(od);
});
});
unittest.group('obj-schema-AuditLogConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildAuditLogConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AuditLogConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAuditLogConfig(od);
});
});
unittest.group('obj-schema-Binding', () {
unittest.test('to-json--from-json', () async {
final o = buildBinding();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Binding.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkBinding(od);
});
});
unittest.group('obj-schema-ConsumerPscConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildConsumerPscConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ConsumerPscConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkConsumerPscConfig(od);
});
});
unittest.group('obj-schema-ConsumerPscConnection', () {
unittest.test('to-json--from-json', () async {
final o = buildConsumerPscConnection();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ConsumerPscConnection.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkConsumerPscConnection(od);
});
});
unittest.group('obj-schema-Empty', () {
unittest.test('to-json--from-json', () async {
final o = buildEmpty();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Empty.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkEmpty(od);
});
});
unittest.group('obj-schema-Expr', () {
unittest.test('to-json--from-json', () async {
final o = buildExpr();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Expr.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkExpr(od);
});
});
unittest.group('obj-schema-GoogleLongrunningCancelOperationRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningCancelOperationRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningCancelOperationRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningCancelOperationRequest(od);
});
});
unittest.group('obj-schema-GoogleLongrunningListOperationsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningListOperationsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningListOperationsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningListOperationsResponse(od);
});
});
unittest.group('obj-schema-GoogleLongrunningOperation', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningOperation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningOperation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningOperation(od);
});
});
unittest.group('obj-schema-GoogleRpcErrorInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleRpcErrorInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleRpcErrorInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleRpcErrorInfo(od);
});
});
unittest.group('obj-schema-GoogleRpcStatus', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleRpcStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleRpcStatus.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleRpcStatus(od);
});
});
unittest.group('obj-schema-Group', () {
unittest.test('to-json--from-json', () async {
final o = buildGroup();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Group.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGroup(od);
});
});
unittest.group('obj-schema-Hub', () {
unittest.test('to-json--from-json', () async {
final o = buildHub();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Hub.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkHub(od);
});
});
unittest.group('obj-schema-InternalRange', () {
unittest.test('to-json--from-json', () async {
final o = buildInternalRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InternalRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInternalRange(od);
});
});
unittest.group('obj-schema-LinkedInterconnectAttachments', () {
unittest.test('to-json--from-json', () async {
final o = buildLinkedInterconnectAttachments();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LinkedInterconnectAttachments.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLinkedInterconnectAttachments(od);
});
});
unittest.group('obj-schema-LinkedRouterApplianceInstances', () {
unittest.test('to-json--from-json', () async {
final o = buildLinkedRouterApplianceInstances();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LinkedRouterApplianceInstances.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLinkedRouterApplianceInstances(od);
});
});
unittest.group('obj-schema-LinkedVpcNetwork', () {
unittest.test('to-json--from-json', () async {
final o = buildLinkedVpcNetwork();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LinkedVpcNetwork.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLinkedVpcNetwork(od);
});
});
unittest.group('obj-schema-LinkedVpnTunnels', () {
unittest.test('to-json--from-json', () async {
final o = buildLinkedVpnTunnels();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LinkedVpnTunnels.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLinkedVpnTunnels(od);
});
});
unittest.group('obj-schema-ListGroupsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListGroupsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListGroupsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListGroupsResponse(od);
});
});
unittest.group('obj-schema-ListHubSpokesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListHubSpokesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListHubSpokesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListHubSpokesResponse(od);
});
});
unittest.group('obj-schema-ListHubsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListHubsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListHubsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListHubsResponse(od);
});
});
unittest.group('obj-schema-ListInternalRangesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListInternalRangesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListInternalRangesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListInternalRangesResponse(od);
});
});
unittest.group('obj-schema-ListLocationsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListLocationsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListLocationsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListLocationsResponse(od);
});
});
unittest.group('obj-schema-ListRouteTablesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListRouteTablesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListRouteTablesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListRouteTablesResponse(od);
});
});
unittest.group('obj-schema-ListRoutesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListRoutesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListRoutesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListRoutesResponse(od);
});
});
unittest.group('obj-schema-ListServiceClassesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListServiceClassesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListServiceClassesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListServiceClassesResponse(od);
});
});
unittest.group('obj-schema-ListServiceConnectionMapsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListServiceConnectionMapsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListServiceConnectionMapsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListServiceConnectionMapsResponse(od);
});
});
unittest.group('obj-schema-ListServiceConnectionPoliciesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListServiceConnectionPoliciesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListServiceConnectionPoliciesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListServiceConnectionPoliciesResponse(od);
});
});
unittest.group('obj-schema-ListServiceConnectionTokensResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListServiceConnectionTokensResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListServiceConnectionTokensResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListServiceConnectionTokensResponse(od);
});
});
unittest.group('obj-schema-ListSpokesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListSpokesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListSpokesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListSpokesResponse(od);
});
});
unittest.group('obj-schema-Location', () {
unittest.test('to-json--from-json', () async {
final o = buildLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Location.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkLocation(od);
});
});
unittest.group('obj-schema-NextHopVpcNetwork', () {
unittest.test('to-json--from-json', () async {
final o = buildNextHopVpcNetwork();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.NextHopVpcNetwork.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkNextHopVpcNetwork(od);
});
});
unittest.group('obj-schema-Policy', () {
unittest.test('to-json--from-json', () async {
final o = buildPolicy();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Policy.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPolicy(od);
});
});
unittest.group('obj-schema-ProducerPscConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildProducerPscConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ProducerPscConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkProducerPscConfig(od);
});
});
unittest.group('obj-schema-PscConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildPscConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.PscConfig.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPscConfig(od);
});
});
unittest.group('obj-schema-PscConnection', () {
unittest.test('to-json--from-json', () async {
final o = buildPscConnection();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PscConnection.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPscConnection(od);
});
});
unittest.group('obj-schema-RejectSpokeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildRejectSpokeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RejectSpokeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRejectSpokeRequest(od);
});
});
unittest.group('obj-schema-Route', () {
unittest.test('to-json--from-json', () async {
final o = buildRoute();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Route.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkRoute(od);
});
});
unittest.group('obj-schema-RouteTable', () {
unittest.test('to-json--from-json', () async {
final o = buildRouteTable();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.RouteTable.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkRouteTable(od);
});
});
unittest.group('obj-schema-RouterApplianceInstance', () {
unittest.test('to-json--from-json', () async {
final o = buildRouterApplianceInstance();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RouterApplianceInstance.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRouterApplianceInstance(od);
});
});
unittest.group('obj-schema-RoutingVPC', () {
unittest.test('to-json--from-json', () async {
final o = buildRoutingVPC();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.RoutingVPC.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkRoutingVPC(od);
});
});
unittest.group('obj-schema-ServiceClass', () {
unittest.test('to-json--from-json', () async {
final o = buildServiceClass();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ServiceClass.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkServiceClass(od);
});
});
unittest.group('obj-schema-ServiceConnectionMap', () {
unittest.test('to-json--from-json', () async {
final o = buildServiceConnectionMap();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ServiceConnectionMap.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkServiceConnectionMap(od);
});
});
unittest.group('obj-schema-ServiceConnectionPolicy', () {
unittest.test('to-json--from-json', () async {
final o = buildServiceConnectionPolicy();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ServiceConnectionPolicy.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkServiceConnectionPolicy(od);
});
});
unittest.group('obj-schema-ServiceConnectionToken', () {
unittest.test('to-json--from-json', () async {
final o = buildServiceConnectionToken();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ServiceConnectionToken.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkServiceConnectionToken(od);
});
});
unittest.group('obj-schema-SetIamPolicyRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSetIamPolicyRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SetIamPolicyRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSetIamPolicyRequest(od);
});
});
unittest.group('obj-schema-Spoke', () {
unittest.test('to-json--from-json', () async {
final o = buildSpoke();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Spoke.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSpoke(od);
});
});
unittest.group('obj-schema-SpokeStateCount', () {
unittest.test('to-json--from-json', () async {
final o = buildSpokeStateCount();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SpokeStateCount.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpokeStateCount(od);
});
});
unittest.group('obj-schema-SpokeStateReasonCount', () {
unittest.test('to-json--from-json', () async {
final o = buildSpokeStateReasonCount();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SpokeStateReasonCount.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpokeStateReasonCount(od);
});
});
unittest.group('obj-schema-SpokeSummary', () {
unittest.test('to-json--from-json', () async {
final o = buildSpokeSummary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SpokeSummary.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpokeSummary(od);
});
});
unittest.group('obj-schema-SpokeTypeCount', () {
unittest.test('to-json--from-json', () async {
final o = buildSpokeTypeCount();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SpokeTypeCount.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpokeTypeCount(od);
});
});
unittest.group('obj-schema-StateReason', () {
unittest.test('to-json--from-json', () async {
final o = buildStateReason();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StateReason.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStateReason(od);
});
});
unittest.group('obj-schema-TestIamPermissionsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildTestIamPermissionsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TestIamPermissionsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsRequest(od);
});
});
unittest.group('obj-schema-TestIamPermissionsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildTestIamPermissionsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TestIamPermissionsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsResponse(od);
});
});
unittest.group('resource-ProjectsLocationsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLocation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkLocation(response as api.Location);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations;
final arg_name = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListLocationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_name,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListLocationsResponse(response as api.ListLocationsResponse);
});
});
unittest.group('resource-ProjectsLocationsGlobalHubsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_request = buildHub();
final arg_parent = 'foo';
final arg_hubId = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Hub.fromJson(json as core.Map<core.String, core.dynamic>);
checkHub(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['hubId']!.first,
unittest.equals(arg_hubId),
);
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
hubId: arg_hubId, requestId: arg_requestId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
requestId: arg_requestId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildHub());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkHub(response as api.Hub);
});
unittest.test('method--getIamPolicy', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_resource = 'foo';
final arg_options_requestedPolicyVersion = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['options.requestedPolicyVersion']!.first),
unittest.equals(arg_options_requestedPolicyVersion),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getIamPolicy(arg_resource,
options_requestedPolicyVersion: arg_options_requestedPolicyVersion,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListHubsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListHubsResponse(response as api.ListHubsResponse);
});
unittest.test('method--listSpokes', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_name = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_spokeLocations = buildUnnamed66();
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['spokeLocations']!,
unittest.equals(arg_spokeLocations),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListHubSpokesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.listSpokes(arg_name,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
spokeLocations: arg_spokeLocations,
view: arg_view,
$fields: arg_$fields);
checkListHubSpokesResponse(response as api.ListHubSpokesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_request = buildHub();
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Hub.fromJson(json as core.Map<core.String, core.dynamic>);
checkHub(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
requestId: arg_requestId,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--setIamPolicy', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_request = buildSetIamPolicyRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SetIamPolicyRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSetIamPolicyRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.setIamPolicy(arg_request, arg_resource,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--testIamPermissions', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.global.hubs;
final arg_request = buildTestIamPermissionsRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.TestIamPermissionsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTestIamPermissionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.testIamPermissions(arg_request, arg_resource,
$fields: arg_$fields);
checkTestIamPermissionsResponse(
response as api.TestIamPermissionsResponse);
});
});
unittest.group('resource-ProjectsLocationsGlobalHubsGroupsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.groups;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGroup());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGroup(response as api.Group);
});
unittest.test('method--getIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.groups;
final arg_resource = 'foo';
final arg_options_requestedPolicyVersion = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['options.requestedPolicyVersion']!.first),
unittest.equals(arg_options_requestedPolicyVersion),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getIamPolicy(arg_resource,
options_requestedPolicyVersion: arg_options_requestedPolicyVersion,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.groups;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListGroupsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListGroupsResponse(response as api.ListGroupsResponse);
});
unittest.test('method--setIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.groups;
final arg_request = buildSetIamPolicyRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SetIamPolicyRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSetIamPolicyRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.setIamPolicy(arg_request, arg_resource,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--testIamPermissions', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.groups;
final arg_request = buildTestIamPermissionsRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.TestIamPermissionsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTestIamPermissionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.testIamPermissions(arg_request, arg_resource,
$fields: arg_$fields);
checkTestIamPermissionsResponse(
response as api.TestIamPermissionsResponse);
});
});
unittest.group('resource-ProjectsLocationsGlobalHubsRouteTablesResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.routeTables;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildRouteTable());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkRouteTable(response as api.RouteTable);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.routeTables;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListRouteTablesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListRouteTablesResponse(response as api.ListRouteTablesResponse);
});
});
unittest.group(
'resource-ProjectsLocationsGlobalHubsRouteTablesRoutesResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.routeTables
.routes;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildRoute());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkRoute(response as api.Route);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.hubs
.routeTables
.routes;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListRoutesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListRoutesResponse(response as api.ListRoutesResponse);
});
});
unittest.group('resource-ProjectsLocationsGlobalPolicyBasedRoutesResource',
() {
unittest.test('method--getIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.policyBasedRoutes;
final arg_resource = 'foo';
final arg_options_requestedPolicyVersion = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['options.requestedPolicyVersion']!.first),
unittest.equals(arg_options_requestedPolicyVersion),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getIamPolicy(arg_resource,
options_requestedPolicyVersion: arg_options_requestedPolicyVersion,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--setIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.policyBasedRoutes;
final arg_request = buildSetIamPolicyRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SetIamPolicyRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSetIamPolicyRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.setIamPolicy(arg_request, arg_resource,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--testIamPermissions', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.global
.policyBasedRoutes;
final arg_request = buildTestIamPermissionsRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.TestIamPermissionsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTestIamPermissionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.testIamPermissions(arg_request, arg_resource,
$fields: arg_$fields);
checkTestIamPermissionsResponse(
response as api.TestIamPermissionsResponse);
});
});
unittest.group('resource-ProjectsLocationsInternalRangesResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.internalRanges;
final arg_request = buildInternalRange();
final arg_parent = 'foo';
final arg_internalRangeId = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.InternalRange.fromJson(
json as core.Map<core.String, core.dynamic>);
checkInternalRange(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['internalRangeId']!.first,
unittest.equals(arg_internalRangeId),
);
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
internalRangeId: arg_internalRangeId,
requestId: arg_requestId,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.internalRanges;
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
requestId: arg_requestId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.internalRanges;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildInternalRange());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkInternalRange(response as api.InternalRange);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.internalRanges;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListInternalRangesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListInternalRangesResponse(
response as api.ListInternalRangesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.internalRanges;
final arg_request = buildInternalRange();
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.InternalRange.fromJson(
json as core.Map<core.String, core.dynamic>);
checkInternalRange(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
requestId: arg_requestId,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
});
unittest.group('resource-ProjectsLocationsOperationsResource', () {
unittest.test('method--cancel', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.operations;
final arg_request = buildGoogleLongrunningCancelOperationRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleLongrunningCancelOperationRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningCancelOperationRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.cancel(arg_request, arg_name, $fields: arg_$fields);
checkEmpty(response as api.Empty);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkEmpty(response as api.Empty);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.operations;
final arg_name = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleLongrunningListOperationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_name,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleLongrunningListOperationsResponse(
response as api.GoogleLongrunningListOperationsResponse);
});
});
unittest.group('resource-ProjectsLocationsServiceClassesResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.serviceClasses;
final arg_name = 'foo';
final arg_etag = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['etag']!.first,
unittest.equals(arg_etag),
);
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
etag: arg_etag, requestId: arg_requestId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.serviceClasses;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildServiceClass());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkServiceClass(response as api.ServiceClass);
});
unittest.test('method--getIamPolicy', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.serviceClasses;
final arg_resource = 'foo';
final arg_options_requestedPolicyVersion = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['options.requestedPolicyVersion']!.first),
unittest.equals(arg_options_requestedPolicyVersion),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getIamPolicy(arg_resource,
options_requestedPolicyVersion: arg_options_requestedPolicyVersion,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.serviceClasses;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListServiceClassesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListServiceClassesResponse(
response as api.ListServiceClassesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.serviceClasses;
final arg_request = buildServiceClass();
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ServiceClass.fromJson(
json as core.Map<core.String, core.dynamic>);
checkServiceClass(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
requestId: arg_requestId,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--setIamPolicy', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.serviceClasses;
final arg_request = buildSetIamPolicyRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SetIamPolicyRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSetIamPolicyRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.setIamPolicy(arg_request, arg_resource,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--testIamPermissions', () async {
final mock = HttpServerMock();
final res =
api.NetworkconnectivityApi(mock).projects.locations.serviceClasses;
final arg_request = buildTestIamPermissionsRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.TestIamPermissionsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTestIamPermissionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.testIamPermissions(arg_request, arg_resource,
$fields: arg_$fields);
checkTestIamPermissionsResponse(
response as api.TestIamPermissionsResponse);
});
});
unittest.group('resource-ProjectsLocationsServiceConnectionMapsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionMaps;
final arg_request = buildServiceConnectionMap();
final arg_parent = 'foo';
final arg_requestId = 'foo';
final arg_serviceConnectionMapId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ServiceConnectionMap.fromJson(
json as core.Map<core.String, core.dynamic>);
checkServiceConnectionMap(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['serviceConnectionMapId']!.first,
unittest.equals(arg_serviceConnectionMapId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
requestId: arg_requestId,
serviceConnectionMapId: arg_serviceConnectionMapId,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionMaps;
final arg_name = 'foo';
final arg_etag = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['etag']!.first,
unittest.equals(arg_etag),
);
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
etag: arg_etag, requestId: arg_requestId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionMaps;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildServiceConnectionMap());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkServiceConnectionMap(response as api.ServiceConnectionMap);
});
unittest.test('method--getIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionMaps;
final arg_resource = 'foo';
final arg_options_requestedPolicyVersion = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['options.requestedPolicyVersion']!.first),
unittest.equals(arg_options_requestedPolicyVersion),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getIamPolicy(arg_resource,
options_requestedPolicyVersion: arg_options_requestedPolicyVersion,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionMaps;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildListServiceConnectionMapsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListServiceConnectionMapsResponse(
response as api.ListServiceConnectionMapsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionMaps;
final arg_request = buildServiceConnectionMap();
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ServiceConnectionMap.fromJson(
json as core.Map<core.String, core.dynamic>);
checkServiceConnectionMap(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
requestId: arg_requestId,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--setIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionMaps;
final arg_request = buildSetIamPolicyRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SetIamPolicyRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSetIamPolicyRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.setIamPolicy(arg_request, arg_resource,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--testIamPermissions', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionMaps;
final arg_request = buildTestIamPermissionsRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.TestIamPermissionsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTestIamPermissionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.testIamPermissions(arg_request, arg_resource,
$fields: arg_$fields);
checkTestIamPermissionsResponse(
response as api.TestIamPermissionsResponse);
});
});
unittest.group('resource-ProjectsLocationsServiceConnectionPoliciesResource',
() {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionPolicies;
final arg_request = buildServiceConnectionPolicy();
final arg_parent = 'foo';
final arg_requestId = 'foo';
final arg_serviceConnectionPolicyId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ServiceConnectionPolicy.fromJson(
json as core.Map<core.String, core.dynamic>);
checkServiceConnectionPolicy(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['serviceConnectionPolicyId']!.first,
unittest.equals(arg_serviceConnectionPolicyId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
requestId: arg_requestId,
serviceConnectionPolicyId: arg_serviceConnectionPolicyId,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionPolicies;
final arg_name = 'foo';
final arg_etag = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['etag']!.first,
unittest.equals(arg_etag),
);
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
etag: arg_etag, requestId: arg_requestId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionPolicies;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildServiceConnectionPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkServiceConnectionPolicy(response as api.ServiceConnectionPolicy);
});
unittest.test('method--getIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionPolicies;
final arg_resource = 'foo';
final arg_options_requestedPolicyVersion = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['options.requestedPolicyVersion']!.first),
unittest.equals(arg_options_requestedPolicyVersion),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getIamPolicy(arg_resource,
options_requestedPolicyVersion: arg_options_requestedPolicyVersion,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionPolicies;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildListServiceConnectionPoliciesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListServiceConnectionPoliciesResponse(
response as api.ListServiceConnectionPoliciesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionPolicies;
final arg_request = buildServiceConnectionPolicy();
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ServiceConnectionPolicy.fromJson(
json as core.Map<core.String, core.dynamic>);
checkServiceConnectionPolicy(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
requestId: arg_requestId,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--setIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionPolicies;
final arg_request = buildSetIamPolicyRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SetIamPolicyRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSetIamPolicyRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.setIamPolicy(arg_request, arg_resource,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--testIamPermissions', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionPolicies;
final arg_request = buildTestIamPermissionsRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.TestIamPermissionsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTestIamPermissionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.testIamPermissions(arg_request, arg_resource,
$fields: arg_$fields);
checkTestIamPermissionsResponse(
response as api.TestIamPermissionsResponse);
});
});
unittest.group('resource-ProjectsLocationsServiceConnectionTokensResource',
() {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionTokens;
final arg_request = buildServiceConnectionToken();
final arg_parent = 'foo';
final arg_requestId = 'foo';
final arg_serviceConnectionTokenId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ServiceConnectionToken.fromJson(
json as core.Map<core.String, core.dynamic>);
checkServiceConnectionToken(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['serviceConnectionTokenId']!.first,
unittest.equals(arg_serviceConnectionTokenId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
requestId: arg_requestId,
serviceConnectionTokenId: arg_serviceConnectionTokenId,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionTokens;
final arg_name = 'foo';
final arg_etag = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['etag']!.first,
unittest.equals(arg_etag),
);
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
etag: arg_etag, requestId: arg_requestId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionTokens;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildServiceConnectionToken());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkServiceConnectionToken(response as api.ServiceConnectionToken);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock)
.projects
.locations
.serviceConnectionTokens;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildListServiceConnectionTokensResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListServiceConnectionTokensResponse(
response as api.ListServiceConnectionTokensResponse);
});
});
unittest.group('resource-ProjectsLocationsSpokesResource', () {
unittest.test('method--accept', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_request = buildAcceptSpokeRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.AcceptSpokeRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkAcceptSpokeRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.accept(arg_request, arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_request = buildSpoke();
final arg_parent = 'foo';
final arg_requestId = 'foo';
final arg_spokeId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Spoke.fromJson(json as core.Map<core.String, core.dynamic>);
checkSpoke(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['spokeId']!.first,
unittest.equals(arg_spokeId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
requestId: arg_requestId, spokeId: arg_spokeId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name,
requestId: arg_requestId, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSpoke());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkSpoke(response as api.Spoke);
});
unittest.test('method--getIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_resource = 'foo';
final arg_options_requestedPolicyVersion = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['options.requestedPolicyVersion']!.first),
unittest.equals(arg_options_requestedPolicyVersion),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getIamPolicy(arg_resource,
options_requestedPolicyVersion: arg_options_requestedPolicyVersion,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_orderBy = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['orderBy']!.first,
unittest.equals(arg_orderBy),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListSpokesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListSpokesResponse(response as api.ListSpokesResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_request = buildSpoke();
final arg_name = 'foo';
final arg_requestId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Spoke.fromJson(json as core.Map<core.String, core.dynamic>);
checkSpoke(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
requestId: arg_requestId,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--reject', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_request = buildRejectSpokeRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.RejectSpokeRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkRejectSpokeRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.reject(arg_request, arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--setIamPolicy', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_request = buildSetIamPolicyRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SetIamPolicyRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSetIamPolicyRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPolicy());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.setIamPolicy(arg_request, arg_resource,
$fields: arg_$fields);
checkPolicy(response as api.Policy);
});
unittest.test('method--testIamPermissions', () async {
final mock = HttpServerMock();
final res = api.NetworkconnectivityApi(mock).projects.locations.spokes;
final arg_request = buildTestIamPermissionsRequest();
final arg_resource = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.TestIamPermissionsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkTestIamPermissionsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTestIamPermissionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.testIamPermissions(arg_request, arg_resource,
$fields: arg_$fields);
checkTestIamPermissionsResponse(
response as api.TestIamPermissionsResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/networkconnectivity/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/networkconnectivity/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 112135} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/playcustomapp/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.List<api.Organization> buildUnnamed0() => [
buildOrganization(),
buildOrganization(),
];
void checkUnnamed0(core.List<api.Organization> o) {
unittest.expect(o, unittest.hasLength(2));
checkOrganization(o[0]);
checkOrganization(o[1]);
}
core.int buildCounterCustomApp = 0;
api.CustomApp buildCustomApp() {
final o = api.CustomApp();
buildCounterCustomApp++;
if (buildCounterCustomApp < 3) {
o.languageCode = 'foo';
o.organizations = buildUnnamed0();
o.packageName = 'foo';
o.title = 'foo';
}
buildCounterCustomApp--;
return o;
}
void checkCustomApp(api.CustomApp o) {
buildCounterCustomApp++;
if (buildCounterCustomApp < 3) {
unittest.expect(
o.languageCode!,
unittest.equals('foo'),
);
checkUnnamed0(o.organizations!);
unittest.expect(
o.packageName!,
unittest.equals('foo'),
);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
}
buildCounterCustomApp--;
}
core.int buildCounterOrganization = 0;
api.Organization buildOrganization() {
final o = api.Organization();
buildCounterOrganization++;
if (buildCounterOrganization < 3) {
o.organizationId = 'foo';
o.organizationName = 'foo';
}
buildCounterOrganization--;
return o;
}
void checkOrganization(api.Organization o) {
buildCounterOrganization++;
if (buildCounterOrganization < 3) {
unittest.expect(
o.organizationId!,
unittest.equals('foo'),
);
unittest.expect(
o.organizationName!,
unittest.equals('foo'),
);
}
buildCounterOrganization--;
}
void main() {
unittest.group('obj-schema-CustomApp', () {
unittest.test('to-json--from-json', () async {
final o = buildCustomApp();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.CustomApp.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkCustomApp(od);
});
});
unittest.group('obj-schema-Organization', () {
unittest.test('to-json--from-json', () async {
final o = buildOrganization();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Organization.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkOrganization(od);
});
});
unittest.group('resource-AccountsCustomAppsResource', () {
unittest.test('method--create', () async {
// TODO: Implement tests for media upload;
// TODO: Implement tests for media download;
final mock = HttpServerMock();
final res = api.PlaycustomappApi(mock).accounts.customApps;
final arg_request = buildCustomApp();
final arg_account = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.CustomApp.fromJson(json as core.Map<core.String, core.dynamic>);
checkCustomApp(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 26),
unittest.equals('playcustomapp/v1/accounts/'),
);
pathOffset += 26;
index = path.indexOf('/customApps', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_account'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/customApps'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildCustomApp());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.create(arg_request, arg_account, $fields: arg_$fields);
checkCustomApp(response as api.CustomApp);
});
});
}
| googleapis.dart/generated/googleapis/test/playcustomapp/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/playcustomapp/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 2502} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/retail/v2.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.Map<core.String, core.Object?> buildUnnamed0() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed0(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.List<core.Map<core.String, core.Object?>> buildUnnamed1() => [
buildUnnamed0(),
buildUnnamed0(),
];
void checkUnnamed1(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed0(o[0]);
checkUnnamed0(o[1]);
}
core.int buildCounterGoogleApiHttpBody = 0;
api.GoogleApiHttpBody buildGoogleApiHttpBody() {
final o = api.GoogleApiHttpBody();
buildCounterGoogleApiHttpBody++;
if (buildCounterGoogleApiHttpBody < 3) {
o.contentType = 'foo';
o.data = 'foo';
o.extensions = buildUnnamed1();
}
buildCounterGoogleApiHttpBody--;
return o;
}
void checkGoogleApiHttpBody(api.GoogleApiHttpBody o) {
buildCounterGoogleApiHttpBody++;
if (buildCounterGoogleApiHttpBody < 3) {
unittest.expect(
o.contentType!,
unittest.equals('foo'),
);
unittest.expect(
o.data!,
unittest.equals('foo'),
);
checkUnnamed1(o.extensions!);
}
buildCounterGoogleApiHttpBody--;
}
core.int buildCounterGoogleCloudRetailV2AddCatalogAttributeRequest = 0;
api.GoogleCloudRetailV2AddCatalogAttributeRequest
buildGoogleCloudRetailV2AddCatalogAttributeRequest() {
final o = api.GoogleCloudRetailV2AddCatalogAttributeRequest();
buildCounterGoogleCloudRetailV2AddCatalogAttributeRequest++;
if (buildCounterGoogleCloudRetailV2AddCatalogAttributeRequest < 3) {
o.catalogAttribute = buildGoogleCloudRetailV2CatalogAttribute();
}
buildCounterGoogleCloudRetailV2AddCatalogAttributeRequest--;
return o;
}
void checkGoogleCloudRetailV2AddCatalogAttributeRequest(
api.GoogleCloudRetailV2AddCatalogAttributeRequest o) {
buildCounterGoogleCloudRetailV2AddCatalogAttributeRequest++;
if (buildCounterGoogleCloudRetailV2AddCatalogAttributeRequest < 3) {
checkGoogleCloudRetailV2CatalogAttribute(o.catalogAttribute!);
}
buildCounterGoogleCloudRetailV2AddCatalogAttributeRequest--;
}
core.int buildCounterGoogleCloudRetailV2AddControlRequest = 0;
api.GoogleCloudRetailV2AddControlRequest
buildGoogleCloudRetailV2AddControlRequest() {
final o = api.GoogleCloudRetailV2AddControlRequest();
buildCounterGoogleCloudRetailV2AddControlRequest++;
if (buildCounterGoogleCloudRetailV2AddControlRequest < 3) {
o.controlId = 'foo';
}
buildCounterGoogleCloudRetailV2AddControlRequest--;
return o;
}
void checkGoogleCloudRetailV2AddControlRequest(
api.GoogleCloudRetailV2AddControlRequest o) {
buildCounterGoogleCloudRetailV2AddControlRequest++;
if (buildCounterGoogleCloudRetailV2AddControlRequest < 3) {
unittest.expect(
o.controlId!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2AddControlRequest--;
}
core.List<core.String> buildUnnamed2() => [
'foo',
'foo',
];
void checkUnnamed2(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 buildCounterGoogleCloudRetailV2AddFulfillmentPlacesRequest = 0;
api.GoogleCloudRetailV2AddFulfillmentPlacesRequest
buildGoogleCloudRetailV2AddFulfillmentPlacesRequest() {
final o = api.GoogleCloudRetailV2AddFulfillmentPlacesRequest();
buildCounterGoogleCloudRetailV2AddFulfillmentPlacesRequest++;
if (buildCounterGoogleCloudRetailV2AddFulfillmentPlacesRequest < 3) {
o.addTime = 'foo';
o.allowMissing = true;
o.placeIds = buildUnnamed2();
o.type = 'foo';
}
buildCounterGoogleCloudRetailV2AddFulfillmentPlacesRequest--;
return o;
}
void checkGoogleCloudRetailV2AddFulfillmentPlacesRequest(
api.GoogleCloudRetailV2AddFulfillmentPlacesRequest o) {
buildCounterGoogleCloudRetailV2AddFulfillmentPlacesRequest++;
if (buildCounterGoogleCloudRetailV2AddFulfillmentPlacesRequest < 3) {
unittest.expect(
o.addTime!,
unittest.equals('foo'),
);
unittest.expect(o.allowMissing!, unittest.isTrue);
checkUnnamed2(o.placeIds!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2AddFulfillmentPlacesRequest--;
}
core.List<api.GoogleCloudRetailV2LocalInventory> buildUnnamed3() => [
buildGoogleCloudRetailV2LocalInventory(),
buildGoogleCloudRetailV2LocalInventory(),
];
void checkUnnamed3(core.List<api.GoogleCloudRetailV2LocalInventory> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2LocalInventory(o[0]);
checkGoogleCloudRetailV2LocalInventory(o[1]);
}
core.int buildCounterGoogleCloudRetailV2AddLocalInventoriesRequest = 0;
api.GoogleCloudRetailV2AddLocalInventoriesRequest
buildGoogleCloudRetailV2AddLocalInventoriesRequest() {
final o = api.GoogleCloudRetailV2AddLocalInventoriesRequest();
buildCounterGoogleCloudRetailV2AddLocalInventoriesRequest++;
if (buildCounterGoogleCloudRetailV2AddLocalInventoriesRequest < 3) {
o.addMask = 'foo';
o.addTime = 'foo';
o.allowMissing = true;
o.localInventories = buildUnnamed3();
}
buildCounterGoogleCloudRetailV2AddLocalInventoriesRequest--;
return o;
}
void checkGoogleCloudRetailV2AddLocalInventoriesRequest(
api.GoogleCloudRetailV2AddLocalInventoriesRequest o) {
buildCounterGoogleCloudRetailV2AddLocalInventoriesRequest++;
if (buildCounterGoogleCloudRetailV2AddLocalInventoriesRequest < 3) {
unittest.expect(
o.addMask!,
unittest.equals('foo'),
);
unittest.expect(
o.addTime!,
unittest.equals('foo'),
);
unittest.expect(o.allowMissing!, unittest.isTrue);
checkUnnamed3(o.localInventories!);
}
buildCounterGoogleCloudRetailV2AddLocalInventoriesRequest--;
}
core.Map<core.String, api.GoogleCloudRetailV2CatalogAttribute>
buildUnnamed4() => {
'x': buildGoogleCloudRetailV2CatalogAttribute(),
'y': buildGoogleCloudRetailV2CatalogAttribute(),
};
void checkUnnamed4(
core.Map<core.String, api.GoogleCloudRetailV2CatalogAttribute> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2CatalogAttribute(o['x']!);
checkGoogleCloudRetailV2CatalogAttribute(o['y']!);
}
core.int buildCounterGoogleCloudRetailV2AttributesConfig = 0;
api.GoogleCloudRetailV2AttributesConfig
buildGoogleCloudRetailV2AttributesConfig() {
final o = api.GoogleCloudRetailV2AttributesConfig();
buildCounterGoogleCloudRetailV2AttributesConfig++;
if (buildCounterGoogleCloudRetailV2AttributesConfig < 3) {
o.attributeConfigLevel = 'foo';
o.catalogAttributes = buildUnnamed4();
o.name = 'foo';
}
buildCounterGoogleCloudRetailV2AttributesConfig--;
return o;
}
void checkGoogleCloudRetailV2AttributesConfig(
api.GoogleCloudRetailV2AttributesConfig o) {
buildCounterGoogleCloudRetailV2AttributesConfig++;
if (buildCounterGoogleCloudRetailV2AttributesConfig < 3) {
unittest.expect(
o.attributeConfigLevel!,
unittest.equals('foo'),
);
checkUnnamed4(o.catalogAttributes!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2AttributesConfig--;
}
core.List<core.String> buildUnnamed5() => [
'foo',
'foo',
];
void checkUnnamed5(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.List<core.String> buildUnnamed6() => [
'foo',
'foo',
];
void checkUnnamed6(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 buildCounterGoogleCloudRetailV2Audience = 0;
api.GoogleCloudRetailV2Audience buildGoogleCloudRetailV2Audience() {
final o = api.GoogleCloudRetailV2Audience();
buildCounterGoogleCloudRetailV2Audience++;
if (buildCounterGoogleCloudRetailV2Audience < 3) {
o.ageGroups = buildUnnamed5();
o.genders = buildUnnamed6();
}
buildCounterGoogleCloudRetailV2Audience--;
return o;
}
void checkGoogleCloudRetailV2Audience(api.GoogleCloudRetailV2Audience o) {
buildCounterGoogleCloudRetailV2Audience++;
if (buildCounterGoogleCloudRetailV2Audience < 3) {
checkUnnamed5(o.ageGroups!);
checkUnnamed6(o.genders!);
}
buildCounterGoogleCloudRetailV2Audience--;
}
core.int buildCounterGoogleCloudRetailV2BigQuerySource = 0;
api.GoogleCloudRetailV2BigQuerySource buildGoogleCloudRetailV2BigQuerySource() {
final o = api.GoogleCloudRetailV2BigQuerySource();
buildCounterGoogleCloudRetailV2BigQuerySource++;
if (buildCounterGoogleCloudRetailV2BigQuerySource < 3) {
o.dataSchema = 'foo';
o.datasetId = 'foo';
o.gcsStagingDir = 'foo';
o.partitionDate = buildGoogleTypeDate();
o.projectId = 'foo';
o.tableId = 'foo';
}
buildCounterGoogleCloudRetailV2BigQuerySource--;
return o;
}
void checkGoogleCloudRetailV2BigQuerySource(
api.GoogleCloudRetailV2BigQuerySource o) {
buildCounterGoogleCloudRetailV2BigQuerySource++;
if (buildCounterGoogleCloudRetailV2BigQuerySource < 3) {
unittest.expect(
o.dataSchema!,
unittest.equals('foo'),
);
unittest.expect(
o.datasetId!,
unittest.equals('foo'),
);
unittest.expect(
o.gcsStagingDir!,
unittest.equals('foo'),
);
checkGoogleTypeDate(o.partitionDate!);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
unittest.expect(
o.tableId!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2BigQuerySource--;
}
core.int buildCounterGoogleCloudRetailV2Catalog = 0;
api.GoogleCloudRetailV2Catalog buildGoogleCloudRetailV2Catalog() {
final o = api.GoogleCloudRetailV2Catalog();
buildCounterGoogleCloudRetailV2Catalog++;
if (buildCounterGoogleCloudRetailV2Catalog < 3) {
o.displayName = 'foo';
o.name = 'foo';
o.productLevelConfig = buildGoogleCloudRetailV2ProductLevelConfig();
}
buildCounterGoogleCloudRetailV2Catalog--;
return o;
}
void checkGoogleCloudRetailV2Catalog(api.GoogleCloudRetailV2Catalog o) {
buildCounterGoogleCloudRetailV2Catalog++;
if (buildCounterGoogleCloudRetailV2Catalog < 3) {
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2ProductLevelConfig(o.productLevelConfig!);
}
buildCounterGoogleCloudRetailV2Catalog--;
}
core.int buildCounterGoogleCloudRetailV2CatalogAttribute = 0;
api.GoogleCloudRetailV2CatalogAttribute
buildGoogleCloudRetailV2CatalogAttribute() {
final o = api.GoogleCloudRetailV2CatalogAttribute();
buildCounterGoogleCloudRetailV2CatalogAttribute++;
if (buildCounterGoogleCloudRetailV2CatalogAttribute < 3) {
o.dynamicFacetableOption = 'foo';
o.exactSearchableOption = 'foo';
o.inUse = true;
o.indexableOption = 'foo';
o.key = 'foo';
o.retrievableOption = 'foo';
o.searchableOption = 'foo';
o.type = 'foo';
}
buildCounterGoogleCloudRetailV2CatalogAttribute--;
return o;
}
void checkGoogleCloudRetailV2CatalogAttribute(
api.GoogleCloudRetailV2CatalogAttribute o) {
buildCounterGoogleCloudRetailV2CatalogAttribute++;
if (buildCounterGoogleCloudRetailV2CatalogAttribute < 3) {
unittest.expect(
o.dynamicFacetableOption!,
unittest.equals('foo'),
);
unittest.expect(
o.exactSearchableOption!,
unittest.equals('foo'),
);
unittest.expect(o.inUse!, unittest.isTrue);
unittest.expect(
o.indexableOption!,
unittest.equals('foo'),
);
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(
o.retrievableOption!,
unittest.equals('foo'),
);
unittest.expect(
o.searchableOption!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2CatalogAttribute--;
}
core.List<core.String> buildUnnamed7() => [
'foo',
'foo',
];
void checkUnnamed7(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.List<core.String> buildUnnamed8() => [
'foo',
'foo',
];
void checkUnnamed8(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 buildCounterGoogleCloudRetailV2ColorInfo = 0;
api.GoogleCloudRetailV2ColorInfo buildGoogleCloudRetailV2ColorInfo() {
final o = api.GoogleCloudRetailV2ColorInfo();
buildCounterGoogleCloudRetailV2ColorInfo++;
if (buildCounterGoogleCloudRetailV2ColorInfo < 3) {
o.colorFamilies = buildUnnamed7();
o.colors = buildUnnamed8();
}
buildCounterGoogleCloudRetailV2ColorInfo--;
return o;
}
void checkGoogleCloudRetailV2ColorInfo(api.GoogleCloudRetailV2ColorInfo o) {
buildCounterGoogleCloudRetailV2ColorInfo++;
if (buildCounterGoogleCloudRetailV2ColorInfo < 3) {
checkUnnamed7(o.colorFamilies!);
checkUnnamed8(o.colors!);
}
buildCounterGoogleCloudRetailV2ColorInfo--;
}
core.List<api.GoogleCloudRetailV2CompleteQueryResponseCompletionResult>
buildUnnamed9() => [
buildGoogleCloudRetailV2CompleteQueryResponseCompletionResult(),
buildGoogleCloudRetailV2CompleteQueryResponseCompletionResult(),
];
void checkUnnamed9(
core.List<api.GoogleCloudRetailV2CompleteQueryResponseCompletionResult> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2CompleteQueryResponseCompletionResult(o[0]);
checkGoogleCloudRetailV2CompleteQueryResponseCompletionResult(o[1]);
}
core.List<api.GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult>
buildUnnamed10() => [
buildGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult(),
buildGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult(),
];
void checkUnnamed10(
core.List<api.GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult>
o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult(o[0]);
checkGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult(o[1]);
}
core.int buildCounterGoogleCloudRetailV2CompleteQueryResponse = 0;
api.GoogleCloudRetailV2CompleteQueryResponse
buildGoogleCloudRetailV2CompleteQueryResponse() {
final o = api.GoogleCloudRetailV2CompleteQueryResponse();
buildCounterGoogleCloudRetailV2CompleteQueryResponse++;
if (buildCounterGoogleCloudRetailV2CompleteQueryResponse < 3) {
o.attributionToken = 'foo';
o.completionResults = buildUnnamed9();
o.recentSearchResults = buildUnnamed10();
}
buildCounterGoogleCloudRetailV2CompleteQueryResponse--;
return o;
}
void checkGoogleCloudRetailV2CompleteQueryResponse(
api.GoogleCloudRetailV2CompleteQueryResponse o) {
buildCounterGoogleCloudRetailV2CompleteQueryResponse++;
if (buildCounterGoogleCloudRetailV2CompleteQueryResponse < 3) {
unittest.expect(
o.attributionToken!,
unittest.equals('foo'),
);
checkUnnamed9(o.completionResults!);
checkUnnamed10(o.recentSearchResults!);
}
buildCounterGoogleCloudRetailV2CompleteQueryResponse--;
}
core.Map<core.String, api.GoogleCloudRetailV2CustomAttribute>
buildUnnamed11() => {
'x': buildGoogleCloudRetailV2CustomAttribute(),
'y': buildGoogleCloudRetailV2CustomAttribute(),
};
void checkUnnamed11(
core.Map<core.String, api.GoogleCloudRetailV2CustomAttribute> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2CustomAttribute(o['x']!);
checkGoogleCloudRetailV2CustomAttribute(o['y']!);
}
core.int buildCounterGoogleCloudRetailV2CompleteQueryResponseCompletionResult =
0;
api.GoogleCloudRetailV2CompleteQueryResponseCompletionResult
buildGoogleCloudRetailV2CompleteQueryResponseCompletionResult() {
final o = api.GoogleCloudRetailV2CompleteQueryResponseCompletionResult();
buildCounterGoogleCloudRetailV2CompleteQueryResponseCompletionResult++;
if (buildCounterGoogleCloudRetailV2CompleteQueryResponseCompletionResult <
3) {
o.attributes = buildUnnamed11();
o.suggestion = 'foo';
}
buildCounterGoogleCloudRetailV2CompleteQueryResponseCompletionResult--;
return o;
}
void checkGoogleCloudRetailV2CompleteQueryResponseCompletionResult(
api.GoogleCloudRetailV2CompleteQueryResponseCompletionResult o) {
buildCounterGoogleCloudRetailV2CompleteQueryResponseCompletionResult++;
if (buildCounterGoogleCloudRetailV2CompleteQueryResponseCompletionResult <
3) {
checkUnnamed11(o.attributes!);
unittest.expect(
o.suggestion!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2CompleteQueryResponseCompletionResult--;
}
core.int
buildCounterGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult = 0;
api.GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult
buildGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult() {
final o = api.GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult();
buildCounterGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult++;
if (buildCounterGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult <
3) {
o.recentSearch = 'foo';
}
buildCounterGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult--;
return o;
}
void checkGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult(
api.GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult o) {
buildCounterGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult++;
if (buildCounterGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult <
3) {
unittest.expect(
o.recentSearch!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult--;
}
core.int buildCounterGoogleCloudRetailV2CompletionConfig = 0;
api.GoogleCloudRetailV2CompletionConfig
buildGoogleCloudRetailV2CompletionConfig() {
final o = api.GoogleCloudRetailV2CompletionConfig();
buildCounterGoogleCloudRetailV2CompletionConfig++;
if (buildCounterGoogleCloudRetailV2CompletionConfig < 3) {
o.allowlistInputConfig =
buildGoogleCloudRetailV2CompletionDataInputConfig();
o.autoLearning = true;
o.denylistInputConfig = buildGoogleCloudRetailV2CompletionDataInputConfig();
o.lastAllowlistImportOperation = 'foo';
o.lastDenylistImportOperation = 'foo';
o.lastSuggestionsImportOperation = 'foo';
o.matchingOrder = 'foo';
o.maxSuggestions = 42;
o.minPrefixLength = 42;
o.name = 'foo';
o.suggestionsInputConfig =
buildGoogleCloudRetailV2CompletionDataInputConfig();
}
buildCounterGoogleCloudRetailV2CompletionConfig--;
return o;
}
void checkGoogleCloudRetailV2CompletionConfig(
api.GoogleCloudRetailV2CompletionConfig o) {
buildCounterGoogleCloudRetailV2CompletionConfig++;
if (buildCounterGoogleCloudRetailV2CompletionConfig < 3) {
checkGoogleCloudRetailV2CompletionDataInputConfig(o.allowlistInputConfig!);
unittest.expect(o.autoLearning!, unittest.isTrue);
checkGoogleCloudRetailV2CompletionDataInputConfig(o.denylistInputConfig!);
unittest.expect(
o.lastAllowlistImportOperation!,
unittest.equals('foo'),
);
unittest.expect(
o.lastDenylistImportOperation!,
unittest.equals('foo'),
);
unittest.expect(
o.lastSuggestionsImportOperation!,
unittest.equals('foo'),
);
unittest.expect(
o.matchingOrder!,
unittest.equals('foo'),
);
unittest.expect(
o.maxSuggestions!,
unittest.equals(42),
);
unittest.expect(
o.minPrefixLength!,
unittest.equals(42),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2CompletionDataInputConfig(
o.suggestionsInputConfig!);
}
buildCounterGoogleCloudRetailV2CompletionConfig--;
}
core.int buildCounterGoogleCloudRetailV2CompletionDataInputConfig = 0;
api.GoogleCloudRetailV2CompletionDataInputConfig
buildGoogleCloudRetailV2CompletionDataInputConfig() {
final o = api.GoogleCloudRetailV2CompletionDataInputConfig();
buildCounterGoogleCloudRetailV2CompletionDataInputConfig++;
if (buildCounterGoogleCloudRetailV2CompletionDataInputConfig < 3) {
o.bigQuerySource = buildGoogleCloudRetailV2BigQuerySource();
}
buildCounterGoogleCloudRetailV2CompletionDataInputConfig--;
return o;
}
void checkGoogleCloudRetailV2CompletionDataInputConfig(
api.GoogleCloudRetailV2CompletionDataInputConfig o) {
buildCounterGoogleCloudRetailV2CompletionDataInputConfig++;
if (buildCounterGoogleCloudRetailV2CompletionDataInputConfig < 3) {
checkGoogleCloudRetailV2BigQuerySource(o.bigQuerySource!);
}
buildCounterGoogleCloudRetailV2CompletionDataInputConfig--;
}
core.int buildCounterGoogleCloudRetailV2CompletionDetail = 0;
api.GoogleCloudRetailV2CompletionDetail
buildGoogleCloudRetailV2CompletionDetail() {
final o = api.GoogleCloudRetailV2CompletionDetail();
buildCounterGoogleCloudRetailV2CompletionDetail++;
if (buildCounterGoogleCloudRetailV2CompletionDetail < 3) {
o.completionAttributionToken = 'foo';
o.selectedPosition = 42;
o.selectedSuggestion = 'foo';
}
buildCounterGoogleCloudRetailV2CompletionDetail--;
return o;
}
void checkGoogleCloudRetailV2CompletionDetail(
api.GoogleCloudRetailV2CompletionDetail o) {
buildCounterGoogleCloudRetailV2CompletionDetail++;
if (buildCounterGoogleCloudRetailV2CompletionDetail < 3) {
unittest.expect(
o.completionAttributionToken!,
unittest.equals('foo'),
);
unittest.expect(
o.selectedPosition!,
unittest.equals(42),
);
unittest.expect(
o.selectedSuggestion!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2CompletionDetail--;
}
core.List<api.GoogleCloudRetailV2ConditionTimeRange> buildUnnamed12() => [
buildGoogleCloudRetailV2ConditionTimeRange(),
buildGoogleCloudRetailV2ConditionTimeRange(),
];
void checkUnnamed12(core.List<api.GoogleCloudRetailV2ConditionTimeRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2ConditionTimeRange(o[0]);
checkGoogleCloudRetailV2ConditionTimeRange(o[1]);
}
core.List<api.GoogleCloudRetailV2ConditionQueryTerm> buildUnnamed13() => [
buildGoogleCloudRetailV2ConditionQueryTerm(),
buildGoogleCloudRetailV2ConditionQueryTerm(),
];
void checkUnnamed13(core.List<api.GoogleCloudRetailV2ConditionQueryTerm> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2ConditionQueryTerm(o[0]);
checkGoogleCloudRetailV2ConditionQueryTerm(o[1]);
}
core.int buildCounterGoogleCloudRetailV2Condition = 0;
api.GoogleCloudRetailV2Condition buildGoogleCloudRetailV2Condition() {
final o = api.GoogleCloudRetailV2Condition();
buildCounterGoogleCloudRetailV2Condition++;
if (buildCounterGoogleCloudRetailV2Condition < 3) {
o.activeTimeRange = buildUnnamed12();
o.queryTerms = buildUnnamed13();
}
buildCounterGoogleCloudRetailV2Condition--;
return o;
}
void checkGoogleCloudRetailV2Condition(api.GoogleCloudRetailV2Condition o) {
buildCounterGoogleCloudRetailV2Condition++;
if (buildCounterGoogleCloudRetailV2Condition < 3) {
checkUnnamed12(o.activeTimeRange!);
checkUnnamed13(o.queryTerms!);
}
buildCounterGoogleCloudRetailV2Condition--;
}
core.int buildCounterGoogleCloudRetailV2ConditionQueryTerm = 0;
api.GoogleCloudRetailV2ConditionQueryTerm
buildGoogleCloudRetailV2ConditionQueryTerm() {
final o = api.GoogleCloudRetailV2ConditionQueryTerm();
buildCounterGoogleCloudRetailV2ConditionQueryTerm++;
if (buildCounterGoogleCloudRetailV2ConditionQueryTerm < 3) {
o.fullMatch = true;
o.value = 'foo';
}
buildCounterGoogleCloudRetailV2ConditionQueryTerm--;
return o;
}
void checkGoogleCloudRetailV2ConditionQueryTerm(
api.GoogleCloudRetailV2ConditionQueryTerm o) {
buildCounterGoogleCloudRetailV2ConditionQueryTerm++;
if (buildCounterGoogleCloudRetailV2ConditionQueryTerm < 3) {
unittest.expect(o.fullMatch!, unittest.isTrue);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ConditionQueryTerm--;
}
core.int buildCounterGoogleCloudRetailV2ConditionTimeRange = 0;
api.GoogleCloudRetailV2ConditionTimeRange
buildGoogleCloudRetailV2ConditionTimeRange() {
final o = api.GoogleCloudRetailV2ConditionTimeRange();
buildCounterGoogleCloudRetailV2ConditionTimeRange++;
if (buildCounterGoogleCloudRetailV2ConditionTimeRange < 3) {
o.endTime = 'foo';
o.startTime = 'foo';
}
buildCounterGoogleCloudRetailV2ConditionTimeRange--;
return o;
}
void checkGoogleCloudRetailV2ConditionTimeRange(
api.GoogleCloudRetailV2ConditionTimeRange o) {
buildCounterGoogleCloudRetailV2ConditionTimeRange++;
if (buildCounterGoogleCloudRetailV2ConditionTimeRange < 3) {
unittest.expect(
o.endTime!,
unittest.equals('foo'),
);
unittest.expect(
o.startTime!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ConditionTimeRange--;
}
core.List<core.String> buildUnnamed14() => [
'foo',
'foo',
];
void checkUnnamed14(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.List<core.String> buildUnnamed15() => [
'foo',
'foo',
];
void checkUnnamed15(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.List<core.String> buildUnnamed16() => [
'foo',
'foo',
];
void checkUnnamed16(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 buildCounterGoogleCloudRetailV2Control = 0;
api.GoogleCloudRetailV2Control buildGoogleCloudRetailV2Control() {
final o = api.GoogleCloudRetailV2Control();
buildCounterGoogleCloudRetailV2Control++;
if (buildCounterGoogleCloudRetailV2Control < 3) {
o.associatedServingConfigIds = buildUnnamed14();
o.displayName = 'foo';
o.name = 'foo';
o.rule = buildGoogleCloudRetailV2Rule();
o.searchSolutionUseCase = buildUnnamed15();
o.solutionTypes = buildUnnamed16();
}
buildCounterGoogleCloudRetailV2Control--;
return o;
}
void checkGoogleCloudRetailV2Control(api.GoogleCloudRetailV2Control o) {
buildCounterGoogleCloudRetailV2Control++;
if (buildCounterGoogleCloudRetailV2Control < 3) {
checkUnnamed14(o.associatedServingConfigIds!);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2Rule(o.rule!);
checkUnnamed15(o.searchSolutionUseCase!);
checkUnnamed16(o.solutionTypes!);
}
buildCounterGoogleCloudRetailV2Control--;
}
core.List<core.double> buildUnnamed17() => [
42.0,
42.0,
];
void checkUnnamed17(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),
);
}
core.List<core.String> buildUnnamed18() => [
'foo',
'foo',
];
void checkUnnamed18(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 buildCounterGoogleCloudRetailV2CustomAttribute = 0;
api.GoogleCloudRetailV2CustomAttribute
buildGoogleCloudRetailV2CustomAttribute() {
final o = api.GoogleCloudRetailV2CustomAttribute();
buildCounterGoogleCloudRetailV2CustomAttribute++;
if (buildCounterGoogleCloudRetailV2CustomAttribute < 3) {
o.indexable = true;
o.numbers = buildUnnamed17();
o.searchable = true;
o.text = buildUnnamed18();
}
buildCounterGoogleCloudRetailV2CustomAttribute--;
return o;
}
void checkGoogleCloudRetailV2CustomAttribute(
api.GoogleCloudRetailV2CustomAttribute o) {
buildCounterGoogleCloudRetailV2CustomAttribute++;
if (buildCounterGoogleCloudRetailV2CustomAttribute < 3) {
unittest.expect(o.indexable!, unittest.isTrue);
checkUnnamed17(o.numbers!);
unittest.expect(o.searchable!, unittest.isTrue);
checkUnnamed18(o.text!);
}
buildCounterGoogleCloudRetailV2CustomAttribute--;
}
core.int buildCounterGoogleCloudRetailV2ExperimentInfo = 0;
api.GoogleCloudRetailV2ExperimentInfo buildGoogleCloudRetailV2ExperimentInfo() {
final o = api.GoogleCloudRetailV2ExperimentInfo();
buildCounterGoogleCloudRetailV2ExperimentInfo++;
if (buildCounterGoogleCloudRetailV2ExperimentInfo < 3) {
o.experiment = 'foo';
o.servingConfigExperiment =
buildGoogleCloudRetailV2ExperimentInfoServingConfigExperiment();
}
buildCounterGoogleCloudRetailV2ExperimentInfo--;
return o;
}
void checkGoogleCloudRetailV2ExperimentInfo(
api.GoogleCloudRetailV2ExperimentInfo o) {
buildCounterGoogleCloudRetailV2ExperimentInfo++;
if (buildCounterGoogleCloudRetailV2ExperimentInfo < 3) {
unittest.expect(
o.experiment!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2ExperimentInfoServingConfigExperiment(
o.servingConfigExperiment!);
}
buildCounterGoogleCloudRetailV2ExperimentInfo--;
}
core.int buildCounterGoogleCloudRetailV2ExperimentInfoServingConfigExperiment =
0;
api.GoogleCloudRetailV2ExperimentInfoServingConfigExperiment
buildGoogleCloudRetailV2ExperimentInfoServingConfigExperiment() {
final o = api.GoogleCloudRetailV2ExperimentInfoServingConfigExperiment();
buildCounterGoogleCloudRetailV2ExperimentInfoServingConfigExperiment++;
if (buildCounterGoogleCloudRetailV2ExperimentInfoServingConfigExperiment <
3) {
o.experimentServingConfig = 'foo';
o.originalServingConfig = 'foo';
}
buildCounterGoogleCloudRetailV2ExperimentInfoServingConfigExperiment--;
return o;
}
void checkGoogleCloudRetailV2ExperimentInfoServingConfigExperiment(
api.GoogleCloudRetailV2ExperimentInfoServingConfigExperiment o) {
buildCounterGoogleCloudRetailV2ExperimentInfoServingConfigExperiment++;
if (buildCounterGoogleCloudRetailV2ExperimentInfoServingConfigExperiment <
3) {
unittest.expect(
o.experimentServingConfig!,
unittest.equals('foo'),
);
unittest.expect(
o.originalServingConfig!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ExperimentInfoServingConfigExperiment--;
}
core.List<core.String> buildUnnamed19() => [
'foo',
'foo',
];
void checkUnnamed19(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 buildCounterGoogleCloudRetailV2FulfillmentInfo = 0;
api.GoogleCloudRetailV2FulfillmentInfo
buildGoogleCloudRetailV2FulfillmentInfo() {
final o = api.GoogleCloudRetailV2FulfillmentInfo();
buildCounterGoogleCloudRetailV2FulfillmentInfo++;
if (buildCounterGoogleCloudRetailV2FulfillmentInfo < 3) {
o.placeIds = buildUnnamed19();
o.type = 'foo';
}
buildCounterGoogleCloudRetailV2FulfillmentInfo--;
return o;
}
void checkGoogleCloudRetailV2FulfillmentInfo(
api.GoogleCloudRetailV2FulfillmentInfo o) {
buildCounterGoogleCloudRetailV2FulfillmentInfo++;
if (buildCounterGoogleCloudRetailV2FulfillmentInfo < 3) {
checkUnnamed19(o.placeIds!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2FulfillmentInfo--;
}
core.List<core.String> buildUnnamed20() => [
'foo',
'foo',
];
void checkUnnamed20(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 buildCounterGoogleCloudRetailV2GcsSource = 0;
api.GoogleCloudRetailV2GcsSource buildGoogleCloudRetailV2GcsSource() {
final o = api.GoogleCloudRetailV2GcsSource();
buildCounterGoogleCloudRetailV2GcsSource++;
if (buildCounterGoogleCloudRetailV2GcsSource < 3) {
o.dataSchema = 'foo';
o.inputUris = buildUnnamed20();
}
buildCounterGoogleCloudRetailV2GcsSource--;
return o;
}
void checkGoogleCloudRetailV2GcsSource(api.GoogleCloudRetailV2GcsSource o) {
buildCounterGoogleCloudRetailV2GcsSource++;
if (buildCounterGoogleCloudRetailV2GcsSource < 3) {
unittest.expect(
o.dataSchema!,
unittest.equals('foo'),
);
checkUnnamed20(o.inputUris!);
}
buildCounterGoogleCloudRetailV2GcsSource--;
}
core.int buildCounterGoogleCloudRetailV2GetDefaultBranchResponse = 0;
api.GoogleCloudRetailV2GetDefaultBranchResponse
buildGoogleCloudRetailV2GetDefaultBranchResponse() {
final o = api.GoogleCloudRetailV2GetDefaultBranchResponse();
buildCounterGoogleCloudRetailV2GetDefaultBranchResponse++;
if (buildCounterGoogleCloudRetailV2GetDefaultBranchResponse < 3) {
o.branch = 'foo';
o.note = 'foo';
o.setTime = 'foo';
}
buildCounterGoogleCloudRetailV2GetDefaultBranchResponse--;
return o;
}
void checkGoogleCloudRetailV2GetDefaultBranchResponse(
api.GoogleCloudRetailV2GetDefaultBranchResponse o) {
buildCounterGoogleCloudRetailV2GetDefaultBranchResponse++;
if (buildCounterGoogleCloudRetailV2GetDefaultBranchResponse < 3) {
unittest.expect(
o.branch!,
unittest.equals('foo'),
);
unittest.expect(
o.note!,
unittest.equals('foo'),
);
unittest.expect(
o.setTime!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2GetDefaultBranchResponse--;
}
core.int buildCounterGoogleCloudRetailV2Image = 0;
api.GoogleCloudRetailV2Image buildGoogleCloudRetailV2Image() {
final o = api.GoogleCloudRetailV2Image();
buildCounterGoogleCloudRetailV2Image++;
if (buildCounterGoogleCloudRetailV2Image < 3) {
o.height = 42;
o.uri = 'foo';
o.width = 42;
}
buildCounterGoogleCloudRetailV2Image--;
return o;
}
void checkGoogleCloudRetailV2Image(api.GoogleCloudRetailV2Image o) {
buildCounterGoogleCloudRetailV2Image++;
if (buildCounterGoogleCloudRetailV2Image < 3) {
unittest.expect(
o.height!,
unittest.equals(42),
);
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
unittest.expect(
o.width!,
unittest.equals(42),
);
}
buildCounterGoogleCloudRetailV2Image--;
}
core.int buildCounterGoogleCloudRetailV2ImportCompletionDataRequest = 0;
api.GoogleCloudRetailV2ImportCompletionDataRequest
buildGoogleCloudRetailV2ImportCompletionDataRequest() {
final o = api.GoogleCloudRetailV2ImportCompletionDataRequest();
buildCounterGoogleCloudRetailV2ImportCompletionDataRequest++;
if (buildCounterGoogleCloudRetailV2ImportCompletionDataRequest < 3) {
o.inputConfig = buildGoogleCloudRetailV2CompletionDataInputConfig();
o.notificationPubsubTopic = 'foo';
}
buildCounterGoogleCloudRetailV2ImportCompletionDataRequest--;
return o;
}
void checkGoogleCloudRetailV2ImportCompletionDataRequest(
api.GoogleCloudRetailV2ImportCompletionDataRequest o) {
buildCounterGoogleCloudRetailV2ImportCompletionDataRequest++;
if (buildCounterGoogleCloudRetailV2ImportCompletionDataRequest < 3) {
checkGoogleCloudRetailV2CompletionDataInputConfig(o.inputConfig!);
unittest.expect(
o.notificationPubsubTopic!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ImportCompletionDataRequest--;
}
core.int buildCounterGoogleCloudRetailV2ImportErrorsConfig = 0;
api.GoogleCloudRetailV2ImportErrorsConfig
buildGoogleCloudRetailV2ImportErrorsConfig() {
final o = api.GoogleCloudRetailV2ImportErrorsConfig();
buildCounterGoogleCloudRetailV2ImportErrorsConfig++;
if (buildCounterGoogleCloudRetailV2ImportErrorsConfig < 3) {
o.gcsPrefix = 'foo';
}
buildCounterGoogleCloudRetailV2ImportErrorsConfig--;
return o;
}
void checkGoogleCloudRetailV2ImportErrorsConfig(
api.GoogleCloudRetailV2ImportErrorsConfig o) {
buildCounterGoogleCloudRetailV2ImportErrorsConfig++;
if (buildCounterGoogleCloudRetailV2ImportErrorsConfig < 3) {
unittest.expect(
o.gcsPrefix!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ImportErrorsConfig--;
}
core.int buildCounterGoogleCloudRetailV2ImportProductsRequest = 0;
api.GoogleCloudRetailV2ImportProductsRequest
buildGoogleCloudRetailV2ImportProductsRequest() {
final o = api.GoogleCloudRetailV2ImportProductsRequest();
buildCounterGoogleCloudRetailV2ImportProductsRequest++;
if (buildCounterGoogleCloudRetailV2ImportProductsRequest < 3) {
o.errorsConfig = buildGoogleCloudRetailV2ImportErrorsConfig();
o.inputConfig = buildGoogleCloudRetailV2ProductInputConfig();
o.notificationPubsubTopic = 'foo';
o.reconciliationMode = 'foo';
o.requestId = 'foo';
o.updateMask = 'foo';
}
buildCounterGoogleCloudRetailV2ImportProductsRequest--;
return o;
}
void checkGoogleCloudRetailV2ImportProductsRequest(
api.GoogleCloudRetailV2ImportProductsRequest o) {
buildCounterGoogleCloudRetailV2ImportProductsRequest++;
if (buildCounterGoogleCloudRetailV2ImportProductsRequest < 3) {
checkGoogleCloudRetailV2ImportErrorsConfig(o.errorsConfig!);
checkGoogleCloudRetailV2ProductInputConfig(o.inputConfig!);
unittest.expect(
o.notificationPubsubTopic!,
unittest.equals('foo'),
);
unittest.expect(
o.reconciliationMode!,
unittest.equals('foo'),
);
unittest.expect(
o.requestId!,
unittest.equals('foo'),
);
unittest.expect(
o.updateMask!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ImportProductsRequest--;
}
core.int buildCounterGoogleCloudRetailV2ImportUserEventsRequest = 0;
api.GoogleCloudRetailV2ImportUserEventsRequest
buildGoogleCloudRetailV2ImportUserEventsRequest() {
final o = api.GoogleCloudRetailV2ImportUserEventsRequest();
buildCounterGoogleCloudRetailV2ImportUserEventsRequest++;
if (buildCounterGoogleCloudRetailV2ImportUserEventsRequest < 3) {
o.errorsConfig = buildGoogleCloudRetailV2ImportErrorsConfig();
o.inputConfig = buildGoogleCloudRetailV2UserEventInputConfig();
}
buildCounterGoogleCloudRetailV2ImportUserEventsRequest--;
return o;
}
void checkGoogleCloudRetailV2ImportUserEventsRequest(
api.GoogleCloudRetailV2ImportUserEventsRequest o) {
buildCounterGoogleCloudRetailV2ImportUserEventsRequest++;
if (buildCounterGoogleCloudRetailV2ImportUserEventsRequest < 3) {
checkGoogleCloudRetailV2ImportErrorsConfig(o.errorsConfig!);
checkGoogleCloudRetailV2UserEventInputConfig(o.inputConfig!);
}
buildCounterGoogleCloudRetailV2ImportUserEventsRequest--;
}
core.int buildCounterGoogleCloudRetailV2Interval = 0;
api.GoogleCloudRetailV2Interval buildGoogleCloudRetailV2Interval() {
final o = api.GoogleCloudRetailV2Interval();
buildCounterGoogleCloudRetailV2Interval++;
if (buildCounterGoogleCloudRetailV2Interval < 3) {
o.exclusiveMaximum = 42.0;
o.exclusiveMinimum = 42.0;
o.maximum = 42.0;
o.minimum = 42.0;
}
buildCounterGoogleCloudRetailV2Interval--;
return o;
}
void checkGoogleCloudRetailV2Interval(api.GoogleCloudRetailV2Interval o) {
buildCounterGoogleCloudRetailV2Interval++;
if (buildCounterGoogleCloudRetailV2Interval < 3) {
unittest.expect(
o.exclusiveMaximum!,
unittest.equals(42.0),
);
unittest.expect(
o.exclusiveMinimum!,
unittest.equals(42.0),
);
unittest.expect(
o.maximum!,
unittest.equals(42.0),
);
unittest.expect(
o.minimum!,
unittest.equals(42.0),
);
}
buildCounterGoogleCloudRetailV2Interval--;
}
core.List<api.GoogleCloudRetailV2Catalog> buildUnnamed21() => [
buildGoogleCloudRetailV2Catalog(),
buildGoogleCloudRetailV2Catalog(),
];
void checkUnnamed21(core.List<api.GoogleCloudRetailV2Catalog> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Catalog(o[0]);
checkGoogleCloudRetailV2Catalog(o[1]);
}
core.int buildCounterGoogleCloudRetailV2ListCatalogsResponse = 0;
api.GoogleCloudRetailV2ListCatalogsResponse
buildGoogleCloudRetailV2ListCatalogsResponse() {
final o = api.GoogleCloudRetailV2ListCatalogsResponse();
buildCounterGoogleCloudRetailV2ListCatalogsResponse++;
if (buildCounterGoogleCloudRetailV2ListCatalogsResponse < 3) {
o.catalogs = buildUnnamed21();
o.nextPageToken = 'foo';
}
buildCounterGoogleCloudRetailV2ListCatalogsResponse--;
return o;
}
void checkGoogleCloudRetailV2ListCatalogsResponse(
api.GoogleCloudRetailV2ListCatalogsResponse o) {
buildCounterGoogleCloudRetailV2ListCatalogsResponse++;
if (buildCounterGoogleCloudRetailV2ListCatalogsResponse < 3) {
checkUnnamed21(o.catalogs!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ListCatalogsResponse--;
}
core.List<api.GoogleCloudRetailV2Control> buildUnnamed22() => [
buildGoogleCloudRetailV2Control(),
buildGoogleCloudRetailV2Control(),
];
void checkUnnamed22(core.List<api.GoogleCloudRetailV2Control> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Control(o[0]);
checkGoogleCloudRetailV2Control(o[1]);
}
core.int buildCounterGoogleCloudRetailV2ListControlsResponse = 0;
api.GoogleCloudRetailV2ListControlsResponse
buildGoogleCloudRetailV2ListControlsResponse() {
final o = api.GoogleCloudRetailV2ListControlsResponse();
buildCounterGoogleCloudRetailV2ListControlsResponse++;
if (buildCounterGoogleCloudRetailV2ListControlsResponse < 3) {
o.controls = buildUnnamed22();
o.nextPageToken = 'foo';
}
buildCounterGoogleCloudRetailV2ListControlsResponse--;
return o;
}
void checkGoogleCloudRetailV2ListControlsResponse(
api.GoogleCloudRetailV2ListControlsResponse o) {
buildCounterGoogleCloudRetailV2ListControlsResponse++;
if (buildCounterGoogleCloudRetailV2ListControlsResponse < 3) {
checkUnnamed22(o.controls!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ListControlsResponse--;
}
core.List<api.GoogleCloudRetailV2Model> buildUnnamed23() => [
buildGoogleCloudRetailV2Model(),
buildGoogleCloudRetailV2Model(),
];
void checkUnnamed23(core.List<api.GoogleCloudRetailV2Model> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Model(o[0]);
checkGoogleCloudRetailV2Model(o[1]);
}
core.int buildCounterGoogleCloudRetailV2ListModelsResponse = 0;
api.GoogleCloudRetailV2ListModelsResponse
buildGoogleCloudRetailV2ListModelsResponse() {
final o = api.GoogleCloudRetailV2ListModelsResponse();
buildCounterGoogleCloudRetailV2ListModelsResponse++;
if (buildCounterGoogleCloudRetailV2ListModelsResponse < 3) {
o.models = buildUnnamed23();
o.nextPageToken = 'foo';
}
buildCounterGoogleCloudRetailV2ListModelsResponse--;
return o;
}
void checkGoogleCloudRetailV2ListModelsResponse(
api.GoogleCloudRetailV2ListModelsResponse o) {
buildCounterGoogleCloudRetailV2ListModelsResponse++;
if (buildCounterGoogleCloudRetailV2ListModelsResponse < 3) {
checkUnnamed23(o.models!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ListModelsResponse--;
}
core.List<api.GoogleCloudRetailV2Product> buildUnnamed24() => [
buildGoogleCloudRetailV2Product(),
buildGoogleCloudRetailV2Product(),
];
void checkUnnamed24(core.List<api.GoogleCloudRetailV2Product> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Product(o[0]);
checkGoogleCloudRetailV2Product(o[1]);
}
core.int buildCounterGoogleCloudRetailV2ListProductsResponse = 0;
api.GoogleCloudRetailV2ListProductsResponse
buildGoogleCloudRetailV2ListProductsResponse() {
final o = api.GoogleCloudRetailV2ListProductsResponse();
buildCounterGoogleCloudRetailV2ListProductsResponse++;
if (buildCounterGoogleCloudRetailV2ListProductsResponse < 3) {
o.nextPageToken = 'foo';
o.products = buildUnnamed24();
}
buildCounterGoogleCloudRetailV2ListProductsResponse--;
return o;
}
void checkGoogleCloudRetailV2ListProductsResponse(
api.GoogleCloudRetailV2ListProductsResponse o) {
buildCounterGoogleCloudRetailV2ListProductsResponse++;
if (buildCounterGoogleCloudRetailV2ListProductsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed24(o.products!);
}
buildCounterGoogleCloudRetailV2ListProductsResponse--;
}
core.List<api.GoogleCloudRetailV2ServingConfig> buildUnnamed25() => [
buildGoogleCloudRetailV2ServingConfig(),
buildGoogleCloudRetailV2ServingConfig(),
];
void checkUnnamed25(core.List<api.GoogleCloudRetailV2ServingConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2ServingConfig(o[0]);
checkGoogleCloudRetailV2ServingConfig(o[1]);
}
core.int buildCounterGoogleCloudRetailV2ListServingConfigsResponse = 0;
api.GoogleCloudRetailV2ListServingConfigsResponse
buildGoogleCloudRetailV2ListServingConfigsResponse() {
final o = api.GoogleCloudRetailV2ListServingConfigsResponse();
buildCounterGoogleCloudRetailV2ListServingConfigsResponse++;
if (buildCounterGoogleCloudRetailV2ListServingConfigsResponse < 3) {
o.nextPageToken = 'foo';
o.servingConfigs = buildUnnamed25();
}
buildCounterGoogleCloudRetailV2ListServingConfigsResponse--;
return o;
}
void checkGoogleCloudRetailV2ListServingConfigsResponse(
api.GoogleCloudRetailV2ListServingConfigsResponse o) {
buildCounterGoogleCloudRetailV2ListServingConfigsResponse++;
if (buildCounterGoogleCloudRetailV2ListServingConfigsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed25(o.servingConfigs!);
}
buildCounterGoogleCloudRetailV2ListServingConfigsResponse--;
}
core.Map<core.String, api.GoogleCloudRetailV2CustomAttribute>
buildUnnamed26() => {
'x': buildGoogleCloudRetailV2CustomAttribute(),
'y': buildGoogleCloudRetailV2CustomAttribute(),
};
void checkUnnamed26(
core.Map<core.String, api.GoogleCloudRetailV2CustomAttribute> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2CustomAttribute(o['x']!);
checkGoogleCloudRetailV2CustomAttribute(o['y']!);
}
core.List<core.String> buildUnnamed27() => [
'foo',
'foo',
];
void checkUnnamed27(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 buildCounterGoogleCloudRetailV2LocalInventory = 0;
api.GoogleCloudRetailV2LocalInventory buildGoogleCloudRetailV2LocalInventory() {
final o = api.GoogleCloudRetailV2LocalInventory();
buildCounterGoogleCloudRetailV2LocalInventory++;
if (buildCounterGoogleCloudRetailV2LocalInventory < 3) {
o.attributes = buildUnnamed26();
o.fulfillmentTypes = buildUnnamed27();
o.placeId = 'foo';
o.priceInfo = buildGoogleCloudRetailV2PriceInfo();
}
buildCounterGoogleCloudRetailV2LocalInventory--;
return o;
}
void checkGoogleCloudRetailV2LocalInventory(
api.GoogleCloudRetailV2LocalInventory o) {
buildCounterGoogleCloudRetailV2LocalInventory++;
if (buildCounterGoogleCloudRetailV2LocalInventory < 3) {
checkUnnamed26(o.attributes!);
checkUnnamed27(o.fulfillmentTypes!);
unittest.expect(
o.placeId!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2PriceInfo(o.priceInfo!);
}
buildCounterGoogleCloudRetailV2LocalInventory--;
}
core.List<api.GoogleCloudRetailV2ModelServingConfigList> buildUnnamed28() => [
buildGoogleCloudRetailV2ModelServingConfigList(),
buildGoogleCloudRetailV2ModelServingConfigList(),
];
void checkUnnamed28(
core.List<api.GoogleCloudRetailV2ModelServingConfigList> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2ModelServingConfigList(o[0]);
checkGoogleCloudRetailV2ModelServingConfigList(o[1]);
}
core.int buildCounterGoogleCloudRetailV2Model = 0;
api.GoogleCloudRetailV2Model buildGoogleCloudRetailV2Model() {
final o = api.GoogleCloudRetailV2Model();
buildCounterGoogleCloudRetailV2Model++;
if (buildCounterGoogleCloudRetailV2Model < 3) {
o.createTime = 'foo';
o.dataState = 'foo';
o.displayName = 'foo';
o.filteringOption = 'foo';
o.lastTuneTime = 'foo';
o.modelFeaturesConfig = buildGoogleCloudRetailV2ModelModelFeaturesConfig();
o.name = 'foo';
o.optimizationObjective = 'foo';
o.periodicTuningState = 'foo';
o.servingConfigLists = buildUnnamed28();
o.servingState = 'foo';
o.trainingState = 'foo';
o.tuningOperation = 'foo';
o.type = 'foo';
o.updateTime = 'foo';
}
buildCounterGoogleCloudRetailV2Model--;
return o;
}
void checkGoogleCloudRetailV2Model(api.GoogleCloudRetailV2Model o) {
buildCounterGoogleCloudRetailV2Model++;
if (buildCounterGoogleCloudRetailV2Model < 3) {
unittest.expect(
o.createTime!,
unittest.equals('foo'),
);
unittest.expect(
o.dataState!,
unittest.equals('foo'),
);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.filteringOption!,
unittest.equals('foo'),
);
unittest.expect(
o.lastTuneTime!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2ModelModelFeaturesConfig(o.modelFeaturesConfig!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.optimizationObjective!,
unittest.equals('foo'),
);
unittest.expect(
o.periodicTuningState!,
unittest.equals('foo'),
);
checkUnnamed28(o.servingConfigLists!);
unittest.expect(
o.servingState!,
unittest.equals('foo'),
);
unittest.expect(
o.trainingState!,
unittest.equals('foo'),
);
unittest.expect(
o.tuningOperation!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2Model--;
}
core.int
buildCounterGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig =
0;
api.GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig
buildGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig() {
final o =
api.GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig();
buildCounterGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig++;
if (buildCounterGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig <
3) {
o.contextProductsType = 'foo';
}
buildCounterGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig--;
return o;
}
void checkGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig(
api.GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig o) {
buildCounterGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig++;
if (buildCounterGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig <
3) {
unittest.expect(
o.contextProductsType!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig--;
}
core.int buildCounterGoogleCloudRetailV2ModelModelFeaturesConfig = 0;
api.GoogleCloudRetailV2ModelModelFeaturesConfig
buildGoogleCloudRetailV2ModelModelFeaturesConfig() {
final o = api.GoogleCloudRetailV2ModelModelFeaturesConfig();
buildCounterGoogleCloudRetailV2ModelModelFeaturesConfig++;
if (buildCounterGoogleCloudRetailV2ModelModelFeaturesConfig < 3) {
o.frequentlyBoughtTogetherConfig =
buildGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig();
}
buildCounterGoogleCloudRetailV2ModelModelFeaturesConfig--;
return o;
}
void checkGoogleCloudRetailV2ModelModelFeaturesConfig(
api.GoogleCloudRetailV2ModelModelFeaturesConfig o) {
buildCounterGoogleCloudRetailV2ModelModelFeaturesConfig++;
if (buildCounterGoogleCloudRetailV2ModelModelFeaturesConfig < 3) {
checkGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig(
o.frequentlyBoughtTogetherConfig!);
}
buildCounterGoogleCloudRetailV2ModelModelFeaturesConfig--;
}
core.List<core.String> buildUnnamed29() => [
'foo',
'foo',
];
void checkUnnamed29(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 buildCounterGoogleCloudRetailV2ModelServingConfigList = 0;
api.GoogleCloudRetailV2ModelServingConfigList
buildGoogleCloudRetailV2ModelServingConfigList() {
final o = api.GoogleCloudRetailV2ModelServingConfigList();
buildCounterGoogleCloudRetailV2ModelServingConfigList++;
if (buildCounterGoogleCloudRetailV2ModelServingConfigList < 3) {
o.servingConfigIds = buildUnnamed29();
}
buildCounterGoogleCloudRetailV2ModelServingConfigList--;
return o;
}
void checkGoogleCloudRetailV2ModelServingConfigList(
api.GoogleCloudRetailV2ModelServingConfigList o) {
buildCounterGoogleCloudRetailV2ModelServingConfigList++;
if (buildCounterGoogleCloudRetailV2ModelServingConfigList < 3) {
checkUnnamed29(o.servingConfigIds!);
}
buildCounterGoogleCloudRetailV2ModelServingConfigList--;
}
core.int buildCounterGoogleCloudRetailV2PauseModelRequest = 0;
api.GoogleCloudRetailV2PauseModelRequest
buildGoogleCloudRetailV2PauseModelRequest() {
final o = api.GoogleCloudRetailV2PauseModelRequest();
buildCounterGoogleCloudRetailV2PauseModelRequest++;
if (buildCounterGoogleCloudRetailV2PauseModelRequest < 3) {}
buildCounterGoogleCloudRetailV2PauseModelRequest--;
return o;
}
void checkGoogleCloudRetailV2PauseModelRequest(
api.GoogleCloudRetailV2PauseModelRequest o) {
buildCounterGoogleCloudRetailV2PauseModelRequest++;
if (buildCounterGoogleCloudRetailV2PauseModelRequest < 3) {}
buildCounterGoogleCloudRetailV2PauseModelRequest--;
}
core.Map<core.String, core.String> buildUnnamed30() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed30(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.Map<core.String, core.Object?> buildUnnamed31() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed31(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 buildCounterGoogleCloudRetailV2PredictRequest = 0;
api.GoogleCloudRetailV2PredictRequest buildGoogleCloudRetailV2PredictRequest() {
final o = api.GoogleCloudRetailV2PredictRequest();
buildCounterGoogleCloudRetailV2PredictRequest++;
if (buildCounterGoogleCloudRetailV2PredictRequest < 3) {
o.filter = 'foo';
o.labels = buildUnnamed30();
o.pageSize = 42;
o.pageToken = 'foo';
o.params = buildUnnamed31();
o.userEvent = buildGoogleCloudRetailV2UserEvent();
o.validateOnly = true;
}
buildCounterGoogleCloudRetailV2PredictRequest--;
return o;
}
void checkGoogleCloudRetailV2PredictRequest(
api.GoogleCloudRetailV2PredictRequest o) {
buildCounterGoogleCloudRetailV2PredictRequest++;
if (buildCounterGoogleCloudRetailV2PredictRequest < 3) {
unittest.expect(
o.filter!,
unittest.equals('foo'),
);
checkUnnamed30(o.labels!);
unittest.expect(
o.pageSize!,
unittest.equals(42),
);
unittest.expect(
o.pageToken!,
unittest.equals('foo'),
);
checkUnnamed31(o.params!);
checkGoogleCloudRetailV2UserEvent(o.userEvent!);
unittest.expect(o.validateOnly!, unittest.isTrue);
}
buildCounterGoogleCloudRetailV2PredictRequest--;
}
core.List<core.String> buildUnnamed32() => [
'foo',
'foo',
];
void checkUnnamed32(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.List<api.GoogleCloudRetailV2PredictResponsePredictionResult>
buildUnnamed33() => [
buildGoogleCloudRetailV2PredictResponsePredictionResult(),
buildGoogleCloudRetailV2PredictResponsePredictionResult(),
];
void checkUnnamed33(
core.List<api.GoogleCloudRetailV2PredictResponsePredictionResult> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2PredictResponsePredictionResult(o[0]);
checkGoogleCloudRetailV2PredictResponsePredictionResult(o[1]);
}
core.int buildCounterGoogleCloudRetailV2PredictResponse = 0;
api.GoogleCloudRetailV2PredictResponse
buildGoogleCloudRetailV2PredictResponse() {
final o = api.GoogleCloudRetailV2PredictResponse();
buildCounterGoogleCloudRetailV2PredictResponse++;
if (buildCounterGoogleCloudRetailV2PredictResponse < 3) {
o.attributionToken = 'foo';
o.missingIds = buildUnnamed32();
o.results = buildUnnamed33();
o.validateOnly = true;
}
buildCounterGoogleCloudRetailV2PredictResponse--;
return o;
}
void checkGoogleCloudRetailV2PredictResponse(
api.GoogleCloudRetailV2PredictResponse o) {
buildCounterGoogleCloudRetailV2PredictResponse++;
if (buildCounterGoogleCloudRetailV2PredictResponse < 3) {
unittest.expect(
o.attributionToken!,
unittest.equals('foo'),
);
checkUnnamed32(o.missingIds!);
checkUnnamed33(o.results!);
unittest.expect(o.validateOnly!, unittest.isTrue);
}
buildCounterGoogleCloudRetailV2PredictResponse--;
}
core.Map<core.String, core.Object?> buildUnnamed34() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed34(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 buildCounterGoogleCloudRetailV2PredictResponsePredictionResult = 0;
api.GoogleCloudRetailV2PredictResponsePredictionResult
buildGoogleCloudRetailV2PredictResponsePredictionResult() {
final o = api.GoogleCloudRetailV2PredictResponsePredictionResult();
buildCounterGoogleCloudRetailV2PredictResponsePredictionResult++;
if (buildCounterGoogleCloudRetailV2PredictResponsePredictionResult < 3) {
o.id = 'foo';
o.metadata = buildUnnamed34();
}
buildCounterGoogleCloudRetailV2PredictResponsePredictionResult--;
return o;
}
void checkGoogleCloudRetailV2PredictResponsePredictionResult(
api.GoogleCloudRetailV2PredictResponsePredictionResult o) {
buildCounterGoogleCloudRetailV2PredictResponsePredictionResult++;
if (buildCounterGoogleCloudRetailV2PredictResponsePredictionResult < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkUnnamed34(o.metadata!);
}
buildCounterGoogleCloudRetailV2PredictResponsePredictionResult--;
}
core.int buildCounterGoogleCloudRetailV2PriceInfo = 0;
api.GoogleCloudRetailV2PriceInfo buildGoogleCloudRetailV2PriceInfo() {
final o = api.GoogleCloudRetailV2PriceInfo();
buildCounterGoogleCloudRetailV2PriceInfo++;
if (buildCounterGoogleCloudRetailV2PriceInfo < 3) {
o.cost = 42.0;
o.currencyCode = 'foo';
o.originalPrice = 42.0;
o.price = 42.0;
o.priceEffectiveTime = 'foo';
o.priceExpireTime = 'foo';
o.priceRange = buildGoogleCloudRetailV2PriceInfoPriceRange();
}
buildCounterGoogleCloudRetailV2PriceInfo--;
return o;
}
void checkGoogleCloudRetailV2PriceInfo(api.GoogleCloudRetailV2PriceInfo o) {
buildCounterGoogleCloudRetailV2PriceInfo++;
if (buildCounterGoogleCloudRetailV2PriceInfo < 3) {
unittest.expect(
o.cost!,
unittest.equals(42.0),
);
unittest.expect(
o.currencyCode!,
unittest.equals('foo'),
);
unittest.expect(
o.originalPrice!,
unittest.equals(42.0),
);
unittest.expect(
o.price!,
unittest.equals(42.0),
);
unittest.expect(
o.priceEffectiveTime!,
unittest.equals('foo'),
);
unittest.expect(
o.priceExpireTime!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2PriceInfoPriceRange(o.priceRange!);
}
buildCounterGoogleCloudRetailV2PriceInfo--;
}
core.int buildCounterGoogleCloudRetailV2PriceInfoPriceRange = 0;
api.GoogleCloudRetailV2PriceInfoPriceRange
buildGoogleCloudRetailV2PriceInfoPriceRange() {
final o = api.GoogleCloudRetailV2PriceInfoPriceRange();
buildCounterGoogleCloudRetailV2PriceInfoPriceRange++;
if (buildCounterGoogleCloudRetailV2PriceInfoPriceRange < 3) {
o.originalPrice = buildGoogleCloudRetailV2Interval();
o.price = buildGoogleCloudRetailV2Interval();
}
buildCounterGoogleCloudRetailV2PriceInfoPriceRange--;
return o;
}
void checkGoogleCloudRetailV2PriceInfoPriceRange(
api.GoogleCloudRetailV2PriceInfoPriceRange o) {
buildCounterGoogleCloudRetailV2PriceInfoPriceRange++;
if (buildCounterGoogleCloudRetailV2PriceInfoPriceRange < 3) {
checkGoogleCloudRetailV2Interval(o.originalPrice!);
checkGoogleCloudRetailV2Interval(o.price!);
}
buildCounterGoogleCloudRetailV2PriceInfoPriceRange--;
}
core.Map<core.String, api.GoogleCloudRetailV2CustomAttribute>
buildUnnamed35() => {
'x': buildGoogleCloudRetailV2CustomAttribute(),
'y': buildGoogleCloudRetailV2CustomAttribute(),
};
void checkUnnamed35(
core.Map<core.String, api.GoogleCloudRetailV2CustomAttribute> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2CustomAttribute(o['x']!);
checkGoogleCloudRetailV2CustomAttribute(o['y']!);
}
core.List<core.String> buildUnnamed36() => [
'foo',
'foo',
];
void checkUnnamed36(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.List<core.String> buildUnnamed37() => [
'foo',
'foo',
];
void checkUnnamed37(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.List<core.String> buildUnnamed38() => [
'foo',
'foo',
];
void checkUnnamed38(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.List<core.String> buildUnnamed39() => [
'foo',
'foo',
];
void checkUnnamed39(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.List<api.GoogleCloudRetailV2FulfillmentInfo> buildUnnamed40() => [
buildGoogleCloudRetailV2FulfillmentInfo(),
buildGoogleCloudRetailV2FulfillmentInfo(),
];
void checkUnnamed40(core.List<api.GoogleCloudRetailV2FulfillmentInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2FulfillmentInfo(o[0]);
checkGoogleCloudRetailV2FulfillmentInfo(o[1]);
}
core.List<api.GoogleCloudRetailV2Image> buildUnnamed41() => [
buildGoogleCloudRetailV2Image(),
buildGoogleCloudRetailV2Image(),
];
void checkUnnamed41(core.List<api.GoogleCloudRetailV2Image> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Image(o[0]);
checkGoogleCloudRetailV2Image(o[1]);
}
core.List<api.GoogleCloudRetailV2LocalInventory> buildUnnamed42() => [
buildGoogleCloudRetailV2LocalInventory(),
buildGoogleCloudRetailV2LocalInventory(),
];
void checkUnnamed42(core.List<api.GoogleCloudRetailV2LocalInventory> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2LocalInventory(o[0]);
checkGoogleCloudRetailV2LocalInventory(o[1]);
}
core.List<core.String> buildUnnamed43() => [
'foo',
'foo',
];
void checkUnnamed43(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.List<core.String> buildUnnamed44() => [
'foo',
'foo',
];
void checkUnnamed44(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.List<api.GoogleCloudRetailV2Promotion> buildUnnamed45() => [
buildGoogleCloudRetailV2Promotion(),
buildGoogleCloudRetailV2Promotion(),
];
void checkUnnamed45(core.List<api.GoogleCloudRetailV2Promotion> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Promotion(o[0]);
checkGoogleCloudRetailV2Promotion(o[1]);
}
core.List<core.String> buildUnnamed46() => [
'foo',
'foo',
];
void checkUnnamed46(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.List<core.String> buildUnnamed47() => [
'foo',
'foo',
];
void checkUnnamed47(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.List<api.GoogleCloudRetailV2Product> buildUnnamed48() => [
buildGoogleCloudRetailV2Product(),
buildGoogleCloudRetailV2Product(),
];
void checkUnnamed48(core.List<api.GoogleCloudRetailV2Product> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Product(o[0]);
checkGoogleCloudRetailV2Product(o[1]);
}
core.int buildCounterGoogleCloudRetailV2Product = 0;
api.GoogleCloudRetailV2Product buildGoogleCloudRetailV2Product() {
final o = api.GoogleCloudRetailV2Product();
buildCounterGoogleCloudRetailV2Product++;
if (buildCounterGoogleCloudRetailV2Product < 3) {
o.attributes = buildUnnamed35();
o.audience = buildGoogleCloudRetailV2Audience();
o.availability = 'foo';
o.availableQuantity = 42;
o.availableTime = 'foo';
o.brands = buildUnnamed36();
o.categories = buildUnnamed37();
o.collectionMemberIds = buildUnnamed38();
o.colorInfo = buildGoogleCloudRetailV2ColorInfo();
o.conditions = buildUnnamed39();
o.description = 'foo';
o.expireTime = 'foo';
o.fulfillmentInfo = buildUnnamed40();
o.gtin = 'foo';
o.id = 'foo';
o.images = buildUnnamed41();
o.languageCode = 'foo';
o.localInventories = buildUnnamed42();
o.materials = buildUnnamed43();
o.name = 'foo';
o.patterns = buildUnnamed44();
o.priceInfo = buildGoogleCloudRetailV2PriceInfo();
o.primaryProductId = 'foo';
o.promotions = buildUnnamed45();
o.publishTime = 'foo';
o.rating = buildGoogleCloudRetailV2Rating();
o.retrievableFields = 'foo';
o.sizes = buildUnnamed46();
o.tags = buildUnnamed47();
o.title = 'foo';
o.ttl = 'foo';
o.type = 'foo';
o.uri = 'foo';
o.variants = buildUnnamed48();
}
buildCounterGoogleCloudRetailV2Product--;
return o;
}
void checkGoogleCloudRetailV2Product(api.GoogleCloudRetailV2Product o) {
buildCounterGoogleCloudRetailV2Product++;
if (buildCounterGoogleCloudRetailV2Product < 3) {
checkUnnamed35(o.attributes!);
checkGoogleCloudRetailV2Audience(o.audience!);
unittest.expect(
o.availability!,
unittest.equals('foo'),
);
unittest.expect(
o.availableQuantity!,
unittest.equals(42),
);
unittest.expect(
o.availableTime!,
unittest.equals('foo'),
);
checkUnnamed36(o.brands!);
checkUnnamed37(o.categories!);
checkUnnamed38(o.collectionMemberIds!);
checkGoogleCloudRetailV2ColorInfo(o.colorInfo!);
checkUnnamed39(o.conditions!);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.expireTime!,
unittest.equals('foo'),
);
checkUnnamed40(o.fulfillmentInfo!);
unittest.expect(
o.gtin!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkUnnamed41(o.images!);
unittest.expect(
o.languageCode!,
unittest.equals('foo'),
);
checkUnnamed42(o.localInventories!);
checkUnnamed43(o.materials!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed44(o.patterns!);
checkGoogleCloudRetailV2PriceInfo(o.priceInfo!);
unittest.expect(
o.primaryProductId!,
unittest.equals('foo'),
);
checkUnnamed45(o.promotions!);
unittest.expect(
o.publishTime!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2Rating(o.rating!);
unittest.expect(
o.retrievableFields!,
unittest.equals('foo'),
);
checkUnnamed46(o.sizes!);
checkUnnamed47(o.tags!);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
unittest.expect(
o.ttl!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
checkUnnamed48(o.variants!);
}
buildCounterGoogleCloudRetailV2Product--;
}
core.int buildCounterGoogleCloudRetailV2ProductDetail = 0;
api.GoogleCloudRetailV2ProductDetail buildGoogleCloudRetailV2ProductDetail() {
final o = api.GoogleCloudRetailV2ProductDetail();
buildCounterGoogleCloudRetailV2ProductDetail++;
if (buildCounterGoogleCloudRetailV2ProductDetail < 3) {
o.product = buildGoogleCloudRetailV2Product();
o.quantity = 42;
}
buildCounterGoogleCloudRetailV2ProductDetail--;
return o;
}
void checkGoogleCloudRetailV2ProductDetail(
api.GoogleCloudRetailV2ProductDetail o) {
buildCounterGoogleCloudRetailV2ProductDetail++;
if (buildCounterGoogleCloudRetailV2ProductDetail < 3) {
checkGoogleCloudRetailV2Product(o.product!);
unittest.expect(
o.quantity!,
unittest.equals(42),
);
}
buildCounterGoogleCloudRetailV2ProductDetail--;
}
core.List<api.GoogleCloudRetailV2Product> buildUnnamed49() => [
buildGoogleCloudRetailV2Product(),
buildGoogleCloudRetailV2Product(),
];
void checkUnnamed49(core.List<api.GoogleCloudRetailV2Product> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Product(o[0]);
checkGoogleCloudRetailV2Product(o[1]);
}
core.int buildCounterGoogleCloudRetailV2ProductInlineSource = 0;
api.GoogleCloudRetailV2ProductInlineSource
buildGoogleCloudRetailV2ProductInlineSource() {
final o = api.GoogleCloudRetailV2ProductInlineSource();
buildCounterGoogleCloudRetailV2ProductInlineSource++;
if (buildCounterGoogleCloudRetailV2ProductInlineSource < 3) {
o.products = buildUnnamed49();
}
buildCounterGoogleCloudRetailV2ProductInlineSource--;
return o;
}
void checkGoogleCloudRetailV2ProductInlineSource(
api.GoogleCloudRetailV2ProductInlineSource o) {
buildCounterGoogleCloudRetailV2ProductInlineSource++;
if (buildCounterGoogleCloudRetailV2ProductInlineSource < 3) {
checkUnnamed49(o.products!);
}
buildCounterGoogleCloudRetailV2ProductInlineSource--;
}
core.int buildCounterGoogleCloudRetailV2ProductInputConfig = 0;
api.GoogleCloudRetailV2ProductInputConfig
buildGoogleCloudRetailV2ProductInputConfig() {
final o = api.GoogleCloudRetailV2ProductInputConfig();
buildCounterGoogleCloudRetailV2ProductInputConfig++;
if (buildCounterGoogleCloudRetailV2ProductInputConfig < 3) {
o.bigQuerySource = buildGoogleCloudRetailV2BigQuerySource();
o.gcsSource = buildGoogleCloudRetailV2GcsSource();
o.productInlineSource = buildGoogleCloudRetailV2ProductInlineSource();
}
buildCounterGoogleCloudRetailV2ProductInputConfig--;
return o;
}
void checkGoogleCloudRetailV2ProductInputConfig(
api.GoogleCloudRetailV2ProductInputConfig o) {
buildCounterGoogleCloudRetailV2ProductInputConfig++;
if (buildCounterGoogleCloudRetailV2ProductInputConfig < 3) {
checkGoogleCloudRetailV2BigQuerySource(o.bigQuerySource!);
checkGoogleCloudRetailV2GcsSource(o.gcsSource!);
checkGoogleCloudRetailV2ProductInlineSource(o.productInlineSource!);
}
buildCounterGoogleCloudRetailV2ProductInputConfig--;
}
core.int buildCounterGoogleCloudRetailV2ProductLevelConfig = 0;
api.GoogleCloudRetailV2ProductLevelConfig
buildGoogleCloudRetailV2ProductLevelConfig() {
final o = api.GoogleCloudRetailV2ProductLevelConfig();
buildCounterGoogleCloudRetailV2ProductLevelConfig++;
if (buildCounterGoogleCloudRetailV2ProductLevelConfig < 3) {
o.ingestionProductType = 'foo';
o.merchantCenterProductIdField = 'foo';
}
buildCounterGoogleCloudRetailV2ProductLevelConfig--;
return o;
}
void checkGoogleCloudRetailV2ProductLevelConfig(
api.GoogleCloudRetailV2ProductLevelConfig o) {
buildCounterGoogleCloudRetailV2ProductLevelConfig++;
if (buildCounterGoogleCloudRetailV2ProductLevelConfig < 3) {
unittest.expect(
o.ingestionProductType!,
unittest.equals('foo'),
);
unittest.expect(
o.merchantCenterProductIdField!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ProductLevelConfig--;
}
core.int buildCounterGoogleCloudRetailV2Promotion = 0;
api.GoogleCloudRetailV2Promotion buildGoogleCloudRetailV2Promotion() {
final o = api.GoogleCloudRetailV2Promotion();
buildCounterGoogleCloudRetailV2Promotion++;
if (buildCounterGoogleCloudRetailV2Promotion < 3) {
o.promotionId = 'foo';
}
buildCounterGoogleCloudRetailV2Promotion--;
return o;
}
void checkGoogleCloudRetailV2Promotion(api.GoogleCloudRetailV2Promotion o) {
buildCounterGoogleCloudRetailV2Promotion++;
if (buildCounterGoogleCloudRetailV2Promotion < 3) {
unittest.expect(
o.promotionId!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2Promotion--;
}
core.int buildCounterGoogleCloudRetailV2PurchaseTransaction = 0;
api.GoogleCloudRetailV2PurchaseTransaction
buildGoogleCloudRetailV2PurchaseTransaction() {
final o = api.GoogleCloudRetailV2PurchaseTransaction();
buildCounterGoogleCloudRetailV2PurchaseTransaction++;
if (buildCounterGoogleCloudRetailV2PurchaseTransaction < 3) {
o.cost = 42.0;
o.currencyCode = 'foo';
o.id = 'foo';
o.revenue = 42.0;
o.tax = 42.0;
}
buildCounterGoogleCloudRetailV2PurchaseTransaction--;
return o;
}
void checkGoogleCloudRetailV2PurchaseTransaction(
api.GoogleCloudRetailV2PurchaseTransaction o) {
buildCounterGoogleCloudRetailV2PurchaseTransaction++;
if (buildCounterGoogleCloudRetailV2PurchaseTransaction < 3) {
unittest.expect(
o.cost!,
unittest.equals(42.0),
);
unittest.expect(
o.currencyCode!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.revenue!,
unittest.equals(42.0),
);
unittest.expect(
o.tax!,
unittest.equals(42.0),
);
}
buildCounterGoogleCloudRetailV2PurchaseTransaction--;
}
core.int buildCounterGoogleCloudRetailV2PurgeProductsRequest = 0;
api.GoogleCloudRetailV2PurgeProductsRequest
buildGoogleCloudRetailV2PurgeProductsRequest() {
final o = api.GoogleCloudRetailV2PurgeProductsRequest();
buildCounterGoogleCloudRetailV2PurgeProductsRequest++;
if (buildCounterGoogleCloudRetailV2PurgeProductsRequest < 3) {
o.filter = 'foo';
o.force = true;
}
buildCounterGoogleCloudRetailV2PurgeProductsRequest--;
return o;
}
void checkGoogleCloudRetailV2PurgeProductsRequest(
api.GoogleCloudRetailV2PurgeProductsRequest o) {
buildCounterGoogleCloudRetailV2PurgeProductsRequest++;
if (buildCounterGoogleCloudRetailV2PurgeProductsRequest < 3) {
unittest.expect(
o.filter!,
unittest.equals('foo'),
);
unittest.expect(o.force!, unittest.isTrue);
}
buildCounterGoogleCloudRetailV2PurgeProductsRequest--;
}
core.int buildCounterGoogleCloudRetailV2PurgeUserEventsRequest = 0;
api.GoogleCloudRetailV2PurgeUserEventsRequest
buildGoogleCloudRetailV2PurgeUserEventsRequest() {
final o = api.GoogleCloudRetailV2PurgeUserEventsRequest();
buildCounterGoogleCloudRetailV2PurgeUserEventsRequest++;
if (buildCounterGoogleCloudRetailV2PurgeUserEventsRequest < 3) {
o.filter = 'foo';
o.force = true;
}
buildCounterGoogleCloudRetailV2PurgeUserEventsRequest--;
return o;
}
void checkGoogleCloudRetailV2PurgeUserEventsRequest(
api.GoogleCloudRetailV2PurgeUserEventsRequest o) {
buildCounterGoogleCloudRetailV2PurgeUserEventsRequest++;
if (buildCounterGoogleCloudRetailV2PurgeUserEventsRequest < 3) {
unittest.expect(
o.filter!,
unittest.equals('foo'),
);
unittest.expect(o.force!, unittest.isTrue);
}
buildCounterGoogleCloudRetailV2PurgeUserEventsRequest--;
}
core.List<core.int> buildUnnamed50() => [
42,
42,
];
void checkUnnamed50(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),
);
}
core.int buildCounterGoogleCloudRetailV2Rating = 0;
api.GoogleCloudRetailV2Rating buildGoogleCloudRetailV2Rating() {
final o = api.GoogleCloudRetailV2Rating();
buildCounterGoogleCloudRetailV2Rating++;
if (buildCounterGoogleCloudRetailV2Rating < 3) {
o.averageRating = 42.0;
o.ratingCount = 42;
o.ratingHistogram = buildUnnamed50();
}
buildCounterGoogleCloudRetailV2Rating--;
return o;
}
void checkGoogleCloudRetailV2Rating(api.GoogleCloudRetailV2Rating o) {
buildCounterGoogleCloudRetailV2Rating++;
if (buildCounterGoogleCloudRetailV2Rating < 3) {
unittest.expect(
o.averageRating!,
unittest.equals(42.0),
);
unittest.expect(
o.ratingCount!,
unittest.equals(42),
);
checkUnnamed50(o.ratingHistogram!);
}
buildCounterGoogleCloudRetailV2Rating--;
}
core.int buildCounterGoogleCloudRetailV2RejoinUserEventsRequest = 0;
api.GoogleCloudRetailV2RejoinUserEventsRequest
buildGoogleCloudRetailV2RejoinUserEventsRequest() {
final o = api.GoogleCloudRetailV2RejoinUserEventsRequest();
buildCounterGoogleCloudRetailV2RejoinUserEventsRequest++;
if (buildCounterGoogleCloudRetailV2RejoinUserEventsRequest < 3) {
o.userEventRejoinScope = 'foo';
}
buildCounterGoogleCloudRetailV2RejoinUserEventsRequest--;
return o;
}
void checkGoogleCloudRetailV2RejoinUserEventsRequest(
api.GoogleCloudRetailV2RejoinUserEventsRequest o) {
buildCounterGoogleCloudRetailV2RejoinUserEventsRequest++;
if (buildCounterGoogleCloudRetailV2RejoinUserEventsRequest < 3) {
unittest.expect(
o.userEventRejoinScope!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RejoinUserEventsRequest--;
}
core.int buildCounterGoogleCloudRetailV2RemoveCatalogAttributeRequest = 0;
api.GoogleCloudRetailV2RemoveCatalogAttributeRequest
buildGoogleCloudRetailV2RemoveCatalogAttributeRequest() {
final o = api.GoogleCloudRetailV2RemoveCatalogAttributeRequest();
buildCounterGoogleCloudRetailV2RemoveCatalogAttributeRequest++;
if (buildCounterGoogleCloudRetailV2RemoveCatalogAttributeRequest < 3) {
o.key = 'foo';
}
buildCounterGoogleCloudRetailV2RemoveCatalogAttributeRequest--;
return o;
}
void checkGoogleCloudRetailV2RemoveCatalogAttributeRequest(
api.GoogleCloudRetailV2RemoveCatalogAttributeRequest o) {
buildCounterGoogleCloudRetailV2RemoveCatalogAttributeRequest++;
if (buildCounterGoogleCloudRetailV2RemoveCatalogAttributeRequest < 3) {
unittest.expect(
o.key!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RemoveCatalogAttributeRequest--;
}
core.int buildCounterGoogleCloudRetailV2RemoveControlRequest = 0;
api.GoogleCloudRetailV2RemoveControlRequest
buildGoogleCloudRetailV2RemoveControlRequest() {
final o = api.GoogleCloudRetailV2RemoveControlRequest();
buildCounterGoogleCloudRetailV2RemoveControlRequest++;
if (buildCounterGoogleCloudRetailV2RemoveControlRequest < 3) {
o.controlId = 'foo';
}
buildCounterGoogleCloudRetailV2RemoveControlRequest--;
return o;
}
void checkGoogleCloudRetailV2RemoveControlRequest(
api.GoogleCloudRetailV2RemoveControlRequest o) {
buildCounterGoogleCloudRetailV2RemoveControlRequest++;
if (buildCounterGoogleCloudRetailV2RemoveControlRequest < 3) {
unittest.expect(
o.controlId!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RemoveControlRequest--;
}
core.List<core.String> buildUnnamed51() => [
'foo',
'foo',
];
void checkUnnamed51(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 buildCounterGoogleCloudRetailV2RemoveFulfillmentPlacesRequest = 0;
api.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest
buildGoogleCloudRetailV2RemoveFulfillmentPlacesRequest() {
final o = api.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest();
buildCounterGoogleCloudRetailV2RemoveFulfillmentPlacesRequest++;
if (buildCounterGoogleCloudRetailV2RemoveFulfillmentPlacesRequest < 3) {
o.allowMissing = true;
o.placeIds = buildUnnamed51();
o.removeTime = 'foo';
o.type = 'foo';
}
buildCounterGoogleCloudRetailV2RemoveFulfillmentPlacesRequest--;
return o;
}
void checkGoogleCloudRetailV2RemoveFulfillmentPlacesRequest(
api.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest o) {
buildCounterGoogleCloudRetailV2RemoveFulfillmentPlacesRequest++;
if (buildCounterGoogleCloudRetailV2RemoveFulfillmentPlacesRequest < 3) {
unittest.expect(o.allowMissing!, unittest.isTrue);
checkUnnamed51(o.placeIds!);
unittest.expect(
o.removeTime!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RemoveFulfillmentPlacesRequest--;
}
core.List<core.String> buildUnnamed52() => [
'foo',
'foo',
];
void checkUnnamed52(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 buildCounterGoogleCloudRetailV2RemoveLocalInventoriesRequest = 0;
api.GoogleCloudRetailV2RemoveLocalInventoriesRequest
buildGoogleCloudRetailV2RemoveLocalInventoriesRequest() {
final o = api.GoogleCloudRetailV2RemoveLocalInventoriesRequest();
buildCounterGoogleCloudRetailV2RemoveLocalInventoriesRequest++;
if (buildCounterGoogleCloudRetailV2RemoveLocalInventoriesRequest < 3) {
o.allowMissing = true;
o.placeIds = buildUnnamed52();
o.removeTime = 'foo';
}
buildCounterGoogleCloudRetailV2RemoveLocalInventoriesRequest--;
return o;
}
void checkGoogleCloudRetailV2RemoveLocalInventoriesRequest(
api.GoogleCloudRetailV2RemoveLocalInventoriesRequest o) {
buildCounterGoogleCloudRetailV2RemoveLocalInventoriesRequest++;
if (buildCounterGoogleCloudRetailV2RemoveLocalInventoriesRequest < 3) {
unittest.expect(o.allowMissing!, unittest.isTrue);
checkUnnamed52(o.placeIds!);
unittest.expect(
o.removeTime!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RemoveLocalInventoriesRequest--;
}
core.int buildCounterGoogleCloudRetailV2ReplaceCatalogAttributeRequest = 0;
api.GoogleCloudRetailV2ReplaceCatalogAttributeRequest
buildGoogleCloudRetailV2ReplaceCatalogAttributeRequest() {
final o = api.GoogleCloudRetailV2ReplaceCatalogAttributeRequest();
buildCounterGoogleCloudRetailV2ReplaceCatalogAttributeRequest++;
if (buildCounterGoogleCloudRetailV2ReplaceCatalogAttributeRequest < 3) {
o.catalogAttribute = buildGoogleCloudRetailV2CatalogAttribute();
o.updateMask = 'foo';
}
buildCounterGoogleCloudRetailV2ReplaceCatalogAttributeRequest--;
return o;
}
void checkGoogleCloudRetailV2ReplaceCatalogAttributeRequest(
api.GoogleCloudRetailV2ReplaceCatalogAttributeRequest o) {
buildCounterGoogleCloudRetailV2ReplaceCatalogAttributeRequest++;
if (buildCounterGoogleCloudRetailV2ReplaceCatalogAttributeRequest < 3) {
checkGoogleCloudRetailV2CatalogAttribute(o.catalogAttribute!);
unittest.expect(
o.updateMask!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2ReplaceCatalogAttributeRequest--;
}
core.int buildCounterGoogleCloudRetailV2ResumeModelRequest = 0;
api.GoogleCloudRetailV2ResumeModelRequest
buildGoogleCloudRetailV2ResumeModelRequest() {
final o = api.GoogleCloudRetailV2ResumeModelRequest();
buildCounterGoogleCloudRetailV2ResumeModelRequest++;
if (buildCounterGoogleCloudRetailV2ResumeModelRequest < 3) {}
buildCounterGoogleCloudRetailV2ResumeModelRequest--;
return o;
}
void checkGoogleCloudRetailV2ResumeModelRequest(
api.GoogleCloudRetailV2ResumeModelRequest o) {
buildCounterGoogleCloudRetailV2ResumeModelRequest++;
if (buildCounterGoogleCloudRetailV2ResumeModelRequest < 3) {}
buildCounterGoogleCloudRetailV2ResumeModelRequest--;
}
core.int buildCounterGoogleCloudRetailV2Rule = 0;
api.GoogleCloudRetailV2Rule buildGoogleCloudRetailV2Rule() {
final o = api.GoogleCloudRetailV2Rule();
buildCounterGoogleCloudRetailV2Rule++;
if (buildCounterGoogleCloudRetailV2Rule < 3) {
o.boostAction = buildGoogleCloudRetailV2RuleBoostAction();
o.condition = buildGoogleCloudRetailV2Condition();
o.doNotAssociateAction = buildGoogleCloudRetailV2RuleDoNotAssociateAction();
o.filterAction = buildGoogleCloudRetailV2RuleFilterAction();
o.ignoreAction = buildGoogleCloudRetailV2RuleIgnoreAction();
o.onewaySynonymsAction = buildGoogleCloudRetailV2RuleOnewaySynonymsAction();
o.redirectAction = buildGoogleCloudRetailV2RuleRedirectAction();
o.replacementAction = buildGoogleCloudRetailV2RuleReplacementAction();
o.twowaySynonymsAction = buildGoogleCloudRetailV2RuleTwowaySynonymsAction();
}
buildCounterGoogleCloudRetailV2Rule--;
return o;
}
void checkGoogleCloudRetailV2Rule(api.GoogleCloudRetailV2Rule o) {
buildCounterGoogleCloudRetailV2Rule++;
if (buildCounterGoogleCloudRetailV2Rule < 3) {
checkGoogleCloudRetailV2RuleBoostAction(o.boostAction!);
checkGoogleCloudRetailV2Condition(o.condition!);
checkGoogleCloudRetailV2RuleDoNotAssociateAction(o.doNotAssociateAction!);
checkGoogleCloudRetailV2RuleFilterAction(o.filterAction!);
checkGoogleCloudRetailV2RuleIgnoreAction(o.ignoreAction!);
checkGoogleCloudRetailV2RuleOnewaySynonymsAction(o.onewaySynonymsAction!);
checkGoogleCloudRetailV2RuleRedirectAction(o.redirectAction!);
checkGoogleCloudRetailV2RuleReplacementAction(o.replacementAction!);
checkGoogleCloudRetailV2RuleTwowaySynonymsAction(o.twowaySynonymsAction!);
}
buildCounterGoogleCloudRetailV2Rule--;
}
core.int buildCounterGoogleCloudRetailV2RuleBoostAction = 0;
api.GoogleCloudRetailV2RuleBoostAction
buildGoogleCloudRetailV2RuleBoostAction() {
final o = api.GoogleCloudRetailV2RuleBoostAction();
buildCounterGoogleCloudRetailV2RuleBoostAction++;
if (buildCounterGoogleCloudRetailV2RuleBoostAction < 3) {
o.boost = 42.0;
o.productsFilter = 'foo';
}
buildCounterGoogleCloudRetailV2RuleBoostAction--;
return o;
}
void checkGoogleCloudRetailV2RuleBoostAction(
api.GoogleCloudRetailV2RuleBoostAction o) {
buildCounterGoogleCloudRetailV2RuleBoostAction++;
if (buildCounterGoogleCloudRetailV2RuleBoostAction < 3) {
unittest.expect(
o.boost!,
unittest.equals(42.0),
);
unittest.expect(
o.productsFilter!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RuleBoostAction--;
}
core.List<core.String> buildUnnamed53() => [
'foo',
'foo',
];
void checkUnnamed53(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.List<core.String> buildUnnamed54() => [
'foo',
'foo',
];
void checkUnnamed54(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.List<core.String> buildUnnamed55() => [
'foo',
'foo',
];
void checkUnnamed55(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 buildCounterGoogleCloudRetailV2RuleDoNotAssociateAction = 0;
api.GoogleCloudRetailV2RuleDoNotAssociateAction
buildGoogleCloudRetailV2RuleDoNotAssociateAction() {
final o = api.GoogleCloudRetailV2RuleDoNotAssociateAction();
buildCounterGoogleCloudRetailV2RuleDoNotAssociateAction++;
if (buildCounterGoogleCloudRetailV2RuleDoNotAssociateAction < 3) {
o.doNotAssociateTerms = buildUnnamed53();
o.queryTerms = buildUnnamed54();
o.terms = buildUnnamed55();
}
buildCounterGoogleCloudRetailV2RuleDoNotAssociateAction--;
return o;
}
void checkGoogleCloudRetailV2RuleDoNotAssociateAction(
api.GoogleCloudRetailV2RuleDoNotAssociateAction o) {
buildCounterGoogleCloudRetailV2RuleDoNotAssociateAction++;
if (buildCounterGoogleCloudRetailV2RuleDoNotAssociateAction < 3) {
checkUnnamed53(o.doNotAssociateTerms!);
checkUnnamed54(o.queryTerms!);
checkUnnamed55(o.terms!);
}
buildCounterGoogleCloudRetailV2RuleDoNotAssociateAction--;
}
core.int buildCounterGoogleCloudRetailV2RuleFilterAction = 0;
api.GoogleCloudRetailV2RuleFilterAction
buildGoogleCloudRetailV2RuleFilterAction() {
final o = api.GoogleCloudRetailV2RuleFilterAction();
buildCounterGoogleCloudRetailV2RuleFilterAction++;
if (buildCounterGoogleCloudRetailV2RuleFilterAction < 3) {
o.filter = 'foo';
}
buildCounterGoogleCloudRetailV2RuleFilterAction--;
return o;
}
void checkGoogleCloudRetailV2RuleFilterAction(
api.GoogleCloudRetailV2RuleFilterAction o) {
buildCounterGoogleCloudRetailV2RuleFilterAction++;
if (buildCounterGoogleCloudRetailV2RuleFilterAction < 3) {
unittest.expect(
o.filter!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RuleFilterAction--;
}
core.List<core.String> buildUnnamed56() => [
'foo',
'foo',
];
void checkUnnamed56(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 buildCounterGoogleCloudRetailV2RuleIgnoreAction = 0;
api.GoogleCloudRetailV2RuleIgnoreAction
buildGoogleCloudRetailV2RuleIgnoreAction() {
final o = api.GoogleCloudRetailV2RuleIgnoreAction();
buildCounterGoogleCloudRetailV2RuleIgnoreAction++;
if (buildCounterGoogleCloudRetailV2RuleIgnoreAction < 3) {
o.ignoreTerms = buildUnnamed56();
}
buildCounterGoogleCloudRetailV2RuleIgnoreAction--;
return o;
}
void checkGoogleCloudRetailV2RuleIgnoreAction(
api.GoogleCloudRetailV2RuleIgnoreAction o) {
buildCounterGoogleCloudRetailV2RuleIgnoreAction++;
if (buildCounterGoogleCloudRetailV2RuleIgnoreAction < 3) {
checkUnnamed56(o.ignoreTerms!);
}
buildCounterGoogleCloudRetailV2RuleIgnoreAction--;
}
core.List<core.String> buildUnnamed57() => [
'foo',
'foo',
];
void checkUnnamed57(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.List<core.String> buildUnnamed58() => [
'foo',
'foo',
];
void checkUnnamed58(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.List<core.String> buildUnnamed59() => [
'foo',
'foo',
];
void checkUnnamed59(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 buildCounterGoogleCloudRetailV2RuleOnewaySynonymsAction = 0;
api.GoogleCloudRetailV2RuleOnewaySynonymsAction
buildGoogleCloudRetailV2RuleOnewaySynonymsAction() {
final o = api.GoogleCloudRetailV2RuleOnewaySynonymsAction();
buildCounterGoogleCloudRetailV2RuleOnewaySynonymsAction++;
if (buildCounterGoogleCloudRetailV2RuleOnewaySynonymsAction < 3) {
o.onewayTerms = buildUnnamed57();
o.queryTerms = buildUnnamed58();
o.synonyms = buildUnnamed59();
}
buildCounterGoogleCloudRetailV2RuleOnewaySynonymsAction--;
return o;
}
void checkGoogleCloudRetailV2RuleOnewaySynonymsAction(
api.GoogleCloudRetailV2RuleOnewaySynonymsAction o) {
buildCounterGoogleCloudRetailV2RuleOnewaySynonymsAction++;
if (buildCounterGoogleCloudRetailV2RuleOnewaySynonymsAction < 3) {
checkUnnamed57(o.onewayTerms!);
checkUnnamed58(o.queryTerms!);
checkUnnamed59(o.synonyms!);
}
buildCounterGoogleCloudRetailV2RuleOnewaySynonymsAction--;
}
core.int buildCounterGoogleCloudRetailV2RuleRedirectAction = 0;
api.GoogleCloudRetailV2RuleRedirectAction
buildGoogleCloudRetailV2RuleRedirectAction() {
final o = api.GoogleCloudRetailV2RuleRedirectAction();
buildCounterGoogleCloudRetailV2RuleRedirectAction++;
if (buildCounterGoogleCloudRetailV2RuleRedirectAction < 3) {
o.redirectUri = 'foo';
}
buildCounterGoogleCloudRetailV2RuleRedirectAction--;
return o;
}
void checkGoogleCloudRetailV2RuleRedirectAction(
api.GoogleCloudRetailV2RuleRedirectAction o) {
buildCounterGoogleCloudRetailV2RuleRedirectAction++;
if (buildCounterGoogleCloudRetailV2RuleRedirectAction < 3) {
unittest.expect(
o.redirectUri!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RuleRedirectAction--;
}
core.List<core.String> buildUnnamed60() => [
'foo',
'foo',
];
void checkUnnamed60(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 buildCounterGoogleCloudRetailV2RuleReplacementAction = 0;
api.GoogleCloudRetailV2RuleReplacementAction
buildGoogleCloudRetailV2RuleReplacementAction() {
final o = api.GoogleCloudRetailV2RuleReplacementAction();
buildCounterGoogleCloudRetailV2RuleReplacementAction++;
if (buildCounterGoogleCloudRetailV2RuleReplacementAction < 3) {
o.queryTerms = buildUnnamed60();
o.replacementTerm = 'foo';
o.term = 'foo';
}
buildCounterGoogleCloudRetailV2RuleReplacementAction--;
return o;
}
void checkGoogleCloudRetailV2RuleReplacementAction(
api.GoogleCloudRetailV2RuleReplacementAction o) {
buildCounterGoogleCloudRetailV2RuleReplacementAction++;
if (buildCounterGoogleCloudRetailV2RuleReplacementAction < 3) {
checkUnnamed60(o.queryTerms!);
unittest.expect(
o.replacementTerm!,
unittest.equals('foo'),
);
unittest.expect(
o.term!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2RuleReplacementAction--;
}
core.List<core.String> buildUnnamed61() => [
'foo',
'foo',
];
void checkUnnamed61(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 buildCounterGoogleCloudRetailV2RuleTwowaySynonymsAction = 0;
api.GoogleCloudRetailV2RuleTwowaySynonymsAction
buildGoogleCloudRetailV2RuleTwowaySynonymsAction() {
final o = api.GoogleCloudRetailV2RuleTwowaySynonymsAction();
buildCounterGoogleCloudRetailV2RuleTwowaySynonymsAction++;
if (buildCounterGoogleCloudRetailV2RuleTwowaySynonymsAction < 3) {
o.synonyms = buildUnnamed61();
}
buildCounterGoogleCloudRetailV2RuleTwowaySynonymsAction--;
return o;
}
void checkGoogleCloudRetailV2RuleTwowaySynonymsAction(
api.GoogleCloudRetailV2RuleTwowaySynonymsAction o) {
buildCounterGoogleCloudRetailV2RuleTwowaySynonymsAction++;
if (buildCounterGoogleCloudRetailV2RuleTwowaySynonymsAction < 3) {
checkUnnamed61(o.synonyms!);
}
buildCounterGoogleCloudRetailV2RuleTwowaySynonymsAction--;
}
core.List<api.GoogleCloudRetailV2SearchRequestFacetSpec> buildUnnamed62() => [
buildGoogleCloudRetailV2SearchRequestFacetSpec(),
buildGoogleCloudRetailV2SearchRequestFacetSpec(),
];
void checkUnnamed62(
core.List<api.GoogleCloudRetailV2SearchRequestFacetSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2SearchRequestFacetSpec(o[0]);
checkGoogleCloudRetailV2SearchRequestFacetSpec(o[1]);
}
core.Map<core.String, core.String> buildUnnamed63() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed63(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.List<core.String> buildUnnamed64() => [
'foo',
'foo',
];
void checkUnnamed64(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.List<core.String> buildUnnamed65() => [
'foo',
'foo',
];
void checkUnnamed65(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 buildCounterGoogleCloudRetailV2SearchRequest = 0;
api.GoogleCloudRetailV2SearchRequest buildGoogleCloudRetailV2SearchRequest() {
final o = api.GoogleCloudRetailV2SearchRequest();
buildCounterGoogleCloudRetailV2SearchRequest++;
if (buildCounterGoogleCloudRetailV2SearchRequest < 3) {
o.boostSpec = buildGoogleCloudRetailV2SearchRequestBoostSpec();
o.branch = 'foo';
o.canonicalFilter = 'foo';
o.dynamicFacetSpec =
buildGoogleCloudRetailV2SearchRequestDynamicFacetSpec();
o.entity = 'foo';
o.facetSpecs = buildUnnamed62();
o.filter = 'foo';
o.labels = buildUnnamed63();
o.offset = 42;
o.orderBy = 'foo';
o.pageCategories = buildUnnamed64();
o.pageSize = 42;
o.pageToken = 'foo';
o.personalizationSpec =
buildGoogleCloudRetailV2SearchRequestPersonalizationSpec();
o.query = 'foo';
o.queryExpansionSpec =
buildGoogleCloudRetailV2SearchRequestQueryExpansionSpec();
o.searchMode = 'foo';
o.spellCorrectionSpec =
buildGoogleCloudRetailV2SearchRequestSpellCorrectionSpec();
o.userInfo = buildGoogleCloudRetailV2UserInfo();
o.variantRollupKeys = buildUnnamed65();
o.visitorId = 'foo';
}
buildCounterGoogleCloudRetailV2SearchRequest--;
return o;
}
void checkGoogleCloudRetailV2SearchRequest(
api.GoogleCloudRetailV2SearchRequest o) {
buildCounterGoogleCloudRetailV2SearchRequest++;
if (buildCounterGoogleCloudRetailV2SearchRequest < 3) {
checkGoogleCloudRetailV2SearchRequestBoostSpec(o.boostSpec!);
unittest.expect(
o.branch!,
unittest.equals('foo'),
);
unittest.expect(
o.canonicalFilter!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2SearchRequestDynamicFacetSpec(o.dynamicFacetSpec!);
unittest.expect(
o.entity!,
unittest.equals('foo'),
);
checkUnnamed62(o.facetSpecs!);
unittest.expect(
o.filter!,
unittest.equals('foo'),
);
checkUnnamed63(o.labels!);
unittest.expect(
o.offset!,
unittest.equals(42),
);
unittest.expect(
o.orderBy!,
unittest.equals('foo'),
);
checkUnnamed64(o.pageCategories!);
unittest.expect(
o.pageSize!,
unittest.equals(42),
);
unittest.expect(
o.pageToken!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2SearchRequestPersonalizationSpec(
o.personalizationSpec!);
unittest.expect(
o.query!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2SearchRequestQueryExpansionSpec(
o.queryExpansionSpec!);
unittest.expect(
o.searchMode!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2SearchRequestSpellCorrectionSpec(
o.spellCorrectionSpec!);
checkGoogleCloudRetailV2UserInfo(o.userInfo!);
checkUnnamed65(o.variantRollupKeys!);
unittest.expect(
o.visitorId!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SearchRequest--;
}
core.List<api.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec>
buildUnnamed66() => [
buildGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(),
buildGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(),
];
void checkUnnamed66(
core.List<api.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec>
o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(o[0]);
checkGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(o[1]);
}
core.int buildCounterGoogleCloudRetailV2SearchRequestBoostSpec = 0;
api.GoogleCloudRetailV2SearchRequestBoostSpec
buildGoogleCloudRetailV2SearchRequestBoostSpec() {
final o = api.GoogleCloudRetailV2SearchRequestBoostSpec();
buildCounterGoogleCloudRetailV2SearchRequestBoostSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestBoostSpec < 3) {
o.conditionBoostSpecs = buildUnnamed66();
o.skipBoostSpecValidation = true;
}
buildCounterGoogleCloudRetailV2SearchRequestBoostSpec--;
return o;
}
void checkGoogleCloudRetailV2SearchRequestBoostSpec(
api.GoogleCloudRetailV2SearchRequestBoostSpec o) {
buildCounterGoogleCloudRetailV2SearchRequestBoostSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestBoostSpec < 3) {
checkUnnamed66(o.conditionBoostSpecs!);
unittest.expect(o.skipBoostSpecValidation!, unittest.isTrue);
}
buildCounterGoogleCloudRetailV2SearchRequestBoostSpec--;
}
core.int
buildCounterGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec = 0;
api.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec
buildGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec() {
final o = api.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec();
buildCounterGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec <
3) {
o.boost = 42.0;
o.condition = 'foo';
}
buildCounterGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec--;
return o;
}
void checkGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(
api.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec o) {
buildCounterGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec <
3) {
unittest.expect(
o.boost!,
unittest.equals(42.0),
);
unittest.expect(
o.condition!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec--;
}
core.int buildCounterGoogleCloudRetailV2SearchRequestDynamicFacetSpec = 0;
api.GoogleCloudRetailV2SearchRequestDynamicFacetSpec
buildGoogleCloudRetailV2SearchRequestDynamicFacetSpec() {
final o = api.GoogleCloudRetailV2SearchRequestDynamicFacetSpec();
buildCounterGoogleCloudRetailV2SearchRequestDynamicFacetSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestDynamicFacetSpec < 3) {
o.mode = 'foo';
}
buildCounterGoogleCloudRetailV2SearchRequestDynamicFacetSpec--;
return o;
}
void checkGoogleCloudRetailV2SearchRequestDynamicFacetSpec(
api.GoogleCloudRetailV2SearchRequestDynamicFacetSpec o) {
buildCounterGoogleCloudRetailV2SearchRequestDynamicFacetSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestDynamicFacetSpec < 3) {
unittest.expect(
o.mode!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SearchRequestDynamicFacetSpec--;
}
core.List<core.String> buildUnnamed67() => [
'foo',
'foo',
];
void checkUnnamed67(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 buildCounterGoogleCloudRetailV2SearchRequestFacetSpec = 0;
api.GoogleCloudRetailV2SearchRequestFacetSpec
buildGoogleCloudRetailV2SearchRequestFacetSpec() {
final o = api.GoogleCloudRetailV2SearchRequestFacetSpec();
buildCounterGoogleCloudRetailV2SearchRequestFacetSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestFacetSpec < 3) {
o.enableDynamicPosition = true;
o.excludedFilterKeys = buildUnnamed67();
o.facetKey = buildGoogleCloudRetailV2SearchRequestFacetSpecFacetKey();
o.limit = 42;
}
buildCounterGoogleCloudRetailV2SearchRequestFacetSpec--;
return o;
}
void checkGoogleCloudRetailV2SearchRequestFacetSpec(
api.GoogleCloudRetailV2SearchRequestFacetSpec o) {
buildCounterGoogleCloudRetailV2SearchRequestFacetSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestFacetSpec < 3) {
unittest.expect(o.enableDynamicPosition!, unittest.isTrue);
checkUnnamed67(o.excludedFilterKeys!);
checkGoogleCloudRetailV2SearchRequestFacetSpecFacetKey(o.facetKey!);
unittest.expect(
o.limit!,
unittest.equals(42),
);
}
buildCounterGoogleCloudRetailV2SearchRequestFacetSpec--;
}
core.List<core.String> buildUnnamed68() => [
'foo',
'foo',
];
void checkUnnamed68(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.List<api.GoogleCloudRetailV2Interval> buildUnnamed69() => [
buildGoogleCloudRetailV2Interval(),
buildGoogleCloudRetailV2Interval(),
];
void checkUnnamed69(core.List<api.GoogleCloudRetailV2Interval> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2Interval(o[0]);
checkGoogleCloudRetailV2Interval(o[1]);
}
core.List<core.String> buildUnnamed70() => [
'foo',
'foo',
];
void checkUnnamed70(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.List<core.String> buildUnnamed71() => [
'foo',
'foo',
];
void checkUnnamed71(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 buildCounterGoogleCloudRetailV2SearchRequestFacetSpecFacetKey = 0;
api.GoogleCloudRetailV2SearchRequestFacetSpecFacetKey
buildGoogleCloudRetailV2SearchRequestFacetSpecFacetKey() {
final o = api.GoogleCloudRetailV2SearchRequestFacetSpecFacetKey();
buildCounterGoogleCloudRetailV2SearchRequestFacetSpecFacetKey++;
if (buildCounterGoogleCloudRetailV2SearchRequestFacetSpecFacetKey < 3) {
o.caseInsensitive = true;
o.contains = buildUnnamed68();
o.intervals = buildUnnamed69();
o.key = 'foo';
o.orderBy = 'foo';
o.prefixes = buildUnnamed70();
o.query = 'foo';
o.restrictedValues = buildUnnamed71();
o.returnMinMax = true;
}
buildCounterGoogleCloudRetailV2SearchRequestFacetSpecFacetKey--;
return o;
}
void checkGoogleCloudRetailV2SearchRequestFacetSpecFacetKey(
api.GoogleCloudRetailV2SearchRequestFacetSpecFacetKey o) {
buildCounterGoogleCloudRetailV2SearchRequestFacetSpecFacetKey++;
if (buildCounterGoogleCloudRetailV2SearchRequestFacetSpecFacetKey < 3) {
unittest.expect(o.caseInsensitive!, unittest.isTrue);
checkUnnamed68(o.contains!);
checkUnnamed69(o.intervals!);
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(
o.orderBy!,
unittest.equals('foo'),
);
checkUnnamed70(o.prefixes!);
unittest.expect(
o.query!,
unittest.equals('foo'),
);
checkUnnamed71(o.restrictedValues!);
unittest.expect(o.returnMinMax!, unittest.isTrue);
}
buildCounterGoogleCloudRetailV2SearchRequestFacetSpecFacetKey--;
}
core.int buildCounterGoogleCloudRetailV2SearchRequestPersonalizationSpec = 0;
api.GoogleCloudRetailV2SearchRequestPersonalizationSpec
buildGoogleCloudRetailV2SearchRequestPersonalizationSpec() {
final o = api.GoogleCloudRetailV2SearchRequestPersonalizationSpec();
buildCounterGoogleCloudRetailV2SearchRequestPersonalizationSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestPersonalizationSpec < 3) {
o.mode = 'foo';
}
buildCounterGoogleCloudRetailV2SearchRequestPersonalizationSpec--;
return o;
}
void checkGoogleCloudRetailV2SearchRequestPersonalizationSpec(
api.GoogleCloudRetailV2SearchRequestPersonalizationSpec o) {
buildCounterGoogleCloudRetailV2SearchRequestPersonalizationSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestPersonalizationSpec < 3) {
unittest.expect(
o.mode!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SearchRequestPersonalizationSpec--;
}
core.int buildCounterGoogleCloudRetailV2SearchRequestQueryExpansionSpec = 0;
api.GoogleCloudRetailV2SearchRequestQueryExpansionSpec
buildGoogleCloudRetailV2SearchRequestQueryExpansionSpec() {
final o = api.GoogleCloudRetailV2SearchRequestQueryExpansionSpec();
buildCounterGoogleCloudRetailV2SearchRequestQueryExpansionSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestQueryExpansionSpec < 3) {
o.condition = 'foo';
o.pinUnexpandedResults = true;
}
buildCounterGoogleCloudRetailV2SearchRequestQueryExpansionSpec--;
return o;
}
void checkGoogleCloudRetailV2SearchRequestQueryExpansionSpec(
api.GoogleCloudRetailV2SearchRequestQueryExpansionSpec o) {
buildCounterGoogleCloudRetailV2SearchRequestQueryExpansionSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestQueryExpansionSpec < 3) {
unittest.expect(
o.condition!,
unittest.equals('foo'),
);
unittest.expect(o.pinUnexpandedResults!, unittest.isTrue);
}
buildCounterGoogleCloudRetailV2SearchRequestQueryExpansionSpec--;
}
core.int buildCounterGoogleCloudRetailV2SearchRequestSpellCorrectionSpec = 0;
api.GoogleCloudRetailV2SearchRequestSpellCorrectionSpec
buildGoogleCloudRetailV2SearchRequestSpellCorrectionSpec() {
final o = api.GoogleCloudRetailV2SearchRequestSpellCorrectionSpec();
buildCounterGoogleCloudRetailV2SearchRequestSpellCorrectionSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestSpellCorrectionSpec < 3) {
o.mode = 'foo';
}
buildCounterGoogleCloudRetailV2SearchRequestSpellCorrectionSpec--;
return o;
}
void checkGoogleCloudRetailV2SearchRequestSpellCorrectionSpec(
api.GoogleCloudRetailV2SearchRequestSpellCorrectionSpec o) {
buildCounterGoogleCloudRetailV2SearchRequestSpellCorrectionSpec++;
if (buildCounterGoogleCloudRetailV2SearchRequestSpellCorrectionSpec < 3) {
unittest.expect(
o.mode!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SearchRequestSpellCorrectionSpec--;
}
core.List<core.String> buildUnnamed72() => [
'foo',
'foo',
];
void checkUnnamed72(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.List<api.GoogleCloudRetailV2ExperimentInfo> buildUnnamed73() => [
buildGoogleCloudRetailV2ExperimentInfo(),
buildGoogleCloudRetailV2ExperimentInfo(),
];
void checkUnnamed73(core.List<api.GoogleCloudRetailV2ExperimentInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2ExperimentInfo(o[0]);
checkGoogleCloudRetailV2ExperimentInfo(o[1]);
}
core.List<api.GoogleCloudRetailV2SearchResponseFacet> buildUnnamed74() => [
buildGoogleCloudRetailV2SearchResponseFacet(),
buildGoogleCloudRetailV2SearchResponseFacet(),
];
void checkUnnamed74(core.List<api.GoogleCloudRetailV2SearchResponseFacet> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2SearchResponseFacet(o[0]);
checkGoogleCloudRetailV2SearchResponseFacet(o[1]);
}
core.List<api.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec>
buildUnnamed75() => [
buildGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(),
buildGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(),
];
void checkUnnamed75(
core.List<api.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec>
o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(o[0]);
checkGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(o[1]);
}
core.List<api.GoogleCloudRetailV2SearchResponseSearchResult> buildUnnamed76() =>
[
buildGoogleCloudRetailV2SearchResponseSearchResult(),
buildGoogleCloudRetailV2SearchResponseSearchResult(),
];
void checkUnnamed76(
core.List<api.GoogleCloudRetailV2SearchResponseSearchResult> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2SearchResponseSearchResult(o[0]);
checkGoogleCloudRetailV2SearchResponseSearchResult(o[1]);
}
core.int buildCounterGoogleCloudRetailV2SearchResponse = 0;
api.GoogleCloudRetailV2SearchResponse buildGoogleCloudRetailV2SearchResponse() {
final o = api.GoogleCloudRetailV2SearchResponse();
buildCounterGoogleCloudRetailV2SearchResponse++;
if (buildCounterGoogleCloudRetailV2SearchResponse < 3) {
o.appliedControls = buildUnnamed72();
o.attributionToken = 'foo';
o.correctedQuery = 'foo';
o.experimentInfo = buildUnnamed73();
o.facets = buildUnnamed74();
o.invalidConditionBoostSpecs = buildUnnamed75();
o.nextPageToken = 'foo';
o.queryExpansionInfo =
buildGoogleCloudRetailV2SearchResponseQueryExpansionInfo();
o.redirectUri = 'foo';
o.results = buildUnnamed76();
o.totalSize = 42;
}
buildCounterGoogleCloudRetailV2SearchResponse--;
return o;
}
void checkGoogleCloudRetailV2SearchResponse(
api.GoogleCloudRetailV2SearchResponse o) {
buildCounterGoogleCloudRetailV2SearchResponse++;
if (buildCounterGoogleCloudRetailV2SearchResponse < 3) {
checkUnnamed72(o.appliedControls!);
unittest.expect(
o.attributionToken!,
unittest.equals('foo'),
);
unittest.expect(
o.correctedQuery!,
unittest.equals('foo'),
);
checkUnnamed73(o.experimentInfo!);
checkUnnamed74(o.facets!);
checkUnnamed75(o.invalidConditionBoostSpecs!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2SearchResponseQueryExpansionInfo(
o.queryExpansionInfo!);
unittest.expect(
o.redirectUri!,
unittest.equals('foo'),
);
checkUnnamed76(o.results!);
unittest.expect(
o.totalSize!,
unittest.equals(42),
);
}
buildCounterGoogleCloudRetailV2SearchResponse--;
}
core.List<api.GoogleCloudRetailV2SearchResponseFacetFacetValue>
buildUnnamed77() => [
buildGoogleCloudRetailV2SearchResponseFacetFacetValue(),
buildGoogleCloudRetailV2SearchResponseFacetFacetValue(),
];
void checkUnnamed77(
core.List<api.GoogleCloudRetailV2SearchResponseFacetFacetValue> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2SearchResponseFacetFacetValue(o[0]);
checkGoogleCloudRetailV2SearchResponseFacetFacetValue(o[1]);
}
core.int buildCounterGoogleCloudRetailV2SearchResponseFacet = 0;
api.GoogleCloudRetailV2SearchResponseFacet
buildGoogleCloudRetailV2SearchResponseFacet() {
final o = api.GoogleCloudRetailV2SearchResponseFacet();
buildCounterGoogleCloudRetailV2SearchResponseFacet++;
if (buildCounterGoogleCloudRetailV2SearchResponseFacet < 3) {
o.dynamicFacet = true;
o.key = 'foo';
o.values = buildUnnamed77();
}
buildCounterGoogleCloudRetailV2SearchResponseFacet--;
return o;
}
void checkGoogleCloudRetailV2SearchResponseFacet(
api.GoogleCloudRetailV2SearchResponseFacet o) {
buildCounterGoogleCloudRetailV2SearchResponseFacet++;
if (buildCounterGoogleCloudRetailV2SearchResponseFacet < 3) {
unittest.expect(o.dynamicFacet!, unittest.isTrue);
unittest.expect(
o.key!,
unittest.equals('foo'),
);
checkUnnamed77(o.values!);
}
buildCounterGoogleCloudRetailV2SearchResponseFacet--;
}
core.int buildCounterGoogleCloudRetailV2SearchResponseFacetFacetValue = 0;
api.GoogleCloudRetailV2SearchResponseFacetFacetValue
buildGoogleCloudRetailV2SearchResponseFacetFacetValue() {
final o = api.GoogleCloudRetailV2SearchResponseFacetFacetValue();
buildCounterGoogleCloudRetailV2SearchResponseFacetFacetValue++;
if (buildCounterGoogleCloudRetailV2SearchResponseFacetFacetValue < 3) {
o.count = 'foo';
o.interval = buildGoogleCloudRetailV2Interval();
o.maxValue = 42.0;
o.minValue = 42.0;
o.value = 'foo';
}
buildCounterGoogleCloudRetailV2SearchResponseFacetFacetValue--;
return o;
}
void checkGoogleCloudRetailV2SearchResponseFacetFacetValue(
api.GoogleCloudRetailV2SearchResponseFacetFacetValue o) {
buildCounterGoogleCloudRetailV2SearchResponseFacetFacetValue++;
if (buildCounterGoogleCloudRetailV2SearchResponseFacetFacetValue < 3) {
unittest.expect(
o.count!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2Interval(o.interval!);
unittest.expect(
o.maxValue!,
unittest.equals(42.0),
);
unittest.expect(
o.minValue!,
unittest.equals(42.0),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SearchResponseFacetFacetValue--;
}
core.int buildCounterGoogleCloudRetailV2SearchResponseQueryExpansionInfo = 0;
api.GoogleCloudRetailV2SearchResponseQueryExpansionInfo
buildGoogleCloudRetailV2SearchResponseQueryExpansionInfo() {
final o = api.GoogleCloudRetailV2SearchResponseQueryExpansionInfo();
buildCounterGoogleCloudRetailV2SearchResponseQueryExpansionInfo++;
if (buildCounterGoogleCloudRetailV2SearchResponseQueryExpansionInfo < 3) {
o.expandedQuery = true;
o.pinnedResultCount = 'foo';
}
buildCounterGoogleCloudRetailV2SearchResponseQueryExpansionInfo--;
return o;
}
void checkGoogleCloudRetailV2SearchResponseQueryExpansionInfo(
api.GoogleCloudRetailV2SearchResponseQueryExpansionInfo o) {
buildCounterGoogleCloudRetailV2SearchResponseQueryExpansionInfo++;
if (buildCounterGoogleCloudRetailV2SearchResponseQueryExpansionInfo < 3) {
unittest.expect(o.expandedQuery!, unittest.isTrue);
unittest.expect(
o.pinnedResultCount!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SearchResponseQueryExpansionInfo--;
}
core.Map<core.String, core.String> buildUnnamed78() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed78(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.List<core.String> buildUnnamed79() => [
'foo',
'foo',
];
void checkUnnamed79(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.Map<core.String, core.Object?> buildUnnamed80() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed80(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'),
);
}
core.int buildCounterGoogleCloudRetailV2SearchResponseSearchResult = 0;
api.GoogleCloudRetailV2SearchResponseSearchResult
buildGoogleCloudRetailV2SearchResponseSearchResult() {
final o = api.GoogleCloudRetailV2SearchResponseSearchResult();
buildCounterGoogleCloudRetailV2SearchResponseSearchResult++;
if (buildCounterGoogleCloudRetailV2SearchResponseSearchResult < 3) {
o.id = 'foo';
o.matchingVariantCount = 42;
o.matchingVariantFields = buildUnnamed78();
o.personalLabels = buildUnnamed79();
o.product = buildGoogleCloudRetailV2Product();
o.variantRollupValues = buildUnnamed80();
}
buildCounterGoogleCloudRetailV2SearchResponseSearchResult--;
return o;
}
void checkGoogleCloudRetailV2SearchResponseSearchResult(
api.GoogleCloudRetailV2SearchResponseSearchResult o) {
buildCounterGoogleCloudRetailV2SearchResponseSearchResult++;
if (buildCounterGoogleCloudRetailV2SearchResponseSearchResult < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.matchingVariantCount!,
unittest.equals(42),
);
checkUnnamed78(o.matchingVariantFields!);
checkUnnamed79(o.personalLabels!);
checkGoogleCloudRetailV2Product(o.product!);
checkUnnamed80(o.variantRollupValues!);
}
buildCounterGoogleCloudRetailV2SearchResponseSearchResult--;
}
core.List<core.String> buildUnnamed81() => [
'foo',
'foo',
];
void checkUnnamed81(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.List<core.String> buildUnnamed82() => [
'foo',
'foo',
];
void checkUnnamed82(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.List<core.String> buildUnnamed83() => [
'foo',
'foo',
];
void checkUnnamed83(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.List<core.String> buildUnnamed84() => [
'foo',
'foo',
];
void checkUnnamed84(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.List<core.String> buildUnnamed85() => [
'foo',
'foo',
];
void checkUnnamed85(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.List<core.String> buildUnnamed86() => [
'foo',
'foo',
];
void checkUnnamed86(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.List<core.String> buildUnnamed87() => [
'foo',
'foo',
];
void checkUnnamed87(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.List<core.String> buildUnnamed88() => [
'foo',
'foo',
];
void checkUnnamed88(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.List<core.String> buildUnnamed89() => [
'foo',
'foo',
];
void checkUnnamed89(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.List<core.String> buildUnnamed90() => [
'foo',
'foo',
];
void checkUnnamed90(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 buildCounterGoogleCloudRetailV2ServingConfig = 0;
api.GoogleCloudRetailV2ServingConfig buildGoogleCloudRetailV2ServingConfig() {
final o = api.GoogleCloudRetailV2ServingConfig();
buildCounterGoogleCloudRetailV2ServingConfig++;
if (buildCounterGoogleCloudRetailV2ServingConfig < 3) {
o.boostControlIds = buildUnnamed81();
o.displayName = 'foo';
o.diversityLevel = 'foo';
o.diversityType = 'foo';
o.doNotAssociateControlIds = buildUnnamed82();
o.dynamicFacetSpec =
buildGoogleCloudRetailV2SearchRequestDynamicFacetSpec();
o.enableCategoryFilterLevel = 'foo';
o.facetControlIds = buildUnnamed83();
o.filterControlIds = buildUnnamed84();
o.ignoreControlIds = buildUnnamed85();
o.modelId = 'foo';
o.name = 'foo';
o.onewaySynonymsControlIds = buildUnnamed86();
o.personalizationSpec =
buildGoogleCloudRetailV2SearchRequestPersonalizationSpec();
o.priceRerankingLevel = 'foo';
o.redirectControlIds = buildUnnamed87();
o.replacementControlIds = buildUnnamed88();
o.solutionTypes = buildUnnamed89();
o.twowaySynonymsControlIds = buildUnnamed90();
}
buildCounterGoogleCloudRetailV2ServingConfig--;
return o;
}
void checkGoogleCloudRetailV2ServingConfig(
api.GoogleCloudRetailV2ServingConfig o) {
buildCounterGoogleCloudRetailV2ServingConfig++;
if (buildCounterGoogleCloudRetailV2ServingConfig < 3) {
checkUnnamed81(o.boostControlIds!);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.diversityLevel!,
unittest.equals('foo'),
);
unittest.expect(
o.diversityType!,
unittest.equals('foo'),
);
checkUnnamed82(o.doNotAssociateControlIds!);
checkGoogleCloudRetailV2SearchRequestDynamicFacetSpec(o.dynamicFacetSpec!);
unittest.expect(
o.enableCategoryFilterLevel!,
unittest.equals('foo'),
);
checkUnnamed83(o.facetControlIds!);
checkUnnamed84(o.filterControlIds!);
checkUnnamed85(o.ignoreControlIds!);
unittest.expect(
o.modelId!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed86(o.onewaySynonymsControlIds!);
checkGoogleCloudRetailV2SearchRequestPersonalizationSpec(
o.personalizationSpec!);
unittest.expect(
o.priceRerankingLevel!,
unittest.equals('foo'),
);
checkUnnamed87(o.redirectControlIds!);
checkUnnamed88(o.replacementControlIds!);
checkUnnamed89(o.solutionTypes!);
checkUnnamed90(o.twowaySynonymsControlIds!);
}
buildCounterGoogleCloudRetailV2ServingConfig--;
}
core.int buildCounterGoogleCloudRetailV2SetDefaultBranchRequest = 0;
api.GoogleCloudRetailV2SetDefaultBranchRequest
buildGoogleCloudRetailV2SetDefaultBranchRequest() {
final o = api.GoogleCloudRetailV2SetDefaultBranchRequest();
buildCounterGoogleCloudRetailV2SetDefaultBranchRequest++;
if (buildCounterGoogleCloudRetailV2SetDefaultBranchRequest < 3) {
o.branchId = 'foo';
o.force = true;
o.note = 'foo';
}
buildCounterGoogleCloudRetailV2SetDefaultBranchRequest--;
return o;
}
void checkGoogleCloudRetailV2SetDefaultBranchRequest(
api.GoogleCloudRetailV2SetDefaultBranchRequest o) {
buildCounterGoogleCloudRetailV2SetDefaultBranchRequest++;
if (buildCounterGoogleCloudRetailV2SetDefaultBranchRequest < 3) {
unittest.expect(
o.branchId!,
unittest.equals('foo'),
);
unittest.expect(o.force!, unittest.isTrue);
unittest.expect(
o.note!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SetDefaultBranchRequest--;
}
core.int buildCounterGoogleCloudRetailV2SetInventoryRequest = 0;
api.GoogleCloudRetailV2SetInventoryRequest
buildGoogleCloudRetailV2SetInventoryRequest() {
final o = api.GoogleCloudRetailV2SetInventoryRequest();
buildCounterGoogleCloudRetailV2SetInventoryRequest++;
if (buildCounterGoogleCloudRetailV2SetInventoryRequest < 3) {
o.allowMissing = true;
o.inventory = buildGoogleCloudRetailV2Product();
o.setMask = 'foo';
o.setTime = 'foo';
}
buildCounterGoogleCloudRetailV2SetInventoryRequest--;
return o;
}
void checkGoogleCloudRetailV2SetInventoryRequest(
api.GoogleCloudRetailV2SetInventoryRequest o) {
buildCounterGoogleCloudRetailV2SetInventoryRequest++;
if (buildCounterGoogleCloudRetailV2SetInventoryRequest < 3) {
unittest.expect(o.allowMissing!, unittest.isTrue);
checkGoogleCloudRetailV2Product(o.inventory!);
unittest.expect(
o.setMask!,
unittest.equals('foo'),
);
unittest.expect(
o.setTime!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2SetInventoryRequest--;
}
core.int buildCounterGoogleCloudRetailV2TuneModelRequest = 0;
api.GoogleCloudRetailV2TuneModelRequest
buildGoogleCloudRetailV2TuneModelRequest() {
final o = api.GoogleCloudRetailV2TuneModelRequest();
buildCounterGoogleCloudRetailV2TuneModelRequest++;
if (buildCounterGoogleCloudRetailV2TuneModelRequest < 3) {}
buildCounterGoogleCloudRetailV2TuneModelRequest--;
return o;
}
void checkGoogleCloudRetailV2TuneModelRequest(
api.GoogleCloudRetailV2TuneModelRequest o) {
buildCounterGoogleCloudRetailV2TuneModelRequest++;
if (buildCounterGoogleCloudRetailV2TuneModelRequest < 3) {}
buildCounterGoogleCloudRetailV2TuneModelRequest--;
}
core.Map<core.String, api.GoogleCloudRetailV2CustomAttribute>
buildUnnamed91() => {
'x': buildGoogleCloudRetailV2CustomAttribute(),
'y': buildGoogleCloudRetailV2CustomAttribute(),
};
void checkUnnamed91(
core.Map<core.String, api.GoogleCloudRetailV2CustomAttribute> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2CustomAttribute(o['x']!);
checkGoogleCloudRetailV2CustomAttribute(o['y']!);
}
core.List<core.String> buildUnnamed92() => [
'foo',
'foo',
];
void checkUnnamed92(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.List<core.String> buildUnnamed93() => [
'foo',
'foo',
];
void checkUnnamed93(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.List<api.GoogleCloudRetailV2ProductDetail> buildUnnamed94() => [
buildGoogleCloudRetailV2ProductDetail(),
buildGoogleCloudRetailV2ProductDetail(),
];
void checkUnnamed94(core.List<api.GoogleCloudRetailV2ProductDetail> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2ProductDetail(o[0]);
checkGoogleCloudRetailV2ProductDetail(o[1]);
}
core.int buildCounterGoogleCloudRetailV2UserEvent = 0;
api.GoogleCloudRetailV2UserEvent buildGoogleCloudRetailV2UserEvent() {
final o = api.GoogleCloudRetailV2UserEvent();
buildCounterGoogleCloudRetailV2UserEvent++;
if (buildCounterGoogleCloudRetailV2UserEvent < 3) {
o.attributes = buildUnnamed91();
o.attributionToken = 'foo';
o.cartId = 'foo';
o.completionDetail = buildGoogleCloudRetailV2CompletionDetail();
o.entity = 'foo';
o.eventTime = 'foo';
o.eventType = 'foo';
o.experimentIds = buildUnnamed92();
o.filter = 'foo';
o.offset = 42;
o.orderBy = 'foo';
o.pageCategories = buildUnnamed93();
o.pageViewId = 'foo';
o.productDetails = buildUnnamed94();
o.purchaseTransaction = buildGoogleCloudRetailV2PurchaseTransaction();
o.referrerUri = 'foo';
o.searchQuery = 'foo';
o.sessionId = 'foo';
o.uri = 'foo';
o.userInfo = buildGoogleCloudRetailV2UserInfo();
o.visitorId = 'foo';
}
buildCounterGoogleCloudRetailV2UserEvent--;
return o;
}
void checkGoogleCloudRetailV2UserEvent(api.GoogleCloudRetailV2UserEvent o) {
buildCounterGoogleCloudRetailV2UserEvent++;
if (buildCounterGoogleCloudRetailV2UserEvent < 3) {
checkUnnamed91(o.attributes!);
unittest.expect(
o.attributionToken!,
unittest.equals('foo'),
);
unittest.expect(
o.cartId!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2CompletionDetail(o.completionDetail!);
unittest.expect(
o.entity!,
unittest.equals('foo'),
);
unittest.expect(
o.eventTime!,
unittest.equals('foo'),
);
unittest.expect(
o.eventType!,
unittest.equals('foo'),
);
checkUnnamed92(o.experimentIds!);
unittest.expect(
o.filter!,
unittest.equals('foo'),
);
unittest.expect(
o.offset!,
unittest.equals(42),
);
unittest.expect(
o.orderBy!,
unittest.equals('foo'),
);
checkUnnamed93(o.pageCategories!);
unittest.expect(
o.pageViewId!,
unittest.equals('foo'),
);
checkUnnamed94(o.productDetails!);
checkGoogleCloudRetailV2PurchaseTransaction(o.purchaseTransaction!);
unittest.expect(
o.referrerUri!,
unittest.equals('foo'),
);
unittest.expect(
o.searchQuery!,
unittest.equals('foo'),
);
unittest.expect(
o.sessionId!,
unittest.equals('foo'),
);
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
checkGoogleCloudRetailV2UserInfo(o.userInfo!);
unittest.expect(
o.visitorId!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2UserEvent--;
}
core.List<api.GoogleCloudRetailV2UserEvent> buildUnnamed95() => [
buildGoogleCloudRetailV2UserEvent(),
buildGoogleCloudRetailV2UserEvent(),
];
void checkUnnamed95(core.List<api.GoogleCloudRetailV2UserEvent> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudRetailV2UserEvent(o[0]);
checkGoogleCloudRetailV2UserEvent(o[1]);
}
core.int buildCounterGoogleCloudRetailV2UserEventInlineSource = 0;
api.GoogleCloudRetailV2UserEventInlineSource
buildGoogleCloudRetailV2UserEventInlineSource() {
final o = api.GoogleCloudRetailV2UserEventInlineSource();
buildCounterGoogleCloudRetailV2UserEventInlineSource++;
if (buildCounterGoogleCloudRetailV2UserEventInlineSource < 3) {
o.userEvents = buildUnnamed95();
}
buildCounterGoogleCloudRetailV2UserEventInlineSource--;
return o;
}
void checkGoogleCloudRetailV2UserEventInlineSource(
api.GoogleCloudRetailV2UserEventInlineSource o) {
buildCounterGoogleCloudRetailV2UserEventInlineSource++;
if (buildCounterGoogleCloudRetailV2UserEventInlineSource < 3) {
checkUnnamed95(o.userEvents!);
}
buildCounterGoogleCloudRetailV2UserEventInlineSource--;
}
core.int buildCounterGoogleCloudRetailV2UserEventInputConfig = 0;
api.GoogleCloudRetailV2UserEventInputConfig
buildGoogleCloudRetailV2UserEventInputConfig() {
final o = api.GoogleCloudRetailV2UserEventInputConfig();
buildCounterGoogleCloudRetailV2UserEventInputConfig++;
if (buildCounterGoogleCloudRetailV2UserEventInputConfig < 3) {
o.bigQuerySource = buildGoogleCloudRetailV2BigQuerySource();
o.gcsSource = buildGoogleCloudRetailV2GcsSource();
o.userEventInlineSource = buildGoogleCloudRetailV2UserEventInlineSource();
}
buildCounterGoogleCloudRetailV2UserEventInputConfig--;
return o;
}
void checkGoogleCloudRetailV2UserEventInputConfig(
api.GoogleCloudRetailV2UserEventInputConfig o) {
buildCounterGoogleCloudRetailV2UserEventInputConfig++;
if (buildCounterGoogleCloudRetailV2UserEventInputConfig < 3) {
checkGoogleCloudRetailV2BigQuerySource(o.bigQuerySource!);
checkGoogleCloudRetailV2GcsSource(o.gcsSource!);
checkGoogleCloudRetailV2UserEventInlineSource(o.userEventInlineSource!);
}
buildCounterGoogleCloudRetailV2UserEventInputConfig--;
}
core.int buildCounterGoogleCloudRetailV2UserInfo = 0;
api.GoogleCloudRetailV2UserInfo buildGoogleCloudRetailV2UserInfo() {
final o = api.GoogleCloudRetailV2UserInfo();
buildCounterGoogleCloudRetailV2UserInfo++;
if (buildCounterGoogleCloudRetailV2UserInfo < 3) {
o.directUserRequest = true;
o.ipAddress = 'foo';
o.userAgent = 'foo';
o.userId = 'foo';
}
buildCounterGoogleCloudRetailV2UserInfo--;
return o;
}
void checkGoogleCloudRetailV2UserInfo(api.GoogleCloudRetailV2UserInfo o) {
buildCounterGoogleCloudRetailV2UserInfo++;
if (buildCounterGoogleCloudRetailV2UserInfo < 3) {
unittest.expect(o.directUserRequest!, unittest.isTrue);
unittest.expect(
o.ipAddress!,
unittest.equals('foo'),
);
unittest.expect(
o.userAgent!,
unittest.equals('foo'),
);
unittest.expect(
o.userId!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudRetailV2UserInfo--;
}
core.List<api.GoogleLongrunningOperation> buildUnnamed96() => [
buildGoogleLongrunningOperation(),
buildGoogleLongrunningOperation(),
];
void checkUnnamed96(core.List<api.GoogleLongrunningOperation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleLongrunningOperation(o[0]);
checkGoogleLongrunningOperation(o[1]);
}
core.int buildCounterGoogleLongrunningListOperationsResponse = 0;
api.GoogleLongrunningListOperationsResponse
buildGoogleLongrunningListOperationsResponse() {
final o = api.GoogleLongrunningListOperationsResponse();
buildCounterGoogleLongrunningListOperationsResponse++;
if (buildCounterGoogleLongrunningListOperationsResponse < 3) {
o.nextPageToken = 'foo';
o.operations = buildUnnamed96();
}
buildCounterGoogleLongrunningListOperationsResponse--;
return o;
}
void checkGoogleLongrunningListOperationsResponse(
api.GoogleLongrunningListOperationsResponse o) {
buildCounterGoogleLongrunningListOperationsResponse++;
if (buildCounterGoogleLongrunningListOperationsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed96(o.operations!);
}
buildCounterGoogleLongrunningListOperationsResponse--;
}
core.Map<core.String, core.Object?> buildUnnamed97() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed97(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'),
);
}
core.Map<core.String, core.Object?> buildUnnamed98() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed98(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));
unittest.expect(
casted11['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted11['bool'],
unittest.equals(true),
);
unittest.expect(
casted11['string'],
unittest.equals('foo'),
);
var casted12 = (o['y']!) as core.Map;
unittest.expect(casted12, unittest.hasLength(3));
unittest.expect(
casted12['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted12['bool'],
unittest.equals(true),
);
unittest.expect(
casted12['string'],
unittest.equals('foo'),
);
}
core.int buildCounterGoogleLongrunningOperation = 0;
api.GoogleLongrunningOperation buildGoogleLongrunningOperation() {
final o = api.GoogleLongrunningOperation();
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
o.done = true;
o.error = buildGoogleRpcStatus();
o.metadata = buildUnnamed97();
o.name = 'foo';
o.response = buildUnnamed98();
}
buildCounterGoogleLongrunningOperation--;
return o;
}
void checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) {
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
unittest.expect(o.done!, unittest.isTrue);
checkGoogleRpcStatus(o.error!);
checkUnnamed97(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed98(o.response!);
}
buildCounterGoogleLongrunningOperation--;
}
core.int buildCounterGoogleProtobufEmpty = 0;
api.GoogleProtobufEmpty buildGoogleProtobufEmpty() {
final o = api.GoogleProtobufEmpty();
buildCounterGoogleProtobufEmpty++;
if (buildCounterGoogleProtobufEmpty < 3) {}
buildCounterGoogleProtobufEmpty--;
return o;
}
void checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) {
buildCounterGoogleProtobufEmpty++;
if (buildCounterGoogleProtobufEmpty < 3) {}
buildCounterGoogleProtobufEmpty--;
}
core.Map<core.String, core.Object?> buildUnnamed99() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed99(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));
unittest.expect(
casted13['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted13['bool'],
unittest.equals(true),
);
unittest.expect(
casted13['string'],
unittest.equals('foo'),
);
var casted14 = (o['y']!) as core.Map;
unittest.expect(casted14, unittest.hasLength(3));
unittest.expect(
casted14['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted14['bool'],
unittest.equals(true),
);
unittest.expect(
casted14['string'],
unittest.equals('foo'),
);
}
core.List<core.Map<core.String, core.Object?>> buildUnnamed100() => [
buildUnnamed99(),
buildUnnamed99(),
];
void checkUnnamed100(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed99(o[0]);
checkUnnamed99(o[1]);
}
core.int buildCounterGoogleRpcStatus = 0;
api.GoogleRpcStatus buildGoogleRpcStatus() {
final o = api.GoogleRpcStatus();
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
o.code = 42;
o.details = buildUnnamed100();
o.message = 'foo';
}
buildCounterGoogleRpcStatus--;
return o;
}
void checkGoogleRpcStatus(api.GoogleRpcStatus o) {
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed100(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterGoogleRpcStatus--;
}
core.int buildCounterGoogleTypeDate = 0;
api.GoogleTypeDate buildGoogleTypeDate() {
final o = api.GoogleTypeDate();
buildCounterGoogleTypeDate++;
if (buildCounterGoogleTypeDate < 3) {
o.day = 42;
o.month = 42;
o.year = 42;
}
buildCounterGoogleTypeDate--;
return o;
}
void checkGoogleTypeDate(api.GoogleTypeDate o) {
buildCounterGoogleTypeDate++;
if (buildCounterGoogleTypeDate < 3) {
unittest.expect(
o.day!,
unittest.equals(42),
);
unittest.expect(
o.month!,
unittest.equals(42),
);
unittest.expect(
o.year!,
unittest.equals(42),
);
}
buildCounterGoogleTypeDate--;
}
core.List<core.String> buildUnnamed101() => [
'foo',
'foo',
];
void checkUnnamed101(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'),
);
}
void main() {
unittest.group('obj-schema-GoogleApiHttpBody', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleApiHttpBody();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleApiHttpBody.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleApiHttpBody(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2AddCatalogAttributeRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2AddCatalogAttributeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2AddCatalogAttributeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AddCatalogAttributeRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2AddControlRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2AddControlRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2AddControlRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AddControlRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2AddFulfillmentPlacesRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2AddFulfillmentPlacesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2AddFulfillmentPlacesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AddFulfillmentPlacesRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2AddLocalInventoriesRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2AddLocalInventoriesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2AddLocalInventoriesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AddLocalInventoriesRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2AttributesConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2AttributesConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2AttributesConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AttributesConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Audience', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Audience();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Audience.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Audience(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2BigQuerySource', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2BigQuerySource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2BigQuerySource.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2BigQuerySource(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Catalog', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Catalog();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Catalog.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Catalog(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2CatalogAttribute', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2CatalogAttribute();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2CatalogAttribute.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CatalogAttribute(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ColorInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ColorInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ColorInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ColorInfo(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2CompleteQueryResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2CompleteQueryResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2CompleteQueryResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CompleteQueryResponse(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2CompleteQueryResponseCompletionResult',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2CompleteQueryResponseCompletionResult();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudRetailV2CompleteQueryResponseCompletionResult.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CompleteQueryResponseCompletionResult(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult',
() {
unittest.test('to-json--from-json', () async {
final o =
buildGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult
.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CompleteQueryResponseRecentSearchResult(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2CompletionConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2CompletionConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2CompletionConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CompletionConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2CompletionDataInputConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2CompletionDataInputConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2CompletionDataInputConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CompletionDataInputConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2CompletionDetail', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2CompletionDetail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2CompletionDetail.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CompletionDetail(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Condition', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Condition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Condition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Condition(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ConditionQueryTerm', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ConditionQueryTerm();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ConditionQueryTerm.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ConditionQueryTerm(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ConditionTimeRange', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ConditionTimeRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ConditionTimeRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ConditionTimeRange(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Control', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Control();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Control.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Control(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2CustomAttribute', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2CustomAttribute();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2CustomAttribute.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CustomAttribute(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ExperimentInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ExperimentInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ExperimentInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ExperimentInfo(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2ExperimentInfoServingConfigExperiment',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ExperimentInfoServingConfigExperiment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudRetailV2ExperimentInfoServingConfigExperiment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ExperimentInfoServingConfigExperiment(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2FulfillmentInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2FulfillmentInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2FulfillmentInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2FulfillmentInfo(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2GcsSource', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2GcsSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2GcsSource.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2GcsSource(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2GetDefaultBranchResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2GetDefaultBranchResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2GetDefaultBranchResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2GetDefaultBranchResponse(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Image', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Image();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Image.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Image(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ImportCompletionDataRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ImportCompletionDataRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ImportCompletionDataRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ImportCompletionDataRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ImportErrorsConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ImportErrorsConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ImportErrorsConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ImportErrorsConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ImportProductsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ImportProductsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ImportProductsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ImportProductsRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ImportUserEventsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ImportUserEventsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ImportUserEventsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ImportUserEventsRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Interval', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Interval();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Interval.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Interval(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ListCatalogsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ListCatalogsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ListCatalogsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ListCatalogsResponse(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ListControlsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ListControlsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ListControlsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ListControlsResponse(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ListModelsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ListModelsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ListModelsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ListModelsResponse(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ListProductsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ListProductsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ListProductsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ListProductsResponse(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ListServingConfigsResponse',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ListServingConfigsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ListServingConfigsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ListServingConfigsResponse(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2LocalInventory', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2LocalInventory();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2LocalInventory.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2LocalInventory(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Model', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Model();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Model.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Model(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig',
() {
unittest.test('to-json--from-json', () async {
final o =
buildGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig
.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ModelModelFeaturesConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ModelModelFeaturesConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ModelModelFeaturesConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ModelModelFeaturesConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ModelServingConfigList', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ModelServingConfigList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ModelServingConfigList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ModelServingConfigList(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2PauseModelRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PauseModelRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2PauseModelRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PauseModelRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2PredictRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PredictRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2PredictRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PredictRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2PredictResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PredictResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2PredictResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PredictResponse(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2PredictResponsePredictionResult', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PredictResponsePredictionResult();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudRetailV2PredictResponsePredictionResult.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PredictResponsePredictionResult(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2PriceInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PriceInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2PriceInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PriceInfo(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2PriceInfoPriceRange', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PriceInfoPriceRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2PriceInfoPriceRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PriceInfoPriceRange(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Product', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Product();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Product.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Product(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ProductDetail', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ProductDetail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ProductDetail.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ProductDetail(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ProductInlineSource', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ProductInlineSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ProductInlineSource.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ProductInlineSource(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ProductInputConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ProductInputConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ProductInputConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ProductInputConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ProductLevelConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ProductLevelConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ProductLevelConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ProductLevelConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Promotion', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Promotion();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Promotion.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Promotion(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2PurchaseTransaction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PurchaseTransaction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2PurchaseTransaction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PurchaseTransaction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2PurgeProductsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PurgeProductsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2PurgeProductsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PurgeProductsRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2PurgeUserEventsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2PurgeUserEventsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2PurgeUserEventsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PurgeUserEventsRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Rating', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Rating();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Rating.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Rating(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RejoinUserEventsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RejoinUserEventsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RejoinUserEventsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RejoinUserEventsRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RemoveCatalogAttributeRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RemoveCatalogAttributeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RemoveCatalogAttributeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RemoveCatalogAttributeRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RemoveControlRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RemoveControlRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RemoveControlRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RemoveControlRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RemoveFulfillmentPlacesRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RemoveFulfillmentPlacesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RemoveFulfillmentPlacesRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RemoveLocalInventoriesRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RemoveLocalInventoriesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RemoveLocalInventoriesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RemoveLocalInventoriesRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ReplaceCatalogAttributeRequest',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ReplaceCatalogAttributeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ReplaceCatalogAttributeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ReplaceCatalogAttributeRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ResumeModelRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ResumeModelRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ResumeModelRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ResumeModelRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2Rule', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2Rule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2Rule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Rule(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RuleBoostAction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RuleBoostAction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RuleBoostAction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RuleBoostAction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RuleDoNotAssociateAction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RuleDoNotAssociateAction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RuleDoNotAssociateAction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RuleDoNotAssociateAction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RuleFilterAction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RuleFilterAction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RuleFilterAction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RuleFilterAction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RuleIgnoreAction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RuleIgnoreAction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RuleIgnoreAction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RuleIgnoreAction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RuleOnewaySynonymsAction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RuleOnewaySynonymsAction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RuleOnewaySynonymsAction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RuleOnewaySynonymsAction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RuleRedirectAction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RuleRedirectAction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RuleRedirectAction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RuleRedirectAction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RuleReplacementAction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RuleReplacementAction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RuleReplacementAction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RuleReplacementAction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2RuleTwowaySynonymsAction', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2RuleTwowaySynonymsAction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2RuleTwowaySynonymsAction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RuleTwowaySynonymsAction(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchRequestBoostSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchRequestBoostSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchRequestBoostSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequestBoostSpec(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec',
() {
unittest.test('to-json--from-json', () async {
final o =
buildGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec
.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchRequestDynamicFacetSpec',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchRequestDynamicFacetSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchRequestDynamicFacetSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequestDynamicFacetSpec(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchRequestFacetSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchRequestFacetSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchRequestFacetSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequestFacetSpec(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchRequestFacetSpecFacetKey',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchRequestFacetSpecFacetKey();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchRequestFacetSpecFacetKey.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequestFacetSpecFacetKey(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2SearchRequestPersonalizationSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchRequestPersonalizationSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudRetailV2SearchRequestPersonalizationSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequestPersonalizationSpec(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2SearchRequestQueryExpansionSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchRequestQueryExpansionSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudRetailV2SearchRequestQueryExpansionSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequestQueryExpansionSpec(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2SearchRequestSpellCorrectionSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchRequestSpellCorrectionSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudRetailV2SearchRequestSpellCorrectionSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequestSpellCorrectionSpec(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchResponse(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchResponseFacet', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchResponseFacet();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchResponseFacet.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchResponseFacet(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchResponseFacetFacetValue',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchResponseFacetFacetValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchResponseFacetFacetValue.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchResponseFacetFacetValue(od);
});
});
unittest.group(
'obj-schema-GoogleCloudRetailV2SearchResponseQueryExpansionInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchResponseQueryExpansionInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudRetailV2SearchResponseQueryExpansionInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchResponseQueryExpansionInfo(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SearchResponseSearchResult',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SearchResponseSearchResult();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SearchResponseSearchResult.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchResponseSearchResult(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2ServingConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2ServingConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2ServingConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ServingConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SetDefaultBranchRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SetDefaultBranchRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SetDefaultBranchRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SetDefaultBranchRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2SetInventoryRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2SetInventoryRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2SetInventoryRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SetInventoryRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2TuneModelRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2TuneModelRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2TuneModelRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2TuneModelRequest(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2UserEvent', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2UserEvent();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2UserEvent.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2UserEvent(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2UserEventInlineSource', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2UserEventInlineSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2UserEventInlineSource.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2UserEventInlineSource(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2UserEventInputConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2UserEventInputConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2UserEventInputConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2UserEventInputConfig(od);
});
});
unittest.group('obj-schema-GoogleCloudRetailV2UserInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudRetailV2UserInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudRetailV2UserInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2UserInfo(od);
});
});
unittest.group('obj-schema-GoogleLongrunningListOperationsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningListOperationsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningListOperationsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningListOperationsResponse(od);
});
});
unittest.group('obj-schema-GoogleLongrunningOperation', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningOperation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningOperation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningOperation(od);
});
});
unittest.group('obj-schema-GoogleProtobufEmpty', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleProtobufEmpty();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleProtobufEmpty.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleProtobufEmpty(od);
});
});
unittest.group('obj-schema-GoogleRpcStatus', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleRpcStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleRpcStatus.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleRpcStatus(od);
});
});
unittest.group('obj-schema-GoogleTypeDate', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleTypeDate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleTypeDate.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleTypeDate(od);
});
});
unittest.group('resource-ProjectsLocationsCatalogsResource', () {
unittest.test('method--completeQuery', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_catalog = 'foo';
final arg_dataset = 'foo';
final arg_deviceType = 'foo';
final arg_entity = 'foo';
final arg_languageCodes = buildUnnamed101();
final arg_maxSuggestions = 42;
final arg_query = 'foo';
final arg_visitorId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['dataset']!.first,
unittest.equals(arg_dataset),
);
unittest.expect(
queryMap['deviceType']!.first,
unittest.equals(arg_deviceType),
);
unittest.expect(
queryMap['entity']!.first,
unittest.equals(arg_entity),
);
unittest.expect(
queryMap['languageCodes']!,
unittest.equals(arg_languageCodes),
);
unittest.expect(
core.int.parse(queryMap['maxSuggestions']!.first),
unittest.equals(arg_maxSuggestions),
);
unittest.expect(
queryMap['query']!.first,
unittest.equals(arg_query),
);
unittest.expect(
queryMap['visitorId']!.first,
unittest.equals(arg_visitorId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildGoogleCloudRetailV2CompleteQueryResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.completeQuery(arg_catalog,
dataset: arg_dataset,
deviceType: arg_deviceType,
entity: arg_entity,
languageCodes: arg_languageCodes,
maxSuggestions: arg_maxSuggestions,
query: arg_query,
visitorId: arg_visitorId,
$fields: arg_$fields);
checkGoogleCloudRetailV2CompleteQueryResponse(
response as api.GoogleCloudRetailV2CompleteQueryResponse);
});
unittest.test('method--getAttributesConfig', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2AttributesConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.getAttributesConfig(arg_name, $fields: arg_$fields);
checkGoogleCloudRetailV2AttributesConfig(
response as api.GoogleCloudRetailV2AttributesConfig);
});
unittest.test('method--getCompletionConfig', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2CompletionConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.getCompletionConfig(arg_name, $fields: arg_$fields);
checkGoogleCloudRetailV2CompletionConfig(
response as api.GoogleCloudRetailV2CompletionConfig);
});
unittest.test('method--getDefaultBranch', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_catalog = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildGoogleCloudRetailV2GetDefaultBranchResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.getDefaultBranch(arg_catalog, $fields: arg_$fields);
checkGoogleCloudRetailV2GetDefaultBranchResponse(
response as api.GoogleCloudRetailV2GetDefaultBranchResponse);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ListCatalogsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleCloudRetailV2ListCatalogsResponse(
response as api.GoogleCloudRetailV2ListCatalogsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_request = buildGoogleCloudRetailV2Catalog();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2Catalog.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Catalog(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Catalog());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkGoogleCloudRetailV2Catalog(
response as api.GoogleCloudRetailV2Catalog);
});
unittest.test('method--setDefaultBranch', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_request = buildGoogleCloudRetailV2SetDefaultBranchRequest();
final arg_catalog = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2SetDefaultBranchRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SetDefaultBranchRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleProtobufEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.setDefaultBranch(arg_request, arg_catalog,
$fields: arg_$fields);
checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty);
});
unittest.test('method--updateAttributesConfig', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_request = buildGoogleCloudRetailV2AttributesConfig();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2AttributesConfig.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AttributesConfig(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2AttributesConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.updateAttributesConfig(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkGoogleCloudRetailV2AttributesConfig(
response as api.GoogleCloudRetailV2AttributesConfig);
});
unittest.test('method--updateCompletionConfig', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs;
final arg_request = buildGoogleCloudRetailV2CompletionConfig();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2CompletionConfig.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2CompletionConfig(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2CompletionConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.updateCompletionConfig(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkGoogleCloudRetailV2CompletionConfig(
response as api.GoogleCloudRetailV2CompletionConfig);
});
});
unittest.group('resource-ProjectsLocationsCatalogsAttributesConfigResource',
() {
unittest.test('method--addCatalogAttribute', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.attributesConfig;
final arg_request = buildGoogleCloudRetailV2AddCatalogAttributeRequest();
final arg_attributesConfig = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2AddCatalogAttributeRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AddCatalogAttributeRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2AttributesConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.addCatalogAttribute(
arg_request, arg_attributesConfig,
$fields: arg_$fields);
checkGoogleCloudRetailV2AttributesConfig(
response as api.GoogleCloudRetailV2AttributesConfig);
});
unittest.test('method--removeCatalogAttribute', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.attributesConfig;
final arg_request =
buildGoogleCloudRetailV2RemoveCatalogAttributeRequest();
final arg_attributesConfig = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.GoogleCloudRetailV2RemoveCatalogAttributeRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RemoveCatalogAttributeRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2AttributesConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.removeCatalogAttribute(
arg_request, arg_attributesConfig,
$fields: arg_$fields);
checkGoogleCloudRetailV2AttributesConfig(
response as api.GoogleCloudRetailV2AttributesConfig);
});
unittest.test('method--replaceCatalogAttribute', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.attributesConfig;
final arg_request =
buildGoogleCloudRetailV2ReplaceCatalogAttributeRequest();
final arg_attributesConfig = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.GoogleCloudRetailV2ReplaceCatalogAttributeRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ReplaceCatalogAttributeRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2AttributesConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.replaceCatalogAttribute(
arg_request, arg_attributesConfig,
$fields: arg_$fields);
checkGoogleCloudRetailV2AttributesConfig(
response as api.GoogleCloudRetailV2AttributesConfig);
});
});
unittest.group('resource-ProjectsLocationsCatalogsBranchesOperationsResource',
() {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
});
unittest.group('resource-ProjectsLocationsCatalogsBranchesProductsResource',
() {
unittest.test('method--addFulfillmentPlaces', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request = buildGoogleCloudRetailV2AddFulfillmentPlacesRequest();
final arg_product = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2AddFulfillmentPlacesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AddFulfillmentPlacesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.addFulfillmentPlaces(arg_request, arg_product,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--addLocalInventories', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request = buildGoogleCloudRetailV2AddLocalInventoriesRequest();
final arg_product = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2AddLocalInventoriesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AddLocalInventoriesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.addLocalInventories(arg_request, arg_product,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request = buildGoogleCloudRetailV2Product();
final arg_parent = 'foo';
final arg_productId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2Product.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Product(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['productId']!.first,
unittest.equals(arg_productId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Product());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
productId: arg_productId, $fields: arg_$fields);
checkGoogleCloudRetailV2Product(
response as api.GoogleCloudRetailV2Product);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleProtobufEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Product());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleCloudRetailV2Product(
response as api.GoogleCloudRetailV2Product);
});
unittest.test('method--import', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request = buildGoogleCloudRetailV2ImportProductsRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2ImportProductsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ImportProductsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.import(arg_request, arg_parent, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_readMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['readMask']!.first,
unittest.equals(arg_readMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ListProductsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
readMask: arg_readMask,
$fields: arg_$fields);
checkGoogleCloudRetailV2ListProductsResponse(
response as api.GoogleCloudRetailV2ListProductsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request = buildGoogleCloudRetailV2Product();
final arg_name = 'foo';
final arg_allowMissing = true;
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2Product.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Product(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['allowMissing']!.first,
unittest.equals('$arg_allowMissing'),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Product());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
allowMissing: arg_allowMissing,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkGoogleCloudRetailV2Product(
response as api.GoogleCloudRetailV2Product);
});
unittest.test('method--purge', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request = buildGoogleCloudRetailV2PurgeProductsRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2PurgeProductsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PurgeProductsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.purge(arg_request, arg_parent, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--removeFulfillmentPlaces', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request =
buildGoogleCloudRetailV2RemoveFulfillmentPlacesRequest();
final arg_product = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.GoogleCloudRetailV2RemoveFulfillmentPlacesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RemoveFulfillmentPlacesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.removeFulfillmentPlaces(
arg_request, arg_product,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--removeLocalInventories', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request =
buildGoogleCloudRetailV2RemoveLocalInventoriesRequest();
final arg_product = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.GoogleCloudRetailV2RemoveLocalInventoriesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RemoveLocalInventoriesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.removeLocalInventories(
arg_request, arg_product,
$fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--setInventory', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock)
.projects
.locations
.catalogs
.branches
.products;
final arg_request = buildGoogleCloudRetailV2SetInventoryRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2SetInventoryRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SetInventoryRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.setInventory(arg_request, arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
});
unittest.group('resource-ProjectsLocationsCatalogsCompletionDataResource',
() {
unittest.test('method--import', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.completionData;
final arg_request = buildGoogleCloudRetailV2ImportCompletionDataRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2ImportCompletionDataRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ImportCompletionDataRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.import(arg_request, arg_parent, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
});
unittest.group('resource-ProjectsLocationsCatalogsControlsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.controls;
final arg_request = buildGoogleCloudRetailV2Control();
final arg_parent = 'foo';
final arg_controlId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2Control.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Control(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['controlId']!.first,
unittest.equals(arg_controlId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Control());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
controlId: arg_controlId, $fields: arg_$fields);
checkGoogleCloudRetailV2Control(
response as api.GoogleCloudRetailV2Control);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.controls;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleProtobufEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.controls;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Control());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleCloudRetailV2Control(
response as api.GoogleCloudRetailV2Control);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.controls;
final arg_parent = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ListControlsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleCloudRetailV2ListControlsResponse(
response as api.GoogleCloudRetailV2ListControlsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.controls;
final arg_request = buildGoogleCloudRetailV2Control();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2Control.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Control(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Control());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkGoogleCloudRetailV2Control(
response as api.GoogleCloudRetailV2Control);
});
});
unittest.group('resource-ProjectsLocationsCatalogsModelsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.models;
final arg_request = buildGoogleCloudRetailV2Model();
final arg_parent = 'foo';
final arg_dryRun = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2Model.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Model(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['dryRun']!.first,
unittest.equals('$arg_dryRun'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
dryRun: arg_dryRun, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.models;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleProtobufEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.models;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Model());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleCloudRetailV2Model(response as api.GoogleCloudRetailV2Model);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.models;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ListModelsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleCloudRetailV2ListModelsResponse(
response as api.GoogleCloudRetailV2ListModelsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.models;
final arg_request = buildGoogleCloudRetailV2Model();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2Model.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2Model(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Model());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkGoogleCloudRetailV2Model(response as api.GoogleCloudRetailV2Model);
});
unittest.test('method--pause', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.models;
final arg_request = buildGoogleCloudRetailV2PauseModelRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2PauseModelRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PauseModelRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Model());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.pause(arg_request, arg_name, $fields: arg_$fields);
checkGoogleCloudRetailV2Model(response as api.GoogleCloudRetailV2Model);
});
unittest.test('method--resume', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.models;
final arg_request = buildGoogleCloudRetailV2ResumeModelRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2ResumeModelRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ResumeModelRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2Model());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.resume(arg_request, arg_name, $fields: arg_$fields);
checkGoogleCloudRetailV2Model(response as api.GoogleCloudRetailV2Model);
});
unittest.test('method--tune', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.catalogs.models;
final arg_request = buildGoogleCloudRetailV2TuneModelRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2TuneModelRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2TuneModelRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.tune(arg_request, arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
});
unittest.group('resource-ProjectsLocationsCatalogsOperationsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.operations;
final arg_name = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleLongrunningListOperationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_name,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleLongrunningListOperationsResponse(
response as api.GoogleLongrunningListOperationsResponse);
});
});
unittest.group('resource-ProjectsLocationsCatalogsPlacementsResource', () {
unittest.test('method--predict', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.placements;
final arg_request = buildGoogleCloudRetailV2PredictRequest();
final arg_placement = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2PredictRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PredictRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2PredictResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.predict(arg_request, arg_placement, $fields: arg_$fields);
checkGoogleCloudRetailV2PredictResponse(
response as api.GoogleCloudRetailV2PredictResponse);
});
unittest.test('method--search', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.placements;
final arg_request = buildGoogleCloudRetailV2SearchRequest();
final arg_placement = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2SearchRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2SearchResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.search(arg_request, arg_placement, $fields: arg_$fields);
checkGoogleCloudRetailV2SearchResponse(
response as api.GoogleCloudRetailV2SearchResponse);
});
});
unittest.group('resource-ProjectsLocationsCatalogsServingConfigsResource',
() {
unittest.test('method--addControl', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_request = buildGoogleCloudRetailV2AddControlRequest();
final arg_servingConfig = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2AddControlRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2AddControlRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ServingConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.addControl(arg_request, arg_servingConfig,
$fields: arg_$fields);
checkGoogleCloudRetailV2ServingConfig(
response as api.GoogleCloudRetailV2ServingConfig);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_request = buildGoogleCloudRetailV2ServingConfig();
final arg_parent = 'foo';
final arg_servingConfigId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2ServingConfig.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ServingConfig(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['servingConfigId']!.first,
unittest.equals(arg_servingConfigId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ServingConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_parent,
servingConfigId: arg_servingConfigId, $fields: arg_$fields);
checkGoogleCloudRetailV2ServingConfig(
response as api.GoogleCloudRetailV2ServingConfig);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleProtobufEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ServingConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleCloudRetailV2ServingConfig(
response as api.GoogleCloudRetailV2ServingConfig);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_parent = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildGoogleCloudRetailV2ListServingConfigsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_parent,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleCloudRetailV2ListServingConfigsResponse(
response as api.GoogleCloudRetailV2ListServingConfigsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_request = buildGoogleCloudRetailV2ServingConfig();
final arg_name = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2ServingConfig.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ServingConfig(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ServingConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_name,
updateMask: arg_updateMask, $fields: arg_$fields);
checkGoogleCloudRetailV2ServingConfig(
response as api.GoogleCloudRetailV2ServingConfig);
});
unittest.test('method--predict', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_request = buildGoogleCloudRetailV2PredictRequest();
final arg_placement = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2PredictRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PredictRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2PredictResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.predict(arg_request, arg_placement, $fields: arg_$fields);
checkGoogleCloudRetailV2PredictResponse(
response as api.GoogleCloudRetailV2PredictResponse);
});
unittest.test('method--removeControl', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_request = buildGoogleCloudRetailV2RemoveControlRequest();
final arg_servingConfig = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2RemoveControlRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RemoveControlRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2ServingConfig());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.removeControl(arg_request, arg_servingConfig,
$fields: arg_$fields);
checkGoogleCloudRetailV2ServingConfig(
response as api.GoogleCloudRetailV2ServingConfig);
});
unittest.test('method--search', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.servingConfigs;
final arg_request = buildGoogleCloudRetailV2SearchRequest();
final arg_placement = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2SearchRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2SearchRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudRetailV2SearchResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.search(arg_request, arg_placement, $fields: arg_$fields);
checkGoogleCloudRetailV2SearchResponse(
response as api.GoogleCloudRetailV2SearchResponse);
});
});
unittest.group('resource-ProjectsLocationsCatalogsUserEventsResource', () {
unittest.test('method--collect', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.userEvents;
final arg_parent = 'foo';
final arg_ets = 'foo';
final arg_prebuiltRule = 'foo';
final arg_rawJson = 'foo';
final arg_uri = 'foo';
final arg_userEvent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['ets']!.first,
unittest.equals(arg_ets),
);
unittest.expect(
queryMap['prebuiltRule']!.first,
unittest.equals(arg_prebuiltRule),
);
unittest.expect(
queryMap['rawJson']!.first,
unittest.equals(arg_rawJson),
);
unittest.expect(
queryMap['uri']!.first,
unittest.equals(arg_uri),
);
unittest.expect(
queryMap['userEvent']!.first,
unittest.equals(arg_userEvent),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleApiHttpBody());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.collect(arg_parent,
ets: arg_ets,
prebuiltRule: arg_prebuiltRule,
rawJson: arg_rawJson,
uri: arg_uri,
userEvent: arg_userEvent,
$fields: arg_$fields);
checkGoogleApiHttpBody(response as api.GoogleApiHttpBody);
});
unittest.test('method--import', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.userEvents;
final arg_request = buildGoogleCloudRetailV2ImportUserEventsRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2ImportUserEventsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2ImportUserEventsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.import(arg_request, arg_parent, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--purge', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.userEvents;
final arg_request = buildGoogleCloudRetailV2PurgeUserEventsRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2PurgeUserEventsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2PurgeUserEventsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.purge(arg_request, arg_parent, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--rejoin', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.userEvents;
final arg_request = buildGoogleCloudRetailV2RejoinUserEventsRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2RejoinUserEventsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2RejoinUserEventsRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.rejoin(arg_request, arg_parent, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--write', () async {
final mock = HttpServerMock();
final res =
api.CloudRetailApi(mock).projects.locations.catalogs.userEvents;
final arg_request = buildGoogleCloudRetailV2UserEvent();
final arg_parent = 'foo';
final arg_writeAsync = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudRetailV2UserEvent.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudRetailV2UserEvent(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['writeAsync']!.first,
unittest.equals('$arg_writeAsync'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudRetailV2UserEvent());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.write(arg_request, arg_parent,
writeAsync: arg_writeAsync, $fields: arg_$fields);
checkGoogleCloudRetailV2UserEvent(
response as api.GoogleCloudRetailV2UserEvent);
});
});
unittest.group('resource-ProjectsLocationsOperationsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.locations.operations;
final arg_name = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleLongrunningListOperationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_name,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleLongrunningListOperationsResponse(
response as api.GoogleLongrunningListOperationsResponse);
});
});
unittest.group('resource-ProjectsOperationsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.CloudRetailApi(mock).projects.operations;
final arg_name = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v2/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleLongrunningListOperationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_name,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleLongrunningListOperationsResponse(
response as api.GoogleLongrunningListOperationsResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/retail/v2_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/retail/v2_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 140257} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/sheets/v4.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterAddBandingRequest = 0;
api.AddBandingRequest buildAddBandingRequest() {
final o = api.AddBandingRequest();
buildCounterAddBandingRequest++;
if (buildCounterAddBandingRequest < 3) {
o.bandedRange = buildBandedRange();
}
buildCounterAddBandingRequest--;
return o;
}
void checkAddBandingRequest(api.AddBandingRequest o) {
buildCounterAddBandingRequest++;
if (buildCounterAddBandingRequest < 3) {
checkBandedRange(o.bandedRange!);
}
buildCounterAddBandingRequest--;
}
core.int buildCounterAddBandingResponse = 0;
api.AddBandingResponse buildAddBandingResponse() {
final o = api.AddBandingResponse();
buildCounterAddBandingResponse++;
if (buildCounterAddBandingResponse < 3) {
o.bandedRange = buildBandedRange();
}
buildCounterAddBandingResponse--;
return o;
}
void checkAddBandingResponse(api.AddBandingResponse o) {
buildCounterAddBandingResponse++;
if (buildCounterAddBandingResponse < 3) {
checkBandedRange(o.bandedRange!);
}
buildCounterAddBandingResponse--;
}
core.int buildCounterAddChartRequest = 0;
api.AddChartRequest buildAddChartRequest() {
final o = api.AddChartRequest();
buildCounterAddChartRequest++;
if (buildCounterAddChartRequest < 3) {
o.chart = buildEmbeddedChart();
}
buildCounterAddChartRequest--;
return o;
}
void checkAddChartRequest(api.AddChartRequest o) {
buildCounterAddChartRequest++;
if (buildCounterAddChartRequest < 3) {
checkEmbeddedChart(o.chart!);
}
buildCounterAddChartRequest--;
}
core.int buildCounterAddChartResponse = 0;
api.AddChartResponse buildAddChartResponse() {
final o = api.AddChartResponse();
buildCounterAddChartResponse++;
if (buildCounterAddChartResponse < 3) {
o.chart = buildEmbeddedChart();
}
buildCounterAddChartResponse--;
return o;
}
void checkAddChartResponse(api.AddChartResponse o) {
buildCounterAddChartResponse++;
if (buildCounterAddChartResponse < 3) {
checkEmbeddedChart(o.chart!);
}
buildCounterAddChartResponse--;
}
core.int buildCounterAddConditionalFormatRuleRequest = 0;
api.AddConditionalFormatRuleRequest buildAddConditionalFormatRuleRequest() {
final o = api.AddConditionalFormatRuleRequest();
buildCounterAddConditionalFormatRuleRequest++;
if (buildCounterAddConditionalFormatRuleRequest < 3) {
o.index = 42;
o.rule = buildConditionalFormatRule();
}
buildCounterAddConditionalFormatRuleRequest--;
return o;
}
void checkAddConditionalFormatRuleRequest(
api.AddConditionalFormatRuleRequest o) {
buildCounterAddConditionalFormatRuleRequest++;
if (buildCounterAddConditionalFormatRuleRequest < 3) {
unittest.expect(
o.index!,
unittest.equals(42),
);
checkConditionalFormatRule(o.rule!);
}
buildCounterAddConditionalFormatRuleRequest--;
}
core.int buildCounterAddDataSourceRequest = 0;
api.AddDataSourceRequest buildAddDataSourceRequest() {
final o = api.AddDataSourceRequest();
buildCounterAddDataSourceRequest++;
if (buildCounterAddDataSourceRequest < 3) {
o.dataSource = buildDataSource();
}
buildCounterAddDataSourceRequest--;
return o;
}
void checkAddDataSourceRequest(api.AddDataSourceRequest o) {
buildCounterAddDataSourceRequest++;
if (buildCounterAddDataSourceRequest < 3) {
checkDataSource(o.dataSource!);
}
buildCounterAddDataSourceRequest--;
}
core.int buildCounterAddDataSourceResponse = 0;
api.AddDataSourceResponse buildAddDataSourceResponse() {
final o = api.AddDataSourceResponse();
buildCounterAddDataSourceResponse++;
if (buildCounterAddDataSourceResponse < 3) {
o.dataExecutionStatus = buildDataExecutionStatus();
o.dataSource = buildDataSource();
}
buildCounterAddDataSourceResponse--;
return o;
}
void checkAddDataSourceResponse(api.AddDataSourceResponse o) {
buildCounterAddDataSourceResponse++;
if (buildCounterAddDataSourceResponse < 3) {
checkDataExecutionStatus(o.dataExecutionStatus!);
checkDataSource(o.dataSource!);
}
buildCounterAddDataSourceResponse--;
}
core.int buildCounterAddDimensionGroupRequest = 0;
api.AddDimensionGroupRequest buildAddDimensionGroupRequest() {
final o = api.AddDimensionGroupRequest();
buildCounterAddDimensionGroupRequest++;
if (buildCounterAddDimensionGroupRequest < 3) {
o.range = buildDimensionRange();
}
buildCounterAddDimensionGroupRequest--;
return o;
}
void checkAddDimensionGroupRequest(api.AddDimensionGroupRequest o) {
buildCounterAddDimensionGroupRequest++;
if (buildCounterAddDimensionGroupRequest < 3) {
checkDimensionRange(o.range!);
}
buildCounterAddDimensionGroupRequest--;
}
core.List<api.DimensionGroup> buildUnnamed0() => [
buildDimensionGroup(),
buildDimensionGroup(),
];
void checkUnnamed0(core.List<api.DimensionGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkDimensionGroup(o[0]);
checkDimensionGroup(o[1]);
}
core.int buildCounterAddDimensionGroupResponse = 0;
api.AddDimensionGroupResponse buildAddDimensionGroupResponse() {
final o = api.AddDimensionGroupResponse();
buildCounterAddDimensionGroupResponse++;
if (buildCounterAddDimensionGroupResponse < 3) {
o.dimensionGroups = buildUnnamed0();
}
buildCounterAddDimensionGroupResponse--;
return o;
}
void checkAddDimensionGroupResponse(api.AddDimensionGroupResponse o) {
buildCounterAddDimensionGroupResponse++;
if (buildCounterAddDimensionGroupResponse < 3) {
checkUnnamed0(o.dimensionGroups!);
}
buildCounterAddDimensionGroupResponse--;
}
core.int buildCounterAddFilterViewRequest = 0;
api.AddFilterViewRequest buildAddFilterViewRequest() {
final o = api.AddFilterViewRequest();
buildCounterAddFilterViewRequest++;
if (buildCounterAddFilterViewRequest < 3) {
o.filter = buildFilterView();
}
buildCounterAddFilterViewRequest--;
return o;
}
void checkAddFilterViewRequest(api.AddFilterViewRequest o) {
buildCounterAddFilterViewRequest++;
if (buildCounterAddFilterViewRequest < 3) {
checkFilterView(o.filter!);
}
buildCounterAddFilterViewRequest--;
}
core.int buildCounterAddFilterViewResponse = 0;
api.AddFilterViewResponse buildAddFilterViewResponse() {
final o = api.AddFilterViewResponse();
buildCounterAddFilterViewResponse++;
if (buildCounterAddFilterViewResponse < 3) {
o.filter = buildFilterView();
}
buildCounterAddFilterViewResponse--;
return o;
}
void checkAddFilterViewResponse(api.AddFilterViewResponse o) {
buildCounterAddFilterViewResponse++;
if (buildCounterAddFilterViewResponse < 3) {
checkFilterView(o.filter!);
}
buildCounterAddFilterViewResponse--;
}
core.int buildCounterAddNamedRangeRequest = 0;
api.AddNamedRangeRequest buildAddNamedRangeRequest() {
final o = api.AddNamedRangeRequest();
buildCounterAddNamedRangeRequest++;
if (buildCounterAddNamedRangeRequest < 3) {
o.namedRange = buildNamedRange();
}
buildCounterAddNamedRangeRequest--;
return o;
}
void checkAddNamedRangeRequest(api.AddNamedRangeRequest o) {
buildCounterAddNamedRangeRequest++;
if (buildCounterAddNamedRangeRequest < 3) {
checkNamedRange(o.namedRange!);
}
buildCounterAddNamedRangeRequest--;
}
core.int buildCounterAddNamedRangeResponse = 0;
api.AddNamedRangeResponse buildAddNamedRangeResponse() {
final o = api.AddNamedRangeResponse();
buildCounterAddNamedRangeResponse++;
if (buildCounterAddNamedRangeResponse < 3) {
o.namedRange = buildNamedRange();
}
buildCounterAddNamedRangeResponse--;
return o;
}
void checkAddNamedRangeResponse(api.AddNamedRangeResponse o) {
buildCounterAddNamedRangeResponse++;
if (buildCounterAddNamedRangeResponse < 3) {
checkNamedRange(o.namedRange!);
}
buildCounterAddNamedRangeResponse--;
}
core.int buildCounterAddProtectedRangeRequest = 0;
api.AddProtectedRangeRequest buildAddProtectedRangeRequest() {
final o = api.AddProtectedRangeRequest();
buildCounterAddProtectedRangeRequest++;
if (buildCounterAddProtectedRangeRequest < 3) {
o.protectedRange = buildProtectedRange();
}
buildCounterAddProtectedRangeRequest--;
return o;
}
void checkAddProtectedRangeRequest(api.AddProtectedRangeRequest o) {
buildCounterAddProtectedRangeRequest++;
if (buildCounterAddProtectedRangeRequest < 3) {
checkProtectedRange(o.protectedRange!);
}
buildCounterAddProtectedRangeRequest--;
}
core.int buildCounterAddProtectedRangeResponse = 0;
api.AddProtectedRangeResponse buildAddProtectedRangeResponse() {
final o = api.AddProtectedRangeResponse();
buildCounterAddProtectedRangeResponse++;
if (buildCounterAddProtectedRangeResponse < 3) {
o.protectedRange = buildProtectedRange();
}
buildCounterAddProtectedRangeResponse--;
return o;
}
void checkAddProtectedRangeResponse(api.AddProtectedRangeResponse o) {
buildCounterAddProtectedRangeResponse++;
if (buildCounterAddProtectedRangeResponse < 3) {
checkProtectedRange(o.protectedRange!);
}
buildCounterAddProtectedRangeResponse--;
}
core.int buildCounterAddSheetRequest = 0;
api.AddSheetRequest buildAddSheetRequest() {
final o = api.AddSheetRequest();
buildCounterAddSheetRequest++;
if (buildCounterAddSheetRequest < 3) {
o.properties = buildSheetProperties();
}
buildCounterAddSheetRequest--;
return o;
}
void checkAddSheetRequest(api.AddSheetRequest o) {
buildCounterAddSheetRequest++;
if (buildCounterAddSheetRequest < 3) {
checkSheetProperties(o.properties!);
}
buildCounterAddSheetRequest--;
}
core.int buildCounterAddSheetResponse = 0;
api.AddSheetResponse buildAddSheetResponse() {
final o = api.AddSheetResponse();
buildCounterAddSheetResponse++;
if (buildCounterAddSheetResponse < 3) {
o.properties = buildSheetProperties();
}
buildCounterAddSheetResponse--;
return o;
}
void checkAddSheetResponse(api.AddSheetResponse o) {
buildCounterAddSheetResponse++;
if (buildCounterAddSheetResponse < 3) {
checkSheetProperties(o.properties!);
}
buildCounterAddSheetResponse--;
}
core.int buildCounterAddSlicerRequest = 0;
api.AddSlicerRequest buildAddSlicerRequest() {
final o = api.AddSlicerRequest();
buildCounterAddSlicerRequest++;
if (buildCounterAddSlicerRequest < 3) {
o.slicer = buildSlicer();
}
buildCounterAddSlicerRequest--;
return o;
}
void checkAddSlicerRequest(api.AddSlicerRequest o) {
buildCounterAddSlicerRequest++;
if (buildCounterAddSlicerRequest < 3) {
checkSlicer(o.slicer!);
}
buildCounterAddSlicerRequest--;
}
core.int buildCounterAddSlicerResponse = 0;
api.AddSlicerResponse buildAddSlicerResponse() {
final o = api.AddSlicerResponse();
buildCounterAddSlicerResponse++;
if (buildCounterAddSlicerResponse < 3) {
o.slicer = buildSlicer();
}
buildCounterAddSlicerResponse--;
return o;
}
void checkAddSlicerResponse(api.AddSlicerResponse o) {
buildCounterAddSlicerResponse++;
if (buildCounterAddSlicerResponse < 3) {
checkSlicer(o.slicer!);
}
buildCounterAddSlicerResponse--;
}
core.List<api.RowData> buildUnnamed1() => [
buildRowData(),
buildRowData(),
];
void checkUnnamed1(core.List<api.RowData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRowData(o[0]);
checkRowData(o[1]);
}
core.int buildCounterAppendCellsRequest = 0;
api.AppendCellsRequest buildAppendCellsRequest() {
final o = api.AppendCellsRequest();
buildCounterAppendCellsRequest++;
if (buildCounterAppendCellsRequest < 3) {
o.fields = 'foo';
o.rows = buildUnnamed1();
o.sheetId = 42;
}
buildCounterAppendCellsRequest--;
return o;
}
void checkAppendCellsRequest(api.AppendCellsRequest o) {
buildCounterAppendCellsRequest++;
if (buildCounterAppendCellsRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkUnnamed1(o.rows!);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterAppendCellsRequest--;
}
core.int buildCounterAppendDimensionRequest = 0;
api.AppendDimensionRequest buildAppendDimensionRequest() {
final o = api.AppendDimensionRequest();
buildCounterAppendDimensionRequest++;
if (buildCounterAppendDimensionRequest < 3) {
o.dimension = 'foo';
o.length = 42;
o.sheetId = 42;
}
buildCounterAppendDimensionRequest--;
return o;
}
void checkAppendDimensionRequest(api.AppendDimensionRequest o) {
buildCounterAppendDimensionRequest++;
if (buildCounterAppendDimensionRequest < 3) {
unittest.expect(
o.dimension!,
unittest.equals('foo'),
);
unittest.expect(
o.length!,
unittest.equals(42),
);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterAppendDimensionRequest--;
}
core.int buildCounterAppendValuesResponse = 0;
api.AppendValuesResponse buildAppendValuesResponse() {
final o = api.AppendValuesResponse();
buildCounterAppendValuesResponse++;
if (buildCounterAppendValuesResponse < 3) {
o.spreadsheetId = 'foo';
o.tableRange = 'foo';
o.updates = buildUpdateValuesResponse();
}
buildCounterAppendValuesResponse--;
return o;
}
void checkAppendValuesResponse(api.AppendValuesResponse o) {
buildCounterAppendValuesResponse++;
if (buildCounterAppendValuesResponse < 3) {
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
unittest.expect(
o.tableRange!,
unittest.equals('foo'),
);
checkUpdateValuesResponse(o.updates!);
}
buildCounterAppendValuesResponse--;
}
core.int buildCounterAutoFillRequest = 0;
api.AutoFillRequest buildAutoFillRequest() {
final o = api.AutoFillRequest();
buildCounterAutoFillRequest++;
if (buildCounterAutoFillRequest < 3) {
o.range = buildGridRange();
o.sourceAndDestination = buildSourceAndDestination();
o.useAlternateSeries = true;
}
buildCounterAutoFillRequest--;
return o;
}
void checkAutoFillRequest(api.AutoFillRequest o) {
buildCounterAutoFillRequest++;
if (buildCounterAutoFillRequest < 3) {
checkGridRange(o.range!);
checkSourceAndDestination(o.sourceAndDestination!);
unittest.expect(o.useAlternateSeries!, unittest.isTrue);
}
buildCounterAutoFillRequest--;
}
core.int buildCounterAutoResizeDimensionsRequest = 0;
api.AutoResizeDimensionsRequest buildAutoResizeDimensionsRequest() {
final o = api.AutoResizeDimensionsRequest();
buildCounterAutoResizeDimensionsRequest++;
if (buildCounterAutoResizeDimensionsRequest < 3) {
o.dataSourceSheetDimensions = buildDataSourceSheetDimensionRange();
o.dimensions = buildDimensionRange();
}
buildCounterAutoResizeDimensionsRequest--;
return o;
}
void checkAutoResizeDimensionsRequest(api.AutoResizeDimensionsRequest o) {
buildCounterAutoResizeDimensionsRequest++;
if (buildCounterAutoResizeDimensionsRequest < 3) {
checkDataSourceSheetDimensionRange(o.dataSourceSheetDimensions!);
checkDimensionRange(o.dimensions!);
}
buildCounterAutoResizeDimensionsRequest--;
}
core.int buildCounterBandedRange = 0;
api.BandedRange buildBandedRange() {
final o = api.BandedRange();
buildCounterBandedRange++;
if (buildCounterBandedRange < 3) {
o.bandedRangeId = 42;
o.columnProperties = buildBandingProperties();
o.range = buildGridRange();
o.rowProperties = buildBandingProperties();
}
buildCounterBandedRange--;
return o;
}
void checkBandedRange(api.BandedRange o) {
buildCounterBandedRange++;
if (buildCounterBandedRange < 3) {
unittest.expect(
o.bandedRangeId!,
unittest.equals(42),
);
checkBandingProperties(o.columnProperties!);
checkGridRange(o.range!);
checkBandingProperties(o.rowProperties!);
}
buildCounterBandedRange--;
}
core.int buildCounterBandingProperties = 0;
api.BandingProperties buildBandingProperties() {
final o = api.BandingProperties();
buildCounterBandingProperties++;
if (buildCounterBandingProperties < 3) {
o.firstBandColor = buildColor();
o.firstBandColorStyle = buildColorStyle();
o.footerColor = buildColor();
o.footerColorStyle = buildColorStyle();
o.headerColor = buildColor();
o.headerColorStyle = buildColorStyle();
o.secondBandColor = buildColor();
o.secondBandColorStyle = buildColorStyle();
}
buildCounterBandingProperties--;
return o;
}
void checkBandingProperties(api.BandingProperties o) {
buildCounterBandingProperties++;
if (buildCounterBandingProperties < 3) {
checkColor(o.firstBandColor!);
checkColorStyle(o.firstBandColorStyle!);
checkColor(o.footerColor!);
checkColorStyle(o.footerColorStyle!);
checkColor(o.headerColor!);
checkColorStyle(o.headerColorStyle!);
checkColor(o.secondBandColor!);
checkColorStyle(o.secondBandColorStyle!);
}
buildCounterBandingProperties--;
}
core.int buildCounterBaselineValueFormat = 0;
api.BaselineValueFormat buildBaselineValueFormat() {
final o = api.BaselineValueFormat();
buildCounterBaselineValueFormat++;
if (buildCounterBaselineValueFormat < 3) {
o.comparisonType = 'foo';
o.description = 'foo';
o.negativeColor = buildColor();
o.negativeColorStyle = buildColorStyle();
o.position = buildTextPosition();
o.positiveColor = buildColor();
o.positiveColorStyle = buildColorStyle();
o.textFormat = buildTextFormat();
}
buildCounterBaselineValueFormat--;
return o;
}
void checkBaselineValueFormat(api.BaselineValueFormat o) {
buildCounterBaselineValueFormat++;
if (buildCounterBaselineValueFormat < 3) {
unittest.expect(
o.comparisonType!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
checkColor(o.negativeColor!);
checkColorStyle(o.negativeColorStyle!);
checkTextPosition(o.position!);
checkColor(o.positiveColor!);
checkColorStyle(o.positiveColorStyle!);
checkTextFormat(o.textFormat!);
}
buildCounterBaselineValueFormat--;
}
core.int buildCounterBasicChartAxis = 0;
api.BasicChartAxis buildBasicChartAxis() {
final o = api.BasicChartAxis();
buildCounterBasicChartAxis++;
if (buildCounterBasicChartAxis < 3) {
o.format = buildTextFormat();
o.position = 'foo';
o.title = 'foo';
o.titleTextPosition = buildTextPosition();
o.viewWindowOptions = buildChartAxisViewWindowOptions();
}
buildCounterBasicChartAxis--;
return o;
}
void checkBasicChartAxis(api.BasicChartAxis o) {
buildCounterBasicChartAxis++;
if (buildCounterBasicChartAxis < 3) {
checkTextFormat(o.format!);
unittest.expect(
o.position!,
unittest.equals('foo'),
);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
checkTextPosition(o.titleTextPosition!);
checkChartAxisViewWindowOptions(o.viewWindowOptions!);
}
buildCounterBasicChartAxis--;
}
core.int buildCounterBasicChartDomain = 0;
api.BasicChartDomain buildBasicChartDomain() {
final o = api.BasicChartDomain();
buildCounterBasicChartDomain++;
if (buildCounterBasicChartDomain < 3) {
o.domain = buildChartData();
o.reversed = true;
}
buildCounterBasicChartDomain--;
return o;
}
void checkBasicChartDomain(api.BasicChartDomain o) {
buildCounterBasicChartDomain++;
if (buildCounterBasicChartDomain < 3) {
checkChartData(o.domain!);
unittest.expect(o.reversed!, unittest.isTrue);
}
buildCounterBasicChartDomain--;
}
core.List<api.BasicSeriesDataPointStyleOverride> buildUnnamed2() => [
buildBasicSeriesDataPointStyleOverride(),
buildBasicSeriesDataPointStyleOverride(),
];
void checkUnnamed2(core.List<api.BasicSeriesDataPointStyleOverride> o) {
unittest.expect(o, unittest.hasLength(2));
checkBasicSeriesDataPointStyleOverride(o[0]);
checkBasicSeriesDataPointStyleOverride(o[1]);
}
core.int buildCounterBasicChartSeries = 0;
api.BasicChartSeries buildBasicChartSeries() {
final o = api.BasicChartSeries();
buildCounterBasicChartSeries++;
if (buildCounterBasicChartSeries < 3) {
o.color = buildColor();
o.colorStyle = buildColorStyle();
o.dataLabel = buildDataLabel();
o.lineStyle = buildLineStyle();
o.pointStyle = buildPointStyle();
o.series = buildChartData();
o.styleOverrides = buildUnnamed2();
o.targetAxis = 'foo';
o.type = 'foo';
}
buildCounterBasicChartSeries--;
return o;
}
void checkBasicChartSeries(api.BasicChartSeries o) {
buildCounterBasicChartSeries++;
if (buildCounterBasicChartSeries < 3) {
checkColor(o.color!);
checkColorStyle(o.colorStyle!);
checkDataLabel(o.dataLabel!);
checkLineStyle(o.lineStyle!);
checkPointStyle(o.pointStyle!);
checkChartData(o.series!);
checkUnnamed2(o.styleOverrides!);
unittest.expect(
o.targetAxis!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterBasicChartSeries--;
}
core.List<api.BasicChartAxis> buildUnnamed3() => [
buildBasicChartAxis(),
buildBasicChartAxis(),
];
void checkUnnamed3(core.List<api.BasicChartAxis> o) {
unittest.expect(o, unittest.hasLength(2));
checkBasicChartAxis(o[0]);
checkBasicChartAxis(o[1]);
}
core.List<api.BasicChartDomain> buildUnnamed4() => [
buildBasicChartDomain(),
buildBasicChartDomain(),
];
void checkUnnamed4(core.List<api.BasicChartDomain> o) {
unittest.expect(o, unittest.hasLength(2));
checkBasicChartDomain(o[0]);
checkBasicChartDomain(o[1]);
}
core.List<api.BasicChartSeries> buildUnnamed5() => [
buildBasicChartSeries(),
buildBasicChartSeries(),
];
void checkUnnamed5(core.List<api.BasicChartSeries> o) {
unittest.expect(o, unittest.hasLength(2));
checkBasicChartSeries(o[0]);
checkBasicChartSeries(o[1]);
}
core.int buildCounterBasicChartSpec = 0;
api.BasicChartSpec buildBasicChartSpec() {
final o = api.BasicChartSpec();
buildCounterBasicChartSpec++;
if (buildCounterBasicChartSpec < 3) {
o.axis = buildUnnamed3();
o.chartType = 'foo';
o.compareMode = 'foo';
o.domains = buildUnnamed4();
o.headerCount = 42;
o.interpolateNulls = true;
o.legendPosition = 'foo';
o.lineSmoothing = true;
o.series = buildUnnamed5();
o.stackedType = 'foo';
o.threeDimensional = true;
o.totalDataLabel = buildDataLabel();
}
buildCounterBasicChartSpec--;
return o;
}
void checkBasicChartSpec(api.BasicChartSpec o) {
buildCounterBasicChartSpec++;
if (buildCounterBasicChartSpec < 3) {
checkUnnamed3(o.axis!);
unittest.expect(
o.chartType!,
unittest.equals('foo'),
);
unittest.expect(
o.compareMode!,
unittest.equals('foo'),
);
checkUnnamed4(o.domains!);
unittest.expect(
o.headerCount!,
unittest.equals(42),
);
unittest.expect(o.interpolateNulls!, unittest.isTrue);
unittest.expect(
o.legendPosition!,
unittest.equals('foo'),
);
unittest.expect(o.lineSmoothing!, unittest.isTrue);
checkUnnamed5(o.series!);
unittest.expect(
o.stackedType!,
unittest.equals('foo'),
);
unittest.expect(o.threeDimensional!, unittest.isTrue);
checkDataLabel(o.totalDataLabel!);
}
buildCounterBasicChartSpec--;
}
core.Map<core.String, api.FilterCriteria> buildUnnamed6() => {
'x': buildFilterCriteria(),
'y': buildFilterCriteria(),
};
void checkUnnamed6(core.Map<core.String, api.FilterCriteria> o) {
unittest.expect(o, unittest.hasLength(2));
checkFilterCriteria(o['x']!);
checkFilterCriteria(o['y']!);
}
core.List<api.FilterSpec> buildUnnamed7() => [
buildFilterSpec(),
buildFilterSpec(),
];
void checkUnnamed7(core.List<api.FilterSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkFilterSpec(o[0]);
checkFilterSpec(o[1]);
}
core.List<api.SortSpec> buildUnnamed8() => [
buildSortSpec(),
buildSortSpec(),
];
void checkUnnamed8(core.List<api.SortSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkSortSpec(o[0]);
checkSortSpec(o[1]);
}
core.int buildCounterBasicFilter = 0;
api.BasicFilter buildBasicFilter() {
final o = api.BasicFilter();
buildCounterBasicFilter++;
if (buildCounterBasicFilter < 3) {
o.criteria = buildUnnamed6();
o.filterSpecs = buildUnnamed7();
o.range = buildGridRange();
o.sortSpecs = buildUnnamed8();
}
buildCounterBasicFilter--;
return o;
}
void checkBasicFilter(api.BasicFilter o) {
buildCounterBasicFilter++;
if (buildCounterBasicFilter < 3) {
checkUnnamed6(o.criteria!);
checkUnnamed7(o.filterSpecs!);
checkGridRange(o.range!);
checkUnnamed8(o.sortSpecs!);
}
buildCounterBasicFilter--;
}
core.int buildCounterBasicSeriesDataPointStyleOverride = 0;
api.BasicSeriesDataPointStyleOverride buildBasicSeriesDataPointStyleOverride() {
final o = api.BasicSeriesDataPointStyleOverride();
buildCounterBasicSeriesDataPointStyleOverride++;
if (buildCounterBasicSeriesDataPointStyleOverride < 3) {
o.color = buildColor();
o.colorStyle = buildColorStyle();
o.index = 42;
o.pointStyle = buildPointStyle();
}
buildCounterBasicSeriesDataPointStyleOverride--;
return o;
}
void checkBasicSeriesDataPointStyleOverride(
api.BasicSeriesDataPointStyleOverride o) {
buildCounterBasicSeriesDataPointStyleOverride++;
if (buildCounterBasicSeriesDataPointStyleOverride < 3) {
checkColor(o.color!);
checkColorStyle(o.colorStyle!);
unittest.expect(
o.index!,
unittest.equals(42),
);
checkPointStyle(o.pointStyle!);
}
buildCounterBasicSeriesDataPointStyleOverride--;
}
core.List<api.DataFilter> buildUnnamed9() => [
buildDataFilter(),
buildDataFilter(),
];
void checkUnnamed9(core.List<api.DataFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataFilter(o[0]);
checkDataFilter(o[1]);
}
core.int buildCounterBatchClearValuesByDataFilterRequest = 0;
api.BatchClearValuesByDataFilterRequest
buildBatchClearValuesByDataFilterRequest() {
final o = api.BatchClearValuesByDataFilterRequest();
buildCounterBatchClearValuesByDataFilterRequest++;
if (buildCounterBatchClearValuesByDataFilterRequest < 3) {
o.dataFilters = buildUnnamed9();
}
buildCounterBatchClearValuesByDataFilterRequest--;
return o;
}
void checkBatchClearValuesByDataFilterRequest(
api.BatchClearValuesByDataFilterRequest o) {
buildCounterBatchClearValuesByDataFilterRequest++;
if (buildCounterBatchClearValuesByDataFilterRequest < 3) {
checkUnnamed9(o.dataFilters!);
}
buildCounterBatchClearValuesByDataFilterRequest--;
}
core.List<core.String> buildUnnamed10() => [
'foo',
'foo',
];
void checkUnnamed10(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 buildCounterBatchClearValuesByDataFilterResponse = 0;
api.BatchClearValuesByDataFilterResponse
buildBatchClearValuesByDataFilterResponse() {
final o = api.BatchClearValuesByDataFilterResponse();
buildCounterBatchClearValuesByDataFilterResponse++;
if (buildCounterBatchClearValuesByDataFilterResponse < 3) {
o.clearedRanges = buildUnnamed10();
o.spreadsheetId = 'foo';
}
buildCounterBatchClearValuesByDataFilterResponse--;
return o;
}
void checkBatchClearValuesByDataFilterResponse(
api.BatchClearValuesByDataFilterResponse o) {
buildCounterBatchClearValuesByDataFilterResponse++;
if (buildCounterBatchClearValuesByDataFilterResponse < 3) {
checkUnnamed10(o.clearedRanges!);
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
}
buildCounterBatchClearValuesByDataFilterResponse--;
}
core.List<core.String> buildUnnamed11() => [
'foo',
'foo',
];
void checkUnnamed11(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 buildCounterBatchClearValuesRequest = 0;
api.BatchClearValuesRequest buildBatchClearValuesRequest() {
final o = api.BatchClearValuesRequest();
buildCounterBatchClearValuesRequest++;
if (buildCounterBatchClearValuesRequest < 3) {
o.ranges = buildUnnamed11();
}
buildCounterBatchClearValuesRequest--;
return o;
}
void checkBatchClearValuesRequest(api.BatchClearValuesRequest o) {
buildCounterBatchClearValuesRequest++;
if (buildCounterBatchClearValuesRequest < 3) {
checkUnnamed11(o.ranges!);
}
buildCounterBatchClearValuesRequest--;
}
core.List<core.String> buildUnnamed12() => [
'foo',
'foo',
];
void checkUnnamed12(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 buildCounterBatchClearValuesResponse = 0;
api.BatchClearValuesResponse buildBatchClearValuesResponse() {
final o = api.BatchClearValuesResponse();
buildCounterBatchClearValuesResponse++;
if (buildCounterBatchClearValuesResponse < 3) {
o.clearedRanges = buildUnnamed12();
o.spreadsheetId = 'foo';
}
buildCounterBatchClearValuesResponse--;
return o;
}
void checkBatchClearValuesResponse(api.BatchClearValuesResponse o) {
buildCounterBatchClearValuesResponse++;
if (buildCounterBatchClearValuesResponse < 3) {
checkUnnamed12(o.clearedRanges!);
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
}
buildCounterBatchClearValuesResponse--;
}
core.List<api.DataFilter> buildUnnamed13() => [
buildDataFilter(),
buildDataFilter(),
];
void checkUnnamed13(core.List<api.DataFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataFilter(o[0]);
checkDataFilter(o[1]);
}
core.int buildCounterBatchGetValuesByDataFilterRequest = 0;
api.BatchGetValuesByDataFilterRequest buildBatchGetValuesByDataFilterRequest() {
final o = api.BatchGetValuesByDataFilterRequest();
buildCounterBatchGetValuesByDataFilterRequest++;
if (buildCounterBatchGetValuesByDataFilterRequest < 3) {
o.dataFilters = buildUnnamed13();
o.dateTimeRenderOption = 'foo';
o.majorDimension = 'foo';
o.valueRenderOption = 'foo';
}
buildCounterBatchGetValuesByDataFilterRequest--;
return o;
}
void checkBatchGetValuesByDataFilterRequest(
api.BatchGetValuesByDataFilterRequest o) {
buildCounterBatchGetValuesByDataFilterRequest++;
if (buildCounterBatchGetValuesByDataFilterRequest < 3) {
checkUnnamed13(o.dataFilters!);
unittest.expect(
o.dateTimeRenderOption!,
unittest.equals('foo'),
);
unittest.expect(
o.majorDimension!,
unittest.equals('foo'),
);
unittest.expect(
o.valueRenderOption!,
unittest.equals('foo'),
);
}
buildCounterBatchGetValuesByDataFilterRequest--;
}
core.List<api.MatchedValueRange> buildUnnamed14() => [
buildMatchedValueRange(),
buildMatchedValueRange(),
];
void checkUnnamed14(core.List<api.MatchedValueRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkMatchedValueRange(o[0]);
checkMatchedValueRange(o[1]);
}
core.int buildCounterBatchGetValuesByDataFilterResponse = 0;
api.BatchGetValuesByDataFilterResponse
buildBatchGetValuesByDataFilterResponse() {
final o = api.BatchGetValuesByDataFilterResponse();
buildCounterBatchGetValuesByDataFilterResponse++;
if (buildCounterBatchGetValuesByDataFilterResponse < 3) {
o.spreadsheetId = 'foo';
o.valueRanges = buildUnnamed14();
}
buildCounterBatchGetValuesByDataFilterResponse--;
return o;
}
void checkBatchGetValuesByDataFilterResponse(
api.BatchGetValuesByDataFilterResponse o) {
buildCounterBatchGetValuesByDataFilterResponse++;
if (buildCounterBatchGetValuesByDataFilterResponse < 3) {
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
checkUnnamed14(o.valueRanges!);
}
buildCounterBatchGetValuesByDataFilterResponse--;
}
core.List<api.ValueRange> buildUnnamed15() => [
buildValueRange(),
buildValueRange(),
];
void checkUnnamed15(core.List<api.ValueRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkValueRange(o[0]);
checkValueRange(o[1]);
}
core.int buildCounterBatchGetValuesResponse = 0;
api.BatchGetValuesResponse buildBatchGetValuesResponse() {
final o = api.BatchGetValuesResponse();
buildCounterBatchGetValuesResponse++;
if (buildCounterBatchGetValuesResponse < 3) {
o.spreadsheetId = 'foo';
o.valueRanges = buildUnnamed15();
}
buildCounterBatchGetValuesResponse--;
return o;
}
void checkBatchGetValuesResponse(api.BatchGetValuesResponse o) {
buildCounterBatchGetValuesResponse++;
if (buildCounterBatchGetValuesResponse < 3) {
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
checkUnnamed15(o.valueRanges!);
}
buildCounterBatchGetValuesResponse--;
}
core.List<api.Request> buildUnnamed16() => [
buildRequest(),
buildRequest(),
];
void checkUnnamed16(core.List<api.Request> o) {
unittest.expect(o, unittest.hasLength(2));
checkRequest(o[0]);
checkRequest(o[1]);
}
core.List<core.String> buildUnnamed17() => [
'foo',
'foo',
];
void checkUnnamed17(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 buildCounterBatchUpdateSpreadsheetRequest = 0;
api.BatchUpdateSpreadsheetRequest buildBatchUpdateSpreadsheetRequest() {
final o = api.BatchUpdateSpreadsheetRequest();
buildCounterBatchUpdateSpreadsheetRequest++;
if (buildCounterBatchUpdateSpreadsheetRequest < 3) {
o.includeSpreadsheetInResponse = true;
o.requests = buildUnnamed16();
o.responseIncludeGridData = true;
o.responseRanges = buildUnnamed17();
}
buildCounterBatchUpdateSpreadsheetRequest--;
return o;
}
void checkBatchUpdateSpreadsheetRequest(api.BatchUpdateSpreadsheetRequest o) {
buildCounterBatchUpdateSpreadsheetRequest++;
if (buildCounterBatchUpdateSpreadsheetRequest < 3) {
unittest.expect(o.includeSpreadsheetInResponse!, unittest.isTrue);
checkUnnamed16(o.requests!);
unittest.expect(o.responseIncludeGridData!, unittest.isTrue);
checkUnnamed17(o.responseRanges!);
}
buildCounterBatchUpdateSpreadsheetRequest--;
}
core.List<api.Response> buildUnnamed18() => [
buildResponse(),
buildResponse(),
];
void checkUnnamed18(core.List<api.Response> o) {
unittest.expect(o, unittest.hasLength(2));
checkResponse(o[0]);
checkResponse(o[1]);
}
core.int buildCounterBatchUpdateSpreadsheetResponse = 0;
api.BatchUpdateSpreadsheetResponse buildBatchUpdateSpreadsheetResponse() {
final o = api.BatchUpdateSpreadsheetResponse();
buildCounterBatchUpdateSpreadsheetResponse++;
if (buildCounterBatchUpdateSpreadsheetResponse < 3) {
o.replies = buildUnnamed18();
o.spreadsheetId = 'foo';
o.updatedSpreadsheet = buildSpreadsheet();
}
buildCounterBatchUpdateSpreadsheetResponse--;
return o;
}
void checkBatchUpdateSpreadsheetResponse(api.BatchUpdateSpreadsheetResponse o) {
buildCounterBatchUpdateSpreadsheetResponse++;
if (buildCounterBatchUpdateSpreadsheetResponse < 3) {
checkUnnamed18(o.replies!);
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
checkSpreadsheet(o.updatedSpreadsheet!);
}
buildCounterBatchUpdateSpreadsheetResponse--;
}
core.List<api.DataFilterValueRange> buildUnnamed19() => [
buildDataFilterValueRange(),
buildDataFilterValueRange(),
];
void checkUnnamed19(core.List<api.DataFilterValueRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataFilterValueRange(o[0]);
checkDataFilterValueRange(o[1]);
}
core.int buildCounterBatchUpdateValuesByDataFilterRequest = 0;
api.BatchUpdateValuesByDataFilterRequest
buildBatchUpdateValuesByDataFilterRequest() {
final o = api.BatchUpdateValuesByDataFilterRequest();
buildCounterBatchUpdateValuesByDataFilterRequest++;
if (buildCounterBatchUpdateValuesByDataFilterRequest < 3) {
o.data = buildUnnamed19();
o.includeValuesInResponse = true;
o.responseDateTimeRenderOption = 'foo';
o.responseValueRenderOption = 'foo';
o.valueInputOption = 'foo';
}
buildCounterBatchUpdateValuesByDataFilterRequest--;
return o;
}
void checkBatchUpdateValuesByDataFilterRequest(
api.BatchUpdateValuesByDataFilterRequest o) {
buildCounterBatchUpdateValuesByDataFilterRequest++;
if (buildCounterBatchUpdateValuesByDataFilterRequest < 3) {
checkUnnamed19(o.data!);
unittest.expect(o.includeValuesInResponse!, unittest.isTrue);
unittest.expect(
o.responseDateTimeRenderOption!,
unittest.equals('foo'),
);
unittest.expect(
o.responseValueRenderOption!,
unittest.equals('foo'),
);
unittest.expect(
o.valueInputOption!,
unittest.equals('foo'),
);
}
buildCounterBatchUpdateValuesByDataFilterRequest--;
}
core.List<api.UpdateValuesByDataFilterResponse> buildUnnamed20() => [
buildUpdateValuesByDataFilterResponse(),
buildUpdateValuesByDataFilterResponse(),
];
void checkUnnamed20(core.List<api.UpdateValuesByDataFilterResponse> o) {
unittest.expect(o, unittest.hasLength(2));
checkUpdateValuesByDataFilterResponse(o[0]);
checkUpdateValuesByDataFilterResponse(o[1]);
}
core.int buildCounterBatchUpdateValuesByDataFilterResponse = 0;
api.BatchUpdateValuesByDataFilterResponse
buildBatchUpdateValuesByDataFilterResponse() {
final o = api.BatchUpdateValuesByDataFilterResponse();
buildCounterBatchUpdateValuesByDataFilterResponse++;
if (buildCounterBatchUpdateValuesByDataFilterResponse < 3) {
o.responses = buildUnnamed20();
o.spreadsheetId = 'foo';
o.totalUpdatedCells = 42;
o.totalUpdatedColumns = 42;
o.totalUpdatedRows = 42;
o.totalUpdatedSheets = 42;
}
buildCounterBatchUpdateValuesByDataFilterResponse--;
return o;
}
void checkBatchUpdateValuesByDataFilterResponse(
api.BatchUpdateValuesByDataFilterResponse o) {
buildCounterBatchUpdateValuesByDataFilterResponse++;
if (buildCounterBatchUpdateValuesByDataFilterResponse < 3) {
checkUnnamed20(o.responses!);
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
unittest.expect(
o.totalUpdatedCells!,
unittest.equals(42),
);
unittest.expect(
o.totalUpdatedColumns!,
unittest.equals(42),
);
unittest.expect(
o.totalUpdatedRows!,
unittest.equals(42),
);
unittest.expect(
o.totalUpdatedSheets!,
unittest.equals(42),
);
}
buildCounterBatchUpdateValuesByDataFilterResponse--;
}
core.List<api.ValueRange> buildUnnamed21() => [
buildValueRange(),
buildValueRange(),
];
void checkUnnamed21(core.List<api.ValueRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkValueRange(o[0]);
checkValueRange(o[1]);
}
core.int buildCounterBatchUpdateValuesRequest = 0;
api.BatchUpdateValuesRequest buildBatchUpdateValuesRequest() {
final o = api.BatchUpdateValuesRequest();
buildCounterBatchUpdateValuesRequest++;
if (buildCounterBatchUpdateValuesRequest < 3) {
o.data = buildUnnamed21();
o.includeValuesInResponse = true;
o.responseDateTimeRenderOption = 'foo';
o.responseValueRenderOption = 'foo';
o.valueInputOption = 'foo';
}
buildCounterBatchUpdateValuesRequest--;
return o;
}
void checkBatchUpdateValuesRequest(api.BatchUpdateValuesRequest o) {
buildCounterBatchUpdateValuesRequest++;
if (buildCounterBatchUpdateValuesRequest < 3) {
checkUnnamed21(o.data!);
unittest.expect(o.includeValuesInResponse!, unittest.isTrue);
unittest.expect(
o.responseDateTimeRenderOption!,
unittest.equals('foo'),
);
unittest.expect(
o.responseValueRenderOption!,
unittest.equals('foo'),
);
unittest.expect(
o.valueInputOption!,
unittest.equals('foo'),
);
}
buildCounterBatchUpdateValuesRequest--;
}
core.List<api.UpdateValuesResponse> buildUnnamed22() => [
buildUpdateValuesResponse(),
buildUpdateValuesResponse(),
];
void checkUnnamed22(core.List<api.UpdateValuesResponse> o) {
unittest.expect(o, unittest.hasLength(2));
checkUpdateValuesResponse(o[0]);
checkUpdateValuesResponse(o[1]);
}
core.int buildCounterBatchUpdateValuesResponse = 0;
api.BatchUpdateValuesResponse buildBatchUpdateValuesResponse() {
final o = api.BatchUpdateValuesResponse();
buildCounterBatchUpdateValuesResponse++;
if (buildCounterBatchUpdateValuesResponse < 3) {
o.responses = buildUnnamed22();
o.spreadsheetId = 'foo';
o.totalUpdatedCells = 42;
o.totalUpdatedColumns = 42;
o.totalUpdatedRows = 42;
o.totalUpdatedSheets = 42;
}
buildCounterBatchUpdateValuesResponse--;
return o;
}
void checkBatchUpdateValuesResponse(api.BatchUpdateValuesResponse o) {
buildCounterBatchUpdateValuesResponse++;
if (buildCounterBatchUpdateValuesResponse < 3) {
checkUnnamed22(o.responses!);
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
unittest.expect(
o.totalUpdatedCells!,
unittest.equals(42),
);
unittest.expect(
o.totalUpdatedColumns!,
unittest.equals(42),
);
unittest.expect(
o.totalUpdatedRows!,
unittest.equals(42),
);
unittest.expect(
o.totalUpdatedSheets!,
unittest.equals(42),
);
}
buildCounterBatchUpdateValuesResponse--;
}
core.int buildCounterBigQueryDataSourceSpec = 0;
api.BigQueryDataSourceSpec buildBigQueryDataSourceSpec() {
final o = api.BigQueryDataSourceSpec();
buildCounterBigQueryDataSourceSpec++;
if (buildCounterBigQueryDataSourceSpec < 3) {
o.projectId = 'foo';
o.querySpec = buildBigQueryQuerySpec();
o.tableSpec = buildBigQueryTableSpec();
}
buildCounterBigQueryDataSourceSpec--;
return o;
}
void checkBigQueryDataSourceSpec(api.BigQueryDataSourceSpec o) {
buildCounterBigQueryDataSourceSpec++;
if (buildCounterBigQueryDataSourceSpec < 3) {
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
checkBigQueryQuerySpec(o.querySpec!);
checkBigQueryTableSpec(o.tableSpec!);
}
buildCounterBigQueryDataSourceSpec--;
}
core.int buildCounterBigQueryQuerySpec = 0;
api.BigQueryQuerySpec buildBigQueryQuerySpec() {
final o = api.BigQueryQuerySpec();
buildCounterBigQueryQuerySpec++;
if (buildCounterBigQueryQuerySpec < 3) {
o.rawQuery = 'foo';
}
buildCounterBigQueryQuerySpec--;
return o;
}
void checkBigQueryQuerySpec(api.BigQueryQuerySpec o) {
buildCounterBigQueryQuerySpec++;
if (buildCounterBigQueryQuerySpec < 3) {
unittest.expect(
o.rawQuery!,
unittest.equals('foo'),
);
}
buildCounterBigQueryQuerySpec--;
}
core.int buildCounterBigQueryTableSpec = 0;
api.BigQueryTableSpec buildBigQueryTableSpec() {
final o = api.BigQueryTableSpec();
buildCounterBigQueryTableSpec++;
if (buildCounterBigQueryTableSpec < 3) {
o.datasetId = 'foo';
o.tableId = 'foo';
o.tableProjectId = 'foo';
}
buildCounterBigQueryTableSpec--;
return o;
}
void checkBigQueryTableSpec(api.BigQueryTableSpec o) {
buildCounterBigQueryTableSpec++;
if (buildCounterBigQueryTableSpec < 3) {
unittest.expect(
o.datasetId!,
unittest.equals('foo'),
);
unittest.expect(
o.tableId!,
unittest.equals('foo'),
);
unittest.expect(
o.tableProjectId!,
unittest.equals('foo'),
);
}
buildCounterBigQueryTableSpec--;
}
core.List<api.ConditionValue> buildUnnamed23() => [
buildConditionValue(),
buildConditionValue(),
];
void checkUnnamed23(core.List<api.ConditionValue> o) {
unittest.expect(o, unittest.hasLength(2));
checkConditionValue(o[0]);
checkConditionValue(o[1]);
}
core.int buildCounterBooleanCondition = 0;
api.BooleanCondition buildBooleanCondition() {
final o = api.BooleanCondition();
buildCounterBooleanCondition++;
if (buildCounterBooleanCondition < 3) {
o.type = 'foo';
o.values = buildUnnamed23();
}
buildCounterBooleanCondition--;
return o;
}
void checkBooleanCondition(api.BooleanCondition o) {
buildCounterBooleanCondition++;
if (buildCounterBooleanCondition < 3) {
unittest.expect(
o.type!,
unittest.equals('foo'),
);
checkUnnamed23(o.values!);
}
buildCounterBooleanCondition--;
}
core.int buildCounterBooleanRule = 0;
api.BooleanRule buildBooleanRule() {
final o = api.BooleanRule();
buildCounterBooleanRule++;
if (buildCounterBooleanRule < 3) {
o.condition = buildBooleanCondition();
o.format = buildCellFormat();
}
buildCounterBooleanRule--;
return o;
}
void checkBooleanRule(api.BooleanRule o) {
buildCounterBooleanRule++;
if (buildCounterBooleanRule < 3) {
checkBooleanCondition(o.condition!);
checkCellFormat(o.format!);
}
buildCounterBooleanRule--;
}
core.int buildCounterBorder = 0;
api.Border buildBorder() {
final o = api.Border();
buildCounterBorder++;
if (buildCounterBorder < 3) {
o.color = buildColor();
o.colorStyle = buildColorStyle();
o.style = 'foo';
o.width = 42;
}
buildCounterBorder--;
return o;
}
void checkBorder(api.Border o) {
buildCounterBorder++;
if (buildCounterBorder < 3) {
checkColor(o.color!);
checkColorStyle(o.colorStyle!);
unittest.expect(
o.style!,
unittest.equals('foo'),
);
unittest.expect(
o.width!,
unittest.equals(42),
);
}
buildCounterBorder--;
}
core.int buildCounterBorders = 0;
api.Borders buildBorders() {
final o = api.Borders();
buildCounterBorders++;
if (buildCounterBorders < 3) {
o.bottom = buildBorder();
o.left = buildBorder();
o.right = buildBorder();
o.top = buildBorder();
}
buildCounterBorders--;
return o;
}
void checkBorders(api.Borders o) {
buildCounterBorders++;
if (buildCounterBorders < 3) {
checkBorder(o.bottom!);
checkBorder(o.left!);
checkBorder(o.right!);
checkBorder(o.top!);
}
buildCounterBorders--;
}
core.int buildCounterBubbleChartSpec = 0;
api.BubbleChartSpec buildBubbleChartSpec() {
final o = api.BubbleChartSpec();
buildCounterBubbleChartSpec++;
if (buildCounterBubbleChartSpec < 3) {
o.bubbleBorderColor = buildColor();
o.bubbleBorderColorStyle = buildColorStyle();
o.bubbleLabels = buildChartData();
o.bubbleMaxRadiusSize = 42;
o.bubbleMinRadiusSize = 42;
o.bubbleOpacity = 42.0;
o.bubbleSizes = buildChartData();
o.bubbleTextStyle = buildTextFormat();
o.domain = buildChartData();
o.groupIds = buildChartData();
o.legendPosition = 'foo';
o.series = buildChartData();
}
buildCounterBubbleChartSpec--;
return o;
}
void checkBubbleChartSpec(api.BubbleChartSpec o) {
buildCounterBubbleChartSpec++;
if (buildCounterBubbleChartSpec < 3) {
checkColor(o.bubbleBorderColor!);
checkColorStyle(o.bubbleBorderColorStyle!);
checkChartData(o.bubbleLabels!);
unittest.expect(
o.bubbleMaxRadiusSize!,
unittest.equals(42),
);
unittest.expect(
o.bubbleMinRadiusSize!,
unittest.equals(42),
);
unittest.expect(
o.bubbleOpacity!,
unittest.equals(42.0),
);
checkChartData(o.bubbleSizes!);
checkTextFormat(o.bubbleTextStyle!);
checkChartData(o.domain!);
checkChartData(o.groupIds!);
unittest.expect(
o.legendPosition!,
unittest.equals('foo'),
);
checkChartData(o.series!);
}
buildCounterBubbleChartSpec--;
}
core.List<api.CandlestickData> buildUnnamed24() => [
buildCandlestickData(),
buildCandlestickData(),
];
void checkUnnamed24(core.List<api.CandlestickData> o) {
unittest.expect(o, unittest.hasLength(2));
checkCandlestickData(o[0]);
checkCandlestickData(o[1]);
}
core.int buildCounterCandlestickChartSpec = 0;
api.CandlestickChartSpec buildCandlestickChartSpec() {
final o = api.CandlestickChartSpec();
buildCounterCandlestickChartSpec++;
if (buildCounterCandlestickChartSpec < 3) {
o.data = buildUnnamed24();
o.domain = buildCandlestickDomain();
}
buildCounterCandlestickChartSpec--;
return o;
}
void checkCandlestickChartSpec(api.CandlestickChartSpec o) {
buildCounterCandlestickChartSpec++;
if (buildCounterCandlestickChartSpec < 3) {
checkUnnamed24(o.data!);
checkCandlestickDomain(o.domain!);
}
buildCounterCandlestickChartSpec--;
}
core.int buildCounterCandlestickData = 0;
api.CandlestickData buildCandlestickData() {
final o = api.CandlestickData();
buildCounterCandlestickData++;
if (buildCounterCandlestickData < 3) {
o.closeSeries = buildCandlestickSeries();
o.highSeries = buildCandlestickSeries();
o.lowSeries = buildCandlestickSeries();
o.openSeries = buildCandlestickSeries();
}
buildCounterCandlestickData--;
return o;
}
void checkCandlestickData(api.CandlestickData o) {
buildCounterCandlestickData++;
if (buildCounterCandlestickData < 3) {
checkCandlestickSeries(o.closeSeries!);
checkCandlestickSeries(o.highSeries!);
checkCandlestickSeries(o.lowSeries!);
checkCandlestickSeries(o.openSeries!);
}
buildCounterCandlestickData--;
}
core.int buildCounterCandlestickDomain = 0;
api.CandlestickDomain buildCandlestickDomain() {
final o = api.CandlestickDomain();
buildCounterCandlestickDomain++;
if (buildCounterCandlestickDomain < 3) {
o.data = buildChartData();
o.reversed = true;
}
buildCounterCandlestickDomain--;
return o;
}
void checkCandlestickDomain(api.CandlestickDomain o) {
buildCounterCandlestickDomain++;
if (buildCounterCandlestickDomain < 3) {
checkChartData(o.data!);
unittest.expect(o.reversed!, unittest.isTrue);
}
buildCounterCandlestickDomain--;
}
core.int buildCounterCandlestickSeries = 0;
api.CandlestickSeries buildCandlestickSeries() {
final o = api.CandlestickSeries();
buildCounterCandlestickSeries++;
if (buildCounterCandlestickSeries < 3) {
o.data = buildChartData();
}
buildCounterCandlestickSeries--;
return o;
}
void checkCandlestickSeries(api.CandlestickSeries o) {
buildCounterCandlestickSeries++;
if (buildCounterCandlestickSeries < 3) {
checkChartData(o.data!);
}
buildCounterCandlestickSeries--;
}
core.List<api.TextFormatRun> buildUnnamed25() => [
buildTextFormatRun(),
buildTextFormatRun(),
];
void checkUnnamed25(core.List<api.TextFormatRun> o) {
unittest.expect(o, unittest.hasLength(2));
checkTextFormatRun(o[0]);
checkTextFormatRun(o[1]);
}
core.int buildCounterCellData = 0;
api.CellData buildCellData() {
final o = api.CellData();
buildCounterCellData++;
if (buildCounterCellData < 3) {
o.dataSourceFormula = buildDataSourceFormula();
o.dataSourceTable = buildDataSourceTable();
o.dataValidation = buildDataValidationRule();
o.effectiveFormat = buildCellFormat();
o.effectiveValue = buildExtendedValue();
o.formattedValue = 'foo';
o.hyperlink = 'foo';
o.note = 'foo';
o.pivotTable = buildPivotTable();
o.textFormatRuns = buildUnnamed25();
o.userEnteredFormat = buildCellFormat();
o.userEnteredValue = buildExtendedValue();
}
buildCounterCellData--;
return o;
}
void checkCellData(api.CellData o) {
buildCounterCellData++;
if (buildCounterCellData < 3) {
checkDataSourceFormula(o.dataSourceFormula!);
checkDataSourceTable(o.dataSourceTable!);
checkDataValidationRule(o.dataValidation!);
checkCellFormat(o.effectiveFormat!);
checkExtendedValue(o.effectiveValue!);
unittest.expect(
o.formattedValue!,
unittest.equals('foo'),
);
unittest.expect(
o.hyperlink!,
unittest.equals('foo'),
);
unittest.expect(
o.note!,
unittest.equals('foo'),
);
checkPivotTable(o.pivotTable!);
checkUnnamed25(o.textFormatRuns!);
checkCellFormat(o.userEnteredFormat!);
checkExtendedValue(o.userEnteredValue!);
}
buildCounterCellData--;
}
core.int buildCounterCellFormat = 0;
api.CellFormat buildCellFormat() {
final o = api.CellFormat();
buildCounterCellFormat++;
if (buildCounterCellFormat < 3) {
o.backgroundColor = buildColor();
o.backgroundColorStyle = buildColorStyle();
o.borders = buildBorders();
o.horizontalAlignment = 'foo';
o.hyperlinkDisplayType = 'foo';
o.numberFormat = buildNumberFormat();
o.padding = buildPadding();
o.textDirection = 'foo';
o.textFormat = buildTextFormat();
o.textRotation = buildTextRotation();
o.verticalAlignment = 'foo';
o.wrapStrategy = 'foo';
}
buildCounterCellFormat--;
return o;
}
void checkCellFormat(api.CellFormat o) {
buildCounterCellFormat++;
if (buildCounterCellFormat < 3) {
checkColor(o.backgroundColor!);
checkColorStyle(o.backgroundColorStyle!);
checkBorders(o.borders!);
unittest.expect(
o.horizontalAlignment!,
unittest.equals('foo'),
);
unittest.expect(
o.hyperlinkDisplayType!,
unittest.equals('foo'),
);
checkNumberFormat(o.numberFormat!);
checkPadding(o.padding!);
unittest.expect(
o.textDirection!,
unittest.equals('foo'),
);
checkTextFormat(o.textFormat!);
checkTextRotation(o.textRotation!);
unittest.expect(
o.verticalAlignment!,
unittest.equals('foo'),
);
unittest.expect(
o.wrapStrategy!,
unittest.equals('foo'),
);
}
buildCounterCellFormat--;
}
core.int buildCounterChartAxisViewWindowOptions = 0;
api.ChartAxisViewWindowOptions buildChartAxisViewWindowOptions() {
final o = api.ChartAxisViewWindowOptions();
buildCounterChartAxisViewWindowOptions++;
if (buildCounterChartAxisViewWindowOptions < 3) {
o.viewWindowMax = 42.0;
o.viewWindowMin = 42.0;
o.viewWindowMode = 'foo';
}
buildCounterChartAxisViewWindowOptions--;
return o;
}
void checkChartAxisViewWindowOptions(api.ChartAxisViewWindowOptions o) {
buildCounterChartAxisViewWindowOptions++;
if (buildCounterChartAxisViewWindowOptions < 3) {
unittest.expect(
o.viewWindowMax!,
unittest.equals(42.0),
);
unittest.expect(
o.viewWindowMin!,
unittest.equals(42.0),
);
unittest.expect(
o.viewWindowMode!,
unittest.equals('foo'),
);
}
buildCounterChartAxisViewWindowOptions--;
}
core.int buildCounterChartCustomNumberFormatOptions = 0;
api.ChartCustomNumberFormatOptions buildChartCustomNumberFormatOptions() {
final o = api.ChartCustomNumberFormatOptions();
buildCounterChartCustomNumberFormatOptions++;
if (buildCounterChartCustomNumberFormatOptions < 3) {
o.prefix = 'foo';
o.suffix = 'foo';
}
buildCounterChartCustomNumberFormatOptions--;
return o;
}
void checkChartCustomNumberFormatOptions(api.ChartCustomNumberFormatOptions o) {
buildCounterChartCustomNumberFormatOptions++;
if (buildCounterChartCustomNumberFormatOptions < 3) {
unittest.expect(
o.prefix!,
unittest.equals('foo'),
);
unittest.expect(
o.suffix!,
unittest.equals('foo'),
);
}
buildCounterChartCustomNumberFormatOptions--;
}
core.int buildCounterChartData = 0;
api.ChartData buildChartData() {
final o = api.ChartData();
buildCounterChartData++;
if (buildCounterChartData < 3) {
o.aggregateType = 'foo';
o.columnReference = buildDataSourceColumnReference();
o.groupRule = buildChartGroupRule();
o.sourceRange = buildChartSourceRange();
}
buildCounterChartData--;
return o;
}
void checkChartData(api.ChartData o) {
buildCounterChartData++;
if (buildCounterChartData < 3) {
unittest.expect(
o.aggregateType!,
unittest.equals('foo'),
);
checkDataSourceColumnReference(o.columnReference!);
checkChartGroupRule(o.groupRule!);
checkChartSourceRange(o.sourceRange!);
}
buildCounterChartData--;
}
core.int buildCounterChartDateTimeRule = 0;
api.ChartDateTimeRule buildChartDateTimeRule() {
final o = api.ChartDateTimeRule();
buildCounterChartDateTimeRule++;
if (buildCounterChartDateTimeRule < 3) {
o.type = 'foo';
}
buildCounterChartDateTimeRule--;
return o;
}
void checkChartDateTimeRule(api.ChartDateTimeRule o) {
buildCounterChartDateTimeRule++;
if (buildCounterChartDateTimeRule < 3) {
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterChartDateTimeRule--;
}
core.int buildCounterChartGroupRule = 0;
api.ChartGroupRule buildChartGroupRule() {
final o = api.ChartGroupRule();
buildCounterChartGroupRule++;
if (buildCounterChartGroupRule < 3) {
o.dateTimeRule = buildChartDateTimeRule();
o.histogramRule = buildChartHistogramRule();
}
buildCounterChartGroupRule--;
return o;
}
void checkChartGroupRule(api.ChartGroupRule o) {
buildCounterChartGroupRule++;
if (buildCounterChartGroupRule < 3) {
checkChartDateTimeRule(o.dateTimeRule!);
checkChartHistogramRule(o.histogramRule!);
}
buildCounterChartGroupRule--;
}
core.int buildCounterChartHistogramRule = 0;
api.ChartHistogramRule buildChartHistogramRule() {
final o = api.ChartHistogramRule();
buildCounterChartHistogramRule++;
if (buildCounterChartHistogramRule < 3) {
o.intervalSize = 42.0;
o.maxValue = 42.0;
o.minValue = 42.0;
}
buildCounterChartHistogramRule--;
return o;
}
void checkChartHistogramRule(api.ChartHistogramRule o) {
buildCounterChartHistogramRule++;
if (buildCounterChartHistogramRule < 3) {
unittest.expect(
o.intervalSize!,
unittest.equals(42.0),
);
unittest.expect(
o.maxValue!,
unittest.equals(42.0),
);
unittest.expect(
o.minValue!,
unittest.equals(42.0),
);
}
buildCounterChartHistogramRule--;
}
core.List<api.GridRange> buildUnnamed26() => [
buildGridRange(),
buildGridRange(),
];
void checkUnnamed26(core.List<api.GridRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkGridRange(o[0]);
checkGridRange(o[1]);
}
core.int buildCounterChartSourceRange = 0;
api.ChartSourceRange buildChartSourceRange() {
final o = api.ChartSourceRange();
buildCounterChartSourceRange++;
if (buildCounterChartSourceRange < 3) {
o.sources = buildUnnamed26();
}
buildCounterChartSourceRange--;
return o;
}
void checkChartSourceRange(api.ChartSourceRange o) {
buildCounterChartSourceRange++;
if (buildCounterChartSourceRange < 3) {
checkUnnamed26(o.sources!);
}
buildCounterChartSourceRange--;
}
core.List<api.FilterSpec> buildUnnamed27() => [
buildFilterSpec(),
buildFilterSpec(),
];
void checkUnnamed27(core.List<api.FilterSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkFilterSpec(o[0]);
checkFilterSpec(o[1]);
}
core.List<api.SortSpec> buildUnnamed28() => [
buildSortSpec(),
buildSortSpec(),
];
void checkUnnamed28(core.List<api.SortSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkSortSpec(o[0]);
checkSortSpec(o[1]);
}
core.int buildCounterChartSpec = 0;
api.ChartSpec buildChartSpec() {
final o = api.ChartSpec();
buildCounterChartSpec++;
if (buildCounterChartSpec < 3) {
o.altText = 'foo';
o.backgroundColor = buildColor();
o.backgroundColorStyle = buildColorStyle();
o.basicChart = buildBasicChartSpec();
o.bubbleChart = buildBubbleChartSpec();
o.candlestickChart = buildCandlestickChartSpec();
o.dataSourceChartProperties = buildDataSourceChartProperties();
o.filterSpecs = buildUnnamed27();
o.fontName = 'foo';
o.hiddenDimensionStrategy = 'foo';
o.histogramChart = buildHistogramChartSpec();
o.maximized = true;
o.orgChart = buildOrgChartSpec();
o.pieChart = buildPieChartSpec();
o.scorecardChart = buildScorecardChartSpec();
o.sortSpecs = buildUnnamed28();
o.subtitle = 'foo';
o.subtitleTextFormat = buildTextFormat();
o.subtitleTextPosition = buildTextPosition();
o.title = 'foo';
o.titleTextFormat = buildTextFormat();
o.titleTextPosition = buildTextPosition();
o.treemapChart = buildTreemapChartSpec();
o.waterfallChart = buildWaterfallChartSpec();
}
buildCounterChartSpec--;
return o;
}
void checkChartSpec(api.ChartSpec o) {
buildCounterChartSpec++;
if (buildCounterChartSpec < 3) {
unittest.expect(
o.altText!,
unittest.equals('foo'),
);
checkColor(o.backgroundColor!);
checkColorStyle(o.backgroundColorStyle!);
checkBasicChartSpec(o.basicChart!);
checkBubbleChartSpec(o.bubbleChart!);
checkCandlestickChartSpec(o.candlestickChart!);
checkDataSourceChartProperties(o.dataSourceChartProperties!);
checkUnnamed27(o.filterSpecs!);
unittest.expect(
o.fontName!,
unittest.equals('foo'),
);
unittest.expect(
o.hiddenDimensionStrategy!,
unittest.equals('foo'),
);
checkHistogramChartSpec(o.histogramChart!);
unittest.expect(o.maximized!, unittest.isTrue);
checkOrgChartSpec(o.orgChart!);
checkPieChartSpec(o.pieChart!);
checkScorecardChartSpec(o.scorecardChart!);
checkUnnamed28(o.sortSpecs!);
unittest.expect(
o.subtitle!,
unittest.equals('foo'),
);
checkTextFormat(o.subtitleTextFormat!);
checkTextPosition(o.subtitleTextPosition!);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
checkTextFormat(o.titleTextFormat!);
checkTextPosition(o.titleTextPosition!);
checkTreemapChartSpec(o.treemapChart!);
checkWaterfallChartSpec(o.waterfallChart!);
}
buildCounterChartSpec--;
}
core.int buildCounterClearBasicFilterRequest = 0;
api.ClearBasicFilterRequest buildClearBasicFilterRequest() {
final o = api.ClearBasicFilterRequest();
buildCounterClearBasicFilterRequest++;
if (buildCounterClearBasicFilterRequest < 3) {
o.sheetId = 42;
}
buildCounterClearBasicFilterRequest--;
return o;
}
void checkClearBasicFilterRequest(api.ClearBasicFilterRequest o) {
buildCounterClearBasicFilterRequest++;
if (buildCounterClearBasicFilterRequest < 3) {
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterClearBasicFilterRequest--;
}
core.int buildCounterClearValuesRequest = 0;
api.ClearValuesRequest buildClearValuesRequest() {
final o = api.ClearValuesRequest();
buildCounterClearValuesRequest++;
if (buildCounterClearValuesRequest < 3) {}
buildCounterClearValuesRequest--;
return o;
}
void checkClearValuesRequest(api.ClearValuesRequest o) {
buildCounterClearValuesRequest++;
if (buildCounterClearValuesRequest < 3) {}
buildCounterClearValuesRequest--;
}
core.int buildCounterClearValuesResponse = 0;
api.ClearValuesResponse buildClearValuesResponse() {
final o = api.ClearValuesResponse();
buildCounterClearValuesResponse++;
if (buildCounterClearValuesResponse < 3) {
o.clearedRange = 'foo';
o.spreadsheetId = 'foo';
}
buildCounterClearValuesResponse--;
return o;
}
void checkClearValuesResponse(api.ClearValuesResponse o) {
buildCounterClearValuesResponse++;
if (buildCounterClearValuesResponse < 3) {
unittest.expect(
o.clearedRange!,
unittest.equals('foo'),
);
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
}
buildCounterClearValuesResponse--;
}
core.int buildCounterColor = 0;
api.Color buildColor() {
final o = api.Color();
buildCounterColor++;
if (buildCounterColor < 3) {
o.alpha = 42.0;
o.blue = 42.0;
o.green = 42.0;
o.red = 42.0;
}
buildCounterColor--;
return o;
}
void checkColor(api.Color o) {
buildCounterColor++;
if (buildCounterColor < 3) {
unittest.expect(
o.alpha!,
unittest.equals(42.0),
);
unittest.expect(
o.blue!,
unittest.equals(42.0),
);
unittest.expect(
o.green!,
unittest.equals(42.0),
);
unittest.expect(
o.red!,
unittest.equals(42.0),
);
}
buildCounterColor--;
}
core.int buildCounterColorStyle = 0;
api.ColorStyle buildColorStyle() {
final o = api.ColorStyle();
buildCounterColorStyle++;
if (buildCounterColorStyle < 3) {
o.rgbColor = buildColor();
o.themeColor = 'foo';
}
buildCounterColorStyle--;
return o;
}
void checkColorStyle(api.ColorStyle o) {
buildCounterColorStyle++;
if (buildCounterColorStyle < 3) {
checkColor(o.rgbColor!);
unittest.expect(
o.themeColor!,
unittest.equals('foo'),
);
}
buildCounterColorStyle--;
}
core.int buildCounterConditionValue = 0;
api.ConditionValue buildConditionValue() {
final o = api.ConditionValue();
buildCounterConditionValue++;
if (buildCounterConditionValue < 3) {
o.relativeDate = 'foo';
o.userEnteredValue = 'foo';
}
buildCounterConditionValue--;
return o;
}
void checkConditionValue(api.ConditionValue o) {
buildCounterConditionValue++;
if (buildCounterConditionValue < 3) {
unittest.expect(
o.relativeDate!,
unittest.equals('foo'),
);
unittest.expect(
o.userEnteredValue!,
unittest.equals('foo'),
);
}
buildCounterConditionValue--;
}
core.List<api.GridRange> buildUnnamed29() => [
buildGridRange(),
buildGridRange(),
];
void checkUnnamed29(core.List<api.GridRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkGridRange(o[0]);
checkGridRange(o[1]);
}
core.int buildCounterConditionalFormatRule = 0;
api.ConditionalFormatRule buildConditionalFormatRule() {
final o = api.ConditionalFormatRule();
buildCounterConditionalFormatRule++;
if (buildCounterConditionalFormatRule < 3) {
o.booleanRule = buildBooleanRule();
o.gradientRule = buildGradientRule();
o.ranges = buildUnnamed29();
}
buildCounterConditionalFormatRule--;
return o;
}
void checkConditionalFormatRule(api.ConditionalFormatRule o) {
buildCounterConditionalFormatRule++;
if (buildCounterConditionalFormatRule < 3) {
checkBooleanRule(o.booleanRule!);
checkGradientRule(o.gradientRule!);
checkUnnamed29(o.ranges!);
}
buildCounterConditionalFormatRule--;
}
core.int buildCounterCopyPasteRequest = 0;
api.CopyPasteRequest buildCopyPasteRequest() {
final o = api.CopyPasteRequest();
buildCounterCopyPasteRequest++;
if (buildCounterCopyPasteRequest < 3) {
o.destination = buildGridRange();
o.pasteOrientation = 'foo';
o.pasteType = 'foo';
o.source = buildGridRange();
}
buildCounterCopyPasteRequest--;
return o;
}
void checkCopyPasteRequest(api.CopyPasteRequest o) {
buildCounterCopyPasteRequest++;
if (buildCounterCopyPasteRequest < 3) {
checkGridRange(o.destination!);
unittest.expect(
o.pasteOrientation!,
unittest.equals('foo'),
);
unittest.expect(
o.pasteType!,
unittest.equals('foo'),
);
checkGridRange(o.source!);
}
buildCounterCopyPasteRequest--;
}
core.int buildCounterCopySheetToAnotherSpreadsheetRequest = 0;
api.CopySheetToAnotherSpreadsheetRequest
buildCopySheetToAnotherSpreadsheetRequest() {
final o = api.CopySheetToAnotherSpreadsheetRequest();
buildCounterCopySheetToAnotherSpreadsheetRequest++;
if (buildCounterCopySheetToAnotherSpreadsheetRequest < 3) {
o.destinationSpreadsheetId = 'foo';
}
buildCounterCopySheetToAnotherSpreadsheetRequest--;
return o;
}
void checkCopySheetToAnotherSpreadsheetRequest(
api.CopySheetToAnotherSpreadsheetRequest o) {
buildCounterCopySheetToAnotherSpreadsheetRequest++;
if (buildCounterCopySheetToAnotherSpreadsheetRequest < 3) {
unittest.expect(
o.destinationSpreadsheetId!,
unittest.equals('foo'),
);
}
buildCounterCopySheetToAnotherSpreadsheetRequest--;
}
core.int buildCounterCreateDeveloperMetadataRequest = 0;
api.CreateDeveloperMetadataRequest buildCreateDeveloperMetadataRequest() {
final o = api.CreateDeveloperMetadataRequest();
buildCounterCreateDeveloperMetadataRequest++;
if (buildCounterCreateDeveloperMetadataRequest < 3) {
o.developerMetadata = buildDeveloperMetadata();
}
buildCounterCreateDeveloperMetadataRequest--;
return o;
}
void checkCreateDeveloperMetadataRequest(api.CreateDeveloperMetadataRequest o) {
buildCounterCreateDeveloperMetadataRequest++;
if (buildCounterCreateDeveloperMetadataRequest < 3) {
checkDeveloperMetadata(o.developerMetadata!);
}
buildCounterCreateDeveloperMetadataRequest--;
}
core.int buildCounterCreateDeveloperMetadataResponse = 0;
api.CreateDeveloperMetadataResponse buildCreateDeveloperMetadataResponse() {
final o = api.CreateDeveloperMetadataResponse();
buildCounterCreateDeveloperMetadataResponse++;
if (buildCounterCreateDeveloperMetadataResponse < 3) {
o.developerMetadata = buildDeveloperMetadata();
}
buildCounterCreateDeveloperMetadataResponse--;
return o;
}
void checkCreateDeveloperMetadataResponse(
api.CreateDeveloperMetadataResponse o) {
buildCounterCreateDeveloperMetadataResponse++;
if (buildCounterCreateDeveloperMetadataResponse < 3) {
checkDeveloperMetadata(o.developerMetadata!);
}
buildCounterCreateDeveloperMetadataResponse--;
}
core.int buildCounterCutPasteRequest = 0;
api.CutPasteRequest buildCutPasteRequest() {
final o = api.CutPasteRequest();
buildCounterCutPasteRequest++;
if (buildCounterCutPasteRequest < 3) {
o.destination = buildGridCoordinate();
o.pasteType = 'foo';
o.source = buildGridRange();
}
buildCounterCutPasteRequest--;
return o;
}
void checkCutPasteRequest(api.CutPasteRequest o) {
buildCounterCutPasteRequest++;
if (buildCounterCutPasteRequest < 3) {
checkGridCoordinate(o.destination!);
unittest.expect(
o.pasteType!,
unittest.equals('foo'),
);
checkGridRange(o.source!);
}
buildCounterCutPasteRequest--;
}
core.int buildCounterDataExecutionStatus = 0;
api.DataExecutionStatus buildDataExecutionStatus() {
final o = api.DataExecutionStatus();
buildCounterDataExecutionStatus++;
if (buildCounterDataExecutionStatus < 3) {
o.errorCode = 'foo';
o.errorMessage = 'foo';
o.lastRefreshTime = 'foo';
o.state = 'foo';
}
buildCounterDataExecutionStatus--;
return o;
}
void checkDataExecutionStatus(api.DataExecutionStatus o) {
buildCounterDataExecutionStatus++;
if (buildCounterDataExecutionStatus < 3) {
unittest.expect(
o.errorCode!,
unittest.equals('foo'),
);
unittest.expect(
o.errorMessage!,
unittest.equals('foo'),
);
unittest.expect(
o.lastRefreshTime!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
}
buildCounterDataExecutionStatus--;
}
core.int buildCounterDataFilter = 0;
api.DataFilter buildDataFilter() {
final o = api.DataFilter();
buildCounterDataFilter++;
if (buildCounterDataFilter < 3) {
o.a1Range = 'foo';
o.developerMetadataLookup = buildDeveloperMetadataLookup();
o.gridRange = buildGridRange();
}
buildCounterDataFilter--;
return o;
}
void checkDataFilter(api.DataFilter o) {
buildCounterDataFilter++;
if (buildCounterDataFilter < 3) {
unittest.expect(
o.a1Range!,
unittest.equals('foo'),
);
checkDeveloperMetadataLookup(o.developerMetadataLookup!);
checkGridRange(o.gridRange!);
}
buildCounterDataFilter--;
}
core.List<core.Object?> buildUnnamed30() => [
{
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
{
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
];
void checkUnnamed30(core.List<core.Object?> o) {
unittest.expect(o, unittest.hasLength(2));
var casted1 = (o[0]) 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[1]) 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.List<core.List<core.Object?>> buildUnnamed31() => [
buildUnnamed30(),
buildUnnamed30(),
];
void checkUnnamed31(core.List<core.List<core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed30(o[0]);
checkUnnamed30(o[1]);
}
core.int buildCounterDataFilterValueRange = 0;
api.DataFilterValueRange buildDataFilterValueRange() {
final o = api.DataFilterValueRange();
buildCounterDataFilterValueRange++;
if (buildCounterDataFilterValueRange < 3) {
o.dataFilter = buildDataFilter();
o.majorDimension = 'foo';
o.values = buildUnnamed31();
}
buildCounterDataFilterValueRange--;
return o;
}
void checkDataFilterValueRange(api.DataFilterValueRange o) {
buildCounterDataFilterValueRange++;
if (buildCounterDataFilterValueRange < 3) {
checkDataFilter(o.dataFilter!);
unittest.expect(
o.majorDimension!,
unittest.equals('foo'),
);
checkUnnamed31(o.values!);
}
buildCounterDataFilterValueRange--;
}
core.int buildCounterDataLabel = 0;
api.DataLabel buildDataLabel() {
final o = api.DataLabel();
buildCounterDataLabel++;
if (buildCounterDataLabel < 3) {
o.customLabelData = buildChartData();
o.placement = 'foo';
o.textFormat = buildTextFormat();
o.type = 'foo';
}
buildCounterDataLabel--;
return o;
}
void checkDataLabel(api.DataLabel o) {
buildCounterDataLabel++;
if (buildCounterDataLabel < 3) {
checkChartData(o.customLabelData!);
unittest.expect(
o.placement!,
unittest.equals('foo'),
);
checkTextFormat(o.textFormat!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterDataLabel--;
}
core.List<api.DataSourceColumn> buildUnnamed32() => [
buildDataSourceColumn(),
buildDataSourceColumn(),
];
void checkUnnamed32(core.List<api.DataSourceColumn> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSourceColumn(o[0]);
checkDataSourceColumn(o[1]);
}
core.int buildCounterDataSource = 0;
api.DataSource buildDataSource() {
final o = api.DataSource();
buildCounterDataSource++;
if (buildCounterDataSource < 3) {
o.calculatedColumns = buildUnnamed32();
o.dataSourceId = 'foo';
o.sheetId = 42;
o.spec = buildDataSourceSpec();
}
buildCounterDataSource--;
return o;
}
void checkDataSource(api.DataSource o) {
buildCounterDataSource++;
if (buildCounterDataSource < 3) {
checkUnnamed32(o.calculatedColumns!);
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
checkDataSourceSpec(o.spec!);
}
buildCounterDataSource--;
}
core.int buildCounterDataSourceChartProperties = 0;
api.DataSourceChartProperties buildDataSourceChartProperties() {
final o = api.DataSourceChartProperties();
buildCounterDataSourceChartProperties++;
if (buildCounterDataSourceChartProperties < 3) {
o.dataExecutionStatus = buildDataExecutionStatus();
o.dataSourceId = 'foo';
}
buildCounterDataSourceChartProperties--;
return o;
}
void checkDataSourceChartProperties(api.DataSourceChartProperties o) {
buildCounterDataSourceChartProperties++;
if (buildCounterDataSourceChartProperties < 3) {
checkDataExecutionStatus(o.dataExecutionStatus!);
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
}
buildCounterDataSourceChartProperties--;
}
core.int buildCounterDataSourceColumn = 0;
api.DataSourceColumn buildDataSourceColumn() {
final o = api.DataSourceColumn();
buildCounterDataSourceColumn++;
if (buildCounterDataSourceColumn < 3) {
o.formula = 'foo';
o.reference = buildDataSourceColumnReference();
}
buildCounterDataSourceColumn--;
return o;
}
void checkDataSourceColumn(api.DataSourceColumn o) {
buildCounterDataSourceColumn++;
if (buildCounterDataSourceColumn < 3) {
unittest.expect(
o.formula!,
unittest.equals('foo'),
);
checkDataSourceColumnReference(o.reference!);
}
buildCounterDataSourceColumn--;
}
core.int buildCounterDataSourceColumnReference = 0;
api.DataSourceColumnReference buildDataSourceColumnReference() {
final o = api.DataSourceColumnReference();
buildCounterDataSourceColumnReference++;
if (buildCounterDataSourceColumnReference < 3) {
o.name = 'foo';
}
buildCounterDataSourceColumnReference--;
return o;
}
void checkDataSourceColumnReference(api.DataSourceColumnReference o) {
buildCounterDataSourceColumnReference++;
if (buildCounterDataSourceColumnReference < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterDataSourceColumnReference--;
}
core.int buildCounterDataSourceFormula = 0;
api.DataSourceFormula buildDataSourceFormula() {
final o = api.DataSourceFormula();
buildCounterDataSourceFormula++;
if (buildCounterDataSourceFormula < 3) {
o.dataExecutionStatus = buildDataExecutionStatus();
o.dataSourceId = 'foo';
}
buildCounterDataSourceFormula--;
return o;
}
void checkDataSourceFormula(api.DataSourceFormula o) {
buildCounterDataSourceFormula++;
if (buildCounterDataSourceFormula < 3) {
checkDataExecutionStatus(o.dataExecutionStatus!);
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
}
buildCounterDataSourceFormula--;
}
core.int buildCounterDataSourceObjectReference = 0;
api.DataSourceObjectReference buildDataSourceObjectReference() {
final o = api.DataSourceObjectReference();
buildCounterDataSourceObjectReference++;
if (buildCounterDataSourceObjectReference < 3) {
o.chartId = 42;
o.dataSourceFormulaCell = buildGridCoordinate();
o.dataSourcePivotTableAnchorCell = buildGridCoordinate();
o.dataSourceTableAnchorCell = buildGridCoordinate();
o.sheetId = 'foo';
}
buildCounterDataSourceObjectReference--;
return o;
}
void checkDataSourceObjectReference(api.DataSourceObjectReference o) {
buildCounterDataSourceObjectReference++;
if (buildCounterDataSourceObjectReference < 3) {
unittest.expect(
o.chartId!,
unittest.equals(42),
);
checkGridCoordinate(o.dataSourceFormulaCell!);
checkGridCoordinate(o.dataSourcePivotTableAnchorCell!);
checkGridCoordinate(o.dataSourceTableAnchorCell!);
unittest.expect(
o.sheetId!,
unittest.equals('foo'),
);
}
buildCounterDataSourceObjectReference--;
}
core.List<api.DataSourceObjectReference> buildUnnamed33() => [
buildDataSourceObjectReference(),
buildDataSourceObjectReference(),
];
void checkUnnamed33(core.List<api.DataSourceObjectReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSourceObjectReference(o[0]);
checkDataSourceObjectReference(o[1]);
}
core.int buildCounterDataSourceObjectReferences = 0;
api.DataSourceObjectReferences buildDataSourceObjectReferences() {
final o = api.DataSourceObjectReferences();
buildCounterDataSourceObjectReferences++;
if (buildCounterDataSourceObjectReferences < 3) {
o.references = buildUnnamed33();
}
buildCounterDataSourceObjectReferences--;
return o;
}
void checkDataSourceObjectReferences(api.DataSourceObjectReferences o) {
buildCounterDataSourceObjectReferences++;
if (buildCounterDataSourceObjectReferences < 3) {
checkUnnamed33(o.references!);
}
buildCounterDataSourceObjectReferences--;
}
core.int buildCounterDataSourceParameter = 0;
api.DataSourceParameter buildDataSourceParameter() {
final o = api.DataSourceParameter();
buildCounterDataSourceParameter++;
if (buildCounterDataSourceParameter < 3) {
o.name = 'foo';
o.namedRangeId = 'foo';
o.range = buildGridRange();
}
buildCounterDataSourceParameter--;
return o;
}
void checkDataSourceParameter(api.DataSourceParameter o) {
buildCounterDataSourceParameter++;
if (buildCounterDataSourceParameter < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.namedRangeId!,
unittest.equals('foo'),
);
checkGridRange(o.range!);
}
buildCounterDataSourceParameter--;
}
core.int buildCounterDataSourceRefreshDailySchedule = 0;
api.DataSourceRefreshDailySchedule buildDataSourceRefreshDailySchedule() {
final o = api.DataSourceRefreshDailySchedule();
buildCounterDataSourceRefreshDailySchedule++;
if (buildCounterDataSourceRefreshDailySchedule < 3) {
o.startTime = buildTimeOfDay();
}
buildCounterDataSourceRefreshDailySchedule--;
return o;
}
void checkDataSourceRefreshDailySchedule(api.DataSourceRefreshDailySchedule o) {
buildCounterDataSourceRefreshDailySchedule++;
if (buildCounterDataSourceRefreshDailySchedule < 3) {
checkTimeOfDay(o.startTime!);
}
buildCounterDataSourceRefreshDailySchedule--;
}
core.List<core.int> buildUnnamed34() => [
42,
42,
];
void checkUnnamed34(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),
);
}
core.int buildCounterDataSourceRefreshMonthlySchedule = 0;
api.DataSourceRefreshMonthlySchedule buildDataSourceRefreshMonthlySchedule() {
final o = api.DataSourceRefreshMonthlySchedule();
buildCounterDataSourceRefreshMonthlySchedule++;
if (buildCounterDataSourceRefreshMonthlySchedule < 3) {
o.daysOfMonth = buildUnnamed34();
o.startTime = buildTimeOfDay();
}
buildCounterDataSourceRefreshMonthlySchedule--;
return o;
}
void checkDataSourceRefreshMonthlySchedule(
api.DataSourceRefreshMonthlySchedule o) {
buildCounterDataSourceRefreshMonthlySchedule++;
if (buildCounterDataSourceRefreshMonthlySchedule < 3) {
checkUnnamed34(o.daysOfMonth!);
checkTimeOfDay(o.startTime!);
}
buildCounterDataSourceRefreshMonthlySchedule--;
}
core.int buildCounterDataSourceRefreshSchedule = 0;
api.DataSourceRefreshSchedule buildDataSourceRefreshSchedule() {
final o = api.DataSourceRefreshSchedule();
buildCounterDataSourceRefreshSchedule++;
if (buildCounterDataSourceRefreshSchedule < 3) {
o.dailySchedule = buildDataSourceRefreshDailySchedule();
o.enabled = true;
o.monthlySchedule = buildDataSourceRefreshMonthlySchedule();
o.nextRun = buildInterval();
o.refreshScope = 'foo';
o.weeklySchedule = buildDataSourceRefreshWeeklySchedule();
}
buildCounterDataSourceRefreshSchedule--;
return o;
}
void checkDataSourceRefreshSchedule(api.DataSourceRefreshSchedule o) {
buildCounterDataSourceRefreshSchedule++;
if (buildCounterDataSourceRefreshSchedule < 3) {
checkDataSourceRefreshDailySchedule(o.dailySchedule!);
unittest.expect(o.enabled!, unittest.isTrue);
checkDataSourceRefreshMonthlySchedule(o.monthlySchedule!);
checkInterval(o.nextRun!);
unittest.expect(
o.refreshScope!,
unittest.equals('foo'),
);
checkDataSourceRefreshWeeklySchedule(o.weeklySchedule!);
}
buildCounterDataSourceRefreshSchedule--;
}
core.List<core.String> buildUnnamed35() => [
'foo',
'foo',
];
void checkUnnamed35(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 buildCounterDataSourceRefreshWeeklySchedule = 0;
api.DataSourceRefreshWeeklySchedule buildDataSourceRefreshWeeklySchedule() {
final o = api.DataSourceRefreshWeeklySchedule();
buildCounterDataSourceRefreshWeeklySchedule++;
if (buildCounterDataSourceRefreshWeeklySchedule < 3) {
o.daysOfWeek = buildUnnamed35();
o.startTime = buildTimeOfDay();
}
buildCounterDataSourceRefreshWeeklySchedule--;
return o;
}
void checkDataSourceRefreshWeeklySchedule(
api.DataSourceRefreshWeeklySchedule o) {
buildCounterDataSourceRefreshWeeklySchedule++;
if (buildCounterDataSourceRefreshWeeklySchedule < 3) {
checkUnnamed35(o.daysOfWeek!);
checkTimeOfDay(o.startTime!);
}
buildCounterDataSourceRefreshWeeklySchedule--;
}
core.List<api.DataSourceColumnReference> buildUnnamed36() => [
buildDataSourceColumnReference(),
buildDataSourceColumnReference(),
];
void checkUnnamed36(core.List<api.DataSourceColumnReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSourceColumnReference(o[0]);
checkDataSourceColumnReference(o[1]);
}
core.int buildCounterDataSourceSheetDimensionRange = 0;
api.DataSourceSheetDimensionRange buildDataSourceSheetDimensionRange() {
final o = api.DataSourceSheetDimensionRange();
buildCounterDataSourceSheetDimensionRange++;
if (buildCounterDataSourceSheetDimensionRange < 3) {
o.columnReferences = buildUnnamed36();
o.sheetId = 42;
}
buildCounterDataSourceSheetDimensionRange--;
return o;
}
void checkDataSourceSheetDimensionRange(api.DataSourceSheetDimensionRange o) {
buildCounterDataSourceSheetDimensionRange++;
if (buildCounterDataSourceSheetDimensionRange < 3) {
checkUnnamed36(o.columnReferences!);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterDataSourceSheetDimensionRange--;
}
core.List<api.DataSourceColumn> buildUnnamed37() => [
buildDataSourceColumn(),
buildDataSourceColumn(),
];
void checkUnnamed37(core.List<api.DataSourceColumn> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSourceColumn(o[0]);
checkDataSourceColumn(o[1]);
}
core.int buildCounterDataSourceSheetProperties = 0;
api.DataSourceSheetProperties buildDataSourceSheetProperties() {
final o = api.DataSourceSheetProperties();
buildCounterDataSourceSheetProperties++;
if (buildCounterDataSourceSheetProperties < 3) {
o.columns = buildUnnamed37();
o.dataExecutionStatus = buildDataExecutionStatus();
o.dataSourceId = 'foo';
}
buildCounterDataSourceSheetProperties--;
return o;
}
void checkDataSourceSheetProperties(api.DataSourceSheetProperties o) {
buildCounterDataSourceSheetProperties++;
if (buildCounterDataSourceSheetProperties < 3) {
checkUnnamed37(o.columns!);
checkDataExecutionStatus(o.dataExecutionStatus!);
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
}
buildCounterDataSourceSheetProperties--;
}
core.List<api.DataSourceParameter> buildUnnamed38() => [
buildDataSourceParameter(),
buildDataSourceParameter(),
];
void checkUnnamed38(core.List<api.DataSourceParameter> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSourceParameter(o[0]);
checkDataSourceParameter(o[1]);
}
core.int buildCounterDataSourceSpec = 0;
api.DataSourceSpec buildDataSourceSpec() {
final o = api.DataSourceSpec();
buildCounterDataSourceSpec++;
if (buildCounterDataSourceSpec < 3) {
o.bigQuery = buildBigQueryDataSourceSpec();
o.parameters = buildUnnamed38();
}
buildCounterDataSourceSpec--;
return o;
}
void checkDataSourceSpec(api.DataSourceSpec o) {
buildCounterDataSourceSpec++;
if (buildCounterDataSourceSpec < 3) {
checkBigQueryDataSourceSpec(o.bigQuery!);
checkUnnamed38(o.parameters!);
}
buildCounterDataSourceSpec--;
}
core.List<api.DataSourceColumnReference> buildUnnamed39() => [
buildDataSourceColumnReference(),
buildDataSourceColumnReference(),
];
void checkUnnamed39(core.List<api.DataSourceColumnReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSourceColumnReference(o[0]);
checkDataSourceColumnReference(o[1]);
}
core.List<api.FilterSpec> buildUnnamed40() => [
buildFilterSpec(),
buildFilterSpec(),
];
void checkUnnamed40(core.List<api.FilterSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkFilterSpec(o[0]);
checkFilterSpec(o[1]);
}
core.List<api.SortSpec> buildUnnamed41() => [
buildSortSpec(),
buildSortSpec(),
];
void checkUnnamed41(core.List<api.SortSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkSortSpec(o[0]);
checkSortSpec(o[1]);
}
core.int buildCounterDataSourceTable = 0;
api.DataSourceTable buildDataSourceTable() {
final o = api.DataSourceTable();
buildCounterDataSourceTable++;
if (buildCounterDataSourceTable < 3) {
o.columnSelectionType = 'foo';
o.columns = buildUnnamed39();
o.dataExecutionStatus = buildDataExecutionStatus();
o.dataSourceId = 'foo';
o.filterSpecs = buildUnnamed40();
o.rowLimit = 42;
o.sortSpecs = buildUnnamed41();
}
buildCounterDataSourceTable--;
return o;
}
void checkDataSourceTable(api.DataSourceTable o) {
buildCounterDataSourceTable++;
if (buildCounterDataSourceTable < 3) {
unittest.expect(
o.columnSelectionType!,
unittest.equals('foo'),
);
checkUnnamed39(o.columns!);
checkDataExecutionStatus(o.dataExecutionStatus!);
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
checkUnnamed40(o.filterSpecs!);
unittest.expect(
o.rowLimit!,
unittest.equals(42),
);
checkUnnamed41(o.sortSpecs!);
}
buildCounterDataSourceTable--;
}
core.int buildCounterDataValidationRule = 0;
api.DataValidationRule buildDataValidationRule() {
final o = api.DataValidationRule();
buildCounterDataValidationRule++;
if (buildCounterDataValidationRule < 3) {
o.condition = buildBooleanCondition();
o.inputMessage = 'foo';
o.showCustomUi = true;
o.strict = true;
}
buildCounterDataValidationRule--;
return o;
}
void checkDataValidationRule(api.DataValidationRule o) {
buildCounterDataValidationRule++;
if (buildCounterDataValidationRule < 3) {
checkBooleanCondition(o.condition!);
unittest.expect(
o.inputMessage!,
unittest.equals('foo'),
);
unittest.expect(o.showCustomUi!, unittest.isTrue);
unittest.expect(o.strict!, unittest.isTrue);
}
buildCounterDataValidationRule--;
}
core.int buildCounterDateTimeRule = 0;
api.DateTimeRule buildDateTimeRule() {
final o = api.DateTimeRule();
buildCounterDateTimeRule++;
if (buildCounterDateTimeRule < 3) {
o.type = 'foo';
}
buildCounterDateTimeRule--;
return o;
}
void checkDateTimeRule(api.DateTimeRule o) {
buildCounterDateTimeRule++;
if (buildCounterDateTimeRule < 3) {
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterDateTimeRule--;
}
core.int buildCounterDeleteBandingRequest = 0;
api.DeleteBandingRequest buildDeleteBandingRequest() {
final o = api.DeleteBandingRequest();
buildCounterDeleteBandingRequest++;
if (buildCounterDeleteBandingRequest < 3) {
o.bandedRangeId = 42;
}
buildCounterDeleteBandingRequest--;
return o;
}
void checkDeleteBandingRequest(api.DeleteBandingRequest o) {
buildCounterDeleteBandingRequest++;
if (buildCounterDeleteBandingRequest < 3) {
unittest.expect(
o.bandedRangeId!,
unittest.equals(42),
);
}
buildCounterDeleteBandingRequest--;
}
core.int buildCounterDeleteConditionalFormatRuleRequest = 0;
api.DeleteConditionalFormatRuleRequest
buildDeleteConditionalFormatRuleRequest() {
final o = api.DeleteConditionalFormatRuleRequest();
buildCounterDeleteConditionalFormatRuleRequest++;
if (buildCounterDeleteConditionalFormatRuleRequest < 3) {
o.index = 42;
o.sheetId = 42;
}
buildCounterDeleteConditionalFormatRuleRequest--;
return o;
}
void checkDeleteConditionalFormatRuleRequest(
api.DeleteConditionalFormatRuleRequest o) {
buildCounterDeleteConditionalFormatRuleRequest++;
if (buildCounterDeleteConditionalFormatRuleRequest < 3) {
unittest.expect(
o.index!,
unittest.equals(42),
);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterDeleteConditionalFormatRuleRequest--;
}
core.int buildCounterDeleteConditionalFormatRuleResponse = 0;
api.DeleteConditionalFormatRuleResponse
buildDeleteConditionalFormatRuleResponse() {
final o = api.DeleteConditionalFormatRuleResponse();
buildCounterDeleteConditionalFormatRuleResponse++;
if (buildCounterDeleteConditionalFormatRuleResponse < 3) {
o.rule = buildConditionalFormatRule();
}
buildCounterDeleteConditionalFormatRuleResponse--;
return o;
}
void checkDeleteConditionalFormatRuleResponse(
api.DeleteConditionalFormatRuleResponse o) {
buildCounterDeleteConditionalFormatRuleResponse++;
if (buildCounterDeleteConditionalFormatRuleResponse < 3) {
checkConditionalFormatRule(o.rule!);
}
buildCounterDeleteConditionalFormatRuleResponse--;
}
core.int buildCounterDeleteDataSourceRequest = 0;
api.DeleteDataSourceRequest buildDeleteDataSourceRequest() {
final o = api.DeleteDataSourceRequest();
buildCounterDeleteDataSourceRequest++;
if (buildCounterDeleteDataSourceRequest < 3) {
o.dataSourceId = 'foo';
}
buildCounterDeleteDataSourceRequest--;
return o;
}
void checkDeleteDataSourceRequest(api.DeleteDataSourceRequest o) {
buildCounterDeleteDataSourceRequest++;
if (buildCounterDeleteDataSourceRequest < 3) {
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
}
buildCounterDeleteDataSourceRequest--;
}
core.int buildCounterDeleteDeveloperMetadataRequest = 0;
api.DeleteDeveloperMetadataRequest buildDeleteDeveloperMetadataRequest() {
final o = api.DeleteDeveloperMetadataRequest();
buildCounterDeleteDeveloperMetadataRequest++;
if (buildCounterDeleteDeveloperMetadataRequest < 3) {
o.dataFilter = buildDataFilter();
}
buildCounterDeleteDeveloperMetadataRequest--;
return o;
}
void checkDeleteDeveloperMetadataRequest(api.DeleteDeveloperMetadataRequest o) {
buildCounterDeleteDeveloperMetadataRequest++;
if (buildCounterDeleteDeveloperMetadataRequest < 3) {
checkDataFilter(o.dataFilter!);
}
buildCounterDeleteDeveloperMetadataRequest--;
}
core.List<api.DeveloperMetadata> buildUnnamed42() => [
buildDeveloperMetadata(),
buildDeveloperMetadata(),
];
void checkUnnamed42(core.List<api.DeveloperMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkDeveloperMetadata(o[0]);
checkDeveloperMetadata(o[1]);
}
core.int buildCounterDeleteDeveloperMetadataResponse = 0;
api.DeleteDeveloperMetadataResponse buildDeleteDeveloperMetadataResponse() {
final o = api.DeleteDeveloperMetadataResponse();
buildCounterDeleteDeveloperMetadataResponse++;
if (buildCounterDeleteDeveloperMetadataResponse < 3) {
o.deletedDeveloperMetadata = buildUnnamed42();
}
buildCounterDeleteDeveloperMetadataResponse--;
return o;
}
void checkDeleteDeveloperMetadataResponse(
api.DeleteDeveloperMetadataResponse o) {
buildCounterDeleteDeveloperMetadataResponse++;
if (buildCounterDeleteDeveloperMetadataResponse < 3) {
checkUnnamed42(o.deletedDeveloperMetadata!);
}
buildCounterDeleteDeveloperMetadataResponse--;
}
core.int buildCounterDeleteDimensionGroupRequest = 0;
api.DeleteDimensionGroupRequest buildDeleteDimensionGroupRequest() {
final o = api.DeleteDimensionGroupRequest();
buildCounterDeleteDimensionGroupRequest++;
if (buildCounterDeleteDimensionGroupRequest < 3) {
o.range = buildDimensionRange();
}
buildCounterDeleteDimensionGroupRequest--;
return o;
}
void checkDeleteDimensionGroupRequest(api.DeleteDimensionGroupRequest o) {
buildCounterDeleteDimensionGroupRequest++;
if (buildCounterDeleteDimensionGroupRequest < 3) {
checkDimensionRange(o.range!);
}
buildCounterDeleteDimensionGroupRequest--;
}
core.List<api.DimensionGroup> buildUnnamed43() => [
buildDimensionGroup(),
buildDimensionGroup(),
];
void checkUnnamed43(core.List<api.DimensionGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkDimensionGroup(o[0]);
checkDimensionGroup(o[1]);
}
core.int buildCounterDeleteDimensionGroupResponse = 0;
api.DeleteDimensionGroupResponse buildDeleteDimensionGroupResponse() {
final o = api.DeleteDimensionGroupResponse();
buildCounterDeleteDimensionGroupResponse++;
if (buildCounterDeleteDimensionGroupResponse < 3) {
o.dimensionGroups = buildUnnamed43();
}
buildCounterDeleteDimensionGroupResponse--;
return o;
}
void checkDeleteDimensionGroupResponse(api.DeleteDimensionGroupResponse o) {
buildCounterDeleteDimensionGroupResponse++;
if (buildCounterDeleteDimensionGroupResponse < 3) {
checkUnnamed43(o.dimensionGroups!);
}
buildCounterDeleteDimensionGroupResponse--;
}
core.int buildCounterDeleteDimensionRequest = 0;
api.DeleteDimensionRequest buildDeleteDimensionRequest() {
final o = api.DeleteDimensionRequest();
buildCounterDeleteDimensionRequest++;
if (buildCounterDeleteDimensionRequest < 3) {
o.range = buildDimensionRange();
}
buildCounterDeleteDimensionRequest--;
return o;
}
void checkDeleteDimensionRequest(api.DeleteDimensionRequest o) {
buildCounterDeleteDimensionRequest++;
if (buildCounterDeleteDimensionRequest < 3) {
checkDimensionRange(o.range!);
}
buildCounterDeleteDimensionRequest--;
}
core.List<api.DimensionRange> buildUnnamed44() => [
buildDimensionRange(),
buildDimensionRange(),
];
void checkUnnamed44(core.List<api.DimensionRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkDimensionRange(o[0]);
checkDimensionRange(o[1]);
}
core.int buildCounterDeleteDuplicatesRequest = 0;
api.DeleteDuplicatesRequest buildDeleteDuplicatesRequest() {
final o = api.DeleteDuplicatesRequest();
buildCounterDeleteDuplicatesRequest++;
if (buildCounterDeleteDuplicatesRequest < 3) {
o.comparisonColumns = buildUnnamed44();
o.range = buildGridRange();
}
buildCounterDeleteDuplicatesRequest--;
return o;
}
void checkDeleteDuplicatesRequest(api.DeleteDuplicatesRequest o) {
buildCounterDeleteDuplicatesRequest++;
if (buildCounterDeleteDuplicatesRequest < 3) {
checkUnnamed44(o.comparisonColumns!);
checkGridRange(o.range!);
}
buildCounterDeleteDuplicatesRequest--;
}
core.int buildCounterDeleteDuplicatesResponse = 0;
api.DeleteDuplicatesResponse buildDeleteDuplicatesResponse() {
final o = api.DeleteDuplicatesResponse();
buildCounterDeleteDuplicatesResponse++;
if (buildCounterDeleteDuplicatesResponse < 3) {
o.duplicatesRemovedCount = 42;
}
buildCounterDeleteDuplicatesResponse--;
return o;
}
void checkDeleteDuplicatesResponse(api.DeleteDuplicatesResponse o) {
buildCounterDeleteDuplicatesResponse++;
if (buildCounterDeleteDuplicatesResponse < 3) {
unittest.expect(
o.duplicatesRemovedCount!,
unittest.equals(42),
);
}
buildCounterDeleteDuplicatesResponse--;
}
core.int buildCounterDeleteEmbeddedObjectRequest = 0;
api.DeleteEmbeddedObjectRequest buildDeleteEmbeddedObjectRequest() {
final o = api.DeleteEmbeddedObjectRequest();
buildCounterDeleteEmbeddedObjectRequest++;
if (buildCounterDeleteEmbeddedObjectRequest < 3) {
o.objectId = 42;
}
buildCounterDeleteEmbeddedObjectRequest--;
return o;
}
void checkDeleteEmbeddedObjectRequest(api.DeleteEmbeddedObjectRequest o) {
buildCounterDeleteEmbeddedObjectRequest++;
if (buildCounterDeleteEmbeddedObjectRequest < 3) {
unittest.expect(
o.objectId!,
unittest.equals(42),
);
}
buildCounterDeleteEmbeddedObjectRequest--;
}
core.int buildCounterDeleteFilterViewRequest = 0;
api.DeleteFilterViewRequest buildDeleteFilterViewRequest() {
final o = api.DeleteFilterViewRequest();
buildCounterDeleteFilterViewRequest++;
if (buildCounterDeleteFilterViewRequest < 3) {
o.filterId = 42;
}
buildCounterDeleteFilterViewRequest--;
return o;
}
void checkDeleteFilterViewRequest(api.DeleteFilterViewRequest o) {
buildCounterDeleteFilterViewRequest++;
if (buildCounterDeleteFilterViewRequest < 3) {
unittest.expect(
o.filterId!,
unittest.equals(42),
);
}
buildCounterDeleteFilterViewRequest--;
}
core.int buildCounterDeleteNamedRangeRequest = 0;
api.DeleteNamedRangeRequest buildDeleteNamedRangeRequest() {
final o = api.DeleteNamedRangeRequest();
buildCounterDeleteNamedRangeRequest++;
if (buildCounterDeleteNamedRangeRequest < 3) {
o.namedRangeId = 'foo';
}
buildCounterDeleteNamedRangeRequest--;
return o;
}
void checkDeleteNamedRangeRequest(api.DeleteNamedRangeRequest o) {
buildCounterDeleteNamedRangeRequest++;
if (buildCounterDeleteNamedRangeRequest < 3) {
unittest.expect(
o.namedRangeId!,
unittest.equals('foo'),
);
}
buildCounterDeleteNamedRangeRequest--;
}
core.int buildCounterDeleteProtectedRangeRequest = 0;
api.DeleteProtectedRangeRequest buildDeleteProtectedRangeRequest() {
final o = api.DeleteProtectedRangeRequest();
buildCounterDeleteProtectedRangeRequest++;
if (buildCounterDeleteProtectedRangeRequest < 3) {
o.protectedRangeId = 42;
}
buildCounterDeleteProtectedRangeRequest--;
return o;
}
void checkDeleteProtectedRangeRequest(api.DeleteProtectedRangeRequest o) {
buildCounterDeleteProtectedRangeRequest++;
if (buildCounterDeleteProtectedRangeRequest < 3) {
unittest.expect(
o.protectedRangeId!,
unittest.equals(42),
);
}
buildCounterDeleteProtectedRangeRequest--;
}
core.int buildCounterDeleteRangeRequest = 0;
api.DeleteRangeRequest buildDeleteRangeRequest() {
final o = api.DeleteRangeRequest();
buildCounterDeleteRangeRequest++;
if (buildCounterDeleteRangeRequest < 3) {
o.range = buildGridRange();
o.shiftDimension = 'foo';
}
buildCounterDeleteRangeRequest--;
return o;
}
void checkDeleteRangeRequest(api.DeleteRangeRequest o) {
buildCounterDeleteRangeRequest++;
if (buildCounterDeleteRangeRequest < 3) {
checkGridRange(o.range!);
unittest.expect(
o.shiftDimension!,
unittest.equals('foo'),
);
}
buildCounterDeleteRangeRequest--;
}
core.int buildCounterDeleteSheetRequest = 0;
api.DeleteSheetRequest buildDeleteSheetRequest() {
final o = api.DeleteSheetRequest();
buildCounterDeleteSheetRequest++;
if (buildCounterDeleteSheetRequest < 3) {
o.sheetId = 42;
}
buildCounterDeleteSheetRequest--;
return o;
}
void checkDeleteSheetRequest(api.DeleteSheetRequest o) {
buildCounterDeleteSheetRequest++;
if (buildCounterDeleteSheetRequest < 3) {
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterDeleteSheetRequest--;
}
core.int buildCounterDeveloperMetadata = 0;
api.DeveloperMetadata buildDeveloperMetadata() {
final o = api.DeveloperMetadata();
buildCounterDeveloperMetadata++;
if (buildCounterDeveloperMetadata < 3) {
o.location = buildDeveloperMetadataLocation();
o.metadataId = 42;
o.metadataKey = 'foo';
o.metadataValue = 'foo';
o.visibility = 'foo';
}
buildCounterDeveloperMetadata--;
return o;
}
void checkDeveloperMetadata(api.DeveloperMetadata o) {
buildCounterDeveloperMetadata++;
if (buildCounterDeveloperMetadata < 3) {
checkDeveloperMetadataLocation(o.location!);
unittest.expect(
o.metadataId!,
unittest.equals(42),
);
unittest.expect(
o.metadataKey!,
unittest.equals('foo'),
);
unittest.expect(
o.metadataValue!,
unittest.equals('foo'),
);
unittest.expect(
o.visibility!,
unittest.equals('foo'),
);
}
buildCounterDeveloperMetadata--;
}
core.int buildCounterDeveloperMetadataLocation = 0;
api.DeveloperMetadataLocation buildDeveloperMetadataLocation() {
final o = api.DeveloperMetadataLocation();
buildCounterDeveloperMetadataLocation++;
if (buildCounterDeveloperMetadataLocation < 3) {
o.dimensionRange = buildDimensionRange();
o.locationType = 'foo';
o.sheetId = 42;
o.spreadsheet = true;
}
buildCounterDeveloperMetadataLocation--;
return o;
}
void checkDeveloperMetadataLocation(api.DeveloperMetadataLocation o) {
buildCounterDeveloperMetadataLocation++;
if (buildCounterDeveloperMetadataLocation < 3) {
checkDimensionRange(o.dimensionRange!);
unittest.expect(
o.locationType!,
unittest.equals('foo'),
);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
unittest.expect(o.spreadsheet!, unittest.isTrue);
}
buildCounterDeveloperMetadataLocation--;
}
core.int buildCounterDeveloperMetadataLookup = 0;
api.DeveloperMetadataLookup buildDeveloperMetadataLookup() {
final o = api.DeveloperMetadataLookup();
buildCounterDeveloperMetadataLookup++;
if (buildCounterDeveloperMetadataLookup < 3) {
o.locationMatchingStrategy = 'foo';
o.locationType = 'foo';
o.metadataId = 42;
o.metadataKey = 'foo';
o.metadataLocation = buildDeveloperMetadataLocation();
o.metadataValue = 'foo';
o.visibility = 'foo';
}
buildCounterDeveloperMetadataLookup--;
return o;
}
void checkDeveloperMetadataLookup(api.DeveloperMetadataLookup o) {
buildCounterDeveloperMetadataLookup++;
if (buildCounterDeveloperMetadataLookup < 3) {
unittest.expect(
o.locationMatchingStrategy!,
unittest.equals('foo'),
);
unittest.expect(
o.locationType!,
unittest.equals('foo'),
);
unittest.expect(
o.metadataId!,
unittest.equals(42),
);
unittest.expect(
o.metadataKey!,
unittest.equals('foo'),
);
checkDeveloperMetadataLocation(o.metadataLocation!);
unittest.expect(
o.metadataValue!,
unittest.equals('foo'),
);
unittest.expect(
o.visibility!,
unittest.equals('foo'),
);
}
buildCounterDeveloperMetadataLookup--;
}
core.int buildCounterDimensionGroup = 0;
api.DimensionGroup buildDimensionGroup() {
final o = api.DimensionGroup();
buildCounterDimensionGroup++;
if (buildCounterDimensionGroup < 3) {
o.collapsed = true;
o.depth = 42;
o.range = buildDimensionRange();
}
buildCounterDimensionGroup--;
return o;
}
void checkDimensionGroup(api.DimensionGroup o) {
buildCounterDimensionGroup++;
if (buildCounterDimensionGroup < 3) {
unittest.expect(o.collapsed!, unittest.isTrue);
unittest.expect(
o.depth!,
unittest.equals(42),
);
checkDimensionRange(o.range!);
}
buildCounterDimensionGroup--;
}
core.List<api.DeveloperMetadata> buildUnnamed45() => [
buildDeveloperMetadata(),
buildDeveloperMetadata(),
];
void checkUnnamed45(core.List<api.DeveloperMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkDeveloperMetadata(o[0]);
checkDeveloperMetadata(o[1]);
}
core.int buildCounterDimensionProperties = 0;
api.DimensionProperties buildDimensionProperties() {
final o = api.DimensionProperties();
buildCounterDimensionProperties++;
if (buildCounterDimensionProperties < 3) {
o.dataSourceColumnReference = buildDataSourceColumnReference();
o.developerMetadata = buildUnnamed45();
o.hiddenByFilter = true;
o.hiddenByUser = true;
o.pixelSize = 42;
}
buildCounterDimensionProperties--;
return o;
}
void checkDimensionProperties(api.DimensionProperties o) {
buildCounterDimensionProperties++;
if (buildCounterDimensionProperties < 3) {
checkDataSourceColumnReference(o.dataSourceColumnReference!);
checkUnnamed45(o.developerMetadata!);
unittest.expect(o.hiddenByFilter!, unittest.isTrue);
unittest.expect(o.hiddenByUser!, unittest.isTrue);
unittest.expect(
o.pixelSize!,
unittest.equals(42),
);
}
buildCounterDimensionProperties--;
}
core.int buildCounterDimensionRange = 0;
api.DimensionRange buildDimensionRange() {
final o = api.DimensionRange();
buildCounterDimensionRange++;
if (buildCounterDimensionRange < 3) {
o.dimension = 'foo';
o.endIndex = 42;
o.sheetId = 42;
o.startIndex = 42;
}
buildCounterDimensionRange--;
return o;
}
void checkDimensionRange(api.DimensionRange o) {
buildCounterDimensionRange++;
if (buildCounterDimensionRange < 3) {
unittest.expect(
o.dimension!,
unittest.equals('foo'),
);
unittest.expect(
o.endIndex!,
unittest.equals(42),
);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
unittest.expect(
o.startIndex!,
unittest.equals(42),
);
}
buildCounterDimensionRange--;
}
core.int buildCounterDuplicateFilterViewRequest = 0;
api.DuplicateFilterViewRequest buildDuplicateFilterViewRequest() {
final o = api.DuplicateFilterViewRequest();
buildCounterDuplicateFilterViewRequest++;
if (buildCounterDuplicateFilterViewRequest < 3) {
o.filterId = 42;
}
buildCounterDuplicateFilterViewRequest--;
return o;
}
void checkDuplicateFilterViewRequest(api.DuplicateFilterViewRequest o) {
buildCounterDuplicateFilterViewRequest++;
if (buildCounterDuplicateFilterViewRequest < 3) {
unittest.expect(
o.filterId!,
unittest.equals(42),
);
}
buildCounterDuplicateFilterViewRequest--;
}
core.int buildCounterDuplicateFilterViewResponse = 0;
api.DuplicateFilterViewResponse buildDuplicateFilterViewResponse() {
final o = api.DuplicateFilterViewResponse();
buildCounterDuplicateFilterViewResponse++;
if (buildCounterDuplicateFilterViewResponse < 3) {
o.filter = buildFilterView();
}
buildCounterDuplicateFilterViewResponse--;
return o;
}
void checkDuplicateFilterViewResponse(api.DuplicateFilterViewResponse o) {
buildCounterDuplicateFilterViewResponse++;
if (buildCounterDuplicateFilterViewResponse < 3) {
checkFilterView(o.filter!);
}
buildCounterDuplicateFilterViewResponse--;
}
core.int buildCounterDuplicateSheetRequest = 0;
api.DuplicateSheetRequest buildDuplicateSheetRequest() {
final o = api.DuplicateSheetRequest();
buildCounterDuplicateSheetRequest++;
if (buildCounterDuplicateSheetRequest < 3) {
o.insertSheetIndex = 42;
o.newSheetId = 42;
o.newSheetName = 'foo';
o.sourceSheetId = 42;
}
buildCounterDuplicateSheetRequest--;
return o;
}
void checkDuplicateSheetRequest(api.DuplicateSheetRequest o) {
buildCounterDuplicateSheetRequest++;
if (buildCounterDuplicateSheetRequest < 3) {
unittest.expect(
o.insertSheetIndex!,
unittest.equals(42),
);
unittest.expect(
o.newSheetId!,
unittest.equals(42),
);
unittest.expect(
o.newSheetName!,
unittest.equals('foo'),
);
unittest.expect(
o.sourceSheetId!,
unittest.equals(42),
);
}
buildCounterDuplicateSheetRequest--;
}
core.int buildCounterDuplicateSheetResponse = 0;
api.DuplicateSheetResponse buildDuplicateSheetResponse() {
final o = api.DuplicateSheetResponse();
buildCounterDuplicateSheetResponse++;
if (buildCounterDuplicateSheetResponse < 3) {
o.properties = buildSheetProperties();
}
buildCounterDuplicateSheetResponse--;
return o;
}
void checkDuplicateSheetResponse(api.DuplicateSheetResponse o) {
buildCounterDuplicateSheetResponse++;
if (buildCounterDuplicateSheetResponse < 3) {
checkSheetProperties(o.properties!);
}
buildCounterDuplicateSheetResponse--;
}
core.List<core.String> buildUnnamed46() => [
'foo',
'foo',
];
void checkUnnamed46(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.List<core.String> buildUnnamed47() => [
'foo',
'foo',
];
void checkUnnamed47(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 buildCounterEditors = 0;
api.Editors buildEditors() {
final o = api.Editors();
buildCounterEditors++;
if (buildCounterEditors < 3) {
o.domainUsersCanEdit = true;
o.groups = buildUnnamed46();
o.users = buildUnnamed47();
}
buildCounterEditors--;
return o;
}
void checkEditors(api.Editors o) {
buildCounterEditors++;
if (buildCounterEditors < 3) {
unittest.expect(o.domainUsersCanEdit!, unittest.isTrue);
checkUnnamed46(o.groups!);
checkUnnamed47(o.users!);
}
buildCounterEditors--;
}
core.int buildCounterEmbeddedChart = 0;
api.EmbeddedChart buildEmbeddedChart() {
final o = api.EmbeddedChart();
buildCounterEmbeddedChart++;
if (buildCounterEmbeddedChart < 3) {
o.border = buildEmbeddedObjectBorder();
o.chartId = 42;
o.position = buildEmbeddedObjectPosition();
o.spec = buildChartSpec();
}
buildCounterEmbeddedChart--;
return o;
}
void checkEmbeddedChart(api.EmbeddedChart o) {
buildCounterEmbeddedChart++;
if (buildCounterEmbeddedChart < 3) {
checkEmbeddedObjectBorder(o.border!);
unittest.expect(
o.chartId!,
unittest.equals(42),
);
checkEmbeddedObjectPosition(o.position!);
checkChartSpec(o.spec!);
}
buildCounterEmbeddedChart--;
}
core.int buildCounterEmbeddedObjectBorder = 0;
api.EmbeddedObjectBorder buildEmbeddedObjectBorder() {
final o = api.EmbeddedObjectBorder();
buildCounterEmbeddedObjectBorder++;
if (buildCounterEmbeddedObjectBorder < 3) {
o.color = buildColor();
o.colorStyle = buildColorStyle();
}
buildCounterEmbeddedObjectBorder--;
return o;
}
void checkEmbeddedObjectBorder(api.EmbeddedObjectBorder o) {
buildCounterEmbeddedObjectBorder++;
if (buildCounterEmbeddedObjectBorder < 3) {
checkColor(o.color!);
checkColorStyle(o.colorStyle!);
}
buildCounterEmbeddedObjectBorder--;
}
core.int buildCounterEmbeddedObjectPosition = 0;
api.EmbeddedObjectPosition buildEmbeddedObjectPosition() {
final o = api.EmbeddedObjectPosition();
buildCounterEmbeddedObjectPosition++;
if (buildCounterEmbeddedObjectPosition < 3) {
o.newSheet = true;
o.overlayPosition = buildOverlayPosition();
o.sheetId = 42;
}
buildCounterEmbeddedObjectPosition--;
return o;
}
void checkEmbeddedObjectPosition(api.EmbeddedObjectPosition o) {
buildCounterEmbeddedObjectPosition++;
if (buildCounterEmbeddedObjectPosition < 3) {
unittest.expect(o.newSheet!, unittest.isTrue);
checkOverlayPosition(o.overlayPosition!);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterEmbeddedObjectPosition--;
}
core.int buildCounterErrorValue = 0;
api.ErrorValue buildErrorValue() {
final o = api.ErrorValue();
buildCounterErrorValue++;
if (buildCounterErrorValue < 3) {
o.message = 'foo';
o.type = 'foo';
}
buildCounterErrorValue--;
return o;
}
void checkErrorValue(api.ErrorValue o) {
buildCounterErrorValue++;
if (buildCounterErrorValue < 3) {
unittest.expect(
o.message!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterErrorValue--;
}
core.int buildCounterExtendedValue = 0;
api.ExtendedValue buildExtendedValue() {
final o = api.ExtendedValue();
buildCounterExtendedValue++;
if (buildCounterExtendedValue < 3) {
o.boolValue = true;
o.errorValue = buildErrorValue();
o.formulaValue = 'foo';
o.numberValue = 42.0;
o.stringValue = 'foo';
}
buildCounterExtendedValue--;
return o;
}
void checkExtendedValue(api.ExtendedValue o) {
buildCounterExtendedValue++;
if (buildCounterExtendedValue < 3) {
unittest.expect(o.boolValue!, unittest.isTrue);
checkErrorValue(o.errorValue!);
unittest.expect(
o.formulaValue!,
unittest.equals('foo'),
);
unittest.expect(
o.numberValue!,
unittest.equals(42.0),
);
unittest.expect(
o.stringValue!,
unittest.equals('foo'),
);
}
buildCounterExtendedValue--;
}
core.List<core.String> buildUnnamed48() => [
'foo',
'foo',
];
void checkUnnamed48(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 buildCounterFilterCriteria = 0;
api.FilterCriteria buildFilterCriteria() {
final o = api.FilterCriteria();
buildCounterFilterCriteria++;
if (buildCounterFilterCriteria < 3) {
o.condition = buildBooleanCondition();
o.hiddenValues = buildUnnamed48();
o.visibleBackgroundColor = buildColor();
o.visibleBackgroundColorStyle = buildColorStyle();
o.visibleForegroundColor = buildColor();
o.visibleForegroundColorStyle = buildColorStyle();
}
buildCounterFilterCriteria--;
return o;
}
void checkFilterCriteria(api.FilterCriteria o) {
buildCounterFilterCriteria++;
if (buildCounterFilterCriteria < 3) {
checkBooleanCondition(o.condition!);
checkUnnamed48(o.hiddenValues!);
checkColor(o.visibleBackgroundColor!);
checkColorStyle(o.visibleBackgroundColorStyle!);
checkColor(o.visibleForegroundColor!);
checkColorStyle(o.visibleForegroundColorStyle!);
}
buildCounterFilterCriteria--;
}
core.int buildCounterFilterSpec = 0;
api.FilterSpec buildFilterSpec() {
final o = api.FilterSpec();
buildCounterFilterSpec++;
if (buildCounterFilterSpec < 3) {
o.columnIndex = 42;
o.dataSourceColumnReference = buildDataSourceColumnReference();
o.filterCriteria = buildFilterCriteria();
}
buildCounterFilterSpec--;
return o;
}
void checkFilterSpec(api.FilterSpec o) {
buildCounterFilterSpec++;
if (buildCounterFilterSpec < 3) {
unittest.expect(
o.columnIndex!,
unittest.equals(42),
);
checkDataSourceColumnReference(o.dataSourceColumnReference!);
checkFilterCriteria(o.filterCriteria!);
}
buildCounterFilterSpec--;
}
core.Map<core.String, api.FilterCriteria> buildUnnamed49() => {
'x': buildFilterCriteria(),
'y': buildFilterCriteria(),
};
void checkUnnamed49(core.Map<core.String, api.FilterCriteria> o) {
unittest.expect(o, unittest.hasLength(2));
checkFilterCriteria(o['x']!);
checkFilterCriteria(o['y']!);
}
core.List<api.FilterSpec> buildUnnamed50() => [
buildFilterSpec(),
buildFilterSpec(),
];
void checkUnnamed50(core.List<api.FilterSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkFilterSpec(o[0]);
checkFilterSpec(o[1]);
}
core.List<api.SortSpec> buildUnnamed51() => [
buildSortSpec(),
buildSortSpec(),
];
void checkUnnamed51(core.List<api.SortSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkSortSpec(o[0]);
checkSortSpec(o[1]);
}
core.int buildCounterFilterView = 0;
api.FilterView buildFilterView() {
final o = api.FilterView();
buildCounterFilterView++;
if (buildCounterFilterView < 3) {
o.criteria = buildUnnamed49();
o.filterSpecs = buildUnnamed50();
o.filterViewId = 42;
o.namedRangeId = 'foo';
o.range = buildGridRange();
o.sortSpecs = buildUnnamed51();
o.title = 'foo';
}
buildCounterFilterView--;
return o;
}
void checkFilterView(api.FilterView o) {
buildCounterFilterView++;
if (buildCounterFilterView < 3) {
checkUnnamed49(o.criteria!);
checkUnnamed50(o.filterSpecs!);
unittest.expect(
o.filterViewId!,
unittest.equals(42),
);
unittest.expect(
o.namedRangeId!,
unittest.equals('foo'),
);
checkGridRange(o.range!);
checkUnnamed51(o.sortSpecs!);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
}
buildCounterFilterView--;
}
core.int buildCounterFindReplaceRequest = 0;
api.FindReplaceRequest buildFindReplaceRequest() {
final o = api.FindReplaceRequest();
buildCounterFindReplaceRequest++;
if (buildCounterFindReplaceRequest < 3) {
o.allSheets = true;
o.find = 'foo';
o.includeFormulas = true;
o.matchCase = true;
o.matchEntireCell = true;
o.range = buildGridRange();
o.replacement = 'foo';
o.searchByRegex = true;
o.sheetId = 42;
}
buildCounterFindReplaceRequest--;
return o;
}
void checkFindReplaceRequest(api.FindReplaceRequest o) {
buildCounterFindReplaceRequest++;
if (buildCounterFindReplaceRequest < 3) {
unittest.expect(o.allSheets!, unittest.isTrue);
unittest.expect(
o.find!,
unittest.equals('foo'),
);
unittest.expect(o.includeFormulas!, unittest.isTrue);
unittest.expect(o.matchCase!, unittest.isTrue);
unittest.expect(o.matchEntireCell!, unittest.isTrue);
checkGridRange(o.range!);
unittest.expect(
o.replacement!,
unittest.equals('foo'),
);
unittest.expect(o.searchByRegex!, unittest.isTrue);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterFindReplaceRequest--;
}
core.int buildCounterFindReplaceResponse = 0;
api.FindReplaceResponse buildFindReplaceResponse() {
final o = api.FindReplaceResponse();
buildCounterFindReplaceResponse++;
if (buildCounterFindReplaceResponse < 3) {
o.formulasChanged = 42;
o.occurrencesChanged = 42;
o.rowsChanged = 42;
o.sheetsChanged = 42;
o.valuesChanged = 42;
}
buildCounterFindReplaceResponse--;
return o;
}
void checkFindReplaceResponse(api.FindReplaceResponse o) {
buildCounterFindReplaceResponse++;
if (buildCounterFindReplaceResponse < 3) {
unittest.expect(
o.formulasChanged!,
unittest.equals(42),
);
unittest.expect(
o.occurrencesChanged!,
unittest.equals(42),
);
unittest.expect(
o.rowsChanged!,
unittest.equals(42),
);
unittest.expect(
o.sheetsChanged!,
unittest.equals(42),
);
unittest.expect(
o.valuesChanged!,
unittest.equals(42),
);
}
buildCounterFindReplaceResponse--;
}
core.List<api.DataFilter> buildUnnamed52() => [
buildDataFilter(),
buildDataFilter(),
];
void checkUnnamed52(core.List<api.DataFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataFilter(o[0]);
checkDataFilter(o[1]);
}
core.int buildCounterGetSpreadsheetByDataFilterRequest = 0;
api.GetSpreadsheetByDataFilterRequest buildGetSpreadsheetByDataFilterRequest() {
final o = api.GetSpreadsheetByDataFilterRequest();
buildCounterGetSpreadsheetByDataFilterRequest++;
if (buildCounterGetSpreadsheetByDataFilterRequest < 3) {
o.dataFilters = buildUnnamed52();
o.includeGridData = true;
}
buildCounterGetSpreadsheetByDataFilterRequest--;
return o;
}
void checkGetSpreadsheetByDataFilterRequest(
api.GetSpreadsheetByDataFilterRequest o) {
buildCounterGetSpreadsheetByDataFilterRequest++;
if (buildCounterGetSpreadsheetByDataFilterRequest < 3) {
checkUnnamed52(o.dataFilters!);
unittest.expect(o.includeGridData!, unittest.isTrue);
}
buildCounterGetSpreadsheetByDataFilterRequest--;
}
core.int buildCounterGradientRule = 0;
api.GradientRule buildGradientRule() {
final o = api.GradientRule();
buildCounterGradientRule++;
if (buildCounterGradientRule < 3) {
o.maxpoint = buildInterpolationPoint();
o.midpoint = buildInterpolationPoint();
o.minpoint = buildInterpolationPoint();
}
buildCounterGradientRule--;
return o;
}
void checkGradientRule(api.GradientRule o) {
buildCounterGradientRule++;
if (buildCounterGradientRule < 3) {
checkInterpolationPoint(o.maxpoint!);
checkInterpolationPoint(o.midpoint!);
checkInterpolationPoint(o.minpoint!);
}
buildCounterGradientRule--;
}
core.int buildCounterGridCoordinate = 0;
api.GridCoordinate buildGridCoordinate() {
final o = api.GridCoordinate();
buildCounterGridCoordinate++;
if (buildCounterGridCoordinate < 3) {
o.columnIndex = 42;
o.rowIndex = 42;
o.sheetId = 42;
}
buildCounterGridCoordinate--;
return o;
}
void checkGridCoordinate(api.GridCoordinate o) {
buildCounterGridCoordinate++;
if (buildCounterGridCoordinate < 3) {
unittest.expect(
o.columnIndex!,
unittest.equals(42),
);
unittest.expect(
o.rowIndex!,
unittest.equals(42),
);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterGridCoordinate--;
}
core.List<api.DimensionProperties> buildUnnamed53() => [
buildDimensionProperties(),
buildDimensionProperties(),
];
void checkUnnamed53(core.List<api.DimensionProperties> o) {
unittest.expect(o, unittest.hasLength(2));
checkDimensionProperties(o[0]);
checkDimensionProperties(o[1]);
}
core.List<api.RowData> buildUnnamed54() => [
buildRowData(),
buildRowData(),
];
void checkUnnamed54(core.List<api.RowData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRowData(o[0]);
checkRowData(o[1]);
}
core.List<api.DimensionProperties> buildUnnamed55() => [
buildDimensionProperties(),
buildDimensionProperties(),
];
void checkUnnamed55(core.List<api.DimensionProperties> o) {
unittest.expect(o, unittest.hasLength(2));
checkDimensionProperties(o[0]);
checkDimensionProperties(o[1]);
}
core.int buildCounterGridData = 0;
api.GridData buildGridData() {
final o = api.GridData();
buildCounterGridData++;
if (buildCounterGridData < 3) {
o.columnMetadata = buildUnnamed53();
o.rowData = buildUnnamed54();
o.rowMetadata = buildUnnamed55();
o.startColumn = 42;
o.startRow = 42;
}
buildCounterGridData--;
return o;
}
void checkGridData(api.GridData o) {
buildCounterGridData++;
if (buildCounterGridData < 3) {
checkUnnamed53(o.columnMetadata!);
checkUnnamed54(o.rowData!);
checkUnnamed55(o.rowMetadata!);
unittest.expect(
o.startColumn!,
unittest.equals(42),
);
unittest.expect(
o.startRow!,
unittest.equals(42),
);
}
buildCounterGridData--;
}
core.int buildCounterGridProperties = 0;
api.GridProperties buildGridProperties() {
final o = api.GridProperties();
buildCounterGridProperties++;
if (buildCounterGridProperties < 3) {
o.columnCount = 42;
o.columnGroupControlAfter = true;
o.frozenColumnCount = 42;
o.frozenRowCount = 42;
o.hideGridlines = true;
o.rowCount = 42;
o.rowGroupControlAfter = true;
}
buildCounterGridProperties--;
return o;
}
void checkGridProperties(api.GridProperties o) {
buildCounterGridProperties++;
if (buildCounterGridProperties < 3) {
unittest.expect(
o.columnCount!,
unittest.equals(42),
);
unittest.expect(o.columnGroupControlAfter!, unittest.isTrue);
unittest.expect(
o.frozenColumnCount!,
unittest.equals(42),
);
unittest.expect(
o.frozenRowCount!,
unittest.equals(42),
);
unittest.expect(o.hideGridlines!, unittest.isTrue);
unittest.expect(
o.rowCount!,
unittest.equals(42),
);
unittest.expect(o.rowGroupControlAfter!, unittest.isTrue);
}
buildCounterGridProperties--;
}
core.int buildCounterGridRange = 0;
api.GridRange buildGridRange() {
final o = api.GridRange();
buildCounterGridRange++;
if (buildCounterGridRange < 3) {
o.endColumnIndex = 42;
o.endRowIndex = 42;
o.sheetId = 42;
o.startColumnIndex = 42;
o.startRowIndex = 42;
}
buildCounterGridRange--;
return o;
}
void checkGridRange(api.GridRange o) {
buildCounterGridRange++;
if (buildCounterGridRange < 3) {
unittest.expect(
o.endColumnIndex!,
unittest.equals(42),
);
unittest.expect(
o.endRowIndex!,
unittest.equals(42),
);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
unittest.expect(
o.startColumnIndex!,
unittest.equals(42),
);
unittest.expect(
o.startRowIndex!,
unittest.equals(42),
);
}
buildCounterGridRange--;
}
core.List<api.HistogramSeries> buildUnnamed56() => [
buildHistogramSeries(),
buildHistogramSeries(),
];
void checkUnnamed56(core.List<api.HistogramSeries> o) {
unittest.expect(o, unittest.hasLength(2));
checkHistogramSeries(o[0]);
checkHistogramSeries(o[1]);
}
core.int buildCounterHistogramChartSpec = 0;
api.HistogramChartSpec buildHistogramChartSpec() {
final o = api.HistogramChartSpec();
buildCounterHistogramChartSpec++;
if (buildCounterHistogramChartSpec < 3) {
o.bucketSize = 42.0;
o.legendPosition = 'foo';
o.outlierPercentile = 42.0;
o.series = buildUnnamed56();
o.showItemDividers = true;
}
buildCounterHistogramChartSpec--;
return o;
}
void checkHistogramChartSpec(api.HistogramChartSpec o) {
buildCounterHistogramChartSpec++;
if (buildCounterHistogramChartSpec < 3) {
unittest.expect(
o.bucketSize!,
unittest.equals(42.0),
);
unittest.expect(
o.legendPosition!,
unittest.equals('foo'),
);
unittest.expect(
o.outlierPercentile!,
unittest.equals(42.0),
);
checkUnnamed56(o.series!);
unittest.expect(o.showItemDividers!, unittest.isTrue);
}
buildCounterHistogramChartSpec--;
}
core.int buildCounterHistogramRule = 0;
api.HistogramRule buildHistogramRule() {
final o = api.HistogramRule();
buildCounterHistogramRule++;
if (buildCounterHistogramRule < 3) {
o.end = 42.0;
o.interval = 42.0;
o.start = 42.0;
}
buildCounterHistogramRule--;
return o;
}
void checkHistogramRule(api.HistogramRule o) {
buildCounterHistogramRule++;
if (buildCounterHistogramRule < 3) {
unittest.expect(
o.end!,
unittest.equals(42.0),
);
unittest.expect(
o.interval!,
unittest.equals(42.0),
);
unittest.expect(
o.start!,
unittest.equals(42.0),
);
}
buildCounterHistogramRule--;
}
core.int buildCounterHistogramSeries = 0;
api.HistogramSeries buildHistogramSeries() {
final o = api.HistogramSeries();
buildCounterHistogramSeries++;
if (buildCounterHistogramSeries < 3) {
o.barColor = buildColor();
o.barColorStyle = buildColorStyle();
o.data = buildChartData();
}
buildCounterHistogramSeries--;
return o;
}
void checkHistogramSeries(api.HistogramSeries o) {
buildCounterHistogramSeries++;
if (buildCounterHistogramSeries < 3) {
checkColor(o.barColor!);
checkColorStyle(o.barColorStyle!);
checkChartData(o.data!);
}
buildCounterHistogramSeries--;
}
core.int buildCounterInsertDimensionRequest = 0;
api.InsertDimensionRequest buildInsertDimensionRequest() {
final o = api.InsertDimensionRequest();
buildCounterInsertDimensionRequest++;
if (buildCounterInsertDimensionRequest < 3) {
o.inheritFromBefore = true;
o.range = buildDimensionRange();
}
buildCounterInsertDimensionRequest--;
return o;
}
void checkInsertDimensionRequest(api.InsertDimensionRequest o) {
buildCounterInsertDimensionRequest++;
if (buildCounterInsertDimensionRequest < 3) {
unittest.expect(o.inheritFromBefore!, unittest.isTrue);
checkDimensionRange(o.range!);
}
buildCounterInsertDimensionRequest--;
}
core.int buildCounterInsertRangeRequest = 0;
api.InsertRangeRequest buildInsertRangeRequest() {
final o = api.InsertRangeRequest();
buildCounterInsertRangeRequest++;
if (buildCounterInsertRangeRequest < 3) {
o.range = buildGridRange();
o.shiftDimension = 'foo';
}
buildCounterInsertRangeRequest--;
return o;
}
void checkInsertRangeRequest(api.InsertRangeRequest o) {
buildCounterInsertRangeRequest++;
if (buildCounterInsertRangeRequest < 3) {
checkGridRange(o.range!);
unittest.expect(
o.shiftDimension!,
unittest.equals('foo'),
);
}
buildCounterInsertRangeRequest--;
}
core.int buildCounterInterpolationPoint = 0;
api.InterpolationPoint buildInterpolationPoint() {
final o = api.InterpolationPoint();
buildCounterInterpolationPoint++;
if (buildCounterInterpolationPoint < 3) {
o.color = buildColor();
o.colorStyle = buildColorStyle();
o.type = 'foo';
o.value = 'foo';
}
buildCounterInterpolationPoint--;
return o;
}
void checkInterpolationPoint(api.InterpolationPoint o) {
buildCounterInterpolationPoint++;
if (buildCounterInterpolationPoint < 3) {
checkColor(o.color!);
checkColorStyle(o.colorStyle!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterInterpolationPoint--;
}
core.int buildCounterInterval = 0;
api.Interval buildInterval() {
final o = api.Interval();
buildCounterInterval++;
if (buildCounterInterval < 3) {
o.endTime = 'foo';
o.startTime = 'foo';
}
buildCounterInterval--;
return o;
}
void checkInterval(api.Interval o) {
buildCounterInterval++;
if (buildCounterInterval < 3) {
unittest.expect(
o.endTime!,
unittest.equals('foo'),
);
unittest.expect(
o.startTime!,
unittest.equals('foo'),
);
}
buildCounterInterval--;
}
core.int buildCounterIterativeCalculationSettings = 0;
api.IterativeCalculationSettings buildIterativeCalculationSettings() {
final o = api.IterativeCalculationSettings();
buildCounterIterativeCalculationSettings++;
if (buildCounterIterativeCalculationSettings < 3) {
o.convergenceThreshold = 42.0;
o.maxIterations = 42;
}
buildCounterIterativeCalculationSettings--;
return o;
}
void checkIterativeCalculationSettings(api.IterativeCalculationSettings o) {
buildCounterIterativeCalculationSettings++;
if (buildCounterIterativeCalculationSettings < 3) {
unittest.expect(
o.convergenceThreshold!,
unittest.equals(42.0),
);
unittest.expect(
o.maxIterations!,
unittest.equals(42),
);
}
buildCounterIterativeCalculationSettings--;
}
core.int buildCounterKeyValueFormat = 0;
api.KeyValueFormat buildKeyValueFormat() {
final o = api.KeyValueFormat();
buildCounterKeyValueFormat++;
if (buildCounterKeyValueFormat < 3) {
o.position = buildTextPosition();
o.textFormat = buildTextFormat();
}
buildCounterKeyValueFormat--;
return o;
}
void checkKeyValueFormat(api.KeyValueFormat o) {
buildCounterKeyValueFormat++;
if (buildCounterKeyValueFormat < 3) {
checkTextPosition(o.position!);
checkTextFormat(o.textFormat!);
}
buildCounterKeyValueFormat--;
}
core.int buildCounterLineStyle = 0;
api.LineStyle buildLineStyle() {
final o = api.LineStyle();
buildCounterLineStyle++;
if (buildCounterLineStyle < 3) {
o.type = 'foo';
o.width = 42;
}
buildCounterLineStyle--;
return o;
}
void checkLineStyle(api.LineStyle o) {
buildCounterLineStyle++;
if (buildCounterLineStyle < 3) {
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.width!,
unittest.equals(42),
);
}
buildCounterLineStyle--;
}
core.int buildCounterLink = 0;
api.Link buildLink() {
final o = api.Link();
buildCounterLink++;
if (buildCounterLink < 3) {
o.uri = 'foo';
}
buildCounterLink--;
return o;
}
void checkLink(api.Link o) {
buildCounterLink++;
if (buildCounterLink < 3) {
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
}
buildCounterLink--;
}
core.List<api.ManualRuleGroup> buildUnnamed57() => [
buildManualRuleGroup(),
buildManualRuleGroup(),
];
void checkUnnamed57(core.List<api.ManualRuleGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkManualRuleGroup(o[0]);
checkManualRuleGroup(o[1]);
}
core.int buildCounterManualRule = 0;
api.ManualRule buildManualRule() {
final o = api.ManualRule();
buildCounterManualRule++;
if (buildCounterManualRule < 3) {
o.groups = buildUnnamed57();
}
buildCounterManualRule--;
return o;
}
void checkManualRule(api.ManualRule o) {
buildCounterManualRule++;
if (buildCounterManualRule < 3) {
checkUnnamed57(o.groups!);
}
buildCounterManualRule--;
}
core.List<api.ExtendedValue> buildUnnamed58() => [
buildExtendedValue(),
buildExtendedValue(),
];
void checkUnnamed58(core.List<api.ExtendedValue> o) {
unittest.expect(o, unittest.hasLength(2));
checkExtendedValue(o[0]);
checkExtendedValue(o[1]);
}
core.int buildCounterManualRuleGroup = 0;
api.ManualRuleGroup buildManualRuleGroup() {
final o = api.ManualRuleGroup();
buildCounterManualRuleGroup++;
if (buildCounterManualRuleGroup < 3) {
o.groupName = buildExtendedValue();
o.items = buildUnnamed58();
}
buildCounterManualRuleGroup--;
return o;
}
void checkManualRuleGroup(api.ManualRuleGroup o) {
buildCounterManualRuleGroup++;
if (buildCounterManualRuleGroup < 3) {
checkExtendedValue(o.groupName!);
checkUnnamed58(o.items!);
}
buildCounterManualRuleGroup--;
}
core.List<api.DataFilter> buildUnnamed59() => [
buildDataFilter(),
buildDataFilter(),
];
void checkUnnamed59(core.List<api.DataFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataFilter(o[0]);
checkDataFilter(o[1]);
}
core.int buildCounterMatchedDeveloperMetadata = 0;
api.MatchedDeveloperMetadata buildMatchedDeveloperMetadata() {
final o = api.MatchedDeveloperMetadata();
buildCounterMatchedDeveloperMetadata++;
if (buildCounterMatchedDeveloperMetadata < 3) {
o.dataFilters = buildUnnamed59();
o.developerMetadata = buildDeveloperMetadata();
}
buildCounterMatchedDeveloperMetadata--;
return o;
}
void checkMatchedDeveloperMetadata(api.MatchedDeveloperMetadata o) {
buildCounterMatchedDeveloperMetadata++;
if (buildCounterMatchedDeveloperMetadata < 3) {
checkUnnamed59(o.dataFilters!);
checkDeveloperMetadata(o.developerMetadata!);
}
buildCounterMatchedDeveloperMetadata--;
}
core.List<api.DataFilter> buildUnnamed60() => [
buildDataFilter(),
buildDataFilter(),
];
void checkUnnamed60(core.List<api.DataFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataFilter(o[0]);
checkDataFilter(o[1]);
}
core.int buildCounterMatchedValueRange = 0;
api.MatchedValueRange buildMatchedValueRange() {
final o = api.MatchedValueRange();
buildCounterMatchedValueRange++;
if (buildCounterMatchedValueRange < 3) {
o.dataFilters = buildUnnamed60();
o.valueRange = buildValueRange();
}
buildCounterMatchedValueRange--;
return o;
}
void checkMatchedValueRange(api.MatchedValueRange o) {
buildCounterMatchedValueRange++;
if (buildCounterMatchedValueRange < 3) {
checkUnnamed60(o.dataFilters!);
checkValueRange(o.valueRange!);
}
buildCounterMatchedValueRange--;
}
core.int buildCounterMergeCellsRequest = 0;
api.MergeCellsRequest buildMergeCellsRequest() {
final o = api.MergeCellsRequest();
buildCounterMergeCellsRequest++;
if (buildCounterMergeCellsRequest < 3) {
o.mergeType = 'foo';
o.range = buildGridRange();
}
buildCounterMergeCellsRequest--;
return o;
}
void checkMergeCellsRequest(api.MergeCellsRequest o) {
buildCounterMergeCellsRequest++;
if (buildCounterMergeCellsRequest < 3) {
unittest.expect(
o.mergeType!,
unittest.equals('foo'),
);
checkGridRange(o.range!);
}
buildCounterMergeCellsRequest--;
}
core.int buildCounterMoveDimensionRequest = 0;
api.MoveDimensionRequest buildMoveDimensionRequest() {
final o = api.MoveDimensionRequest();
buildCounterMoveDimensionRequest++;
if (buildCounterMoveDimensionRequest < 3) {
o.destinationIndex = 42;
o.source = buildDimensionRange();
}
buildCounterMoveDimensionRequest--;
return o;
}
void checkMoveDimensionRequest(api.MoveDimensionRequest o) {
buildCounterMoveDimensionRequest++;
if (buildCounterMoveDimensionRequest < 3) {
unittest.expect(
o.destinationIndex!,
unittest.equals(42),
);
checkDimensionRange(o.source!);
}
buildCounterMoveDimensionRequest--;
}
core.int buildCounterNamedRange = 0;
api.NamedRange buildNamedRange() {
final o = api.NamedRange();
buildCounterNamedRange++;
if (buildCounterNamedRange < 3) {
o.name = 'foo';
o.namedRangeId = 'foo';
o.range = buildGridRange();
}
buildCounterNamedRange--;
return o;
}
void checkNamedRange(api.NamedRange o) {
buildCounterNamedRange++;
if (buildCounterNamedRange < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.namedRangeId!,
unittest.equals('foo'),
);
checkGridRange(o.range!);
}
buildCounterNamedRange--;
}
core.int buildCounterNumberFormat = 0;
api.NumberFormat buildNumberFormat() {
final o = api.NumberFormat();
buildCounterNumberFormat++;
if (buildCounterNumberFormat < 3) {
o.pattern = 'foo';
o.type = 'foo';
}
buildCounterNumberFormat--;
return o;
}
void checkNumberFormat(api.NumberFormat o) {
buildCounterNumberFormat++;
if (buildCounterNumberFormat < 3) {
unittest.expect(
o.pattern!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterNumberFormat--;
}
core.int buildCounterOrgChartSpec = 0;
api.OrgChartSpec buildOrgChartSpec() {
final o = api.OrgChartSpec();
buildCounterOrgChartSpec++;
if (buildCounterOrgChartSpec < 3) {
o.labels = buildChartData();
o.nodeColor = buildColor();
o.nodeColorStyle = buildColorStyle();
o.nodeSize = 'foo';
o.parentLabels = buildChartData();
o.selectedNodeColor = buildColor();
o.selectedNodeColorStyle = buildColorStyle();
o.tooltips = buildChartData();
}
buildCounterOrgChartSpec--;
return o;
}
void checkOrgChartSpec(api.OrgChartSpec o) {
buildCounterOrgChartSpec++;
if (buildCounterOrgChartSpec < 3) {
checkChartData(o.labels!);
checkColor(o.nodeColor!);
checkColorStyle(o.nodeColorStyle!);
unittest.expect(
o.nodeSize!,
unittest.equals('foo'),
);
checkChartData(o.parentLabels!);
checkColor(o.selectedNodeColor!);
checkColorStyle(o.selectedNodeColorStyle!);
checkChartData(o.tooltips!);
}
buildCounterOrgChartSpec--;
}
core.int buildCounterOverlayPosition = 0;
api.OverlayPosition buildOverlayPosition() {
final o = api.OverlayPosition();
buildCounterOverlayPosition++;
if (buildCounterOverlayPosition < 3) {
o.anchorCell = buildGridCoordinate();
o.heightPixels = 42;
o.offsetXPixels = 42;
o.offsetYPixels = 42;
o.widthPixels = 42;
}
buildCounterOverlayPosition--;
return o;
}
void checkOverlayPosition(api.OverlayPosition o) {
buildCounterOverlayPosition++;
if (buildCounterOverlayPosition < 3) {
checkGridCoordinate(o.anchorCell!);
unittest.expect(
o.heightPixels!,
unittest.equals(42),
);
unittest.expect(
o.offsetXPixels!,
unittest.equals(42),
);
unittest.expect(
o.offsetYPixels!,
unittest.equals(42),
);
unittest.expect(
o.widthPixels!,
unittest.equals(42),
);
}
buildCounterOverlayPosition--;
}
core.int buildCounterPadding = 0;
api.Padding buildPadding() {
final o = api.Padding();
buildCounterPadding++;
if (buildCounterPadding < 3) {
o.bottom = 42;
o.left = 42;
o.right = 42;
o.top = 42;
}
buildCounterPadding--;
return o;
}
void checkPadding(api.Padding o) {
buildCounterPadding++;
if (buildCounterPadding < 3) {
unittest.expect(
o.bottom!,
unittest.equals(42),
);
unittest.expect(
o.left!,
unittest.equals(42),
);
unittest.expect(
o.right!,
unittest.equals(42),
);
unittest.expect(
o.top!,
unittest.equals(42),
);
}
buildCounterPadding--;
}
core.int buildCounterPasteDataRequest = 0;
api.PasteDataRequest buildPasteDataRequest() {
final o = api.PasteDataRequest();
buildCounterPasteDataRequest++;
if (buildCounterPasteDataRequest < 3) {
o.coordinate = buildGridCoordinate();
o.data = 'foo';
o.delimiter = 'foo';
o.html = true;
o.type = 'foo';
}
buildCounterPasteDataRequest--;
return o;
}
void checkPasteDataRequest(api.PasteDataRequest o) {
buildCounterPasteDataRequest++;
if (buildCounterPasteDataRequest < 3) {
checkGridCoordinate(o.coordinate!);
unittest.expect(
o.data!,
unittest.equals('foo'),
);
unittest.expect(
o.delimiter!,
unittest.equals('foo'),
);
unittest.expect(o.html!, unittest.isTrue);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterPasteDataRequest--;
}
core.int buildCounterPieChartSpec = 0;
api.PieChartSpec buildPieChartSpec() {
final o = api.PieChartSpec();
buildCounterPieChartSpec++;
if (buildCounterPieChartSpec < 3) {
o.domain = buildChartData();
o.legendPosition = 'foo';
o.pieHole = 42.0;
o.series = buildChartData();
o.threeDimensional = true;
}
buildCounterPieChartSpec--;
return o;
}
void checkPieChartSpec(api.PieChartSpec o) {
buildCounterPieChartSpec++;
if (buildCounterPieChartSpec < 3) {
checkChartData(o.domain!);
unittest.expect(
o.legendPosition!,
unittest.equals('foo'),
);
unittest.expect(
o.pieHole!,
unittest.equals(42.0),
);
checkChartData(o.series!);
unittest.expect(o.threeDimensional!, unittest.isTrue);
}
buildCounterPieChartSpec--;
}
core.List<core.String> buildUnnamed61() => [
'foo',
'foo',
];
void checkUnnamed61(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 buildCounterPivotFilterCriteria = 0;
api.PivotFilterCriteria buildPivotFilterCriteria() {
final o = api.PivotFilterCriteria();
buildCounterPivotFilterCriteria++;
if (buildCounterPivotFilterCriteria < 3) {
o.condition = buildBooleanCondition();
o.visibleByDefault = true;
o.visibleValues = buildUnnamed61();
}
buildCounterPivotFilterCriteria--;
return o;
}
void checkPivotFilterCriteria(api.PivotFilterCriteria o) {
buildCounterPivotFilterCriteria++;
if (buildCounterPivotFilterCriteria < 3) {
checkBooleanCondition(o.condition!);
unittest.expect(o.visibleByDefault!, unittest.isTrue);
checkUnnamed61(o.visibleValues!);
}
buildCounterPivotFilterCriteria--;
}
core.int buildCounterPivotFilterSpec = 0;
api.PivotFilterSpec buildPivotFilterSpec() {
final o = api.PivotFilterSpec();
buildCounterPivotFilterSpec++;
if (buildCounterPivotFilterSpec < 3) {
o.columnOffsetIndex = 42;
o.dataSourceColumnReference = buildDataSourceColumnReference();
o.filterCriteria = buildPivotFilterCriteria();
}
buildCounterPivotFilterSpec--;
return o;
}
void checkPivotFilterSpec(api.PivotFilterSpec o) {
buildCounterPivotFilterSpec++;
if (buildCounterPivotFilterSpec < 3) {
unittest.expect(
o.columnOffsetIndex!,
unittest.equals(42),
);
checkDataSourceColumnReference(o.dataSourceColumnReference!);
checkPivotFilterCriteria(o.filterCriteria!);
}
buildCounterPivotFilterSpec--;
}
core.List<api.PivotGroupValueMetadata> buildUnnamed62() => [
buildPivotGroupValueMetadata(),
buildPivotGroupValueMetadata(),
];
void checkUnnamed62(core.List<api.PivotGroupValueMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkPivotGroupValueMetadata(o[0]);
checkPivotGroupValueMetadata(o[1]);
}
core.int buildCounterPivotGroup = 0;
api.PivotGroup buildPivotGroup() {
final o = api.PivotGroup();
buildCounterPivotGroup++;
if (buildCounterPivotGroup < 3) {
o.dataSourceColumnReference = buildDataSourceColumnReference();
o.groupLimit = buildPivotGroupLimit();
o.groupRule = buildPivotGroupRule();
o.label = 'foo';
o.repeatHeadings = true;
o.showTotals = true;
o.sortOrder = 'foo';
o.sourceColumnOffset = 42;
o.valueBucket = buildPivotGroupSortValueBucket();
o.valueMetadata = buildUnnamed62();
}
buildCounterPivotGroup--;
return o;
}
void checkPivotGroup(api.PivotGroup o) {
buildCounterPivotGroup++;
if (buildCounterPivotGroup < 3) {
checkDataSourceColumnReference(o.dataSourceColumnReference!);
checkPivotGroupLimit(o.groupLimit!);
checkPivotGroupRule(o.groupRule!);
unittest.expect(
o.label!,
unittest.equals('foo'),
);
unittest.expect(o.repeatHeadings!, unittest.isTrue);
unittest.expect(o.showTotals!, unittest.isTrue);
unittest.expect(
o.sortOrder!,
unittest.equals('foo'),
);
unittest.expect(
o.sourceColumnOffset!,
unittest.equals(42),
);
checkPivotGroupSortValueBucket(o.valueBucket!);
checkUnnamed62(o.valueMetadata!);
}
buildCounterPivotGroup--;
}
core.int buildCounterPivotGroupLimit = 0;
api.PivotGroupLimit buildPivotGroupLimit() {
final o = api.PivotGroupLimit();
buildCounterPivotGroupLimit++;
if (buildCounterPivotGroupLimit < 3) {
o.applyOrder = 42;
o.countLimit = 42;
}
buildCounterPivotGroupLimit--;
return o;
}
void checkPivotGroupLimit(api.PivotGroupLimit o) {
buildCounterPivotGroupLimit++;
if (buildCounterPivotGroupLimit < 3) {
unittest.expect(
o.applyOrder!,
unittest.equals(42),
);
unittest.expect(
o.countLimit!,
unittest.equals(42),
);
}
buildCounterPivotGroupLimit--;
}
core.int buildCounterPivotGroupRule = 0;
api.PivotGroupRule buildPivotGroupRule() {
final o = api.PivotGroupRule();
buildCounterPivotGroupRule++;
if (buildCounterPivotGroupRule < 3) {
o.dateTimeRule = buildDateTimeRule();
o.histogramRule = buildHistogramRule();
o.manualRule = buildManualRule();
}
buildCounterPivotGroupRule--;
return o;
}
void checkPivotGroupRule(api.PivotGroupRule o) {
buildCounterPivotGroupRule++;
if (buildCounterPivotGroupRule < 3) {
checkDateTimeRule(o.dateTimeRule!);
checkHistogramRule(o.histogramRule!);
checkManualRule(o.manualRule!);
}
buildCounterPivotGroupRule--;
}
core.List<api.ExtendedValue> buildUnnamed63() => [
buildExtendedValue(),
buildExtendedValue(),
];
void checkUnnamed63(core.List<api.ExtendedValue> o) {
unittest.expect(o, unittest.hasLength(2));
checkExtendedValue(o[0]);
checkExtendedValue(o[1]);
}
core.int buildCounterPivotGroupSortValueBucket = 0;
api.PivotGroupSortValueBucket buildPivotGroupSortValueBucket() {
final o = api.PivotGroupSortValueBucket();
buildCounterPivotGroupSortValueBucket++;
if (buildCounterPivotGroupSortValueBucket < 3) {
o.buckets = buildUnnamed63();
o.valuesIndex = 42;
}
buildCounterPivotGroupSortValueBucket--;
return o;
}
void checkPivotGroupSortValueBucket(api.PivotGroupSortValueBucket o) {
buildCounterPivotGroupSortValueBucket++;
if (buildCounterPivotGroupSortValueBucket < 3) {
checkUnnamed63(o.buckets!);
unittest.expect(
o.valuesIndex!,
unittest.equals(42),
);
}
buildCounterPivotGroupSortValueBucket--;
}
core.int buildCounterPivotGroupValueMetadata = 0;
api.PivotGroupValueMetadata buildPivotGroupValueMetadata() {
final o = api.PivotGroupValueMetadata();
buildCounterPivotGroupValueMetadata++;
if (buildCounterPivotGroupValueMetadata < 3) {
o.collapsed = true;
o.value = buildExtendedValue();
}
buildCounterPivotGroupValueMetadata--;
return o;
}
void checkPivotGroupValueMetadata(api.PivotGroupValueMetadata o) {
buildCounterPivotGroupValueMetadata++;
if (buildCounterPivotGroupValueMetadata < 3) {
unittest.expect(o.collapsed!, unittest.isTrue);
checkExtendedValue(o.value!);
}
buildCounterPivotGroupValueMetadata--;
}
core.List<api.PivotGroup> buildUnnamed64() => [
buildPivotGroup(),
buildPivotGroup(),
];
void checkUnnamed64(core.List<api.PivotGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkPivotGroup(o[0]);
checkPivotGroup(o[1]);
}
core.Map<core.String, api.PivotFilterCriteria> buildUnnamed65() => {
'x': buildPivotFilterCriteria(),
'y': buildPivotFilterCriteria(),
};
void checkUnnamed65(core.Map<core.String, api.PivotFilterCriteria> o) {
unittest.expect(o, unittest.hasLength(2));
checkPivotFilterCriteria(o['x']!);
checkPivotFilterCriteria(o['y']!);
}
core.List<api.PivotFilterSpec> buildUnnamed66() => [
buildPivotFilterSpec(),
buildPivotFilterSpec(),
];
void checkUnnamed66(core.List<api.PivotFilterSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkPivotFilterSpec(o[0]);
checkPivotFilterSpec(o[1]);
}
core.List<api.PivotGroup> buildUnnamed67() => [
buildPivotGroup(),
buildPivotGroup(),
];
void checkUnnamed67(core.List<api.PivotGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkPivotGroup(o[0]);
checkPivotGroup(o[1]);
}
core.List<api.PivotValue> buildUnnamed68() => [
buildPivotValue(),
buildPivotValue(),
];
void checkUnnamed68(core.List<api.PivotValue> o) {
unittest.expect(o, unittest.hasLength(2));
checkPivotValue(o[0]);
checkPivotValue(o[1]);
}
core.int buildCounterPivotTable = 0;
api.PivotTable buildPivotTable() {
final o = api.PivotTable();
buildCounterPivotTable++;
if (buildCounterPivotTable < 3) {
o.columns = buildUnnamed64();
o.criteria = buildUnnamed65();
o.dataExecutionStatus = buildDataExecutionStatus();
o.dataSourceId = 'foo';
o.filterSpecs = buildUnnamed66();
o.rows = buildUnnamed67();
o.source = buildGridRange();
o.valueLayout = 'foo';
o.values = buildUnnamed68();
}
buildCounterPivotTable--;
return o;
}
void checkPivotTable(api.PivotTable o) {
buildCounterPivotTable++;
if (buildCounterPivotTable < 3) {
checkUnnamed64(o.columns!);
checkUnnamed65(o.criteria!);
checkDataExecutionStatus(o.dataExecutionStatus!);
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
checkUnnamed66(o.filterSpecs!);
checkUnnamed67(o.rows!);
checkGridRange(o.source!);
unittest.expect(
o.valueLayout!,
unittest.equals('foo'),
);
checkUnnamed68(o.values!);
}
buildCounterPivotTable--;
}
core.int buildCounterPivotValue = 0;
api.PivotValue buildPivotValue() {
final o = api.PivotValue();
buildCounterPivotValue++;
if (buildCounterPivotValue < 3) {
o.calculatedDisplayType = 'foo';
o.dataSourceColumnReference = buildDataSourceColumnReference();
o.formula = 'foo';
o.name = 'foo';
o.sourceColumnOffset = 42;
o.summarizeFunction = 'foo';
}
buildCounterPivotValue--;
return o;
}
void checkPivotValue(api.PivotValue o) {
buildCounterPivotValue++;
if (buildCounterPivotValue < 3) {
unittest.expect(
o.calculatedDisplayType!,
unittest.equals('foo'),
);
checkDataSourceColumnReference(o.dataSourceColumnReference!);
unittest.expect(
o.formula!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.sourceColumnOffset!,
unittest.equals(42),
);
unittest.expect(
o.summarizeFunction!,
unittest.equals('foo'),
);
}
buildCounterPivotValue--;
}
core.int buildCounterPointStyle = 0;
api.PointStyle buildPointStyle() {
final o = api.PointStyle();
buildCounterPointStyle++;
if (buildCounterPointStyle < 3) {
o.shape = 'foo';
o.size = 42.0;
}
buildCounterPointStyle--;
return o;
}
void checkPointStyle(api.PointStyle o) {
buildCounterPointStyle++;
if (buildCounterPointStyle < 3) {
unittest.expect(
o.shape!,
unittest.equals('foo'),
);
unittest.expect(
o.size!,
unittest.equals(42.0),
);
}
buildCounterPointStyle--;
}
core.List<api.GridRange> buildUnnamed69() => [
buildGridRange(),
buildGridRange(),
];
void checkUnnamed69(core.List<api.GridRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkGridRange(o[0]);
checkGridRange(o[1]);
}
core.int buildCounterProtectedRange = 0;
api.ProtectedRange buildProtectedRange() {
final o = api.ProtectedRange();
buildCounterProtectedRange++;
if (buildCounterProtectedRange < 3) {
o.description = 'foo';
o.editors = buildEditors();
o.namedRangeId = 'foo';
o.protectedRangeId = 42;
o.range = buildGridRange();
o.requestingUserCanEdit = true;
o.unprotectedRanges = buildUnnamed69();
o.warningOnly = true;
}
buildCounterProtectedRange--;
return o;
}
void checkProtectedRange(api.ProtectedRange o) {
buildCounterProtectedRange++;
if (buildCounterProtectedRange < 3) {
unittest.expect(
o.description!,
unittest.equals('foo'),
);
checkEditors(o.editors!);
unittest.expect(
o.namedRangeId!,
unittest.equals('foo'),
);
unittest.expect(
o.protectedRangeId!,
unittest.equals(42),
);
checkGridRange(o.range!);
unittest.expect(o.requestingUserCanEdit!, unittest.isTrue);
checkUnnamed69(o.unprotectedRanges!);
unittest.expect(o.warningOnly!, unittest.isTrue);
}
buildCounterProtectedRange--;
}
core.int buildCounterRandomizeRangeRequest = 0;
api.RandomizeRangeRequest buildRandomizeRangeRequest() {
final o = api.RandomizeRangeRequest();
buildCounterRandomizeRangeRequest++;
if (buildCounterRandomizeRangeRequest < 3) {
o.range = buildGridRange();
}
buildCounterRandomizeRangeRequest--;
return o;
}
void checkRandomizeRangeRequest(api.RandomizeRangeRequest o) {
buildCounterRandomizeRangeRequest++;
if (buildCounterRandomizeRangeRequest < 3) {
checkGridRange(o.range!);
}
buildCounterRandomizeRangeRequest--;
}
core.int buildCounterRefreshDataSourceObjectExecutionStatus = 0;
api.RefreshDataSourceObjectExecutionStatus
buildRefreshDataSourceObjectExecutionStatus() {
final o = api.RefreshDataSourceObjectExecutionStatus();
buildCounterRefreshDataSourceObjectExecutionStatus++;
if (buildCounterRefreshDataSourceObjectExecutionStatus < 3) {
o.dataExecutionStatus = buildDataExecutionStatus();
o.reference = buildDataSourceObjectReference();
}
buildCounterRefreshDataSourceObjectExecutionStatus--;
return o;
}
void checkRefreshDataSourceObjectExecutionStatus(
api.RefreshDataSourceObjectExecutionStatus o) {
buildCounterRefreshDataSourceObjectExecutionStatus++;
if (buildCounterRefreshDataSourceObjectExecutionStatus < 3) {
checkDataExecutionStatus(o.dataExecutionStatus!);
checkDataSourceObjectReference(o.reference!);
}
buildCounterRefreshDataSourceObjectExecutionStatus--;
}
core.int buildCounterRefreshDataSourceRequest = 0;
api.RefreshDataSourceRequest buildRefreshDataSourceRequest() {
final o = api.RefreshDataSourceRequest();
buildCounterRefreshDataSourceRequest++;
if (buildCounterRefreshDataSourceRequest < 3) {
o.dataSourceId = 'foo';
o.force = true;
o.isAll = true;
o.references = buildDataSourceObjectReferences();
}
buildCounterRefreshDataSourceRequest--;
return o;
}
void checkRefreshDataSourceRequest(api.RefreshDataSourceRequest o) {
buildCounterRefreshDataSourceRequest++;
if (buildCounterRefreshDataSourceRequest < 3) {
unittest.expect(
o.dataSourceId!,
unittest.equals('foo'),
);
unittest.expect(o.force!, unittest.isTrue);
unittest.expect(o.isAll!, unittest.isTrue);
checkDataSourceObjectReferences(o.references!);
}
buildCounterRefreshDataSourceRequest--;
}
core.List<api.RefreshDataSourceObjectExecutionStatus> buildUnnamed70() => [
buildRefreshDataSourceObjectExecutionStatus(),
buildRefreshDataSourceObjectExecutionStatus(),
];
void checkUnnamed70(core.List<api.RefreshDataSourceObjectExecutionStatus> o) {
unittest.expect(o, unittest.hasLength(2));
checkRefreshDataSourceObjectExecutionStatus(o[0]);
checkRefreshDataSourceObjectExecutionStatus(o[1]);
}
core.int buildCounterRefreshDataSourceResponse = 0;
api.RefreshDataSourceResponse buildRefreshDataSourceResponse() {
final o = api.RefreshDataSourceResponse();
buildCounterRefreshDataSourceResponse++;
if (buildCounterRefreshDataSourceResponse < 3) {
o.statuses = buildUnnamed70();
}
buildCounterRefreshDataSourceResponse--;
return o;
}
void checkRefreshDataSourceResponse(api.RefreshDataSourceResponse o) {
buildCounterRefreshDataSourceResponse++;
if (buildCounterRefreshDataSourceResponse < 3) {
checkUnnamed70(o.statuses!);
}
buildCounterRefreshDataSourceResponse--;
}
core.int buildCounterRepeatCellRequest = 0;
api.RepeatCellRequest buildRepeatCellRequest() {
final o = api.RepeatCellRequest();
buildCounterRepeatCellRequest++;
if (buildCounterRepeatCellRequest < 3) {
o.cell = buildCellData();
o.fields = 'foo';
o.range = buildGridRange();
}
buildCounterRepeatCellRequest--;
return o;
}
void checkRepeatCellRequest(api.RepeatCellRequest o) {
buildCounterRepeatCellRequest++;
if (buildCounterRepeatCellRequest < 3) {
checkCellData(o.cell!);
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkGridRange(o.range!);
}
buildCounterRepeatCellRequest--;
}
core.int buildCounterRequest = 0;
api.Request buildRequest() {
final o = api.Request();
buildCounterRequest++;
if (buildCounterRequest < 3) {
o.addBanding = buildAddBandingRequest();
o.addChart = buildAddChartRequest();
o.addConditionalFormatRule = buildAddConditionalFormatRuleRequest();
o.addDataSource = buildAddDataSourceRequest();
o.addDimensionGroup = buildAddDimensionGroupRequest();
o.addFilterView = buildAddFilterViewRequest();
o.addNamedRange = buildAddNamedRangeRequest();
o.addProtectedRange = buildAddProtectedRangeRequest();
o.addSheet = buildAddSheetRequest();
o.addSlicer = buildAddSlicerRequest();
o.appendCells = buildAppendCellsRequest();
o.appendDimension = buildAppendDimensionRequest();
o.autoFill = buildAutoFillRequest();
o.autoResizeDimensions = buildAutoResizeDimensionsRequest();
o.clearBasicFilter = buildClearBasicFilterRequest();
o.copyPaste = buildCopyPasteRequest();
o.createDeveloperMetadata = buildCreateDeveloperMetadataRequest();
o.cutPaste = buildCutPasteRequest();
o.deleteBanding = buildDeleteBandingRequest();
o.deleteConditionalFormatRule = buildDeleteConditionalFormatRuleRequest();
o.deleteDataSource = buildDeleteDataSourceRequest();
o.deleteDeveloperMetadata = buildDeleteDeveloperMetadataRequest();
o.deleteDimension = buildDeleteDimensionRequest();
o.deleteDimensionGroup = buildDeleteDimensionGroupRequest();
o.deleteDuplicates = buildDeleteDuplicatesRequest();
o.deleteEmbeddedObject = buildDeleteEmbeddedObjectRequest();
o.deleteFilterView = buildDeleteFilterViewRequest();
o.deleteNamedRange = buildDeleteNamedRangeRequest();
o.deleteProtectedRange = buildDeleteProtectedRangeRequest();
o.deleteRange = buildDeleteRangeRequest();
o.deleteSheet = buildDeleteSheetRequest();
o.duplicateFilterView = buildDuplicateFilterViewRequest();
o.duplicateSheet = buildDuplicateSheetRequest();
o.findReplace = buildFindReplaceRequest();
o.insertDimension = buildInsertDimensionRequest();
o.insertRange = buildInsertRangeRequest();
o.mergeCells = buildMergeCellsRequest();
o.moveDimension = buildMoveDimensionRequest();
o.pasteData = buildPasteDataRequest();
o.randomizeRange = buildRandomizeRangeRequest();
o.refreshDataSource = buildRefreshDataSourceRequest();
o.repeatCell = buildRepeatCellRequest();
o.setBasicFilter = buildSetBasicFilterRequest();
o.setDataValidation = buildSetDataValidationRequest();
o.sortRange = buildSortRangeRequest();
o.textToColumns = buildTextToColumnsRequest();
o.trimWhitespace = buildTrimWhitespaceRequest();
o.unmergeCells = buildUnmergeCellsRequest();
o.updateBanding = buildUpdateBandingRequest();
o.updateBorders = buildUpdateBordersRequest();
o.updateCells = buildUpdateCellsRequest();
o.updateChartSpec = buildUpdateChartSpecRequest();
o.updateConditionalFormatRule = buildUpdateConditionalFormatRuleRequest();
o.updateDataSource = buildUpdateDataSourceRequest();
o.updateDeveloperMetadata = buildUpdateDeveloperMetadataRequest();
o.updateDimensionGroup = buildUpdateDimensionGroupRequest();
o.updateDimensionProperties = buildUpdateDimensionPropertiesRequest();
o.updateEmbeddedObjectBorder = buildUpdateEmbeddedObjectBorderRequest();
o.updateEmbeddedObjectPosition = buildUpdateEmbeddedObjectPositionRequest();
o.updateFilterView = buildUpdateFilterViewRequest();
o.updateNamedRange = buildUpdateNamedRangeRequest();
o.updateProtectedRange = buildUpdateProtectedRangeRequest();
o.updateSheetProperties = buildUpdateSheetPropertiesRequest();
o.updateSlicerSpec = buildUpdateSlicerSpecRequest();
o.updateSpreadsheetProperties = buildUpdateSpreadsheetPropertiesRequest();
}
buildCounterRequest--;
return o;
}
void checkRequest(api.Request o) {
buildCounterRequest++;
if (buildCounterRequest < 3) {
checkAddBandingRequest(o.addBanding!);
checkAddChartRequest(o.addChart!);
checkAddConditionalFormatRuleRequest(o.addConditionalFormatRule!);
checkAddDataSourceRequest(o.addDataSource!);
checkAddDimensionGroupRequest(o.addDimensionGroup!);
checkAddFilterViewRequest(o.addFilterView!);
checkAddNamedRangeRequest(o.addNamedRange!);
checkAddProtectedRangeRequest(o.addProtectedRange!);
checkAddSheetRequest(o.addSheet!);
checkAddSlicerRequest(o.addSlicer!);
checkAppendCellsRequest(o.appendCells!);
checkAppendDimensionRequest(o.appendDimension!);
checkAutoFillRequest(o.autoFill!);
checkAutoResizeDimensionsRequest(o.autoResizeDimensions!);
checkClearBasicFilterRequest(o.clearBasicFilter!);
checkCopyPasteRequest(o.copyPaste!);
checkCreateDeveloperMetadataRequest(o.createDeveloperMetadata!);
checkCutPasteRequest(o.cutPaste!);
checkDeleteBandingRequest(o.deleteBanding!);
checkDeleteConditionalFormatRuleRequest(o.deleteConditionalFormatRule!);
checkDeleteDataSourceRequest(o.deleteDataSource!);
checkDeleteDeveloperMetadataRequest(o.deleteDeveloperMetadata!);
checkDeleteDimensionRequest(o.deleteDimension!);
checkDeleteDimensionGroupRequest(o.deleteDimensionGroup!);
checkDeleteDuplicatesRequest(o.deleteDuplicates!);
checkDeleteEmbeddedObjectRequest(o.deleteEmbeddedObject!);
checkDeleteFilterViewRequest(o.deleteFilterView!);
checkDeleteNamedRangeRequest(o.deleteNamedRange!);
checkDeleteProtectedRangeRequest(o.deleteProtectedRange!);
checkDeleteRangeRequest(o.deleteRange!);
checkDeleteSheetRequest(o.deleteSheet!);
checkDuplicateFilterViewRequest(o.duplicateFilterView!);
checkDuplicateSheetRequest(o.duplicateSheet!);
checkFindReplaceRequest(o.findReplace!);
checkInsertDimensionRequest(o.insertDimension!);
checkInsertRangeRequest(o.insertRange!);
checkMergeCellsRequest(o.mergeCells!);
checkMoveDimensionRequest(o.moveDimension!);
checkPasteDataRequest(o.pasteData!);
checkRandomizeRangeRequest(o.randomizeRange!);
checkRefreshDataSourceRequest(o.refreshDataSource!);
checkRepeatCellRequest(o.repeatCell!);
checkSetBasicFilterRequest(o.setBasicFilter!);
checkSetDataValidationRequest(o.setDataValidation!);
checkSortRangeRequest(o.sortRange!);
checkTextToColumnsRequest(o.textToColumns!);
checkTrimWhitespaceRequest(o.trimWhitespace!);
checkUnmergeCellsRequest(o.unmergeCells!);
checkUpdateBandingRequest(o.updateBanding!);
checkUpdateBordersRequest(o.updateBorders!);
checkUpdateCellsRequest(o.updateCells!);
checkUpdateChartSpecRequest(o.updateChartSpec!);
checkUpdateConditionalFormatRuleRequest(o.updateConditionalFormatRule!);
checkUpdateDataSourceRequest(o.updateDataSource!);
checkUpdateDeveloperMetadataRequest(o.updateDeveloperMetadata!);
checkUpdateDimensionGroupRequest(o.updateDimensionGroup!);
checkUpdateDimensionPropertiesRequest(o.updateDimensionProperties!);
checkUpdateEmbeddedObjectBorderRequest(o.updateEmbeddedObjectBorder!);
checkUpdateEmbeddedObjectPositionRequest(o.updateEmbeddedObjectPosition!);
checkUpdateFilterViewRequest(o.updateFilterView!);
checkUpdateNamedRangeRequest(o.updateNamedRange!);
checkUpdateProtectedRangeRequest(o.updateProtectedRange!);
checkUpdateSheetPropertiesRequest(o.updateSheetProperties!);
checkUpdateSlicerSpecRequest(o.updateSlicerSpec!);
checkUpdateSpreadsheetPropertiesRequest(o.updateSpreadsheetProperties!);
}
buildCounterRequest--;
}
core.int buildCounterResponse = 0;
api.Response buildResponse() {
final o = api.Response();
buildCounterResponse++;
if (buildCounterResponse < 3) {
o.addBanding = buildAddBandingResponse();
o.addChart = buildAddChartResponse();
o.addDataSource = buildAddDataSourceResponse();
o.addDimensionGroup = buildAddDimensionGroupResponse();
o.addFilterView = buildAddFilterViewResponse();
o.addNamedRange = buildAddNamedRangeResponse();
o.addProtectedRange = buildAddProtectedRangeResponse();
o.addSheet = buildAddSheetResponse();
o.addSlicer = buildAddSlicerResponse();
o.createDeveloperMetadata = buildCreateDeveloperMetadataResponse();
o.deleteConditionalFormatRule = buildDeleteConditionalFormatRuleResponse();
o.deleteDeveloperMetadata = buildDeleteDeveloperMetadataResponse();
o.deleteDimensionGroup = buildDeleteDimensionGroupResponse();
o.deleteDuplicates = buildDeleteDuplicatesResponse();
o.duplicateFilterView = buildDuplicateFilterViewResponse();
o.duplicateSheet = buildDuplicateSheetResponse();
o.findReplace = buildFindReplaceResponse();
o.refreshDataSource = buildRefreshDataSourceResponse();
o.trimWhitespace = buildTrimWhitespaceResponse();
o.updateConditionalFormatRule = buildUpdateConditionalFormatRuleResponse();
o.updateDataSource = buildUpdateDataSourceResponse();
o.updateDeveloperMetadata = buildUpdateDeveloperMetadataResponse();
o.updateEmbeddedObjectPosition =
buildUpdateEmbeddedObjectPositionResponse();
}
buildCounterResponse--;
return o;
}
void checkResponse(api.Response o) {
buildCounterResponse++;
if (buildCounterResponse < 3) {
checkAddBandingResponse(o.addBanding!);
checkAddChartResponse(o.addChart!);
checkAddDataSourceResponse(o.addDataSource!);
checkAddDimensionGroupResponse(o.addDimensionGroup!);
checkAddFilterViewResponse(o.addFilterView!);
checkAddNamedRangeResponse(o.addNamedRange!);
checkAddProtectedRangeResponse(o.addProtectedRange!);
checkAddSheetResponse(o.addSheet!);
checkAddSlicerResponse(o.addSlicer!);
checkCreateDeveloperMetadataResponse(o.createDeveloperMetadata!);
checkDeleteConditionalFormatRuleResponse(o.deleteConditionalFormatRule!);
checkDeleteDeveloperMetadataResponse(o.deleteDeveloperMetadata!);
checkDeleteDimensionGroupResponse(o.deleteDimensionGroup!);
checkDeleteDuplicatesResponse(o.deleteDuplicates!);
checkDuplicateFilterViewResponse(o.duplicateFilterView!);
checkDuplicateSheetResponse(o.duplicateSheet!);
checkFindReplaceResponse(o.findReplace!);
checkRefreshDataSourceResponse(o.refreshDataSource!);
checkTrimWhitespaceResponse(o.trimWhitespace!);
checkUpdateConditionalFormatRuleResponse(o.updateConditionalFormatRule!);
checkUpdateDataSourceResponse(o.updateDataSource!);
checkUpdateDeveloperMetadataResponse(o.updateDeveloperMetadata!);
checkUpdateEmbeddedObjectPositionResponse(o.updateEmbeddedObjectPosition!);
}
buildCounterResponse--;
}
core.List<api.CellData> buildUnnamed71() => [
buildCellData(),
buildCellData(),
];
void checkUnnamed71(core.List<api.CellData> o) {
unittest.expect(o, unittest.hasLength(2));
checkCellData(o[0]);
checkCellData(o[1]);
}
core.int buildCounterRowData = 0;
api.RowData buildRowData() {
final o = api.RowData();
buildCounterRowData++;
if (buildCounterRowData < 3) {
o.values = buildUnnamed71();
}
buildCounterRowData--;
return o;
}
void checkRowData(api.RowData o) {
buildCounterRowData++;
if (buildCounterRowData < 3) {
checkUnnamed71(o.values!);
}
buildCounterRowData--;
}
core.int buildCounterScorecardChartSpec = 0;
api.ScorecardChartSpec buildScorecardChartSpec() {
final o = api.ScorecardChartSpec();
buildCounterScorecardChartSpec++;
if (buildCounterScorecardChartSpec < 3) {
o.aggregateType = 'foo';
o.baselineValueData = buildChartData();
o.baselineValueFormat = buildBaselineValueFormat();
o.customFormatOptions = buildChartCustomNumberFormatOptions();
o.keyValueData = buildChartData();
o.keyValueFormat = buildKeyValueFormat();
o.numberFormatSource = 'foo';
o.scaleFactor = 42.0;
}
buildCounterScorecardChartSpec--;
return o;
}
void checkScorecardChartSpec(api.ScorecardChartSpec o) {
buildCounterScorecardChartSpec++;
if (buildCounterScorecardChartSpec < 3) {
unittest.expect(
o.aggregateType!,
unittest.equals('foo'),
);
checkChartData(o.baselineValueData!);
checkBaselineValueFormat(o.baselineValueFormat!);
checkChartCustomNumberFormatOptions(o.customFormatOptions!);
checkChartData(o.keyValueData!);
checkKeyValueFormat(o.keyValueFormat!);
unittest.expect(
o.numberFormatSource!,
unittest.equals('foo'),
);
unittest.expect(
o.scaleFactor!,
unittest.equals(42.0),
);
}
buildCounterScorecardChartSpec--;
}
core.List<api.DataFilter> buildUnnamed72() => [
buildDataFilter(),
buildDataFilter(),
];
void checkUnnamed72(core.List<api.DataFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataFilter(o[0]);
checkDataFilter(o[1]);
}
core.int buildCounterSearchDeveloperMetadataRequest = 0;
api.SearchDeveloperMetadataRequest buildSearchDeveloperMetadataRequest() {
final o = api.SearchDeveloperMetadataRequest();
buildCounterSearchDeveloperMetadataRequest++;
if (buildCounterSearchDeveloperMetadataRequest < 3) {
o.dataFilters = buildUnnamed72();
}
buildCounterSearchDeveloperMetadataRequest--;
return o;
}
void checkSearchDeveloperMetadataRequest(api.SearchDeveloperMetadataRequest o) {
buildCounterSearchDeveloperMetadataRequest++;
if (buildCounterSearchDeveloperMetadataRequest < 3) {
checkUnnamed72(o.dataFilters!);
}
buildCounterSearchDeveloperMetadataRequest--;
}
core.List<api.MatchedDeveloperMetadata> buildUnnamed73() => [
buildMatchedDeveloperMetadata(),
buildMatchedDeveloperMetadata(),
];
void checkUnnamed73(core.List<api.MatchedDeveloperMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkMatchedDeveloperMetadata(o[0]);
checkMatchedDeveloperMetadata(o[1]);
}
core.int buildCounterSearchDeveloperMetadataResponse = 0;
api.SearchDeveloperMetadataResponse buildSearchDeveloperMetadataResponse() {
final o = api.SearchDeveloperMetadataResponse();
buildCounterSearchDeveloperMetadataResponse++;
if (buildCounterSearchDeveloperMetadataResponse < 3) {
o.matchedDeveloperMetadata = buildUnnamed73();
}
buildCounterSearchDeveloperMetadataResponse--;
return o;
}
void checkSearchDeveloperMetadataResponse(
api.SearchDeveloperMetadataResponse o) {
buildCounterSearchDeveloperMetadataResponse++;
if (buildCounterSearchDeveloperMetadataResponse < 3) {
checkUnnamed73(o.matchedDeveloperMetadata!);
}
buildCounterSearchDeveloperMetadataResponse--;
}
core.int buildCounterSetBasicFilterRequest = 0;
api.SetBasicFilterRequest buildSetBasicFilterRequest() {
final o = api.SetBasicFilterRequest();
buildCounterSetBasicFilterRequest++;
if (buildCounterSetBasicFilterRequest < 3) {
o.filter = buildBasicFilter();
}
buildCounterSetBasicFilterRequest--;
return o;
}
void checkSetBasicFilterRequest(api.SetBasicFilterRequest o) {
buildCounterSetBasicFilterRequest++;
if (buildCounterSetBasicFilterRequest < 3) {
checkBasicFilter(o.filter!);
}
buildCounterSetBasicFilterRequest--;
}
core.int buildCounterSetDataValidationRequest = 0;
api.SetDataValidationRequest buildSetDataValidationRequest() {
final o = api.SetDataValidationRequest();
buildCounterSetDataValidationRequest++;
if (buildCounterSetDataValidationRequest < 3) {
o.range = buildGridRange();
o.rule = buildDataValidationRule();
}
buildCounterSetDataValidationRequest--;
return o;
}
void checkSetDataValidationRequest(api.SetDataValidationRequest o) {
buildCounterSetDataValidationRequest++;
if (buildCounterSetDataValidationRequest < 3) {
checkGridRange(o.range!);
checkDataValidationRule(o.rule!);
}
buildCounterSetDataValidationRequest--;
}
core.List<api.BandedRange> buildUnnamed74() => [
buildBandedRange(),
buildBandedRange(),
];
void checkUnnamed74(core.List<api.BandedRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkBandedRange(o[0]);
checkBandedRange(o[1]);
}
core.List<api.EmbeddedChart> buildUnnamed75() => [
buildEmbeddedChart(),
buildEmbeddedChart(),
];
void checkUnnamed75(core.List<api.EmbeddedChart> o) {
unittest.expect(o, unittest.hasLength(2));
checkEmbeddedChart(o[0]);
checkEmbeddedChart(o[1]);
}
core.List<api.DimensionGroup> buildUnnamed76() => [
buildDimensionGroup(),
buildDimensionGroup(),
];
void checkUnnamed76(core.List<api.DimensionGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkDimensionGroup(o[0]);
checkDimensionGroup(o[1]);
}
core.List<api.ConditionalFormatRule> buildUnnamed77() => [
buildConditionalFormatRule(),
buildConditionalFormatRule(),
];
void checkUnnamed77(core.List<api.ConditionalFormatRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkConditionalFormatRule(o[0]);
checkConditionalFormatRule(o[1]);
}
core.List<api.GridData> buildUnnamed78() => [
buildGridData(),
buildGridData(),
];
void checkUnnamed78(core.List<api.GridData> o) {
unittest.expect(o, unittest.hasLength(2));
checkGridData(o[0]);
checkGridData(o[1]);
}
core.List<api.DeveloperMetadata> buildUnnamed79() => [
buildDeveloperMetadata(),
buildDeveloperMetadata(),
];
void checkUnnamed79(core.List<api.DeveloperMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkDeveloperMetadata(o[0]);
checkDeveloperMetadata(o[1]);
}
core.List<api.FilterView> buildUnnamed80() => [
buildFilterView(),
buildFilterView(),
];
void checkUnnamed80(core.List<api.FilterView> o) {
unittest.expect(o, unittest.hasLength(2));
checkFilterView(o[0]);
checkFilterView(o[1]);
}
core.List<api.GridRange> buildUnnamed81() => [
buildGridRange(),
buildGridRange(),
];
void checkUnnamed81(core.List<api.GridRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkGridRange(o[0]);
checkGridRange(o[1]);
}
core.List<api.ProtectedRange> buildUnnamed82() => [
buildProtectedRange(),
buildProtectedRange(),
];
void checkUnnamed82(core.List<api.ProtectedRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkProtectedRange(o[0]);
checkProtectedRange(o[1]);
}
core.List<api.DimensionGroup> buildUnnamed83() => [
buildDimensionGroup(),
buildDimensionGroup(),
];
void checkUnnamed83(core.List<api.DimensionGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkDimensionGroup(o[0]);
checkDimensionGroup(o[1]);
}
core.List<api.Slicer> buildUnnamed84() => [
buildSlicer(),
buildSlicer(),
];
void checkUnnamed84(core.List<api.Slicer> o) {
unittest.expect(o, unittest.hasLength(2));
checkSlicer(o[0]);
checkSlicer(o[1]);
}
core.int buildCounterSheet = 0;
api.Sheet buildSheet() {
final o = api.Sheet();
buildCounterSheet++;
if (buildCounterSheet < 3) {
o.bandedRanges = buildUnnamed74();
o.basicFilter = buildBasicFilter();
o.charts = buildUnnamed75();
o.columnGroups = buildUnnamed76();
o.conditionalFormats = buildUnnamed77();
o.data = buildUnnamed78();
o.developerMetadata = buildUnnamed79();
o.filterViews = buildUnnamed80();
o.merges = buildUnnamed81();
o.properties = buildSheetProperties();
o.protectedRanges = buildUnnamed82();
o.rowGroups = buildUnnamed83();
o.slicers = buildUnnamed84();
}
buildCounterSheet--;
return o;
}
void checkSheet(api.Sheet o) {
buildCounterSheet++;
if (buildCounterSheet < 3) {
checkUnnamed74(o.bandedRanges!);
checkBasicFilter(o.basicFilter!);
checkUnnamed75(o.charts!);
checkUnnamed76(o.columnGroups!);
checkUnnamed77(o.conditionalFormats!);
checkUnnamed78(o.data!);
checkUnnamed79(o.developerMetadata!);
checkUnnamed80(o.filterViews!);
checkUnnamed81(o.merges!);
checkSheetProperties(o.properties!);
checkUnnamed82(o.protectedRanges!);
checkUnnamed83(o.rowGroups!);
checkUnnamed84(o.slicers!);
}
buildCounterSheet--;
}
core.int buildCounterSheetProperties = 0;
api.SheetProperties buildSheetProperties() {
final o = api.SheetProperties();
buildCounterSheetProperties++;
if (buildCounterSheetProperties < 3) {
o.dataSourceSheetProperties = buildDataSourceSheetProperties();
o.gridProperties = buildGridProperties();
o.hidden = true;
o.index = 42;
o.rightToLeft = true;
o.sheetId = 42;
o.sheetType = 'foo';
o.tabColor = buildColor();
o.tabColorStyle = buildColorStyle();
o.title = 'foo';
}
buildCounterSheetProperties--;
return o;
}
void checkSheetProperties(api.SheetProperties o) {
buildCounterSheetProperties++;
if (buildCounterSheetProperties < 3) {
checkDataSourceSheetProperties(o.dataSourceSheetProperties!);
checkGridProperties(o.gridProperties!);
unittest.expect(o.hidden!, unittest.isTrue);
unittest.expect(
o.index!,
unittest.equals(42),
);
unittest.expect(o.rightToLeft!, unittest.isTrue);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
unittest.expect(
o.sheetType!,
unittest.equals('foo'),
);
checkColor(o.tabColor!);
checkColorStyle(o.tabColorStyle!);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
}
buildCounterSheetProperties--;
}
core.int buildCounterSlicer = 0;
api.Slicer buildSlicer() {
final o = api.Slicer();
buildCounterSlicer++;
if (buildCounterSlicer < 3) {
o.position = buildEmbeddedObjectPosition();
o.slicerId = 42;
o.spec = buildSlicerSpec();
}
buildCounterSlicer--;
return o;
}
void checkSlicer(api.Slicer o) {
buildCounterSlicer++;
if (buildCounterSlicer < 3) {
checkEmbeddedObjectPosition(o.position!);
unittest.expect(
o.slicerId!,
unittest.equals(42),
);
checkSlicerSpec(o.spec!);
}
buildCounterSlicer--;
}
core.int buildCounterSlicerSpec = 0;
api.SlicerSpec buildSlicerSpec() {
final o = api.SlicerSpec();
buildCounterSlicerSpec++;
if (buildCounterSlicerSpec < 3) {
o.applyToPivotTables = true;
o.backgroundColor = buildColor();
o.backgroundColorStyle = buildColorStyle();
o.columnIndex = 42;
o.dataRange = buildGridRange();
o.filterCriteria = buildFilterCriteria();
o.horizontalAlignment = 'foo';
o.textFormat = buildTextFormat();
o.title = 'foo';
}
buildCounterSlicerSpec--;
return o;
}
void checkSlicerSpec(api.SlicerSpec o) {
buildCounterSlicerSpec++;
if (buildCounterSlicerSpec < 3) {
unittest.expect(o.applyToPivotTables!, unittest.isTrue);
checkColor(o.backgroundColor!);
checkColorStyle(o.backgroundColorStyle!);
unittest.expect(
o.columnIndex!,
unittest.equals(42),
);
checkGridRange(o.dataRange!);
checkFilterCriteria(o.filterCriteria!);
unittest.expect(
o.horizontalAlignment!,
unittest.equals('foo'),
);
checkTextFormat(o.textFormat!);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
}
buildCounterSlicerSpec--;
}
core.List<api.SortSpec> buildUnnamed85() => [
buildSortSpec(),
buildSortSpec(),
];
void checkUnnamed85(core.List<api.SortSpec> o) {
unittest.expect(o, unittest.hasLength(2));
checkSortSpec(o[0]);
checkSortSpec(o[1]);
}
core.int buildCounterSortRangeRequest = 0;
api.SortRangeRequest buildSortRangeRequest() {
final o = api.SortRangeRequest();
buildCounterSortRangeRequest++;
if (buildCounterSortRangeRequest < 3) {
o.range = buildGridRange();
o.sortSpecs = buildUnnamed85();
}
buildCounterSortRangeRequest--;
return o;
}
void checkSortRangeRequest(api.SortRangeRequest o) {
buildCounterSortRangeRequest++;
if (buildCounterSortRangeRequest < 3) {
checkGridRange(o.range!);
checkUnnamed85(o.sortSpecs!);
}
buildCounterSortRangeRequest--;
}
core.int buildCounterSortSpec = 0;
api.SortSpec buildSortSpec() {
final o = api.SortSpec();
buildCounterSortSpec++;
if (buildCounterSortSpec < 3) {
o.backgroundColor = buildColor();
o.backgroundColorStyle = buildColorStyle();
o.dataSourceColumnReference = buildDataSourceColumnReference();
o.dimensionIndex = 42;
o.foregroundColor = buildColor();
o.foregroundColorStyle = buildColorStyle();
o.sortOrder = 'foo';
}
buildCounterSortSpec--;
return o;
}
void checkSortSpec(api.SortSpec o) {
buildCounterSortSpec++;
if (buildCounterSortSpec < 3) {
checkColor(o.backgroundColor!);
checkColorStyle(o.backgroundColorStyle!);
checkDataSourceColumnReference(o.dataSourceColumnReference!);
unittest.expect(
o.dimensionIndex!,
unittest.equals(42),
);
checkColor(o.foregroundColor!);
checkColorStyle(o.foregroundColorStyle!);
unittest.expect(
o.sortOrder!,
unittest.equals('foo'),
);
}
buildCounterSortSpec--;
}
core.int buildCounterSourceAndDestination = 0;
api.SourceAndDestination buildSourceAndDestination() {
final o = api.SourceAndDestination();
buildCounterSourceAndDestination++;
if (buildCounterSourceAndDestination < 3) {
o.dimension = 'foo';
o.fillLength = 42;
o.source = buildGridRange();
}
buildCounterSourceAndDestination--;
return o;
}
void checkSourceAndDestination(api.SourceAndDestination o) {
buildCounterSourceAndDestination++;
if (buildCounterSourceAndDestination < 3) {
unittest.expect(
o.dimension!,
unittest.equals('foo'),
);
unittest.expect(
o.fillLength!,
unittest.equals(42),
);
checkGridRange(o.source!);
}
buildCounterSourceAndDestination--;
}
core.List<api.DataSourceRefreshSchedule> buildUnnamed86() => [
buildDataSourceRefreshSchedule(),
buildDataSourceRefreshSchedule(),
];
void checkUnnamed86(core.List<api.DataSourceRefreshSchedule> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSourceRefreshSchedule(o[0]);
checkDataSourceRefreshSchedule(o[1]);
}
core.List<api.DataSource> buildUnnamed87() => [
buildDataSource(),
buildDataSource(),
];
void checkUnnamed87(core.List<api.DataSource> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataSource(o[0]);
checkDataSource(o[1]);
}
core.List<api.DeveloperMetadata> buildUnnamed88() => [
buildDeveloperMetadata(),
buildDeveloperMetadata(),
];
void checkUnnamed88(core.List<api.DeveloperMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkDeveloperMetadata(o[0]);
checkDeveloperMetadata(o[1]);
}
core.List<api.NamedRange> buildUnnamed89() => [
buildNamedRange(),
buildNamedRange(),
];
void checkUnnamed89(core.List<api.NamedRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkNamedRange(o[0]);
checkNamedRange(o[1]);
}
core.List<api.Sheet> buildUnnamed90() => [
buildSheet(),
buildSheet(),
];
void checkUnnamed90(core.List<api.Sheet> o) {
unittest.expect(o, unittest.hasLength(2));
checkSheet(o[0]);
checkSheet(o[1]);
}
core.int buildCounterSpreadsheet = 0;
api.Spreadsheet buildSpreadsheet() {
final o = api.Spreadsheet();
buildCounterSpreadsheet++;
if (buildCounterSpreadsheet < 3) {
o.dataSourceSchedules = buildUnnamed86();
o.dataSources = buildUnnamed87();
o.developerMetadata = buildUnnamed88();
o.namedRanges = buildUnnamed89();
o.properties = buildSpreadsheetProperties();
o.sheets = buildUnnamed90();
o.spreadsheetId = 'foo';
o.spreadsheetUrl = 'foo';
}
buildCounterSpreadsheet--;
return o;
}
void checkSpreadsheet(api.Spreadsheet o) {
buildCounterSpreadsheet++;
if (buildCounterSpreadsheet < 3) {
checkUnnamed86(o.dataSourceSchedules!);
checkUnnamed87(o.dataSources!);
checkUnnamed88(o.developerMetadata!);
checkUnnamed89(o.namedRanges!);
checkSpreadsheetProperties(o.properties!);
checkUnnamed90(o.sheets!);
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
unittest.expect(
o.spreadsheetUrl!,
unittest.equals('foo'),
);
}
buildCounterSpreadsheet--;
}
core.int buildCounterSpreadsheetProperties = 0;
api.SpreadsheetProperties buildSpreadsheetProperties() {
final o = api.SpreadsheetProperties();
buildCounterSpreadsheetProperties++;
if (buildCounterSpreadsheetProperties < 3) {
o.autoRecalc = 'foo';
o.defaultFormat = buildCellFormat();
o.iterativeCalculationSettings = buildIterativeCalculationSettings();
o.locale = 'foo';
o.spreadsheetTheme = buildSpreadsheetTheme();
o.timeZone = 'foo';
o.title = 'foo';
}
buildCounterSpreadsheetProperties--;
return o;
}
void checkSpreadsheetProperties(api.SpreadsheetProperties o) {
buildCounterSpreadsheetProperties++;
if (buildCounterSpreadsheetProperties < 3) {
unittest.expect(
o.autoRecalc!,
unittest.equals('foo'),
);
checkCellFormat(o.defaultFormat!);
checkIterativeCalculationSettings(o.iterativeCalculationSettings!);
unittest.expect(
o.locale!,
unittest.equals('foo'),
);
checkSpreadsheetTheme(o.spreadsheetTheme!);
unittest.expect(
o.timeZone!,
unittest.equals('foo'),
);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
}
buildCounterSpreadsheetProperties--;
}
core.List<api.ThemeColorPair> buildUnnamed91() => [
buildThemeColorPair(),
buildThemeColorPair(),
];
void checkUnnamed91(core.List<api.ThemeColorPair> o) {
unittest.expect(o, unittest.hasLength(2));
checkThemeColorPair(o[0]);
checkThemeColorPair(o[1]);
}
core.int buildCounterSpreadsheetTheme = 0;
api.SpreadsheetTheme buildSpreadsheetTheme() {
final o = api.SpreadsheetTheme();
buildCounterSpreadsheetTheme++;
if (buildCounterSpreadsheetTheme < 3) {
o.primaryFontFamily = 'foo';
o.themeColors = buildUnnamed91();
}
buildCounterSpreadsheetTheme--;
return o;
}
void checkSpreadsheetTheme(api.SpreadsheetTheme o) {
buildCounterSpreadsheetTheme++;
if (buildCounterSpreadsheetTheme < 3) {
unittest.expect(
o.primaryFontFamily!,
unittest.equals('foo'),
);
checkUnnamed91(o.themeColors!);
}
buildCounterSpreadsheetTheme--;
}
core.int buildCounterTextFormat = 0;
api.TextFormat buildTextFormat() {
final o = api.TextFormat();
buildCounterTextFormat++;
if (buildCounterTextFormat < 3) {
o.bold = true;
o.fontFamily = 'foo';
o.fontSize = 42;
o.foregroundColor = buildColor();
o.foregroundColorStyle = buildColorStyle();
o.italic = true;
o.link = buildLink();
o.strikethrough = true;
o.underline = true;
}
buildCounterTextFormat--;
return o;
}
void checkTextFormat(api.TextFormat o) {
buildCounterTextFormat++;
if (buildCounterTextFormat < 3) {
unittest.expect(o.bold!, unittest.isTrue);
unittest.expect(
o.fontFamily!,
unittest.equals('foo'),
);
unittest.expect(
o.fontSize!,
unittest.equals(42),
);
checkColor(o.foregroundColor!);
checkColorStyle(o.foregroundColorStyle!);
unittest.expect(o.italic!, unittest.isTrue);
checkLink(o.link!);
unittest.expect(o.strikethrough!, unittest.isTrue);
unittest.expect(o.underline!, unittest.isTrue);
}
buildCounterTextFormat--;
}
core.int buildCounterTextFormatRun = 0;
api.TextFormatRun buildTextFormatRun() {
final o = api.TextFormatRun();
buildCounterTextFormatRun++;
if (buildCounterTextFormatRun < 3) {
o.format = buildTextFormat();
o.startIndex = 42;
}
buildCounterTextFormatRun--;
return o;
}
void checkTextFormatRun(api.TextFormatRun o) {
buildCounterTextFormatRun++;
if (buildCounterTextFormatRun < 3) {
checkTextFormat(o.format!);
unittest.expect(
o.startIndex!,
unittest.equals(42),
);
}
buildCounterTextFormatRun--;
}
core.int buildCounterTextPosition = 0;
api.TextPosition buildTextPosition() {
final o = api.TextPosition();
buildCounterTextPosition++;
if (buildCounterTextPosition < 3) {
o.horizontalAlignment = 'foo';
}
buildCounterTextPosition--;
return o;
}
void checkTextPosition(api.TextPosition o) {
buildCounterTextPosition++;
if (buildCounterTextPosition < 3) {
unittest.expect(
o.horizontalAlignment!,
unittest.equals('foo'),
);
}
buildCounterTextPosition--;
}
core.int buildCounterTextRotation = 0;
api.TextRotation buildTextRotation() {
final o = api.TextRotation();
buildCounterTextRotation++;
if (buildCounterTextRotation < 3) {
o.angle = 42;
o.vertical = true;
}
buildCounterTextRotation--;
return o;
}
void checkTextRotation(api.TextRotation o) {
buildCounterTextRotation++;
if (buildCounterTextRotation < 3) {
unittest.expect(
o.angle!,
unittest.equals(42),
);
unittest.expect(o.vertical!, unittest.isTrue);
}
buildCounterTextRotation--;
}
core.int buildCounterTextToColumnsRequest = 0;
api.TextToColumnsRequest buildTextToColumnsRequest() {
final o = api.TextToColumnsRequest();
buildCounterTextToColumnsRequest++;
if (buildCounterTextToColumnsRequest < 3) {
o.delimiter = 'foo';
o.delimiterType = 'foo';
o.source = buildGridRange();
}
buildCounterTextToColumnsRequest--;
return o;
}
void checkTextToColumnsRequest(api.TextToColumnsRequest o) {
buildCounterTextToColumnsRequest++;
if (buildCounterTextToColumnsRequest < 3) {
unittest.expect(
o.delimiter!,
unittest.equals('foo'),
);
unittest.expect(
o.delimiterType!,
unittest.equals('foo'),
);
checkGridRange(o.source!);
}
buildCounterTextToColumnsRequest--;
}
core.int buildCounterThemeColorPair = 0;
api.ThemeColorPair buildThemeColorPair() {
final o = api.ThemeColorPair();
buildCounterThemeColorPair++;
if (buildCounterThemeColorPair < 3) {
o.color = buildColorStyle();
o.colorType = 'foo';
}
buildCounterThemeColorPair--;
return o;
}
void checkThemeColorPair(api.ThemeColorPair o) {
buildCounterThemeColorPair++;
if (buildCounterThemeColorPair < 3) {
checkColorStyle(o.color!);
unittest.expect(
o.colorType!,
unittest.equals('foo'),
);
}
buildCounterThemeColorPair--;
}
core.int buildCounterTimeOfDay = 0;
api.TimeOfDay buildTimeOfDay() {
final o = api.TimeOfDay();
buildCounterTimeOfDay++;
if (buildCounterTimeOfDay < 3) {
o.hours = 42;
o.minutes = 42;
o.nanos = 42;
o.seconds = 42;
}
buildCounterTimeOfDay--;
return o;
}
void 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--;
}
core.int buildCounterTreemapChartColorScale = 0;
api.TreemapChartColorScale buildTreemapChartColorScale() {
final o = api.TreemapChartColorScale();
buildCounterTreemapChartColorScale++;
if (buildCounterTreemapChartColorScale < 3) {
o.maxValueColor = buildColor();
o.maxValueColorStyle = buildColorStyle();
o.midValueColor = buildColor();
o.midValueColorStyle = buildColorStyle();
o.minValueColor = buildColor();
o.minValueColorStyle = buildColorStyle();
o.noDataColor = buildColor();
o.noDataColorStyle = buildColorStyle();
}
buildCounterTreemapChartColorScale--;
return o;
}
void checkTreemapChartColorScale(api.TreemapChartColorScale o) {
buildCounterTreemapChartColorScale++;
if (buildCounterTreemapChartColorScale < 3) {
checkColor(o.maxValueColor!);
checkColorStyle(o.maxValueColorStyle!);
checkColor(o.midValueColor!);
checkColorStyle(o.midValueColorStyle!);
checkColor(o.minValueColor!);
checkColorStyle(o.minValueColorStyle!);
checkColor(o.noDataColor!);
checkColorStyle(o.noDataColorStyle!);
}
buildCounterTreemapChartColorScale--;
}
core.int buildCounterTreemapChartSpec = 0;
api.TreemapChartSpec buildTreemapChartSpec() {
final o = api.TreemapChartSpec();
buildCounterTreemapChartSpec++;
if (buildCounterTreemapChartSpec < 3) {
o.colorData = buildChartData();
o.colorScale = buildTreemapChartColorScale();
o.headerColor = buildColor();
o.headerColorStyle = buildColorStyle();
o.hideTooltips = true;
o.hintedLevels = 42;
o.labels = buildChartData();
o.levels = 42;
o.maxValue = 42.0;
o.minValue = 42.0;
o.parentLabels = buildChartData();
o.sizeData = buildChartData();
o.textFormat = buildTextFormat();
}
buildCounterTreemapChartSpec--;
return o;
}
void checkTreemapChartSpec(api.TreemapChartSpec o) {
buildCounterTreemapChartSpec++;
if (buildCounterTreemapChartSpec < 3) {
checkChartData(o.colorData!);
checkTreemapChartColorScale(o.colorScale!);
checkColor(o.headerColor!);
checkColorStyle(o.headerColorStyle!);
unittest.expect(o.hideTooltips!, unittest.isTrue);
unittest.expect(
o.hintedLevels!,
unittest.equals(42),
);
checkChartData(o.labels!);
unittest.expect(
o.levels!,
unittest.equals(42),
);
unittest.expect(
o.maxValue!,
unittest.equals(42.0),
);
unittest.expect(
o.minValue!,
unittest.equals(42.0),
);
checkChartData(o.parentLabels!);
checkChartData(o.sizeData!);
checkTextFormat(o.textFormat!);
}
buildCounterTreemapChartSpec--;
}
core.int buildCounterTrimWhitespaceRequest = 0;
api.TrimWhitespaceRequest buildTrimWhitespaceRequest() {
final o = api.TrimWhitespaceRequest();
buildCounterTrimWhitespaceRequest++;
if (buildCounterTrimWhitespaceRequest < 3) {
o.range = buildGridRange();
}
buildCounterTrimWhitespaceRequest--;
return o;
}
void checkTrimWhitespaceRequest(api.TrimWhitespaceRequest o) {
buildCounterTrimWhitespaceRequest++;
if (buildCounterTrimWhitespaceRequest < 3) {
checkGridRange(o.range!);
}
buildCounterTrimWhitespaceRequest--;
}
core.int buildCounterTrimWhitespaceResponse = 0;
api.TrimWhitespaceResponse buildTrimWhitespaceResponse() {
final o = api.TrimWhitespaceResponse();
buildCounterTrimWhitespaceResponse++;
if (buildCounterTrimWhitespaceResponse < 3) {
o.cellsChangedCount = 42;
}
buildCounterTrimWhitespaceResponse--;
return o;
}
void checkTrimWhitespaceResponse(api.TrimWhitespaceResponse o) {
buildCounterTrimWhitespaceResponse++;
if (buildCounterTrimWhitespaceResponse < 3) {
unittest.expect(
o.cellsChangedCount!,
unittest.equals(42),
);
}
buildCounterTrimWhitespaceResponse--;
}
core.int buildCounterUnmergeCellsRequest = 0;
api.UnmergeCellsRequest buildUnmergeCellsRequest() {
final o = api.UnmergeCellsRequest();
buildCounterUnmergeCellsRequest++;
if (buildCounterUnmergeCellsRequest < 3) {
o.range = buildGridRange();
}
buildCounterUnmergeCellsRequest--;
return o;
}
void checkUnmergeCellsRequest(api.UnmergeCellsRequest o) {
buildCounterUnmergeCellsRequest++;
if (buildCounterUnmergeCellsRequest < 3) {
checkGridRange(o.range!);
}
buildCounterUnmergeCellsRequest--;
}
core.int buildCounterUpdateBandingRequest = 0;
api.UpdateBandingRequest buildUpdateBandingRequest() {
final o = api.UpdateBandingRequest();
buildCounterUpdateBandingRequest++;
if (buildCounterUpdateBandingRequest < 3) {
o.bandedRange = buildBandedRange();
o.fields = 'foo';
}
buildCounterUpdateBandingRequest--;
return o;
}
void checkUpdateBandingRequest(api.UpdateBandingRequest o) {
buildCounterUpdateBandingRequest++;
if (buildCounterUpdateBandingRequest < 3) {
checkBandedRange(o.bandedRange!);
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
}
buildCounterUpdateBandingRequest--;
}
core.int buildCounterUpdateBordersRequest = 0;
api.UpdateBordersRequest buildUpdateBordersRequest() {
final o = api.UpdateBordersRequest();
buildCounterUpdateBordersRequest++;
if (buildCounterUpdateBordersRequest < 3) {
o.bottom = buildBorder();
o.innerHorizontal = buildBorder();
o.innerVertical = buildBorder();
o.left = buildBorder();
o.range = buildGridRange();
o.right = buildBorder();
o.top = buildBorder();
}
buildCounterUpdateBordersRequest--;
return o;
}
void checkUpdateBordersRequest(api.UpdateBordersRequest o) {
buildCounterUpdateBordersRequest++;
if (buildCounterUpdateBordersRequest < 3) {
checkBorder(o.bottom!);
checkBorder(o.innerHorizontal!);
checkBorder(o.innerVertical!);
checkBorder(o.left!);
checkGridRange(o.range!);
checkBorder(o.right!);
checkBorder(o.top!);
}
buildCounterUpdateBordersRequest--;
}
core.List<api.RowData> buildUnnamed92() => [
buildRowData(),
buildRowData(),
];
void checkUnnamed92(core.List<api.RowData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRowData(o[0]);
checkRowData(o[1]);
}
core.int buildCounterUpdateCellsRequest = 0;
api.UpdateCellsRequest buildUpdateCellsRequest() {
final o = api.UpdateCellsRequest();
buildCounterUpdateCellsRequest++;
if (buildCounterUpdateCellsRequest < 3) {
o.fields = 'foo';
o.range = buildGridRange();
o.rows = buildUnnamed92();
o.start = buildGridCoordinate();
}
buildCounterUpdateCellsRequest--;
return o;
}
void checkUpdateCellsRequest(api.UpdateCellsRequest o) {
buildCounterUpdateCellsRequest++;
if (buildCounterUpdateCellsRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkGridRange(o.range!);
checkUnnamed92(o.rows!);
checkGridCoordinate(o.start!);
}
buildCounterUpdateCellsRequest--;
}
core.int buildCounterUpdateChartSpecRequest = 0;
api.UpdateChartSpecRequest buildUpdateChartSpecRequest() {
final o = api.UpdateChartSpecRequest();
buildCounterUpdateChartSpecRequest++;
if (buildCounterUpdateChartSpecRequest < 3) {
o.chartId = 42;
o.spec = buildChartSpec();
}
buildCounterUpdateChartSpecRequest--;
return o;
}
void checkUpdateChartSpecRequest(api.UpdateChartSpecRequest o) {
buildCounterUpdateChartSpecRequest++;
if (buildCounterUpdateChartSpecRequest < 3) {
unittest.expect(
o.chartId!,
unittest.equals(42),
);
checkChartSpec(o.spec!);
}
buildCounterUpdateChartSpecRequest--;
}
core.int buildCounterUpdateConditionalFormatRuleRequest = 0;
api.UpdateConditionalFormatRuleRequest
buildUpdateConditionalFormatRuleRequest() {
final o = api.UpdateConditionalFormatRuleRequest();
buildCounterUpdateConditionalFormatRuleRequest++;
if (buildCounterUpdateConditionalFormatRuleRequest < 3) {
o.index = 42;
o.newIndex = 42;
o.rule = buildConditionalFormatRule();
o.sheetId = 42;
}
buildCounterUpdateConditionalFormatRuleRequest--;
return o;
}
void checkUpdateConditionalFormatRuleRequest(
api.UpdateConditionalFormatRuleRequest o) {
buildCounterUpdateConditionalFormatRuleRequest++;
if (buildCounterUpdateConditionalFormatRuleRequest < 3) {
unittest.expect(
o.index!,
unittest.equals(42),
);
unittest.expect(
o.newIndex!,
unittest.equals(42),
);
checkConditionalFormatRule(o.rule!);
unittest.expect(
o.sheetId!,
unittest.equals(42),
);
}
buildCounterUpdateConditionalFormatRuleRequest--;
}
core.int buildCounterUpdateConditionalFormatRuleResponse = 0;
api.UpdateConditionalFormatRuleResponse
buildUpdateConditionalFormatRuleResponse() {
final o = api.UpdateConditionalFormatRuleResponse();
buildCounterUpdateConditionalFormatRuleResponse++;
if (buildCounterUpdateConditionalFormatRuleResponse < 3) {
o.newIndex = 42;
o.newRule = buildConditionalFormatRule();
o.oldIndex = 42;
o.oldRule = buildConditionalFormatRule();
}
buildCounterUpdateConditionalFormatRuleResponse--;
return o;
}
void checkUpdateConditionalFormatRuleResponse(
api.UpdateConditionalFormatRuleResponse o) {
buildCounterUpdateConditionalFormatRuleResponse++;
if (buildCounterUpdateConditionalFormatRuleResponse < 3) {
unittest.expect(
o.newIndex!,
unittest.equals(42),
);
checkConditionalFormatRule(o.newRule!);
unittest.expect(
o.oldIndex!,
unittest.equals(42),
);
checkConditionalFormatRule(o.oldRule!);
}
buildCounterUpdateConditionalFormatRuleResponse--;
}
core.int buildCounterUpdateDataSourceRequest = 0;
api.UpdateDataSourceRequest buildUpdateDataSourceRequest() {
final o = api.UpdateDataSourceRequest();
buildCounterUpdateDataSourceRequest++;
if (buildCounterUpdateDataSourceRequest < 3) {
o.dataSource = buildDataSource();
o.fields = 'foo';
}
buildCounterUpdateDataSourceRequest--;
return o;
}
void checkUpdateDataSourceRequest(api.UpdateDataSourceRequest o) {
buildCounterUpdateDataSourceRequest++;
if (buildCounterUpdateDataSourceRequest < 3) {
checkDataSource(o.dataSource!);
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
}
buildCounterUpdateDataSourceRequest--;
}
core.int buildCounterUpdateDataSourceResponse = 0;
api.UpdateDataSourceResponse buildUpdateDataSourceResponse() {
final o = api.UpdateDataSourceResponse();
buildCounterUpdateDataSourceResponse++;
if (buildCounterUpdateDataSourceResponse < 3) {
o.dataExecutionStatus = buildDataExecutionStatus();
o.dataSource = buildDataSource();
}
buildCounterUpdateDataSourceResponse--;
return o;
}
void checkUpdateDataSourceResponse(api.UpdateDataSourceResponse o) {
buildCounterUpdateDataSourceResponse++;
if (buildCounterUpdateDataSourceResponse < 3) {
checkDataExecutionStatus(o.dataExecutionStatus!);
checkDataSource(o.dataSource!);
}
buildCounterUpdateDataSourceResponse--;
}
core.List<api.DataFilter> buildUnnamed93() => [
buildDataFilter(),
buildDataFilter(),
];
void checkUnnamed93(core.List<api.DataFilter> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataFilter(o[0]);
checkDataFilter(o[1]);
}
core.int buildCounterUpdateDeveloperMetadataRequest = 0;
api.UpdateDeveloperMetadataRequest buildUpdateDeveloperMetadataRequest() {
final o = api.UpdateDeveloperMetadataRequest();
buildCounterUpdateDeveloperMetadataRequest++;
if (buildCounterUpdateDeveloperMetadataRequest < 3) {
o.dataFilters = buildUnnamed93();
o.developerMetadata = buildDeveloperMetadata();
o.fields = 'foo';
}
buildCounterUpdateDeveloperMetadataRequest--;
return o;
}
void checkUpdateDeveloperMetadataRequest(api.UpdateDeveloperMetadataRequest o) {
buildCounterUpdateDeveloperMetadataRequest++;
if (buildCounterUpdateDeveloperMetadataRequest < 3) {
checkUnnamed93(o.dataFilters!);
checkDeveloperMetadata(o.developerMetadata!);
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
}
buildCounterUpdateDeveloperMetadataRequest--;
}
core.List<api.DeveloperMetadata> buildUnnamed94() => [
buildDeveloperMetadata(),
buildDeveloperMetadata(),
];
void checkUnnamed94(core.List<api.DeveloperMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkDeveloperMetadata(o[0]);
checkDeveloperMetadata(o[1]);
}
core.int buildCounterUpdateDeveloperMetadataResponse = 0;
api.UpdateDeveloperMetadataResponse buildUpdateDeveloperMetadataResponse() {
final o = api.UpdateDeveloperMetadataResponse();
buildCounterUpdateDeveloperMetadataResponse++;
if (buildCounterUpdateDeveloperMetadataResponse < 3) {
o.developerMetadata = buildUnnamed94();
}
buildCounterUpdateDeveloperMetadataResponse--;
return o;
}
void checkUpdateDeveloperMetadataResponse(
api.UpdateDeveloperMetadataResponse o) {
buildCounterUpdateDeveloperMetadataResponse++;
if (buildCounterUpdateDeveloperMetadataResponse < 3) {
checkUnnamed94(o.developerMetadata!);
}
buildCounterUpdateDeveloperMetadataResponse--;
}
core.int buildCounterUpdateDimensionGroupRequest = 0;
api.UpdateDimensionGroupRequest buildUpdateDimensionGroupRequest() {
final o = api.UpdateDimensionGroupRequest();
buildCounterUpdateDimensionGroupRequest++;
if (buildCounterUpdateDimensionGroupRequest < 3) {
o.dimensionGroup = buildDimensionGroup();
o.fields = 'foo';
}
buildCounterUpdateDimensionGroupRequest--;
return o;
}
void checkUpdateDimensionGroupRequest(api.UpdateDimensionGroupRequest o) {
buildCounterUpdateDimensionGroupRequest++;
if (buildCounterUpdateDimensionGroupRequest < 3) {
checkDimensionGroup(o.dimensionGroup!);
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
}
buildCounterUpdateDimensionGroupRequest--;
}
core.int buildCounterUpdateDimensionPropertiesRequest = 0;
api.UpdateDimensionPropertiesRequest buildUpdateDimensionPropertiesRequest() {
final o = api.UpdateDimensionPropertiesRequest();
buildCounterUpdateDimensionPropertiesRequest++;
if (buildCounterUpdateDimensionPropertiesRequest < 3) {
o.dataSourceSheetRange = buildDataSourceSheetDimensionRange();
o.fields = 'foo';
o.properties = buildDimensionProperties();
o.range = buildDimensionRange();
}
buildCounterUpdateDimensionPropertiesRequest--;
return o;
}
void checkUpdateDimensionPropertiesRequest(
api.UpdateDimensionPropertiesRequest o) {
buildCounterUpdateDimensionPropertiesRequest++;
if (buildCounterUpdateDimensionPropertiesRequest < 3) {
checkDataSourceSheetDimensionRange(o.dataSourceSheetRange!);
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkDimensionProperties(o.properties!);
checkDimensionRange(o.range!);
}
buildCounterUpdateDimensionPropertiesRequest--;
}
core.int buildCounterUpdateEmbeddedObjectBorderRequest = 0;
api.UpdateEmbeddedObjectBorderRequest buildUpdateEmbeddedObjectBorderRequest() {
final o = api.UpdateEmbeddedObjectBorderRequest();
buildCounterUpdateEmbeddedObjectBorderRequest++;
if (buildCounterUpdateEmbeddedObjectBorderRequest < 3) {
o.border = buildEmbeddedObjectBorder();
o.fields = 'foo';
o.objectId = 42;
}
buildCounterUpdateEmbeddedObjectBorderRequest--;
return o;
}
void checkUpdateEmbeddedObjectBorderRequest(
api.UpdateEmbeddedObjectBorderRequest o) {
buildCounterUpdateEmbeddedObjectBorderRequest++;
if (buildCounterUpdateEmbeddedObjectBorderRequest < 3) {
checkEmbeddedObjectBorder(o.border!);
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
unittest.expect(
o.objectId!,
unittest.equals(42),
);
}
buildCounterUpdateEmbeddedObjectBorderRequest--;
}
core.int buildCounterUpdateEmbeddedObjectPositionRequest = 0;
api.UpdateEmbeddedObjectPositionRequest
buildUpdateEmbeddedObjectPositionRequest() {
final o = api.UpdateEmbeddedObjectPositionRequest();
buildCounterUpdateEmbeddedObjectPositionRequest++;
if (buildCounterUpdateEmbeddedObjectPositionRequest < 3) {
o.fields = 'foo';
o.newPosition = buildEmbeddedObjectPosition();
o.objectId = 42;
}
buildCounterUpdateEmbeddedObjectPositionRequest--;
return o;
}
void checkUpdateEmbeddedObjectPositionRequest(
api.UpdateEmbeddedObjectPositionRequest o) {
buildCounterUpdateEmbeddedObjectPositionRequest++;
if (buildCounterUpdateEmbeddedObjectPositionRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkEmbeddedObjectPosition(o.newPosition!);
unittest.expect(
o.objectId!,
unittest.equals(42),
);
}
buildCounterUpdateEmbeddedObjectPositionRequest--;
}
core.int buildCounterUpdateEmbeddedObjectPositionResponse = 0;
api.UpdateEmbeddedObjectPositionResponse
buildUpdateEmbeddedObjectPositionResponse() {
final o = api.UpdateEmbeddedObjectPositionResponse();
buildCounterUpdateEmbeddedObjectPositionResponse++;
if (buildCounterUpdateEmbeddedObjectPositionResponse < 3) {
o.position = buildEmbeddedObjectPosition();
}
buildCounterUpdateEmbeddedObjectPositionResponse--;
return o;
}
void checkUpdateEmbeddedObjectPositionResponse(
api.UpdateEmbeddedObjectPositionResponse o) {
buildCounterUpdateEmbeddedObjectPositionResponse++;
if (buildCounterUpdateEmbeddedObjectPositionResponse < 3) {
checkEmbeddedObjectPosition(o.position!);
}
buildCounterUpdateEmbeddedObjectPositionResponse--;
}
core.int buildCounterUpdateFilterViewRequest = 0;
api.UpdateFilterViewRequest buildUpdateFilterViewRequest() {
final o = api.UpdateFilterViewRequest();
buildCounterUpdateFilterViewRequest++;
if (buildCounterUpdateFilterViewRequest < 3) {
o.fields = 'foo';
o.filter = buildFilterView();
}
buildCounterUpdateFilterViewRequest--;
return o;
}
void checkUpdateFilterViewRequest(api.UpdateFilterViewRequest o) {
buildCounterUpdateFilterViewRequest++;
if (buildCounterUpdateFilterViewRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkFilterView(o.filter!);
}
buildCounterUpdateFilterViewRequest--;
}
core.int buildCounterUpdateNamedRangeRequest = 0;
api.UpdateNamedRangeRequest buildUpdateNamedRangeRequest() {
final o = api.UpdateNamedRangeRequest();
buildCounterUpdateNamedRangeRequest++;
if (buildCounterUpdateNamedRangeRequest < 3) {
o.fields = 'foo';
o.namedRange = buildNamedRange();
}
buildCounterUpdateNamedRangeRequest--;
return o;
}
void checkUpdateNamedRangeRequest(api.UpdateNamedRangeRequest o) {
buildCounterUpdateNamedRangeRequest++;
if (buildCounterUpdateNamedRangeRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkNamedRange(o.namedRange!);
}
buildCounterUpdateNamedRangeRequest--;
}
core.int buildCounterUpdateProtectedRangeRequest = 0;
api.UpdateProtectedRangeRequest buildUpdateProtectedRangeRequest() {
final o = api.UpdateProtectedRangeRequest();
buildCounterUpdateProtectedRangeRequest++;
if (buildCounterUpdateProtectedRangeRequest < 3) {
o.fields = 'foo';
o.protectedRange = buildProtectedRange();
}
buildCounterUpdateProtectedRangeRequest--;
return o;
}
void checkUpdateProtectedRangeRequest(api.UpdateProtectedRangeRequest o) {
buildCounterUpdateProtectedRangeRequest++;
if (buildCounterUpdateProtectedRangeRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkProtectedRange(o.protectedRange!);
}
buildCounterUpdateProtectedRangeRequest--;
}
core.int buildCounterUpdateSheetPropertiesRequest = 0;
api.UpdateSheetPropertiesRequest buildUpdateSheetPropertiesRequest() {
final o = api.UpdateSheetPropertiesRequest();
buildCounterUpdateSheetPropertiesRequest++;
if (buildCounterUpdateSheetPropertiesRequest < 3) {
o.fields = 'foo';
o.properties = buildSheetProperties();
}
buildCounterUpdateSheetPropertiesRequest--;
return o;
}
void checkUpdateSheetPropertiesRequest(api.UpdateSheetPropertiesRequest o) {
buildCounterUpdateSheetPropertiesRequest++;
if (buildCounterUpdateSheetPropertiesRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkSheetProperties(o.properties!);
}
buildCounterUpdateSheetPropertiesRequest--;
}
core.int buildCounterUpdateSlicerSpecRequest = 0;
api.UpdateSlicerSpecRequest buildUpdateSlicerSpecRequest() {
final o = api.UpdateSlicerSpecRequest();
buildCounterUpdateSlicerSpecRequest++;
if (buildCounterUpdateSlicerSpecRequest < 3) {
o.fields = 'foo';
o.slicerId = 42;
o.spec = buildSlicerSpec();
}
buildCounterUpdateSlicerSpecRequest--;
return o;
}
void checkUpdateSlicerSpecRequest(api.UpdateSlicerSpecRequest o) {
buildCounterUpdateSlicerSpecRequest++;
if (buildCounterUpdateSlicerSpecRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
unittest.expect(
o.slicerId!,
unittest.equals(42),
);
checkSlicerSpec(o.spec!);
}
buildCounterUpdateSlicerSpecRequest--;
}
core.int buildCounterUpdateSpreadsheetPropertiesRequest = 0;
api.UpdateSpreadsheetPropertiesRequest
buildUpdateSpreadsheetPropertiesRequest() {
final o = api.UpdateSpreadsheetPropertiesRequest();
buildCounterUpdateSpreadsheetPropertiesRequest++;
if (buildCounterUpdateSpreadsheetPropertiesRequest < 3) {
o.fields = 'foo';
o.properties = buildSpreadsheetProperties();
}
buildCounterUpdateSpreadsheetPropertiesRequest--;
return o;
}
void checkUpdateSpreadsheetPropertiesRequest(
api.UpdateSpreadsheetPropertiesRequest o) {
buildCounterUpdateSpreadsheetPropertiesRequest++;
if (buildCounterUpdateSpreadsheetPropertiesRequest < 3) {
unittest.expect(
o.fields!,
unittest.equals('foo'),
);
checkSpreadsheetProperties(o.properties!);
}
buildCounterUpdateSpreadsheetPropertiesRequest--;
}
core.int buildCounterUpdateValuesByDataFilterResponse = 0;
api.UpdateValuesByDataFilterResponse buildUpdateValuesByDataFilterResponse() {
final o = api.UpdateValuesByDataFilterResponse();
buildCounterUpdateValuesByDataFilterResponse++;
if (buildCounterUpdateValuesByDataFilterResponse < 3) {
o.dataFilter = buildDataFilter();
o.updatedCells = 42;
o.updatedColumns = 42;
o.updatedData = buildValueRange();
o.updatedRange = 'foo';
o.updatedRows = 42;
}
buildCounterUpdateValuesByDataFilterResponse--;
return o;
}
void checkUpdateValuesByDataFilterResponse(
api.UpdateValuesByDataFilterResponse o) {
buildCounterUpdateValuesByDataFilterResponse++;
if (buildCounterUpdateValuesByDataFilterResponse < 3) {
checkDataFilter(o.dataFilter!);
unittest.expect(
o.updatedCells!,
unittest.equals(42),
);
unittest.expect(
o.updatedColumns!,
unittest.equals(42),
);
checkValueRange(o.updatedData!);
unittest.expect(
o.updatedRange!,
unittest.equals('foo'),
);
unittest.expect(
o.updatedRows!,
unittest.equals(42),
);
}
buildCounterUpdateValuesByDataFilterResponse--;
}
core.int buildCounterUpdateValuesResponse = 0;
api.UpdateValuesResponse buildUpdateValuesResponse() {
final o = api.UpdateValuesResponse();
buildCounterUpdateValuesResponse++;
if (buildCounterUpdateValuesResponse < 3) {
o.spreadsheetId = 'foo';
o.updatedCells = 42;
o.updatedColumns = 42;
o.updatedData = buildValueRange();
o.updatedRange = 'foo';
o.updatedRows = 42;
}
buildCounterUpdateValuesResponse--;
return o;
}
void checkUpdateValuesResponse(api.UpdateValuesResponse o) {
buildCounterUpdateValuesResponse++;
if (buildCounterUpdateValuesResponse < 3) {
unittest.expect(
o.spreadsheetId!,
unittest.equals('foo'),
);
unittest.expect(
o.updatedCells!,
unittest.equals(42),
);
unittest.expect(
o.updatedColumns!,
unittest.equals(42),
);
checkValueRange(o.updatedData!);
unittest.expect(
o.updatedRange!,
unittest.equals('foo'),
);
unittest.expect(
o.updatedRows!,
unittest.equals(42),
);
}
buildCounterUpdateValuesResponse--;
}
core.List<core.Object?> buildUnnamed95() => [
{
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
{
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
];
void checkUnnamed95(core.List<core.Object?> o) {
unittest.expect(o, unittest.hasLength(2));
var casted3 = (o[0]) 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[1]) 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.List<core.List<core.Object?>> buildUnnamed96() => [
buildUnnamed95(),
buildUnnamed95(),
];
void checkUnnamed96(core.List<core.List<core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed95(o[0]);
checkUnnamed95(o[1]);
}
core.int buildCounterValueRange = 0;
api.ValueRange buildValueRange() {
final o = api.ValueRange();
buildCounterValueRange++;
if (buildCounterValueRange < 3) {
o.majorDimension = 'foo';
o.range = 'foo';
o.values = buildUnnamed96();
}
buildCounterValueRange--;
return o;
}
void checkValueRange(api.ValueRange o) {
buildCounterValueRange++;
if (buildCounterValueRange < 3) {
unittest.expect(
o.majorDimension!,
unittest.equals('foo'),
);
unittest.expect(
o.range!,
unittest.equals('foo'),
);
checkUnnamed96(o.values!);
}
buildCounterValueRange--;
}
core.int buildCounterWaterfallChartColumnStyle = 0;
api.WaterfallChartColumnStyle buildWaterfallChartColumnStyle() {
final o = api.WaterfallChartColumnStyle();
buildCounterWaterfallChartColumnStyle++;
if (buildCounterWaterfallChartColumnStyle < 3) {
o.color = buildColor();
o.colorStyle = buildColorStyle();
o.label = 'foo';
}
buildCounterWaterfallChartColumnStyle--;
return o;
}
void checkWaterfallChartColumnStyle(api.WaterfallChartColumnStyle o) {
buildCounterWaterfallChartColumnStyle++;
if (buildCounterWaterfallChartColumnStyle < 3) {
checkColor(o.color!);
checkColorStyle(o.colorStyle!);
unittest.expect(
o.label!,
unittest.equals('foo'),
);
}
buildCounterWaterfallChartColumnStyle--;
}
core.int buildCounterWaterfallChartCustomSubtotal = 0;
api.WaterfallChartCustomSubtotal buildWaterfallChartCustomSubtotal() {
final o = api.WaterfallChartCustomSubtotal();
buildCounterWaterfallChartCustomSubtotal++;
if (buildCounterWaterfallChartCustomSubtotal < 3) {
o.dataIsSubtotal = true;
o.label = 'foo';
o.subtotalIndex = 42;
}
buildCounterWaterfallChartCustomSubtotal--;
return o;
}
void checkWaterfallChartCustomSubtotal(api.WaterfallChartCustomSubtotal o) {
buildCounterWaterfallChartCustomSubtotal++;
if (buildCounterWaterfallChartCustomSubtotal < 3) {
unittest.expect(o.dataIsSubtotal!, unittest.isTrue);
unittest.expect(
o.label!,
unittest.equals('foo'),
);
unittest.expect(
o.subtotalIndex!,
unittest.equals(42),
);
}
buildCounterWaterfallChartCustomSubtotal--;
}
core.int buildCounterWaterfallChartDomain = 0;
api.WaterfallChartDomain buildWaterfallChartDomain() {
final o = api.WaterfallChartDomain();
buildCounterWaterfallChartDomain++;
if (buildCounterWaterfallChartDomain < 3) {
o.data = buildChartData();
o.reversed = true;
}
buildCounterWaterfallChartDomain--;
return o;
}
void checkWaterfallChartDomain(api.WaterfallChartDomain o) {
buildCounterWaterfallChartDomain++;
if (buildCounterWaterfallChartDomain < 3) {
checkChartData(o.data!);
unittest.expect(o.reversed!, unittest.isTrue);
}
buildCounterWaterfallChartDomain--;
}
core.List<api.WaterfallChartCustomSubtotal> buildUnnamed97() => [
buildWaterfallChartCustomSubtotal(),
buildWaterfallChartCustomSubtotal(),
];
void checkUnnamed97(core.List<api.WaterfallChartCustomSubtotal> o) {
unittest.expect(o, unittest.hasLength(2));
checkWaterfallChartCustomSubtotal(o[0]);
checkWaterfallChartCustomSubtotal(o[1]);
}
core.int buildCounterWaterfallChartSeries = 0;
api.WaterfallChartSeries buildWaterfallChartSeries() {
final o = api.WaterfallChartSeries();
buildCounterWaterfallChartSeries++;
if (buildCounterWaterfallChartSeries < 3) {
o.customSubtotals = buildUnnamed97();
o.data = buildChartData();
o.dataLabel = buildDataLabel();
o.hideTrailingSubtotal = true;
o.negativeColumnsStyle = buildWaterfallChartColumnStyle();
o.positiveColumnsStyle = buildWaterfallChartColumnStyle();
o.subtotalColumnsStyle = buildWaterfallChartColumnStyle();
}
buildCounterWaterfallChartSeries--;
return o;
}
void checkWaterfallChartSeries(api.WaterfallChartSeries o) {
buildCounterWaterfallChartSeries++;
if (buildCounterWaterfallChartSeries < 3) {
checkUnnamed97(o.customSubtotals!);
checkChartData(o.data!);
checkDataLabel(o.dataLabel!);
unittest.expect(o.hideTrailingSubtotal!, unittest.isTrue);
checkWaterfallChartColumnStyle(o.negativeColumnsStyle!);
checkWaterfallChartColumnStyle(o.positiveColumnsStyle!);
checkWaterfallChartColumnStyle(o.subtotalColumnsStyle!);
}
buildCounterWaterfallChartSeries--;
}
core.List<api.WaterfallChartSeries> buildUnnamed98() => [
buildWaterfallChartSeries(),
buildWaterfallChartSeries(),
];
void checkUnnamed98(core.List<api.WaterfallChartSeries> o) {
unittest.expect(o, unittest.hasLength(2));
checkWaterfallChartSeries(o[0]);
checkWaterfallChartSeries(o[1]);
}
core.int buildCounterWaterfallChartSpec = 0;
api.WaterfallChartSpec buildWaterfallChartSpec() {
final o = api.WaterfallChartSpec();
buildCounterWaterfallChartSpec++;
if (buildCounterWaterfallChartSpec < 3) {
o.connectorLineStyle = buildLineStyle();
o.domain = buildWaterfallChartDomain();
o.firstValueIsTotal = true;
o.hideConnectorLines = true;
o.series = buildUnnamed98();
o.stackedType = 'foo';
o.totalDataLabel = buildDataLabel();
}
buildCounterWaterfallChartSpec--;
return o;
}
void checkWaterfallChartSpec(api.WaterfallChartSpec o) {
buildCounterWaterfallChartSpec++;
if (buildCounterWaterfallChartSpec < 3) {
checkLineStyle(o.connectorLineStyle!);
checkWaterfallChartDomain(o.domain!);
unittest.expect(o.firstValueIsTotal!, unittest.isTrue);
unittest.expect(o.hideConnectorLines!, unittest.isTrue);
checkUnnamed98(o.series!);
unittest.expect(
o.stackedType!,
unittest.equals('foo'),
);
checkDataLabel(o.totalDataLabel!);
}
buildCounterWaterfallChartSpec--;
}
core.List<core.String> buildUnnamed99() => [
'foo',
'foo',
];
void checkUnnamed99(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.List<core.String> buildUnnamed100() => [
'foo',
'foo',
];
void checkUnnamed100(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'),
);
}
void main() {
unittest.group('obj-schema-AddBandingRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddBandingRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddBandingRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddBandingRequest(od);
});
});
unittest.group('obj-schema-AddBandingResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddBandingResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddBandingResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddBandingResponse(od);
});
});
unittest.group('obj-schema-AddChartRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddChartRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddChartRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddChartRequest(od);
});
});
unittest.group('obj-schema-AddChartResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddChartResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddChartResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddChartResponse(od);
});
});
unittest.group('obj-schema-AddConditionalFormatRuleRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddConditionalFormatRuleRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddConditionalFormatRuleRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddConditionalFormatRuleRequest(od);
});
});
unittest.group('obj-schema-AddDataSourceRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddDataSourceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddDataSourceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddDataSourceRequest(od);
});
});
unittest.group('obj-schema-AddDataSourceResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddDataSourceResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddDataSourceResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddDataSourceResponse(od);
});
});
unittest.group('obj-schema-AddDimensionGroupRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddDimensionGroupRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddDimensionGroupRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddDimensionGroupRequest(od);
});
});
unittest.group('obj-schema-AddDimensionGroupResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddDimensionGroupResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddDimensionGroupResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddDimensionGroupResponse(od);
});
});
unittest.group('obj-schema-AddFilterViewRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddFilterViewRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddFilterViewRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddFilterViewRequest(od);
});
});
unittest.group('obj-schema-AddFilterViewResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddFilterViewResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddFilterViewResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddFilterViewResponse(od);
});
});
unittest.group('obj-schema-AddNamedRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddNamedRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddNamedRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddNamedRangeRequest(od);
});
});
unittest.group('obj-schema-AddNamedRangeResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddNamedRangeResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddNamedRangeResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddNamedRangeResponse(od);
});
});
unittest.group('obj-schema-AddProtectedRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddProtectedRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddProtectedRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddProtectedRangeRequest(od);
});
});
unittest.group('obj-schema-AddProtectedRangeResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddProtectedRangeResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddProtectedRangeResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddProtectedRangeResponse(od);
});
});
unittest.group('obj-schema-AddSheetRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddSheetRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddSheetRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddSheetRequest(od);
});
});
unittest.group('obj-schema-AddSheetResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddSheetResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddSheetResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddSheetResponse(od);
});
});
unittest.group('obj-schema-AddSlicerRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAddSlicerRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddSlicerRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddSlicerRequest(od);
});
});
unittest.group('obj-schema-AddSlicerResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAddSlicerResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AddSlicerResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAddSlicerResponse(od);
});
});
unittest.group('obj-schema-AppendCellsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAppendCellsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AppendCellsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAppendCellsRequest(od);
});
});
unittest.group('obj-schema-AppendDimensionRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAppendDimensionRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AppendDimensionRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAppendDimensionRequest(od);
});
});
unittest.group('obj-schema-AppendValuesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildAppendValuesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AppendValuesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAppendValuesResponse(od);
});
});
unittest.group('obj-schema-AutoFillRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAutoFillRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AutoFillRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAutoFillRequest(od);
});
});
unittest.group('obj-schema-AutoResizeDimensionsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildAutoResizeDimensionsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AutoResizeDimensionsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAutoResizeDimensionsRequest(od);
});
});
unittest.group('obj-schema-BandedRange', () {
unittest.test('to-json--from-json', () async {
final o = buildBandedRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BandedRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBandedRange(od);
});
});
unittest.group('obj-schema-BandingProperties', () {
unittest.test('to-json--from-json', () async {
final o = buildBandingProperties();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BandingProperties.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBandingProperties(od);
});
});
unittest.group('obj-schema-BaselineValueFormat', () {
unittest.test('to-json--from-json', () async {
final o = buildBaselineValueFormat();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BaselineValueFormat.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBaselineValueFormat(od);
});
});
unittest.group('obj-schema-BasicChartAxis', () {
unittest.test('to-json--from-json', () async {
final o = buildBasicChartAxis();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BasicChartAxis.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBasicChartAxis(od);
});
});
unittest.group('obj-schema-BasicChartDomain', () {
unittest.test('to-json--from-json', () async {
final o = buildBasicChartDomain();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BasicChartDomain.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBasicChartDomain(od);
});
});
unittest.group('obj-schema-BasicChartSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildBasicChartSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BasicChartSeries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBasicChartSeries(od);
});
});
unittest.group('obj-schema-BasicChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildBasicChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BasicChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBasicChartSpec(od);
});
});
unittest.group('obj-schema-BasicFilter', () {
unittest.test('to-json--from-json', () async {
final o = buildBasicFilter();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BasicFilter.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBasicFilter(od);
});
});
unittest.group('obj-schema-BasicSeriesDataPointStyleOverride', () {
unittest.test('to-json--from-json', () async {
final o = buildBasicSeriesDataPointStyleOverride();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BasicSeriesDataPointStyleOverride.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBasicSeriesDataPointStyleOverride(od);
});
});
unittest.group('obj-schema-BatchClearValuesByDataFilterRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchClearValuesByDataFilterRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchClearValuesByDataFilterRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchClearValuesByDataFilterRequest(od);
});
});
unittest.group('obj-schema-BatchClearValuesByDataFilterResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchClearValuesByDataFilterResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchClearValuesByDataFilterResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchClearValuesByDataFilterResponse(od);
});
});
unittest.group('obj-schema-BatchClearValuesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchClearValuesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchClearValuesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchClearValuesRequest(od);
});
});
unittest.group('obj-schema-BatchClearValuesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchClearValuesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchClearValuesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchClearValuesResponse(od);
});
});
unittest.group('obj-schema-BatchGetValuesByDataFilterRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchGetValuesByDataFilterRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchGetValuesByDataFilterRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchGetValuesByDataFilterRequest(od);
});
});
unittest.group('obj-schema-BatchGetValuesByDataFilterResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchGetValuesByDataFilterResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchGetValuesByDataFilterResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchGetValuesByDataFilterResponse(od);
});
});
unittest.group('obj-schema-BatchGetValuesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchGetValuesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchGetValuesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchGetValuesResponse(od);
});
});
unittest.group('obj-schema-BatchUpdateSpreadsheetRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchUpdateSpreadsheetRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchUpdateSpreadsheetRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchUpdateSpreadsheetRequest(od);
});
});
unittest.group('obj-schema-BatchUpdateSpreadsheetResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchUpdateSpreadsheetResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchUpdateSpreadsheetResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchUpdateSpreadsheetResponse(od);
});
});
unittest.group('obj-schema-BatchUpdateValuesByDataFilterRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchUpdateValuesByDataFilterRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchUpdateValuesByDataFilterRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchUpdateValuesByDataFilterRequest(od);
});
});
unittest.group('obj-schema-BatchUpdateValuesByDataFilterResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchUpdateValuesByDataFilterResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchUpdateValuesByDataFilterResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchUpdateValuesByDataFilterResponse(od);
});
});
unittest.group('obj-schema-BatchUpdateValuesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchUpdateValuesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchUpdateValuesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchUpdateValuesRequest(od);
});
});
unittest.group('obj-schema-BatchUpdateValuesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchUpdateValuesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchUpdateValuesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchUpdateValuesResponse(od);
});
});
unittest.group('obj-schema-BigQueryDataSourceSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildBigQueryDataSourceSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BigQueryDataSourceSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBigQueryDataSourceSpec(od);
});
});
unittest.group('obj-schema-BigQueryQuerySpec', () {
unittest.test('to-json--from-json', () async {
final o = buildBigQueryQuerySpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BigQueryQuerySpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBigQueryQuerySpec(od);
});
});
unittest.group('obj-schema-BigQueryTableSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildBigQueryTableSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BigQueryTableSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBigQueryTableSpec(od);
});
});
unittest.group('obj-schema-BooleanCondition', () {
unittest.test('to-json--from-json', () async {
final o = buildBooleanCondition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BooleanCondition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBooleanCondition(od);
});
});
unittest.group('obj-schema-BooleanRule', () {
unittest.test('to-json--from-json', () async {
final o = buildBooleanRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BooleanRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBooleanRule(od);
});
});
unittest.group('obj-schema-Border', () {
unittest.test('to-json--from-json', () async {
final o = buildBorder();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Border.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkBorder(od);
});
});
unittest.group('obj-schema-Borders', () {
unittest.test('to-json--from-json', () async {
final o = buildBorders();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Borders.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkBorders(od);
});
});
unittest.group('obj-schema-BubbleChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildBubbleChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BubbleChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBubbleChartSpec(od);
});
});
unittest.group('obj-schema-CandlestickChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildCandlestickChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CandlestickChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCandlestickChartSpec(od);
});
});
unittest.group('obj-schema-CandlestickData', () {
unittest.test('to-json--from-json', () async {
final o = buildCandlestickData();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CandlestickData.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCandlestickData(od);
});
});
unittest.group('obj-schema-CandlestickDomain', () {
unittest.test('to-json--from-json', () async {
final o = buildCandlestickDomain();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CandlestickDomain.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCandlestickDomain(od);
});
});
unittest.group('obj-schema-CandlestickSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildCandlestickSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CandlestickSeries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCandlestickSeries(od);
});
});
unittest.group('obj-schema-CellData', () {
unittest.test('to-json--from-json', () async {
final o = buildCellData();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.CellData.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkCellData(od);
});
});
unittest.group('obj-schema-CellFormat', () {
unittest.test('to-json--from-json', () async {
final o = buildCellFormat();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.CellFormat.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkCellFormat(od);
});
});
unittest.group('obj-schema-ChartAxisViewWindowOptions', () {
unittest.test('to-json--from-json', () async {
final o = buildChartAxisViewWindowOptions();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ChartAxisViewWindowOptions.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkChartAxisViewWindowOptions(od);
});
});
unittest.group('obj-schema-ChartCustomNumberFormatOptions', () {
unittest.test('to-json--from-json', () async {
final o = buildChartCustomNumberFormatOptions();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ChartCustomNumberFormatOptions.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkChartCustomNumberFormatOptions(od);
});
});
unittest.group('obj-schema-ChartData', () {
unittest.test('to-json--from-json', () async {
final o = buildChartData();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ChartData.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkChartData(od);
});
});
unittest.group('obj-schema-ChartDateTimeRule', () {
unittest.test('to-json--from-json', () async {
final o = buildChartDateTimeRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ChartDateTimeRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkChartDateTimeRule(od);
});
});
unittest.group('obj-schema-ChartGroupRule', () {
unittest.test('to-json--from-json', () async {
final o = buildChartGroupRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ChartGroupRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkChartGroupRule(od);
});
});
unittest.group('obj-schema-ChartHistogramRule', () {
unittest.test('to-json--from-json', () async {
final o = buildChartHistogramRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ChartHistogramRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkChartHistogramRule(od);
});
});
unittest.group('obj-schema-ChartSourceRange', () {
unittest.test('to-json--from-json', () async {
final o = buildChartSourceRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ChartSourceRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkChartSourceRange(od);
});
});
unittest.group('obj-schema-ChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ChartSpec.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkChartSpec(od);
});
});
unittest.group('obj-schema-ClearBasicFilterRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildClearBasicFilterRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ClearBasicFilterRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkClearBasicFilterRequest(od);
});
});
unittest.group('obj-schema-ClearValuesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildClearValuesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ClearValuesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkClearValuesRequest(od);
});
});
unittest.group('obj-schema-ClearValuesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildClearValuesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ClearValuesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkClearValuesResponse(od);
});
});
unittest.group('obj-schema-Color', () {
unittest.test('to-json--from-json', () async {
final o = buildColor();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Color.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkColor(od);
});
});
unittest.group('obj-schema-ColorStyle', () {
unittest.test('to-json--from-json', () async {
final o = buildColorStyle();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ColorStyle.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkColorStyle(od);
});
});
unittest.group('obj-schema-ConditionValue', () {
unittest.test('to-json--from-json', () async {
final o = buildConditionValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ConditionValue.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkConditionValue(od);
});
});
unittest.group('obj-schema-ConditionalFormatRule', () {
unittest.test('to-json--from-json', () async {
final o = buildConditionalFormatRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ConditionalFormatRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkConditionalFormatRule(od);
});
});
unittest.group('obj-schema-CopyPasteRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildCopyPasteRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CopyPasteRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCopyPasteRequest(od);
});
});
unittest.group('obj-schema-CopySheetToAnotherSpreadsheetRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildCopySheetToAnotherSpreadsheetRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CopySheetToAnotherSpreadsheetRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCopySheetToAnotherSpreadsheetRequest(od);
});
});
unittest.group('obj-schema-CreateDeveloperMetadataRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildCreateDeveloperMetadataRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CreateDeveloperMetadataRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCreateDeveloperMetadataRequest(od);
});
});
unittest.group('obj-schema-CreateDeveloperMetadataResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildCreateDeveloperMetadataResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CreateDeveloperMetadataResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCreateDeveloperMetadataResponse(od);
});
});
unittest.group('obj-schema-CutPasteRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildCutPasteRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CutPasteRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCutPasteRequest(od);
});
});
unittest.group('obj-schema-DataExecutionStatus', () {
unittest.test('to-json--from-json', () async {
final o = buildDataExecutionStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataExecutionStatus.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataExecutionStatus(od);
});
});
unittest.group('obj-schema-DataFilter', () {
unittest.test('to-json--from-json', () async {
final o = buildDataFilter();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DataFilter.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDataFilter(od);
});
});
unittest.group('obj-schema-DataFilterValueRange', () {
unittest.test('to-json--from-json', () async {
final o = buildDataFilterValueRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataFilterValueRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataFilterValueRange(od);
});
});
unittest.group('obj-schema-DataLabel', () {
unittest.test('to-json--from-json', () async {
final o = buildDataLabel();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DataLabel.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDataLabel(od);
});
});
unittest.group('obj-schema-DataSource', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.DataSource.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDataSource(od);
});
});
unittest.group('obj-schema-DataSourceChartProperties', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceChartProperties();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceChartProperties.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceChartProperties(od);
});
});
unittest.group('obj-schema-DataSourceColumn', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceColumn();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceColumn.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceColumn(od);
});
});
unittest.group('obj-schema-DataSourceColumnReference', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceColumnReference();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceColumnReference.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceColumnReference(od);
});
});
unittest.group('obj-schema-DataSourceFormula', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceFormula();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceFormula.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceFormula(od);
});
});
unittest.group('obj-schema-DataSourceObjectReference', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceObjectReference();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceObjectReference.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceObjectReference(od);
});
});
unittest.group('obj-schema-DataSourceObjectReferences', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceObjectReferences();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceObjectReferences.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceObjectReferences(od);
});
});
unittest.group('obj-schema-DataSourceParameter', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceParameter();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceParameter.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceParameter(od);
});
});
unittest.group('obj-schema-DataSourceRefreshDailySchedule', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceRefreshDailySchedule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceRefreshDailySchedule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceRefreshDailySchedule(od);
});
});
unittest.group('obj-schema-DataSourceRefreshMonthlySchedule', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceRefreshMonthlySchedule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceRefreshMonthlySchedule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceRefreshMonthlySchedule(od);
});
});
unittest.group('obj-schema-DataSourceRefreshSchedule', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceRefreshSchedule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceRefreshSchedule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceRefreshSchedule(od);
});
});
unittest.group('obj-schema-DataSourceRefreshWeeklySchedule', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceRefreshWeeklySchedule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceRefreshWeeklySchedule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceRefreshWeeklySchedule(od);
});
});
unittest.group('obj-schema-DataSourceSheetDimensionRange', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceSheetDimensionRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceSheetDimensionRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceSheetDimensionRange(od);
});
});
unittest.group('obj-schema-DataSourceSheetProperties', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceSheetProperties();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceSheetProperties.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceSheetProperties(od);
});
});
unittest.group('obj-schema-DataSourceSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceSpec(od);
});
});
unittest.group('obj-schema-DataSourceTable', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSourceTable();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSourceTable.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSourceTable(od);
});
});
unittest.group('obj-schema-DataValidationRule', () {
unittest.test('to-json--from-json', () async {
final o = buildDataValidationRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataValidationRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataValidationRule(od);
});
});
unittest.group('obj-schema-DateTimeRule', () {
unittest.test('to-json--from-json', () async {
final o = buildDateTimeRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DateTimeRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDateTimeRule(od);
});
});
unittest.group('obj-schema-DeleteBandingRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteBandingRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteBandingRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteBandingRequest(od);
});
});
unittest.group('obj-schema-DeleteConditionalFormatRuleRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteConditionalFormatRuleRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteConditionalFormatRuleRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteConditionalFormatRuleRequest(od);
});
});
unittest.group('obj-schema-DeleteConditionalFormatRuleResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteConditionalFormatRuleResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteConditionalFormatRuleResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteConditionalFormatRuleResponse(od);
});
});
unittest.group('obj-schema-DeleteDataSourceRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteDataSourceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteDataSourceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteDataSourceRequest(od);
});
});
unittest.group('obj-schema-DeleteDeveloperMetadataRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteDeveloperMetadataRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteDeveloperMetadataRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteDeveloperMetadataRequest(od);
});
});
unittest.group('obj-schema-DeleteDeveloperMetadataResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteDeveloperMetadataResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteDeveloperMetadataResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteDeveloperMetadataResponse(od);
});
});
unittest.group('obj-schema-DeleteDimensionGroupRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteDimensionGroupRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteDimensionGroupRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteDimensionGroupRequest(od);
});
});
unittest.group('obj-schema-DeleteDimensionGroupResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteDimensionGroupResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteDimensionGroupResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteDimensionGroupResponse(od);
});
});
unittest.group('obj-schema-DeleteDimensionRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteDimensionRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteDimensionRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteDimensionRequest(od);
});
});
unittest.group('obj-schema-DeleteDuplicatesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteDuplicatesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteDuplicatesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteDuplicatesRequest(od);
});
});
unittest.group('obj-schema-DeleteDuplicatesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteDuplicatesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteDuplicatesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteDuplicatesResponse(od);
});
});
unittest.group('obj-schema-DeleteEmbeddedObjectRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteEmbeddedObjectRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteEmbeddedObjectRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteEmbeddedObjectRequest(od);
});
});
unittest.group('obj-schema-DeleteFilterViewRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteFilterViewRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteFilterViewRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteFilterViewRequest(od);
});
});
unittest.group('obj-schema-DeleteNamedRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteNamedRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteNamedRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteNamedRangeRequest(od);
});
});
unittest.group('obj-schema-DeleteProtectedRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteProtectedRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteProtectedRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteProtectedRangeRequest(od);
});
});
unittest.group('obj-schema-DeleteRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteRangeRequest(od);
});
});
unittest.group('obj-schema-DeleteSheetRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteSheetRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteSheetRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteSheetRequest(od);
});
});
unittest.group('obj-schema-DeveloperMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildDeveloperMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeveloperMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeveloperMetadata(od);
});
});
unittest.group('obj-schema-DeveloperMetadataLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildDeveloperMetadataLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeveloperMetadataLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeveloperMetadataLocation(od);
});
});
unittest.group('obj-schema-DeveloperMetadataLookup', () {
unittest.test('to-json--from-json', () async {
final o = buildDeveloperMetadataLookup();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeveloperMetadataLookup.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeveloperMetadataLookup(od);
});
});
unittest.group('obj-schema-DimensionGroup', () {
unittest.test('to-json--from-json', () async {
final o = buildDimensionGroup();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DimensionGroup.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDimensionGroup(od);
});
});
unittest.group('obj-schema-DimensionProperties', () {
unittest.test('to-json--from-json', () async {
final o = buildDimensionProperties();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DimensionProperties.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDimensionProperties(od);
});
});
unittest.group('obj-schema-DimensionRange', () {
unittest.test('to-json--from-json', () async {
final o = buildDimensionRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DimensionRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDimensionRange(od);
});
});
unittest.group('obj-schema-DuplicateFilterViewRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDuplicateFilterViewRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DuplicateFilterViewRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDuplicateFilterViewRequest(od);
});
});
unittest.group('obj-schema-DuplicateFilterViewResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildDuplicateFilterViewResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DuplicateFilterViewResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDuplicateFilterViewResponse(od);
});
});
unittest.group('obj-schema-DuplicateSheetRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildDuplicateSheetRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DuplicateSheetRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDuplicateSheetRequest(od);
});
});
unittest.group('obj-schema-DuplicateSheetResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildDuplicateSheetResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DuplicateSheetResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDuplicateSheetResponse(od);
});
});
unittest.group('obj-schema-Editors', () {
unittest.test('to-json--from-json', () async {
final o = buildEditors();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Editors.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkEditors(od);
});
});
unittest.group('obj-schema-EmbeddedChart', () {
unittest.test('to-json--from-json', () async {
final o = buildEmbeddedChart();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.EmbeddedChart.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkEmbeddedChart(od);
});
});
unittest.group('obj-schema-EmbeddedObjectBorder', () {
unittest.test('to-json--from-json', () async {
final o = buildEmbeddedObjectBorder();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.EmbeddedObjectBorder.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkEmbeddedObjectBorder(od);
});
});
unittest.group('obj-schema-EmbeddedObjectPosition', () {
unittest.test('to-json--from-json', () async {
final o = buildEmbeddedObjectPosition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.EmbeddedObjectPosition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkEmbeddedObjectPosition(od);
});
});
unittest.group('obj-schema-ErrorValue', () {
unittest.test('to-json--from-json', () async {
final o = buildErrorValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ErrorValue.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkErrorValue(od);
});
});
unittest.group('obj-schema-ExtendedValue', () {
unittest.test('to-json--from-json', () async {
final o = buildExtendedValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ExtendedValue.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkExtendedValue(od);
});
});
unittest.group('obj-schema-FilterCriteria', () {
unittest.test('to-json--from-json', () async {
final o = buildFilterCriteria();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FilterCriteria.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFilterCriteria(od);
});
});
unittest.group('obj-schema-FilterSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildFilterSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.FilterSpec.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkFilterSpec(od);
});
});
unittest.group('obj-schema-FilterView', () {
unittest.test('to-json--from-json', () async {
final o = buildFilterView();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.FilterView.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkFilterView(od);
});
});
unittest.group('obj-schema-FindReplaceRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildFindReplaceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FindReplaceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFindReplaceRequest(od);
});
});
unittest.group('obj-schema-FindReplaceResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildFindReplaceResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FindReplaceResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFindReplaceResponse(od);
});
});
unittest.group('obj-schema-GetSpreadsheetByDataFilterRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGetSpreadsheetByDataFilterRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GetSpreadsheetByDataFilterRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGetSpreadsheetByDataFilterRequest(od);
});
});
unittest.group('obj-schema-GradientRule', () {
unittest.test('to-json--from-json', () async {
final o = buildGradientRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GradientRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGradientRule(od);
});
});
unittest.group('obj-schema-GridCoordinate', () {
unittest.test('to-json--from-json', () async {
final o = buildGridCoordinate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GridCoordinate.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGridCoordinate(od);
});
});
unittest.group('obj-schema-GridData', () {
unittest.test('to-json--from-json', () async {
final o = buildGridData();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GridData.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGridData(od);
});
});
unittest.group('obj-schema-GridProperties', () {
unittest.test('to-json--from-json', () async {
final o = buildGridProperties();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GridProperties.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGridProperties(od);
});
});
unittest.group('obj-schema-GridRange', () {
unittest.test('to-json--from-json', () async {
final o = buildGridRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GridRange.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGridRange(od);
});
});
unittest.group('obj-schema-HistogramChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildHistogramChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.HistogramChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkHistogramChartSpec(od);
});
});
unittest.group('obj-schema-HistogramRule', () {
unittest.test('to-json--from-json', () async {
final o = buildHistogramRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.HistogramRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkHistogramRule(od);
});
});
unittest.group('obj-schema-HistogramSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildHistogramSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.HistogramSeries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkHistogramSeries(od);
});
});
unittest.group('obj-schema-InsertDimensionRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildInsertDimensionRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InsertDimensionRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInsertDimensionRequest(od);
});
});
unittest.group('obj-schema-InsertRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildInsertRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InsertRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInsertRangeRequest(od);
});
});
unittest.group('obj-schema-InterpolationPoint', () {
unittest.test('to-json--from-json', () async {
final o = buildInterpolationPoint();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InterpolationPoint.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInterpolationPoint(od);
});
});
unittest.group('obj-schema-Interval', () {
unittest.test('to-json--from-json', () async {
final o = buildInterval();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Interval.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkInterval(od);
});
});
unittest.group('obj-schema-IterativeCalculationSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildIterativeCalculationSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IterativeCalculationSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIterativeCalculationSettings(od);
});
});
unittest.group('obj-schema-KeyValueFormat', () {
unittest.test('to-json--from-json', () async {
final o = buildKeyValueFormat();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.KeyValueFormat.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkKeyValueFormat(od);
});
});
unittest.group('obj-schema-LineStyle', () {
unittest.test('to-json--from-json', () async {
final o = buildLineStyle();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.LineStyle.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkLineStyle(od);
});
});
unittest.group('obj-schema-Link', () {
unittest.test('to-json--from-json', () async {
final o = buildLink();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Link.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkLink(od);
});
});
unittest.group('obj-schema-ManualRule', () {
unittest.test('to-json--from-json', () async {
final o = buildManualRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ManualRule.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkManualRule(od);
});
});
unittest.group('obj-schema-ManualRuleGroup', () {
unittest.test('to-json--from-json', () async {
final o = buildManualRuleGroup();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ManualRuleGroup.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkManualRuleGroup(od);
});
});
unittest.group('obj-schema-MatchedDeveloperMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildMatchedDeveloperMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MatchedDeveloperMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMatchedDeveloperMetadata(od);
});
});
unittest.group('obj-schema-MatchedValueRange', () {
unittest.test('to-json--from-json', () async {
final o = buildMatchedValueRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MatchedValueRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMatchedValueRange(od);
});
});
unittest.group('obj-schema-MergeCellsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildMergeCellsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MergeCellsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMergeCellsRequest(od);
});
});
unittest.group('obj-schema-MoveDimensionRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildMoveDimensionRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MoveDimensionRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMoveDimensionRequest(od);
});
});
unittest.group('obj-schema-NamedRange', () {
unittest.test('to-json--from-json', () async {
final o = buildNamedRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.NamedRange.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkNamedRange(od);
});
});
unittest.group('obj-schema-NumberFormat', () {
unittest.test('to-json--from-json', () async {
final o = buildNumberFormat();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.NumberFormat.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkNumberFormat(od);
});
});
unittest.group('obj-schema-OrgChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildOrgChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.OrgChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkOrgChartSpec(od);
});
});
unittest.group('obj-schema-OverlayPosition', () {
unittest.test('to-json--from-json', () async {
final o = buildOverlayPosition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.OverlayPosition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkOverlayPosition(od);
});
});
unittest.group('obj-schema-Padding', () {
unittest.test('to-json--from-json', () async {
final o = buildPadding();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Padding.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPadding(od);
});
});
unittest.group('obj-schema-PasteDataRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildPasteDataRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PasteDataRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPasteDataRequest(od);
});
});
unittest.group('obj-schema-PieChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildPieChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PieChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPieChartSpec(od);
});
});
unittest.group('obj-schema-PivotFilterCriteria', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotFilterCriteria();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PivotFilterCriteria.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPivotFilterCriteria(od);
});
});
unittest.group('obj-schema-PivotFilterSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotFilterSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PivotFilterSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPivotFilterSpec(od);
});
});
unittest.group('obj-schema-PivotGroup', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotGroup();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.PivotGroup.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPivotGroup(od);
});
});
unittest.group('obj-schema-PivotGroupLimit', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotGroupLimit();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PivotGroupLimit.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPivotGroupLimit(od);
});
});
unittest.group('obj-schema-PivotGroupRule', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotGroupRule();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PivotGroupRule.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPivotGroupRule(od);
});
});
unittest.group('obj-schema-PivotGroupSortValueBucket', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotGroupSortValueBucket();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PivotGroupSortValueBucket.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPivotGroupSortValueBucket(od);
});
});
unittest.group('obj-schema-PivotGroupValueMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotGroupValueMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PivotGroupValueMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPivotGroupValueMetadata(od);
});
});
unittest.group('obj-schema-PivotTable', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotTable();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.PivotTable.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPivotTable(od);
});
});
unittest.group('obj-schema-PivotValue', () {
unittest.test('to-json--from-json', () async {
final o = buildPivotValue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.PivotValue.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPivotValue(od);
});
});
unittest.group('obj-schema-PointStyle', () {
unittest.test('to-json--from-json', () async {
final o = buildPointStyle();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.PointStyle.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPointStyle(od);
});
});
unittest.group('obj-schema-ProtectedRange', () {
unittest.test('to-json--from-json', () async {
final o = buildProtectedRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ProtectedRange.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkProtectedRange(od);
});
});
unittest.group('obj-schema-RandomizeRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildRandomizeRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RandomizeRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRandomizeRangeRequest(od);
});
});
unittest.group('obj-schema-RefreshDataSourceObjectExecutionStatus', () {
unittest.test('to-json--from-json', () async {
final o = buildRefreshDataSourceObjectExecutionStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RefreshDataSourceObjectExecutionStatus.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRefreshDataSourceObjectExecutionStatus(od);
});
});
unittest.group('obj-schema-RefreshDataSourceRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildRefreshDataSourceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RefreshDataSourceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRefreshDataSourceRequest(od);
});
});
unittest.group('obj-schema-RefreshDataSourceResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildRefreshDataSourceResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RefreshDataSourceResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRefreshDataSourceResponse(od);
});
});
unittest.group('obj-schema-RepeatCellRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildRepeatCellRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RepeatCellRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRepeatCellRequest(od);
});
});
unittest.group('obj-schema-Request', () {
unittest.test('to-json--from-json', () async {
final o = buildRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Request.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkRequest(od);
});
});
unittest.group('obj-schema-Response', () {
unittest.test('to-json--from-json', () async {
final o = buildResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Response.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkResponse(od);
});
});
unittest.group('obj-schema-RowData', () {
unittest.test('to-json--from-json', () async {
final o = buildRowData();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.RowData.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkRowData(od);
});
});
unittest.group('obj-schema-ScorecardChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildScorecardChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ScorecardChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkScorecardChartSpec(od);
});
});
unittest.group('obj-schema-SearchDeveloperMetadataRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSearchDeveloperMetadataRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SearchDeveloperMetadataRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSearchDeveloperMetadataRequest(od);
});
});
unittest.group('obj-schema-SearchDeveloperMetadataResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSearchDeveloperMetadataResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SearchDeveloperMetadataResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSearchDeveloperMetadataResponse(od);
});
});
unittest.group('obj-schema-SetBasicFilterRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSetBasicFilterRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SetBasicFilterRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSetBasicFilterRequest(od);
});
});
unittest.group('obj-schema-SetDataValidationRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSetDataValidationRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SetDataValidationRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSetDataValidationRequest(od);
});
});
unittest.group('obj-schema-Sheet', () {
unittest.test('to-json--from-json', () async {
final o = buildSheet();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Sheet.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSheet(od);
});
});
unittest.group('obj-schema-SheetProperties', () {
unittest.test('to-json--from-json', () async {
final o = buildSheetProperties();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SheetProperties.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSheetProperties(od);
});
});
unittest.group('obj-schema-Slicer', () {
unittest.test('to-json--from-json', () async {
final o = buildSlicer();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Slicer.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSlicer(od);
});
});
unittest.group('obj-schema-SlicerSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildSlicerSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.SlicerSpec.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSlicerSpec(od);
});
});
unittest.group('obj-schema-SortRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSortRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SortRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSortRangeRequest(od);
});
});
unittest.group('obj-schema-SortSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildSortSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.SortSpec.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSortSpec(od);
});
});
unittest.group('obj-schema-SourceAndDestination', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceAndDestination();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceAndDestination.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceAndDestination(od);
});
});
unittest.group('obj-schema-Spreadsheet', () {
unittest.test('to-json--from-json', () async {
final o = buildSpreadsheet();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Spreadsheet.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpreadsheet(od);
});
});
unittest.group('obj-schema-SpreadsheetProperties', () {
unittest.test('to-json--from-json', () async {
final o = buildSpreadsheetProperties();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SpreadsheetProperties.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpreadsheetProperties(od);
});
});
unittest.group('obj-schema-SpreadsheetTheme', () {
unittest.test('to-json--from-json', () async {
final o = buildSpreadsheetTheme();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SpreadsheetTheme.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpreadsheetTheme(od);
});
});
unittest.group('obj-schema-TextFormat', () {
unittest.test('to-json--from-json', () async {
final o = buildTextFormat();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.TextFormat.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTextFormat(od);
});
});
unittest.group('obj-schema-TextFormatRun', () {
unittest.test('to-json--from-json', () async {
final o = buildTextFormatRun();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TextFormatRun.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTextFormatRun(od);
});
});
unittest.group('obj-schema-TextPosition', () {
unittest.test('to-json--from-json', () async {
final o = buildTextPosition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TextPosition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTextPosition(od);
});
});
unittest.group('obj-schema-TextRotation', () {
unittest.test('to-json--from-json', () async {
final o = buildTextRotation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TextRotation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTextRotation(od);
});
});
unittest.group('obj-schema-TextToColumnsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildTextToColumnsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TextToColumnsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTextToColumnsRequest(od);
});
});
unittest.group('obj-schema-ThemeColorPair', () {
unittest.test('to-json--from-json', () async {
final o = buildThemeColorPair();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ThemeColorPair.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkThemeColorPair(od);
});
});
unittest.group('obj-schema-TimeOfDay', () {
unittest.test('to-json--from-json', () async {
final o = buildTimeOfDay();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.TimeOfDay.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTimeOfDay(od);
});
});
unittest.group('obj-schema-TreemapChartColorScale', () {
unittest.test('to-json--from-json', () async {
final o = buildTreemapChartColorScale();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TreemapChartColorScale.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTreemapChartColorScale(od);
});
});
unittest.group('obj-schema-TreemapChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildTreemapChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TreemapChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTreemapChartSpec(od);
});
});
unittest.group('obj-schema-TrimWhitespaceRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildTrimWhitespaceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TrimWhitespaceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTrimWhitespaceRequest(od);
});
});
unittest.group('obj-schema-TrimWhitespaceResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildTrimWhitespaceResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TrimWhitespaceResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTrimWhitespaceResponse(od);
});
});
unittest.group('obj-schema-UnmergeCellsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUnmergeCellsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UnmergeCellsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUnmergeCellsRequest(od);
});
});
unittest.group('obj-schema-UpdateBandingRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateBandingRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateBandingRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateBandingRequest(od);
});
});
unittest.group('obj-schema-UpdateBordersRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateBordersRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateBordersRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateBordersRequest(od);
});
});
unittest.group('obj-schema-UpdateCellsRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateCellsRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateCellsRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateCellsRequest(od);
});
});
unittest.group('obj-schema-UpdateChartSpecRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateChartSpecRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateChartSpecRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateChartSpecRequest(od);
});
});
unittest.group('obj-schema-UpdateConditionalFormatRuleRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateConditionalFormatRuleRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateConditionalFormatRuleRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateConditionalFormatRuleRequest(od);
});
});
unittest.group('obj-schema-UpdateConditionalFormatRuleResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateConditionalFormatRuleResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateConditionalFormatRuleResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateConditionalFormatRuleResponse(od);
});
});
unittest.group('obj-schema-UpdateDataSourceRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateDataSourceRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateDataSourceRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateDataSourceRequest(od);
});
});
unittest.group('obj-schema-UpdateDataSourceResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateDataSourceResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateDataSourceResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateDataSourceResponse(od);
});
});
unittest.group('obj-schema-UpdateDeveloperMetadataRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateDeveloperMetadataRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateDeveloperMetadataRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateDeveloperMetadataRequest(od);
});
});
unittest.group('obj-schema-UpdateDeveloperMetadataResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateDeveloperMetadataResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateDeveloperMetadataResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateDeveloperMetadataResponse(od);
});
});
unittest.group('obj-schema-UpdateDimensionGroupRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateDimensionGroupRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateDimensionGroupRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateDimensionGroupRequest(od);
});
});
unittest.group('obj-schema-UpdateDimensionPropertiesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateDimensionPropertiesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateDimensionPropertiesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateDimensionPropertiesRequest(od);
});
});
unittest.group('obj-schema-UpdateEmbeddedObjectBorderRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateEmbeddedObjectBorderRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateEmbeddedObjectBorderRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateEmbeddedObjectBorderRequest(od);
});
});
unittest.group('obj-schema-UpdateEmbeddedObjectPositionRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateEmbeddedObjectPositionRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateEmbeddedObjectPositionRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateEmbeddedObjectPositionRequest(od);
});
});
unittest.group('obj-schema-UpdateEmbeddedObjectPositionResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateEmbeddedObjectPositionResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateEmbeddedObjectPositionResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateEmbeddedObjectPositionResponse(od);
});
});
unittest.group('obj-schema-UpdateFilterViewRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateFilterViewRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateFilterViewRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateFilterViewRequest(od);
});
});
unittest.group('obj-schema-UpdateNamedRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateNamedRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateNamedRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateNamedRangeRequest(od);
});
});
unittest.group('obj-schema-UpdateProtectedRangeRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateProtectedRangeRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateProtectedRangeRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateProtectedRangeRequest(od);
});
});
unittest.group('obj-schema-UpdateSheetPropertiesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateSheetPropertiesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateSheetPropertiesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateSheetPropertiesRequest(od);
});
});
unittest.group('obj-schema-UpdateSlicerSpecRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateSlicerSpecRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateSlicerSpecRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateSlicerSpecRequest(od);
});
});
unittest.group('obj-schema-UpdateSpreadsheetPropertiesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateSpreadsheetPropertiesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateSpreadsheetPropertiesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateSpreadsheetPropertiesRequest(od);
});
});
unittest.group('obj-schema-UpdateValuesByDataFilterResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateValuesByDataFilterResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateValuesByDataFilterResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateValuesByDataFilterResponse(od);
});
});
unittest.group('obj-schema-UpdateValuesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildUpdateValuesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.UpdateValuesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkUpdateValuesResponse(od);
});
});
unittest.group('obj-schema-ValueRange', () {
unittest.test('to-json--from-json', () async {
final o = buildValueRange();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ValueRange.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkValueRange(od);
});
});
unittest.group('obj-schema-WaterfallChartColumnStyle', () {
unittest.test('to-json--from-json', () async {
final o = buildWaterfallChartColumnStyle();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WaterfallChartColumnStyle.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWaterfallChartColumnStyle(od);
});
});
unittest.group('obj-schema-WaterfallChartCustomSubtotal', () {
unittest.test('to-json--from-json', () async {
final o = buildWaterfallChartCustomSubtotal();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WaterfallChartCustomSubtotal.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWaterfallChartCustomSubtotal(od);
});
});
unittest.group('obj-schema-WaterfallChartDomain', () {
unittest.test('to-json--from-json', () async {
final o = buildWaterfallChartDomain();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WaterfallChartDomain.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWaterfallChartDomain(od);
});
});
unittest.group('obj-schema-WaterfallChartSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildWaterfallChartSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WaterfallChartSeries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWaterfallChartSeries(od);
});
});
unittest.group('obj-schema-WaterfallChartSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildWaterfallChartSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WaterfallChartSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWaterfallChartSpec(od);
});
});
unittest.group('resource-SpreadsheetsResource', () {
unittest.test('method--batchUpdate', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets;
final arg_request = buildBatchUpdateSpreadsheetRequest();
final arg_spreadsheetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.BatchUpdateSpreadsheetRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkBatchUpdateSpreadsheetRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf(':batchUpdate', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals(':batchUpdate'),
);
pathOffset += 12;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildBatchUpdateSpreadsheetResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.batchUpdate(arg_request, arg_spreadsheetId,
$fields: arg_$fields);
checkBatchUpdateSpreadsheetResponse(
response as api.BatchUpdateSpreadsheetResponse);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets;
final arg_request = buildSpreadsheet();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.Spreadsheet.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSpreadsheet(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 15),
unittest.equals('v4/spreadsheets'),
);
pathOffset += 15;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSpreadsheet());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, $fields: arg_$fields);
checkSpreadsheet(response as api.Spreadsheet);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets;
final arg_spreadsheetId = 'foo';
final arg_includeGridData = true;
final arg_ranges = buildUnnamed99();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeGridData']!.first,
unittest.equals('$arg_includeGridData'),
);
unittest.expect(
queryMap['ranges']!,
unittest.equals(arg_ranges),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSpreadsheet());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_spreadsheetId,
includeGridData: arg_includeGridData,
ranges: arg_ranges,
$fields: arg_$fields);
checkSpreadsheet(response as api.Spreadsheet);
});
unittest.test('method--getByDataFilter', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets;
final arg_request = buildGetSpreadsheetByDataFilterRequest();
final arg_spreadsheetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GetSpreadsheetByDataFilterRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGetSpreadsheetByDataFilterRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf(':getByDataFilter', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals(':getByDataFilter'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSpreadsheet());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getByDataFilter(arg_request, arg_spreadsheetId,
$fields: arg_$fields);
checkSpreadsheet(response as api.Spreadsheet);
});
});
unittest.group('resource-SpreadsheetsDeveloperMetadataResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.developerMetadata;
final arg_spreadsheetId = 'foo';
final arg_metadataId = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/developerMetadata/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 19),
unittest.equals('/developerMetadata/'),
);
pathOffset += 19;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_metadataId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDeveloperMetadata());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_spreadsheetId, arg_metadataId,
$fields: arg_$fields);
checkDeveloperMetadata(response as api.DeveloperMetadata);
});
unittest.test('method--search', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.developerMetadata;
final arg_request = buildSearchDeveloperMetadataRequest();
final arg_spreadsheetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SearchDeveloperMetadataRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSearchDeveloperMetadataRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/developerMetadata:search', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 25),
unittest.equals('/developerMetadata:search'),
);
pathOffset += 25;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildSearchDeveloperMetadataResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.search(arg_request, arg_spreadsheetId,
$fields: arg_$fields);
checkSearchDeveloperMetadataResponse(
response as api.SearchDeveloperMetadataResponse);
});
});
unittest.group('resource-SpreadsheetsSheetsResource', () {
unittest.test('method--copyTo', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.sheets;
final arg_request = buildCopySheetToAnotherSpreadsheetRequest();
final arg_spreadsheetId = 'foo';
final arg_sheetId = 42;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CopySheetToAnotherSpreadsheetRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCopySheetToAnotherSpreadsheetRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/sheets/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/sheets/'),
);
pathOffset += 8;
index = path.indexOf(':copyTo', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_sheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals(':copyTo'),
);
pathOffset += 7;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSheetProperties());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.copyTo(
arg_request, arg_spreadsheetId, arg_sheetId,
$fields: arg_$fields);
checkSheetProperties(response as api.SheetProperties);
});
});
unittest.group('resource-SpreadsheetsValuesResource', () {
unittest.test('method--append', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_request = buildValueRange();
final arg_spreadsheetId = 'foo';
final arg_range = 'foo';
final arg_includeValuesInResponse = true;
final arg_insertDataOption = 'foo';
final arg_responseDateTimeRenderOption = 'foo';
final arg_responseValueRenderOption = 'foo';
final arg_valueInputOption = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ValueRange.fromJson(
json as core.Map<core.String, core.dynamic>);
checkValueRange(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/values/'),
);
pathOffset += 8;
index = path.indexOf(':append', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_range'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals(':append'),
);
pathOffset += 7;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeValuesInResponse']!.first,
unittest.equals('$arg_includeValuesInResponse'),
);
unittest.expect(
queryMap['insertDataOption']!.first,
unittest.equals(arg_insertDataOption),
);
unittest.expect(
queryMap['responseDateTimeRenderOption']!.first,
unittest.equals(arg_responseDateTimeRenderOption),
);
unittest.expect(
queryMap['responseValueRenderOption']!.first,
unittest.equals(arg_responseValueRenderOption),
);
unittest.expect(
queryMap['valueInputOption']!.first,
unittest.equals(arg_valueInputOption),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildAppendValuesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.append(
arg_request, arg_spreadsheetId, arg_range,
includeValuesInResponse: arg_includeValuesInResponse,
insertDataOption: arg_insertDataOption,
responseDateTimeRenderOption: arg_responseDateTimeRenderOption,
responseValueRenderOption: arg_responseValueRenderOption,
valueInputOption: arg_valueInputOption,
$fields: arg_$fields);
checkAppendValuesResponse(response as api.AppendValuesResponse);
});
unittest.test('method--batchClear', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_request = buildBatchClearValuesRequest();
final arg_spreadsheetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.BatchClearValuesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkBatchClearValuesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values:batchClear', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 18),
unittest.equals('/values:batchClear'),
);
pathOffset += 18;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildBatchClearValuesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.batchClear(arg_request, arg_spreadsheetId,
$fields: arg_$fields);
checkBatchClearValuesResponse(response as api.BatchClearValuesResponse);
});
unittest.test('method--batchClearByDataFilter', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_request = buildBatchClearValuesByDataFilterRequest();
final arg_spreadsheetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.BatchClearValuesByDataFilterRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkBatchClearValuesByDataFilterRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values:batchClearByDataFilter', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 30),
unittest.equals('/values:batchClearByDataFilter'),
);
pathOffset += 30;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildBatchClearValuesByDataFilterResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.batchClearByDataFilter(
arg_request, arg_spreadsheetId,
$fields: arg_$fields);
checkBatchClearValuesByDataFilterResponse(
response as api.BatchClearValuesByDataFilterResponse);
});
unittest.test('method--batchGet', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_spreadsheetId = 'foo';
final arg_dateTimeRenderOption = 'foo';
final arg_majorDimension = 'foo';
final arg_ranges = buildUnnamed100();
final arg_valueRenderOption = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values:batchGet', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('/values:batchGet'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['dateTimeRenderOption']!.first,
unittest.equals(arg_dateTimeRenderOption),
);
unittest.expect(
queryMap['majorDimension']!.first,
unittest.equals(arg_majorDimension),
);
unittest.expect(
queryMap['ranges']!,
unittest.equals(arg_ranges),
);
unittest.expect(
queryMap['valueRenderOption']!.first,
unittest.equals(arg_valueRenderOption),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildBatchGetValuesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.batchGet(arg_spreadsheetId,
dateTimeRenderOption: arg_dateTimeRenderOption,
majorDimension: arg_majorDimension,
ranges: arg_ranges,
valueRenderOption: arg_valueRenderOption,
$fields: arg_$fields);
checkBatchGetValuesResponse(response as api.BatchGetValuesResponse);
});
unittest.test('method--batchGetByDataFilter', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_request = buildBatchGetValuesByDataFilterRequest();
final arg_spreadsheetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.BatchGetValuesByDataFilterRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkBatchGetValuesByDataFilterRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values:batchGetByDataFilter', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 28),
unittest.equals('/values:batchGetByDataFilter'),
);
pathOffset += 28;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildBatchGetValuesByDataFilterResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.batchGetByDataFilter(
arg_request, arg_spreadsheetId,
$fields: arg_$fields);
checkBatchGetValuesByDataFilterResponse(
response as api.BatchGetValuesByDataFilterResponse);
});
unittest.test('method--batchUpdate', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_request = buildBatchUpdateValuesRequest();
final arg_spreadsheetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.BatchUpdateValuesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkBatchUpdateValuesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values:batchUpdate', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 19),
unittest.equals('/values:batchUpdate'),
);
pathOffset += 19;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildBatchUpdateValuesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.batchUpdate(arg_request, arg_spreadsheetId,
$fields: arg_$fields);
checkBatchUpdateValuesResponse(response as api.BatchUpdateValuesResponse);
});
unittest.test('method--batchUpdateByDataFilter', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_request = buildBatchUpdateValuesByDataFilterRequest();
final arg_spreadsheetId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.BatchUpdateValuesByDataFilterRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkBatchUpdateValuesByDataFilterRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values:batchUpdateByDataFilter', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 31),
unittest.equals('/values:batchUpdateByDataFilter'),
);
pathOffset += 31;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildBatchUpdateValuesByDataFilterResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.batchUpdateByDataFilter(
arg_request, arg_spreadsheetId,
$fields: arg_$fields);
checkBatchUpdateValuesByDataFilterResponse(
response as api.BatchUpdateValuesByDataFilterResponse);
});
unittest.test('method--clear', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_request = buildClearValuesRequest();
final arg_spreadsheetId = 'foo';
final arg_range = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ClearValuesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkClearValuesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/values/'),
);
pathOffset += 8;
index = path.indexOf(':clear', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_range'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals(':clear'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildClearValuesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.clear(
arg_request, arg_spreadsheetId, arg_range,
$fields: arg_$fields);
checkClearValuesResponse(response as api.ClearValuesResponse);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_spreadsheetId = 'foo';
final arg_range = 'foo';
final arg_dateTimeRenderOption = 'foo';
final arg_majorDimension = 'foo';
final arg_valueRenderOption = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/values/'),
);
pathOffset += 8;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_range'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['dateTimeRenderOption']!.first,
unittest.equals(arg_dateTimeRenderOption),
);
unittest.expect(
queryMap['majorDimension']!.first,
unittest.equals(arg_majorDimension),
);
unittest.expect(
queryMap['valueRenderOption']!.first,
unittest.equals(arg_valueRenderOption),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildValueRange());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_spreadsheetId, arg_range,
dateTimeRenderOption: arg_dateTimeRenderOption,
majorDimension: arg_majorDimension,
valueRenderOption: arg_valueRenderOption,
$fields: arg_$fields);
checkValueRange(response as api.ValueRange);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.SheetsApi(mock).spreadsheets.values;
final arg_request = buildValueRange();
final arg_spreadsheetId = 'foo';
final arg_range = 'foo';
final arg_includeValuesInResponse = true;
final arg_responseDateTimeRenderOption = 'foo';
final arg_responseValueRenderOption = 'foo';
final arg_valueInputOption = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ValueRange.fromJson(
json as core.Map<core.String, core.dynamic>);
checkValueRange(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v4/spreadsheets/'),
);
pathOffset += 16;
index = path.indexOf('/values/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_spreadsheetId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/values/'),
);
pathOffset += 8;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_range'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['includeValuesInResponse']!.first,
unittest.equals('$arg_includeValuesInResponse'),
);
unittest.expect(
queryMap['responseDateTimeRenderOption']!.first,
unittest.equals(arg_responseDateTimeRenderOption),
);
unittest.expect(
queryMap['responseValueRenderOption']!.first,
unittest.equals(arg_responseValueRenderOption),
);
unittest.expect(
queryMap['valueInputOption']!.first,
unittest.equals(arg_valueInputOption),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildUpdateValuesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(
arg_request, arg_spreadsheetId, arg_range,
includeValuesInResponse: arg_includeValuesInResponse,
responseDateTimeRenderOption: arg_responseDateTimeRenderOption,
responseValueRenderOption: arg_responseValueRenderOption,
valueInputOption: arg_valueInputOption,
$fields: arg_$fields);
checkUpdateValuesResponse(response as api.UpdateValuesResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/sheets/v4_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/sheets/v4_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 142998} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/texttospeech/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.List<core.String> buildUnnamed0() => [
'foo',
'foo',
];
void checkUnnamed0(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 buildCounterAudioConfig = 0;
api.AudioConfig buildAudioConfig() {
final o = api.AudioConfig();
buildCounterAudioConfig++;
if (buildCounterAudioConfig < 3) {
o.audioEncoding = 'foo';
o.effectsProfileId = buildUnnamed0();
o.pitch = 42.0;
o.sampleRateHertz = 42;
o.speakingRate = 42.0;
o.volumeGainDb = 42.0;
}
buildCounterAudioConfig--;
return o;
}
void checkAudioConfig(api.AudioConfig o) {
buildCounterAudioConfig++;
if (buildCounterAudioConfig < 3) {
unittest.expect(
o.audioEncoding!,
unittest.equals('foo'),
);
checkUnnamed0(o.effectsProfileId!);
unittest.expect(
o.pitch!,
unittest.equals(42.0),
);
unittest.expect(
o.sampleRateHertz!,
unittest.equals(42),
);
unittest.expect(
o.speakingRate!,
unittest.equals(42.0),
);
unittest.expect(
o.volumeGainDb!,
unittest.equals(42.0),
);
}
buildCounterAudioConfig--;
}
core.int buildCounterCancelOperationRequest = 0;
api.CancelOperationRequest buildCancelOperationRequest() {
final o = api.CancelOperationRequest();
buildCounterCancelOperationRequest++;
if (buildCounterCancelOperationRequest < 3) {}
buildCounterCancelOperationRequest--;
return o;
}
void checkCancelOperationRequest(api.CancelOperationRequest o) {
buildCounterCancelOperationRequest++;
if (buildCounterCancelOperationRequest < 3) {}
buildCounterCancelOperationRequest--;
}
core.int buildCounterCustomVoiceParams = 0;
api.CustomVoiceParams buildCustomVoiceParams() {
final o = api.CustomVoiceParams();
buildCounterCustomVoiceParams++;
if (buildCounterCustomVoiceParams < 3) {
o.model = 'foo';
o.reportedUsage = 'foo';
}
buildCounterCustomVoiceParams--;
return o;
}
void checkCustomVoiceParams(api.CustomVoiceParams o) {
buildCounterCustomVoiceParams++;
if (buildCounterCustomVoiceParams < 3) {
unittest.expect(
o.model!,
unittest.equals('foo'),
);
unittest.expect(
o.reportedUsage!,
unittest.equals('foo'),
);
}
buildCounterCustomVoiceParams--;
}
core.int buildCounterEmpty = 0;
api.Empty buildEmpty() {
final o = api.Empty();
buildCounterEmpty++;
if (buildCounterEmpty < 3) {}
buildCounterEmpty--;
return o;
}
void checkEmpty(api.Empty o) {
buildCounterEmpty++;
if (buildCounterEmpty < 3) {}
buildCounterEmpty--;
}
core.List<api.Operation> buildUnnamed1() => [
buildOperation(),
buildOperation(),
];
void checkUnnamed1(core.List<api.Operation> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperation(o[0]);
checkOperation(o[1]);
}
core.int buildCounterListOperationsResponse = 0;
api.ListOperationsResponse buildListOperationsResponse() {
final o = api.ListOperationsResponse();
buildCounterListOperationsResponse++;
if (buildCounterListOperationsResponse < 3) {
o.nextPageToken = 'foo';
o.operations = buildUnnamed1();
}
buildCounterListOperationsResponse--;
return o;
}
void checkListOperationsResponse(api.ListOperationsResponse o) {
buildCounterListOperationsResponse++;
if (buildCounterListOperationsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed1(o.operations!);
}
buildCounterListOperationsResponse--;
}
core.List<api.Voice> buildUnnamed2() => [
buildVoice(),
buildVoice(),
];
void checkUnnamed2(core.List<api.Voice> o) {
unittest.expect(o, unittest.hasLength(2));
checkVoice(o[0]);
checkVoice(o[1]);
}
core.int buildCounterListVoicesResponse = 0;
api.ListVoicesResponse buildListVoicesResponse() {
final o = api.ListVoicesResponse();
buildCounterListVoicesResponse++;
if (buildCounterListVoicesResponse < 3) {
o.voices = buildUnnamed2();
}
buildCounterListVoicesResponse--;
return o;
}
void checkListVoicesResponse(api.ListVoicesResponse o) {
buildCounterListVoicesResponse++;
if (buildCounterListVoicesResponse < 3) {
checkUnnamed2(o.voices!);
}
buildCounterListVoicesResponse--;
}
core.Map<core.String, core.Object?> buildUnnamed3() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed3(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.Map<core.String, core.Object?> buildUnnamed4() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed4(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;
api.Operation buildOperation() {
final o = api.Operation();
buildCounterOperation++;
if (buildCounterOperation < 3) {
o.done = true;
o.error = buildStatus();
o.metadata = buildUnnamed3();
o.name = 'foo';
o.response = buildUnnamed4();
}
buildCounterOperation--;
return o;
}
void checkOperation(api.Operation o) {
buildCounterOperation++;
if (buildCounterOperation < 3) {
unittest.expect(o.done!, unittest.isTrue);
checkStatus(o.error!);
checkUnnamed3(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed4(o.response!);
}
buildCounterOperation--;
}
core.Map<core.String, core.Object?> buildUnnamed5() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed5(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.List<core.Map<core.String, core.Object?>> buildUnnamed6() => [
buildUnnamed5(),
buildUnnamed5(),
];
void checkUnnamed6(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed5(o[0]);
checkUnnamed5(o[1]);
}
core.int buildCounterStatus = 0;
api.Status buildStatus() {
final o = api.Status();
buildCounterStatus++;
if (buildCounterStatus < 3) {
o.code = 42;
o.details = buildUnnamed6();
o.message = 'foo';
}
buildCounterStatus--;
return o;
}
void checkStatus(api.Status o) {
buildCounterStatus++;
if (buildCounterStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed6(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterStatus--;
}
core.int buildCounterSynthesisInput = 0;
api.SynthesisInput buildSynthesisInput() {
final o = api.SynthesisInput();
buildCounterSynthesisInput++;
if (buildCounterSynthesisInput < 3) {
o.ssml = 'foo';
o.text = 'foo';
}
buildCounterSynthesisInput--;
return o;
}
void checkSynthesisInput(api.SynthesisInput o) {
buildCounterSynthesisInput++;
if (buildCounterSynthesisInput < 3) {
unittest.expect(
o.ssml!,
unittest.equals('foo'),
);
unittest.expect(
o.text!,
unittest.equals('foo'),
);
}
buildCounterSynthesisInput--;
}
core.int buildCounterSynthesizeLongAudioRequest = 0;
api.SynthesizeLongAudioRequest buildSynthesizeLongAudioRequest() {
final o = api.SynthesizeLongAudioRequest();
buildCounterSynthesizeLongAudioRequest++;
if (buildCounterSynthesizeLongAudioRequest < 3) {
o.audioConfig = buildAudioConfig();
o.input = buildSynthesisInput();
o.outputGcsUri = 'foo';
o.voice = buildVoiceSelectionParams();
}
buildCounterSynthesizeLongAudioRequest--;
return o;
}
void checkSynthesizeLongAudioRequest(api.SynthesizeLongAudioRequest o) {
buildCounterSynthesizeLongAudioRequest++;
if (buildCounterSynthesizeLongAudioRequest < 3) {
checkAudioConfig(o.audioConfig!);
checkSynthesisInput(o.input!);
unittest.expect(
o.outputGcsUri!,
unittest.equals('foo'),
);
checkVoiceSelectionParams(o.voice!);
}
buildCounterSynthesizeLongAudioRequest--;
}
core.int buildCounterSynthesizeSpeechRequest = 0;
api.SynthesizeSpeechRequest buildSynthesizeSpeechRequest() {
final o = api.SynthesizeSpeechRequest();
buildCounterSynthesizeSpeechRequest++;
if (buildCounterSynthesizeSpeechRequest < 3) {
o.audioConfig = buildAudioConfig();
o.input = buildSynthesisInput();
o.voice = buildVoiceSelectionParams();
}
buildCounterSynthesizeSpeechRequest--;
return o;
}
void checkSynthesizeSpeechRequest(api.SynthesizeSpeechRequest o) {
buildCounterSynthesizeSpeechRequest++;
if (buildCounterSynthesizeSpeechRequest < 3) {
checkAudioConfig(o.audioConfig!);
checkSynthesisInput(o.input!);
checkVoiceSelectionParams(o.voice!);
}
buildCounterSynthesizeSpeechRequest--;
}
core.int buildCounterSynthesizeSpeechResponse = 0;
api.SynthesizeSpeechResponse buildSynthesizeSpeechResponse() {
final o = api.SynthesizeSpeechResponse();
buildCounterSynthesizeSpeechResponse++;
if (buildCounterSynthesizeSpeechResponse < 3) {
o.audioContent = 'foo';
}
buildCounterSynthesizeSpeechResponse--;
return o;
}
void checkSynthesizeSpeechResponse(api.SynthesizeSpeechResponse o) {
buildCounterSynthesizeSpeechResponse++;
if (buildCounterSynthesizeSpeechResponse < 3) {
unittest.expect(
o.audioContent!,
unittest.equals('foo'),
);
}
buildCounterSynthesizeSpeechResponse--;
}
core.List<core.String> buildUnnamed7() => [
'foo',
'foo',
];
void checkUnnamed7(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 buildCounterVoice = 0;
api.Voice buildVoice() {
final o = api.Voice();
buildCounterVoice++;
if (buildCounterVoice < 3) {
o.languageCodes = buildUnnamed7();
o.name = 'foo';
o.naturalSampleRateHertz = 42;
o.ssmlGender = 'foo';
}
buildCounterVoice--;
return o;
}
void checkVoice(api.Voice o) {
buildCounterVoice++;
if (buildCounterVoice < 3) {
checkUnnamed7(o.languageCodes!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.naturalSampleRateHertz!,
unittest.equals(42),
);
unittest.expect(
o.ssmlGender!,
unittest.equals('foo'),
);
}
buildCounterVoice--;
}
core.int buildCounterVoiceSelectionParams = 0;
api.VoiceSelectionParams buildVoiceSelectionParams() {
final o = api.VoiceSelectionParams();
buildCounterVoiceSelectionParams++;
if (buildCounterVoiceSelectionParams < 3) {
o.customVoice = buildCustomVoiceParams();
o.languageCode = 'foo';
o.name = 'foo';
o.ssmlGender = 'foo';
}
buildCounterVoiceSelectionParams--;
return o;
}
void checkVoiceSelectionParams(api.VoiceSelectionParams o) {
buildCounterVoiceSelectionParams++;
if (buildCounterVoiceSelectionParams < 3) {
checkCustomVoiceParams(o.customVoice!);
unittest.expect(
o.languageCode!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.ssmlGender!,
unittest.equals('foo'),
);
}
buildCounterVoiceSelectionParams--;
}
void main() {
unittest.group('obj-schema-AudioConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildAudioConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AudioConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAudioConfig(od);
});
});
unittest.group('obj-schema-CancelOperationRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildCancelOperationRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CancelOperationRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCancelOperationRequest(od);
});
});
unittest.group('obj-schema-CustomVoiceParams', () {
unittest.test('to-json--from-json', () async {
final o = buildCustomVoiceParams();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CustomVoiceParams.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCustomVoiceParams(od);
});
});
unittest.group('obj-schema-Empty', () {
unittest.test('to-json--from-json', () async {
final o = buildEmpty();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Empty.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkEmpty(od);
});
});
unittest.group('obj-schema-ListOperationsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListOperationsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListOperationsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListOperationsResponse(od);
});
});
unittest.group('obj-schema-ListVoicesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListVoicesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListVoicesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListVoicesResponse(od);
});
});
unittest.group('obj-schema-Operation', () {
unittest.test('to-json--from-json', () async {
final o = buildOperation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Operation.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkOperation(od);
});
});
unittest.group('obj-schema-Status', () {
unittest.test('to-json--from-json', () async {
final o = buildStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Status.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStatus(od);
});
});
unittest.group('obj-schema-SynthesisInput', () {
unittest.test('to-json--from-json', () async {
final o = buildSynthesisInput();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SynthesisInput.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSynthesisInput(od);
});
});
unittest.group('obj-schema-SynthesizeLongAudioRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSynthesizeLongAudioRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SynthesizeLongAudioRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSynthesizeLongAudioRequest(od);
});
});
unittest.group('obj-schema-SynthesizeSpeechRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSynthesizeSpeechRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SynthesizeSpeechRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSynthesizeSpeechRequest(od);
});
});
unittest.group('obj-schema-SynthesizeSpeechResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSynthesizeSpeechResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SynthesizeSpeechResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSynthesizeSpeechResponse(od);
});
});
unittest.group('obj-schema-Voice', () {
unittest.test('to-json--from-json', () async {
final o = buildVoice();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Voice.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkVoice(od);
});
});
unittest.group('obj-schema-VoiceSelectionParams', () {
unittest.test('to-json--from-json', () async {
final o = buildVoiceSelectionParams();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.VoiceSelectionParams.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkVoiceSelectionParams(od);
});
});
unittest.group('resource-OperationsResource', () {
unittest.test('method--cancel', () async {
final mock = HttpServerMock();
final res = api.TexttospeechApi(mock).operations;
final arg_request = buildCancelOperationRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CancelOperationRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCancelOperationRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.cancel(arg_request, arg_name, $fields: arg_$fields);
checkEmpty(response as api.Empty);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.TexttospeechApi(mock).operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkEmpty(response as api.Empty);
});
});
unittest.group('resource-ProjectsLocationsResource', () {
unittest.test('method--synthesizeLongAudio', () async {
final mock = HttpServerMock();
final res = api.TexttospeechApi(mock).projects.locations;
final arg_request = buildSynthesizeLongAudioRequest();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SynthesizeLongAudioRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSynthesizeLongAudioRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.synthesizeLongAudio(arg_request, arg_parent,
$fields: arg_$fields);
checkOperation(response as api.Operation);
});
});
unittest.group('resource-ProjectsLocationsOperationsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.TexttospeechApi(mock).projects.locations.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkOperation(response as api.Operation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.TexttospeechApi(mock).projects.locations.operations;
final arg_name = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListOperationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_name,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListOperationsResponse(response as api.ListOperationsResponse);
});
});
unittest.group('resource-TextResource', () {
unittest.test('method--synthesize', () async {
final mock = HttpServerMock();
final res = api.TexttospeechApi(mock).text;
final arg_request = buildSynthesizeSpeechRequest();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SynthesizeSpeechRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSynthesizeSpeechRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 18),
unittest.equals('v1/text:synthesize'),
);
pathOffset += 18;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSynthesizeSpeechResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.synthesize(arg_request, $fields: arg_$fields);
checkSynthesizeSpeechResponse(response as api.SynthesizeSpeechResponse);
});
});
unittest.group('resource-VoicesResource', () {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.TexttospeechApi(mock).voices;
final arg_languageCode = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('v1/voices'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['languageCode']!.first,
unittest.equals(arg_languageCode),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListVoicesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.list(languageCode: arg_languageCode, $fields: arg_$fields);
checkListVoicesResponse(response as api.ListVoicesResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/texttospeech/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/texttospeech/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 14837} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis/webrisk/v1.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponse = 0;
api.GoogleCloudWebriskV1ComputeThreatListDiffResponse
buildGoogleCloudWebriskV1ComputeThreatListDiffResponse() {
final o = api.GoogleCloudWebriskV1ComputeThreatListDiffResponse();
buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponse++;
if (buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponse < 3) {
o.additions = buildGoogleCloudWebriskV1ThreatEntryAdditions();
o.checksum =
buildGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum();
o.newVersionToken = 'foo';
o.recommendedNextDiff = 'foo';
o.removals = buildGoogleCloudWebriskV1ThreatEntryRemovals();
o.responseType = 'foo';
}
buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponse--;
return o;
}
void checkGoogleCloudWebriskV1ComputeThreatListDiffResponse(
api.GoogleCloudWebriskV1ComputeThreatListDiffResponse o) {
buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponse++;
if (buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponse < 3) {
checkGoogleCloudWebriskV1ThreatEntryAdditions(o.additions!);
checkGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum(o.checksum!);
unittest.expect(
o.newVersionToken!,
unittest.equals('foo'),
);
unittest.expect(
o.recommendedNextDiff!,
unittest.equals('foo'),
);
checkGoogleCloudWebriskV1ThreatEntryRemovals(o.removals!);
unittest.expect(
o.responseType!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponse--;
}
core.int buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum =
0;
api.GoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum
buildGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum() {
final o = api.GoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum();
buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum++;
if (buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum <
3) {
o.sha256 = 'foo';
}
buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum--;
return o;
}
void checkGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum(
api.GoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum o) {
buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum++;
if (buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum <
3) {
unittest.expect(
o.sha256!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum--;
}
core.int buildCounterGoogleCloudWebriskV1RawHashes = 0;
api.GoogleCloudWebriskV1RawHashes buildGoogleCloudWebriskV1RawHashes() {
final o = api.GoogleCloudWebriskV1RawHashes();
buildCounterGoogleCloudWebriskV1RawHashes++;
if (buildCounterGoogleCloudWebriskV1RawHashes < 3) {
o.prefixSize = 42;
o.rawHashes = 'foo';
}
buildCounterGoogleCloudWebriskV1RawHashes--;
return o;
}
void checkGoogleCloudWebriskV1RawHashes(api.GoogleCloudWebriskV1RawHashes o) {
buildCounterGoogleCloudWebriskV1RawHashes++;
if (buildCounterGoogleCloudWebriskV1RawHashes < 3) {
unittest.expect(
o.prefixSize!,
unittest.equals(42),
);
unittest.expect(
o.rawHashes!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudWebriskV1RawHashes--;
}
core.List<core.int> buildUnnamed0() => [
42,
42,
];
void checkUnnamed0(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),
);
}
core.int buildCounterGoogleCloudWebriskV1RawIndices = 0;
api.GoogleCloudWebriskV1RawIndices buildGoogleCloudWebriskV1RawIndices() {
final o = api.GoogleCloudWebriskV1RawIndices();
buildCounterGoogleCloudWebriskV1RawIndices++;
if (buildCounterGoogleCloudWebriskV1RawIndices < 3) {
o.indices = buildUnnamed0();
}
buildCounterGoogleCloudWebriskV1RawIndices--;
return o;
}
void checkGoogleCloudWebriskV1RawIndices(api.GoogleCloudWebriskV1RawIndices o) {
buildCounterGoogleCloudWebriskV1RawIndices++;
if (buildCounterGoogleCloudWebriskV1RawIndices < 3) {
checkUnnamed0(o.indices!);
}
buildCounterGoogleCloudWebriskV1RawIndices--;
}
core.int buildCounterGoogleCloudWebriskV1RiceDeltaEncoding = 0;
api.GoogleCloudWebriskV1RiceDeltaEncoding
buildGoogleCloudWebriskV1RiceDeltaEncoding() {
final o = api.GoogleCloudWebriskV1RiceDeltaEncoding();
buildCounterGoogleCloudWebriskV1RiceDeltaEncoding++;
if (buildCounterGoogleCloudWebriskV1RiceDeltaEncoding < 3) {
o.encodedData = 'foo';
o.entryCount = 42;
o.firstValue = 'foo';
o.riceParameter = 42;
}
buildCounterGoogleCloudWebriskV1RiceDeltaEncoding--;
return o;
}
void checkGoogleCloudWebriskV1RiceDeltaEncoding(
api.GoogleCloudWebriskV1RiceDeltaEncoding o) {
buildCounterGoogleCloudWebriskV1RiceDeltaEncoding++;
if (buildCounterGoogleCloudWebriskV1RiceDeltaEncoding < 3) {
unittest.expect(
o.encodedData!,
unittest.equals('foo'),
);
unittest.expect(
o.entryCount!,
unittest.equals(42),
);
unittest.expect(
o.firstValue!,
unittest.equals('foo'),
);
unittest.expect(
o.riceParameter!,
unittest.equals(42),
);
}
buildCounterGoogleCloudWebriskV1RiceDeltaEncoding--;
}
core.List<api.GoogleCloudWebriskV1SearchHashesResponseThreatHash>
buildUnnamed1() => [
buildGoogleCloudWebriskV1SearchHashesResponseThreatHash(),
buildGoogleCloudWebriskV1SearchHashesResponseThreatHash(),
];
void checkUnnamed1(
core.List<api.GoogleCloudWebriskV1SearchHashesResponseThreatHash> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudWebriskV1SearchHashesResponseThreatHash(o[0]);
checkGoogleCloudWebriskV1SearchHashesResponseThreatHash(o[1]);
}
core.int buildCounterGoogleCloudWebriskV1SearchHashesResponse = 0;
api.GoogleCloudWebriskV1SearchHashesResponse
buildGoogleCloudWebriskV1SearchHashesResponse() {
final o = api.GoogleCloudWebriskV1SearchHashesResponse();
buildCounterGoogleCloudWebriskV1SearchHashesResponse++;
if (buildCounterGoogleCloudWebriskV1SearchHashesResponse < 3) {
o.negativeExpireTime = 'foo';
o.threats = buildUnnamed1();
}
buildCounterGoogleCloudWebriskV1SearchHashesResponse--;
return o;
}
void checkGoogleCloudWebriskV1SearchHashesResponse(
api.GoogleCloudWebriskV1SearchHashesResponse o) {
buildCounterGoogleCloudWebriskV1SearchHashesResponse++;
if (buildCounterGoogleCloudWebriskV1SearchHashesResponse < 3) {
unittest.expect(
o.negativeExpireTime!,
unittest.equals('foo'),
);
checkUnnamed1(o.threats!);
}
buildCounterGoogleCloudWebriskV1SearchHashesResponse--;
}
core.List<core.String> buildUnnamed2() => [
'foo',
'foo',
];
void checkUnnamed2(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 buildCounterGoogleCloudWebriskV1SearchHashesResponseThreatHash = 0;
api.GoogleCloudWebriskV1SearchHashesResponseThreatHash
buildGoogleCloudWebriskV1SearchHashesResponseThreatHash() {
final o = api.GoogleCloudWebriskV1SearchHashesResponseThreatHash();
buildCounterGoogleCloudWebriskV1SearchHashesResponseThreatHash++;
if (buildCounterGoogleCloudWebriskV1SearchHashesResponseThreatHash < 3) {
o.expireTime = 'foo';
o.hash = 'foo';
o.threatTypes = buildUnnamed2();
}
buildCounterGoogleCloudWebriskV1SearchHashesResponseThreatHash--;
return o;
}
void checkGoogleCloudWebriskV1SearchHashesResponseThreatHash(
api.GoogleCloudWebriskV1SearchHashesResponseThreatHash o) {
buildCounterGoogleCloudWebriskV1SearchHashesResponseThreatHash++;
if (buildCounterGoogleCloudWebriskV1SearchHashesResponseThreatHash < 3) {
unittest.expect(
o.expireTime!,
unittest.equals('foo'),
);
unittest.expect(
o.hash!,
unittest.equals('foo'),
);
checkUnnamed2(o.threatTypes!);
}
buildCounterGoogleCloudWebriskV1SearchHashesResponseThreatHash--;
}
core.int buildCounterGoogleCloudWebriskV1SearchUrisResponse = 0;
api.GoogleCloudWebriskV1SearchUrisResponse
buildGoogleCloudWebriskV1SearchUrisResponse() {
final o = api.GoogleCloudWebriskV1SearchUrisResponse();
buildCounterGoogleCloudWebriskV1SearchUrisResponse++;
if (buildCounterGoogleCloudWebriskV1SearchUrisResponse < 3) {
o.threat = buildGoogleCloudWebriskV1SearchUrisResponseThreatUri();
}
buildCounterGoogleCloudWebriskV1SearchUrisResponse--;
return o;
}
void checkGoogleCloudWebriskV1SearchUrisResponse(
api.GoogleCloudWebriskV1SearchUrisResponse o) {
buildCounterGoogleCloudWebriskV1SearchUrisResponse++;
if (buildCounterGoogleCloudWebriskV1SearchUrisResponse < 3) {
checkGoogleCloudWebriskV1SearchUrisResponseThreatUri(o.threat!);
}
buildCounterGoogleCloudWebriskV1SearchUrisResponse--;
}
core.List<core.String> buildUnnamed3() => [
'foo',
'foo',
];
void checkUnnamed3(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 buildCounterGoogleCloudWebriskV1SearchUrisResponseThreatUri = 0;
api.GoogleCloudWebriskV1SearchUrisResponseThreatUri
buildGoogleCloudWebriskV1SearchUrisResponseThreatUri() {
final o = api.GoogleCloudWebriskV1SearchUrisResponseThreatUri();
buildCounterGoogleCloudWebriskV1SearchUrisResponseThreatUri++;
if (buildCounterGoogleCloudWebriskV1SearchUrisResponseThreatUri < 3) {
o.expireTime = 'foo';
o.threatTypes = buildUnnamed3();
}
buildCounterGoogleCloudWebriskV1SearchUrisResponseThreatUri--;
return o;
}
void checkGoogleCloudWebriskV1SearchUrisResponseThreatUri(
api.GoogleCloudWebriskV1SearchUrisResponseThreatUri o) {
buildCounterGoogleCloudWebriskV1SearchUrisResponseThreatUri++;
if (buildCounterGoogleCloudWebriskV1SearchUrisResponseThreatUri < 3) {
unittest.expect(
o.expireTime!,
unittest.equals('foo'),
);
checkUnnamed3(o.threatTypes!);
}
buildCounterGoogleCloudWebriskV1SearchUrisResponseThreatUri--;
}
core.int buildCounterGoogleCloudWebriskV1Submission = 0;
api.GoogleCloudWebriskV1Submission buildGoogleCloudWebriskV1Submission() {
final o = api.GoogleCloudWebriskV1Submission();
buildCounterGoogleCloudWebriskV1Submission++;
if (buildCounterGoogleCloudWebriskV1Submission < 3) {
o.uri = 'foo';
}
buildCounterGoogleCloudWebriskV1Submission--;
return o;
}
void checkGoogleCloudWebriskV1Submission(api.GoogleCloudWebriskV1Submission o) {
buildCounterGoogleCloudWebriskV1Submission++;
if (buildCounterGoogleCloudWebriskV1Submission < 3) {
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
}
buildCounterGoogleCloudWebriskV1Submission--;
}
core.List<api.GoogleCloudWebriskV1RawHashes> buildUnnamed4() => [
buildGoogleCloudWebriskV1RawHashes(),
buildGoogleCloudWebriskV1RawHashes(),
];
void checkUnnamed4(core.List<api.GoogleCloudWebriskV1RawHashes> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudWebriskV1RawHashes(o[0]);
checkGoogleCloudWebriskV1RawHashes(o[1]);
}
core.int buildCounterGoogleCloudWebriskV1ThreatEntryAdditions = 0;
api.GoogleCloudWebriskV1ThreatEntryAdditions
buildGoogleCloudWebriskV1ThreatEntryAdditions() {
final o = api.GoogleCloudWebriskV1ThreatEntryAdditions();
buildCounterGoogleCloudWebriskV1ThreatEntryAdditions++;
if (buildCounterGoogleCloudWebriskV1ThreatEntryAdditions < 3) {
o.rawHashes = buildUnnamed4();
o.riceHashes = buildGoogleCloudWebriskV1RiceDeltaEncoding();
}
buildCounterGoogleCloudWebriskV1ThreatEntryAdditions--;
return o;
}
void checkGoogleCloudWebriskV1ThreatEntryAdditions(
api.GoogleCloudWebriskV1ThreatEntryAdditions o) {
buildCounterGoogleCloudWebriskV1ThreatEntryAdditions++;
if (buildCounterGoogleCloudWebriskV1ThreatEntryAdditions < 3) {
checkUnnamed4(o.rawHashes!);
checkGoogleCloudWebriskV1RiceDeltaEncoding(o.riceHashes!);
}
buildCounterGoogleCloudWebriskV1ThreatEntryAdditions--;
}
core.int buildCounterGoogleCloudWebriskV1ThreatEntryRemovals = 0;
api.GoogleCloudWebriskV1ThreatEntryRemovals
buildGoogleCloudWebriskV1ThreatEntryRemovals() {
final o = api.GoogleCloudWebriskV1ThreatEntryRemovals();
buildCounterGoogleCloudWebriskV1ThreatEntryRemovals++;
if (buildCounterGoogleCloudWebriskV1ThreatEntryRemovals < 3) {
o.rawIndices = buildGoogleCloudWebriskV1RawIndices();
o.riceIndices = buildGoogleCloudWebriskV1RiceDeltaEncoding();
}
buildCounterGoogleCloudWebriskV1ThreatEntryRemovals--;
return o;
}
void checkGoogleCloudWebriskV1ThreatEntryRemovals(
api.GoogleCloudWebriskV1ThreatEntryRemovals o) {
buildCounterGoogleCloudWebriskV1ThreatEntryRemovals++;
if (buildCounterGoogleCloudWebriskV1ThreatEntryRemovals < 3) {
checkGoogleCloudWebriskV1RawIndices(o.rawIndices!);
checkGoogleCloudWebriskV1RiceDeltaEncoding(o.riceIndices!);
}
buildCounterGoogleCloudWebriskV1ThreatEntryRemovals--;
}
core.int buildCounterGoogleLongrunningCancelOperationRequest = 0;
api.GoogleLongrunningCancelOperationRequest
buildGoogleLongrunningCancelOperationRequest() {
final o = api.GoogleLongrunningCancelOperationRequest();
buildCounterGoogleLongrunningCancelOperationRequest++;
if (buildCounterGoogleLongrunningCancelOperationRequest < 3) {}
buildCounterGoogleLongrunningCancelOperationRequest--;
return o;
}
void checkGoogleLongrunningCancelOperationRequest(
api.GoogleLongrunningCancelOperationRequest o) {
buildCounterGoogleLongrunningCancelOperationRequest++;
if (buildCounterGoogleLongrunningCancelOperationRequest < 3) {}
buildCounterGoogleLongrunningCancelOperationRequest--;
}
core.List<api.GoogleLongrunningOperation> buildUnnamed5() => [
buildGoogleLongrunningOperation(),
buildGoogleLongrunningOperation(),
];
void checkUnnamed5(core.List<api.GoogleLongrunningOperation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleLongrunningOperation(o[0]);
checkGoogleLongrunningOperation(o[1]);
}
core.int buildCounterGoogleLongrunningListOperationsResponse = 0;
api.GoogleLongrunningListOperationsResponse
buildGoogleLongrunningListOperationsResponse() {
final o = api.GoogleLongrunningListOperationsResponse();
buildCounterGoogleLongrunningListOperationsResponse++;
if (buildCounterGoogleLongrunningListOperationsResponse < 3) {
o.nextPageToken = 'foo';
o.operations = buildUnnamed5();
}
buildCounterGoogleLongrunningListOperationsResponse--;
return o;
}
void checkGoogleLongrunningListOperationsResponse(
api.GoogleLongrunningListOperationsResponse o) {
buildCounterGoogleLongrunningListOperationsResponse++;
if (buildCounterGoogleLongrunningListOperationsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed5(o.operations!);
}
buildCounterGoogleLongrunningListOperationsResponse--;
}
core.Map<core.String, core.Object?> buildUnnamed6() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed6(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.Map<core.String, core.Object?> buildUnnamed7() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed7(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 buildCounterGoogleLongrunningOperation = 0;
api.GoogleLongrunningOperation buildGoogleLongrunningOperation() {
final o = api.GoogleLongrunningOperation();
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
o.done = true;
o.error = buildGoogleRpcStatus();
o.metadata = buildUnnamed6();
o.name = 'foo';
o.response = buildUnnamed7();
}
buildCounterGoogleLongrunningOperation--;
return o;
}
void checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) {
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
unittest.expect(o.done!, unittest.isTrue);
checkGoogleRpcStatus(o.error!);
checkUnnamed6(o.metadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed7(o.response!);
}
buildCounterGoogleLongrunningOperation--;
}
core.int buildCounterGoogleProtobufEmpty = 0;
api.GoogleProtobufEmpty buildGoogleProtobufEmpty() {
final o = api.GoogleProtobufEmpty();
buildCounterGoogleProtobufEmpty++;
if (buildCounterGoogleProtobufEmpty < 3) {}
buildCounterGoogleProtobufEmpty--;
return o;
}
void checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) {
buildCounterGoogleProtobufEmpty++;
if (buildCounterGoogleProtobufEmpty < 3) {}
buildCounterGoogleProtobufEmpty--;
}
core.Map<core.String, core.Object?> buildUnnamed8() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed8(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.List<core.Map<core.String, core.Object?>> buildUnnamed9() => [
buildUnnamed8(),
buildUnnamed8(),
];
void checkUnnamed9(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed8(o[0]);
checkUnnamed8(o[1]);
}
core.int buildCounterGoogleRpcStatus = 0;
api.GoogleRpcStatus buildGoogleRpcStatus() {
final o = api.GoogleRpcStatus();
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
o.code = 42;
o.details = buildUnnamed9();
o.message = 'foo';
}
buildCounterGoogleRpcStatus--;
return o;
}
void checkGoogleRpcStatus(api.GoogleRpcStatus o) {
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed9(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterGoogleRpcStatus--;
}
core.List<core.String> buildUnnamed10() => [
'foo',
'foo',
];
void checkUnnamed10(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.List<core.String> buildUnnamed11() => [
'foo',
'foo',
];
void checkUnnamed11(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.List<core.String> buildUnnamed12() => [
'foo',
'foo',
];
void checkUnnamed12(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'),
);
}
void main() {
unittest.group('obj-schema-GoogleCloudWebriskV1ComputeThreatListDiffResponse',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1ComputeThreatListDiffResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1ComputeThreatListDiffResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1ComputeThreatListDiffResponse(od);
});
});
unittest.group(
'obj-schema-GoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum',
() {
unittest.test('to-json--from-json', () async {
final o =
buildGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum
.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1RawHashes', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1RawHashes();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1RawHashes.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1RawHashes(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1RawIndices', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1RawIndices();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1RawIndices.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1RawIndices(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1RiceDeltaEncoding', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1RiceDeltaEncoding();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1RiceDeltaEncoding.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1RiceDeltaEncoding(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1SearchHashesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1SearchHashesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1SearchHashesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1SearchHashesResponse(od);
});
});
unittest.group(
'obj-schema-GoogleCloudWebriskV1SearchHashesResponseThreatHash', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1SearchHashesResponseThreatHash();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.GoogleCloudWebriskV1SearchHashesResponseThreatHash.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1SearchHashesResponseThreatHash(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1SearchUrisResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1SearchUrisResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1SearchUrisResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1SearchUrisResponse(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1SearchUrisResponseThreatUri',
() {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1SearchUrisResponseThreatUri();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1SearchUrisResponseThreatUri.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1SearchUrisResponseThreatUri(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1Submission', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1Submission();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1Submission.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1Submission(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1ThreatEntryAdditions', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1ThreatEntryAdditions();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1ThreatEntryAdditions.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1ThreatEntryAdditions(od);
});
});
unittest.group('obj-schema-GoogleCloudWebriskV1ThreatEntryRemovals', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleCloudWebriskV1ThreatEntryRemovals();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleCloudWebriskV1ThreatEntryRemovals.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1ThreatEntryRemovals(od);
});
});
unittest.group('obj-schema-GoogleLongrunningCancelOperationRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningCancelOperationRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningCancelOperationRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningCancelOperationRequest(od);
});
});
unittest.group('obj-schema-GoogleLongrunningListOperationsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningListOperationsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningListOperationsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningListOperationsResponse(od);
});
});
unittest.group('obj-schema-GoogleLongrunningOperation', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleLongrunningOperation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleLongrunningOperation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningOperation(od);
});
});
unittest.group('obj-schema-GoogleProtobufEmpty', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleProtobufEmpty();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleProtobufEmpty.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleProtobufEmpty(od);
});
});
unittest.group('obj-schema-GoogleRpcStatus', () {
unittest.test('to-json--from-json', () async {
final o = buildGoogleRpcStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GoogleRpcStatus.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGoogleRpcStatus(od);
});
});
unittest.group('resource-HashesResource', () {
unittest.test('method--search', () async {
final mock = HttpServerMock();
final res = api.WebRiskApi(mock).hashes;
final arg_hashPrefix = 'foo';
final arg_threatTypes = buildUnnamed10();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 16),
unittest.equals('v1/hashes:search'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['hashPrefix']!.first,
unittest.equals(arg_hashPrefix),
);
unittest.expect(
queryMap['threatTypes']!,
unittest.equals(arg_threatTypes),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildGoogleCloudWebriskV1SearchHashesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.search(
hashPrefix: arg_hashPrefix,
threatTypes: arg_threatTypes,
$fields: arg_$fields);
checkGoogleCloudWebriskV1SearchHashesResponse(
response as api.GoogleCloudWebriskV1SearchHashesResponse);
});
});
unittest.group('resource-ProjectsOperationsResource', () {
unittest.test('method--cancel', () async {
final mock = HttpServerMock();
final res = api.WebRiskApi(mock).projects.operations;
final arg_request = buildGoogleLongrunningCancelOperationRequest();
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleLongrunningCancelOperationRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleLongrunningCancelOperationRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleProtobufEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.cancel(arg_request, arg_name, $fields: arg_$fields);
checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty);
});
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.WebRiskApi(mock).projects.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleProtobufEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(arg_name, $fields: arg_$fields);
checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.WebRiskApi(mock).projects.operations;
final arg_name = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleLongrunningOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_name, $fields: arg_$fields);
checkGoogleLongrunningOperation(
response as api.GoogleLongrunningOperation);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.WebRiskApi(mock).projects.operations;
final arg_name = 'foo';
final arg_filter = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleLongrunningListOperationsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_name,
filter: arg_filter,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkGoogleLongrunningListOperationsResponse(
response as api.GoogleLongrunningListOperationsResponse);
});
});
unittest.group('resource-ProjectsSubmissionsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.WebRiskApi(mock).projects.submissions;
final arg_request = buildGoogleCloudWebriskV1Submission();
final arg_parent = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GoogleCloudWebriskV1Submission.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGoogleCloudWebriskV1Submission(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 3),
unittest.equals('v1/'),
);
pathOffset += 3;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGoogleCloudWebriskV1Submission());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.create(arg_request, arg_parent, $fields: arg_$fields);
checkGoogleCloudWebriskV1Submission(
response as api.GoogleCloudWebriskV1Submission);
});
});
unittest.group('resource-ThreatListsResource', () {
unittest.test('method--computeDiff', () async {
final mock = HttpServerMock();
final res = api.WebRiskApi(mock).threatLists;
final arg_constraints_maxDatabaseEntries = 42;
final arg_constraints_maxDiffEntries = 42;
final arg_constraints_supportedCompressions = buildUnnamed11();
final arg_threatType = 'foo';
final arg_versionToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 26),
unittest.equals('v1/threatLists:computeDiff'),
);
pathOffset += 26;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
core.int.parse(queryMap['constraints.maxDatabaseEntries']!.first),
unittest.equals(arg_constraints_maxDatabaseEntries),
);
unittest.expect(
core.int.parse(queryMap['constraints.maxDiffEntries']!.first),
unittest.equals(arg_constraints_maxDiffEntries),
);
unittest.expect(
queryMap['constraints.supportedCompressions']!,
unittest.equals(arg_constraints_supportedCompressions),
);
unittest.expect(
queryMap['threatType']!.first,
unittest.equals(arg_threatType),
);
unittest.expect(
queryMap['versionToken']!.first,
unittest.equals(arg_versionToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json
.encode(buildGoogleCloudWebriskV1ComputeThreatListDiffResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.computeDiff(
constraints_maxDatabaseEntries: arg_constraints_maxDatabaseEntries,
constraints_maxDiffEntries: arg_constraints_maxDiffEntries,
constraints_supportedCompressions:
arg_constraints_supportedCompressions,
threatType: arg_threatType,
versionToken: arg_versionToken,
$fields: arg_$fields);
checkGoogleCloudWebriskV1ComputeThreatListDiffResponse(
response as api.GoogleCloudWebriskV1ComputeThreatListDiffResponse);
});
});
unittest.group('resource-UrisResource', () {
unittest.test('method--search', () async {
final mock = HttpServerMock();
final res = api.WebRiskApi(mock).uris;
final arg_threatTypes = buildUnnamed12();
final arg_uri = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 14),
unittest.equals('v1/uris:search'),
);
pathOffset += 14;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['threatTypes']!,
unittest.equals(arg_threatTypes),
);
unittest.expect(
queryMap['uri']!.first,
unittest.equals(arg_uri),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildGoogleCloudWebriskV1SearchUrisResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.search(
threatTypes: arg_threatTypes, uri: arg_uri, $fields: arg_$fields);
checkGoogleCloudWebriskV1SearchUrisResponse(
response as api.GoogleCloudWebriskV1SearchUrisResponse);
});
});
}
| googleapis.dart/generated/googleapis/test/webrisk/v1_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis/test/webrisk/v1_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 20443} |
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// 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
/// Area120 Tables API - v1alpha1
///
/// For more information, see
/// <https://support.google.com/area120-tables/answer/10011390>
///
/// Create an instance of [Area120TablesApi] to access these resources:
///
/// - [TablesResource]
/// - [TablesRowsResource]
/// - [WorkspacesResource]
library area120tables_v1alpha1;
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
import '../shared.dart';
import '../src/user_agent.dart';
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
class Area120TablesApi {
/// See, edit, create, and delete all of your Google Drive files
static const driveScope = 'https://www.googleapis.com/auth/drive';
/// See, edit, create, and delete only the specific Google Drive files you use
/// with this app
static const driveFileScope = 'https://www.googleapis.com/auth/drive.file';
/// See and download all your Google Drive files
static const driveReadonlyScope =
'https://www.googleapis.com/auth/drive.readonly';
/// See, edit, create, and delete all your Google Sheets spreadsheets
static const spreadsheetsScope =
'https://www.googleapis.com/auth/spreadsheets';
/// See all your Google Sheets spreadsheets
static const spreadsheetsReadonlyScope =
'https://www.googleapis.com/auth/spreadsheets.readonly';
/// See, edit, create, and delete your tables in Tables by Area 120
static const tablesScope = 'https://www.googleapis.com/auth/tables';
final commons.ApiRequester _requester;
TablesResource get tables => TablesResource(_requester);
WorkspacesResource get workspaces => WorkspacesResource(_requester);
Area120TablesApi(http.Client client,
{core.String rootUrl = 'https://area120tables.googleapis.com/',
core.String servicePath = ''})
: _requester =
commons.ApiRequester(client, rootUrl, servicePath, requestHeaders);
}
class TablesResource {
final commons.ApiRequester _requester;
TablesRowsResource get rows => TablesRowsResource(_requester);
TablesResource(commons.ApiRequester client) : _requester = client;
/// Gets a table.
///
/// Returns NOT_FOUND if the table does not exist.
///
/// Request parameters:
///
/// [name] - Required. The name of the table to retrieve. Format:
/// tables/{table}
/// Value must have pattern `^tables/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Table].
///
/// 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<Table> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1alpha1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Table.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists tables for the user.
///
/// Request parameters:
///
/// [orderBy] - Optional. Sorting order for the list of tables on
/// createTime/updateTime.
///
/// [pageSize] - The maximum number of tables to return. The service may
/// return fewer than this value. If unspecified, at most 20 tables are
/// returned. The maximum value is 100; values above 100 are coerced to 100.
///
/// [pageToken] - A page token, received from a previous `ListTables` call.
/// Provide this to retrieve the subsequent page. When paginating, all other
/// parameters provided to `ListTables` must match the call that provided the
/// page token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListTablesResponse].
///
/// 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<ListTablesResponse> list({
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (orderBy != null) 'orderBy': [orderBy],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1alpha1/tables';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListTablesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
class TablesRowsResource {
final commons.ApiRequester _requester;
TablesRowsResource(commons.ApiRequester client) : _requester = client;
/// Creates multiple rows.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent table where the rows will be created.
/// Format: tables/{table}
/// Value must have pattern `^tables/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [BatchCreateRowsResponse].
///
/// 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<BatchCreateRowsResponse> batchCreate(
BatchCreateRowsRequest request,
core.String parent, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ =
'v1alpha1/' + core.Uri.encodeFull('$parent') + '/rows:batchCreate';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return BatchCreateRowsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes multiple rows.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent table shared by all rows being deleted.
/// Format: tables/{table}
/// Value must have pattern `^tables/\[^/\]+$`.
///
/// [$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> batchDelete(
BatchDeleteRowsRequest request,
core.String parent, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ =
'v1alpha1/' + core.Uri.encodeFull('$parent') + '/rows:batchDelete';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Updates multiple rows.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent table shared by all rows being updated.
/// Format: tables/{table}
/// Value must have pattern `^tables/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [BatchUpdateRowsResponse].
///
/// 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<BatchUpdateRowsResponse> batchUpdate(
BatchUpdateRowsRequest request,
core.String parent, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ =
'v1alpha1/' + core.Uri.encodeFull('$parent') + '/rows:batchUpdate';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return BatchUpdateRowsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Creates a row.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The parent table where this row will be created.
/// Format: tables/{table}
/// Value must have pattern `^tables/\[^/\]+$`.
///
/// [view] - Optional. Column key to use for values in the row. Defaults to
/// user entered name.
/// Possible string values are:
/// - "VIEW_UNSPECIFIED" : Defaults to user entered text.
/// - "COLUMN_ID_VIEW" : Uses internally generated column id to identify
/// values.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Row].
///
/// 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<Row> create(
Row request,
core.String parent, {
core.String? view,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1alpha1/' + core.Uri.encodeFull('$parent') + '/rows';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Row.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a row.
///
/// Request parameters:
///
/// [name] - Required. The name of the row to delete. Format:
/// tables/{table}/rows/{row}
/// Value must have pattern `^tables/\[^/\]+/rows/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1alpha1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets a row.
///
/// Returns NOT_FOUND if the row does not exist in the table.
///
/// Request parameters:
///
/// [name] - Required. The name of the row to retrieve. Format:
/// tables/{table}/rows/{row}
/// Value must have pattern `^tables/\[^/\]+/rows/\[^/\]+$`.
///
/// [view] - Optional. Column key to use for values in the row. Defaults to
/// user entered name.
/// Possible string values are:
/// - "VIEW_UNSPECIFIED" : Defaults to user entered text.
/// - "COLUMN_ID_VIEW" : Uses internally generated column id to identify
/// values.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Row].
///
/// 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<Row> get(
core.String name, {
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1alpha1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Row.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists rows in a table.
///
/// Returns NOT_FOUND if the table does not exist.
///
/// Request parameters:
///
/// [parent] - Required. The parent table. Format: tables/{table}
/// Value must have pattern `^tables/\[^/\]+$`.
///
/// [filter] - Optional. Filter to only include resources matching the
/// requirements. For more information, see
/// [Filtering list results](https://support.google.com/area120-tables/answer/10503371).
///
/// [orderBy] - Optional. Sorting order for the list of rows on
/// createTime/updateTime.
///
/// [pageSize] - The maximum number of rows to return. The service may return
/// fewer than this value. If unspecified, at most 50 rows are returned. The
/// maximum value is 1,000; values above 1,000 are coerced to 1,000.
///
/// [pageToken] - A page token, received from a previous `ListRows` call.
/// Provide this to retrieve the subsequent page. When paginating, all other
/// parameters provided to `ListRows` must match the call that provided the
/// page token.
///
/// [view] - Optional. Column key to use for values in the row. Defaults to
/// user entered name.
/// Possible string values are:
/// - "VIEW_UNSPECIFIED" : Defaults to user entered text.
/// - "COLUMN_ID_VIEW" : Uses internally generated column id to identify
/// values.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListRowsResponse].
///
/// 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<ListRowsResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (orderBy != null) 'orderBy': [orderBy],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1alpha1/' + core.Uri.encodeFull('$parent') + '/rows';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListRowsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
/// Updates a row.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - The resource name of the row. Row names have the form
/// `tables/{table}/rows/{row}`. The name is ignored when creating a row.
/// Value must have pattern `^tables/\[^/\]+/rows/\[^/\]+$`.
///
/// [updateMask] - The list of fields to update.
///
/// [view] - Optional. Column key to use for values in the row. Defaults to
/// user entered name.
/// Possible string values are:
/// - "VIEW_UNSPECIFIED" : Defaults to user entered text.
/// - "COLUMN_ID_VIEW" : Uses internally generated column id to identify
/// values.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Row].
///
/// 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<Row> patch(
Row request,
core.String name, {
core.String? updateMask,
core.String? view,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (updateMask != null) 'updateMask': [updateMask],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1alpha1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Row.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class WorkspacesResource {
final commons.ApiRequester _requester;
WorkspacesResource(commons.ApiRequester client) : _requester = client;
/// Gets a workspace.
///
/// Returns NOT_FOUND if the workspace does not exist.
///
/// Request parameters:
///
/// [name] - Required. The name of the workspace to retrieve. Format:
/// workspaces/{workspace}
/// Value must have pattern `^workspaces/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Workspace].
///
/// 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<Workspace> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1alpha1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Workspace.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists workspaces for the user.
///
/// Request parameters:
///
/// [pageSize] - The maximum number of workspaces to return. The service may
/// return fewer than this value. If unspecified, at most 10 workspaces are
/// returned. The maximum value is 25; values above 25 are coerced to 25.
///
/// [pageToken] - A page token, received from a previous `ListWorkspaces`
/// call. Provide this to retrieve the subsequent page. When paginating, all
/// other parameters provided to `ListWorkspaces` must match the call that
/// provided the page token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListWorkspacesResponse].
///
/// 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<ListWorkspacesResponse> list({
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1alpha1/workspaces';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListWorkspacesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}
}
/// Request message for TablesService.BatchCreateRows.
class BatchCreateRowsRequest {
/// The request message specifying the rows to create.
///
/// A maximum of 500 rows can be created in a single batch.
///
/// Required.
core.List<CreateRowRequest>? requests;
BatchCreateRowsRequest({
this.requests,
});
BatchCreateRowsRequest.fromJson(core.Map json_)
: this(
requests: json_.containsKey('requests')
? (json_['requests'] as core.List)
.map((value) => CreateRowRequest.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (requests != null) 'requests': requests!,
};
}
/// Response message for TablesService.BatchCreateRows.
class BatchCreateRowsResponse {
/// The created rows.
core.List<Row>? rows;
BatchCreateRowsResponse({
this.rows,
});
BatchCreateRowsResponse.fromJson(core.Map json_)
: this(
rows: json_.containsKey('rows')
? (json_['rows'] as core.List)
.map((value) => Row.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (rows != null) 'rows': rows!,
};
}
/// Request message for TablesService.BatchDeleteRows
class BatchDeleteRowsRequest {
/// The names of the rows to delete.
///
/// All rows must belong to the parent table or else the entire batch will
/// fail. A maximum of 500 rows can be deleted in a batch. Format:
/// tables/{table}/rows/{row}
///
/// Required.
core.List<core.String>? names;
BatchDeleteRowsRequest({
this.names,
});
BatchDeleteRowsRequest.fromJson(core.Map json_)
: this(
names: json_.containsKey('names')
? (json_['names'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (names != null) 'names': names!,
};
}
/// Request message for TablesService.BatchUpdateRows.
class BatchUpdateRowsRequest {
/// The request messages specifying the rows to update.
///
/// A maximum of 500 rows can be modified in a single batch.
///
/// Required.
core.List<UpdateRowRequest>? requests;
BatchUpdateRowsRequest({
this.requests,
});
BatchUpdateRowsRequest.fromJson(core.Map json_)
: this(
requests: json_.containsKey('requests')
? (json_['requests'] as core.List)
.map((value) => UpdateRowRequest.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (requests != null) 'requests': requests!,
};
}
/// Response message for TablesService.BatchUpdateRows.
class BatchUpdateRowsResponse {
/// The updated rows.
core.List<Row>? rows;
BatchUpdateRowsResponse({
this.rows,
});
BatchUpdateRowsResponse.fromJson(core.Map json_)
: this(
rows: json_.containsKey('rows')
? (json_['rows'] as core.List)
.map((value) => Row.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (rows != null) 'rows': rows!,
};
}
/// Details on a column in the table.
class ColumnDescription {
/// Data type of the column Supported types are auto_id, boolean,
/// boolean_list, creator, create_timestamp, date, dropdown, location,
/// integer, integer_list, number, number_list, person, person_list, tags,
/// check_list, text, text_list, update_timestamp, updater, relationship,
/// file_attachment_list.
///
/// These types directly map to the column types supported on Tables website.
core.String? dataType;
/// Additional details about a date column.
///
/// Optional.
DateDetails? dateDetails;
/// Internal id for a column.
core.String? id;
/// Range of labeled values for the column.
///
/// Some columns like tags and drop-downs limit the values to a set of
/// possible values. We return the range of values in such cases to help
/// clients implement better user data validation.
///
/// Optional.
core.List<LabeledItem>? labels;
/// Indicates that this is a lookup column whose value is derived from the
/// relationship column specified in the details.
///
/// Lookup columns can not be updated directly. To change the value you must
/// update the associated relationship column.
///
/// Optional.
LookupDetails? lookupDetails;
/// Indicates whether or not multiple values are allowed for array types where
/// such a restriction is possible.
///
/// Optional.
core.bool? multipleValuesDisallowed;
/// column name
core.String? name;
/// Indicates that values for the column cannot be set by the user.
///
/// Optional.
core.bool? readonly;
/// Additional details about a relationship column.
///
/// Specified when data_type is relationship.
///
/// Optional.
RelationshipDetails? relationshipDetails;
ColumnDescription({
this.dataType,
this.dateDetails,
this.id,
this.labels,
this.lookupDetails,
this.multipleValuesDisallowed,
this.name,
this.readonly,
this.relationshipDetails,
});
ColumnDescription.fromJson(core.Map json_)
: this(
dataType: json_.containsKey('dataType')
? json_['dataType'] as core.String
: null,
dateDetails: json_.containsKey('dateDetails')
? DateDetails.fromJson(
json_['dateDetails'] as core.Map<core.String, core.dynamic>)
: null,
id: json_.containsKey('id') ? json_['id'] as core.String : null,
labels: json_.containsKey('labels')
? (json_['labels'] as core.List)
.map((value) => LabeledItem.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
lookupDetails: json_.containsKey('lookupDetails')
? LookupDetails.fromJson(
json_['lookupDetails'] as core.Map<core.String, core.dynamic>)
: null,
multipleValuesDisallowed:
json_.containsKey('multipleValuesDisallowed')
? json_['multipleValuesDisallowed'] as core.bool
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
readonly: json_.containsKey('readonly')
? json_['readonly'] as core.bool
: null,
relationshipDetails: json_.containsKey('relationshipDetails')
? RelationshipDetails.fromJson(json_['relationshipDetails']
as core.Map<core.String, core.dynamic>)
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (dataType != null) 'dataType': dataType!,
if (dateDetails != null) 'dateDetails': dateDetails!,
if (id != null) 'id': id!,
if (labels != null) 'labels': labels!,
if (lookupDetails != null) 'lookupDetails': lookupDetails!,
if (multipleValuesDisallowed != null)
'multipleValuesDisallowed': multipleValuesDisallowed!,
if (name != null) 'name': name!,
if (readonly != null) 'readonly': readonly!,
if (relationshipDetails != null)
'relationshipDetails': relationshipDetails!,
};
}
/// Request message for TablesService.CreateRow.
class CreateRowRequest {
/// The parent table where this row will be created.
///
/// Format: tables/{table}
///
/// Required.
core.String? parent;
/// The row to create.
///
/// Required.
Row? row;
/// Column key to use for values in the row.
///
/// Defaults to user entered name.
///
/// Optional.
/// Possible string values are:
/// - "VIEW_UNSPECIFIED" : Defaults to user entered text.
/// - "COLUMN_ID_VIEW" : Uses internally generated column id to identify
/// values.
core.String? view;
CreateRowRequest({
this.parent,
this.row,
this.view,
});
CreateRowRequest.fromJson(core.Map json_)
: this(
parent: json_.containsKey('parent')
? json_['parent'] as core.String
: null,
row: json_.containsKey('row')
? Row.fromJson(
json_['row'] as core.Map<core.String, core.dynamic>)
: null,
view: json_.containsKey('view') ? json_['view'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (parent != null) 'parent': parent!,
if (row != null) 'row': row!,
if (view != null) 'view': view!,
};
}
/// Details about a date column.
class DateDetails {
/// Whether the date column includes time.
core.bool? hasTime;
DateDetails({
this.hasTime,
});
DateDetails.fromJson(core.Map json_)
: this(
hasTime: json_.containsKey('hasTime')
? json_['hasTime'] as core.bool
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (hasTime != null) 'hasTime': hasTime!,
};
}
/// A generic empty message that you can re-use to avoid defining duplicated
/// empty messages in your APIs.
///
/// A typical example is to use it as the request or the response type of an API
/// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns
/// (google.protobuf.Empty); }
typedef Empty = $Empty;
/// A single item in a labeled column.
class LabeledItem {
/// Internal id associated with the item.
core.String? id;
/// Display string as entered by user.
core.String? name;
LabeledItem({
this.id,
this.name,
});
LabeledItem.fromJson(core.Map json_)
: this(
id: json_.containsKey('id') ? json_['id'] as core.String : null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (id != null) 'id': id!,
if (name != null) 'name': name!,
};
}
/// Response message for TablesService.ListRows.
class ListRowsResponse {
/// A token, which can be sent as `page_token` to retrieve the next page.
///
/// If this field is empty, there are no subsequent pages.
core.String? nextPageToken;
/// The rows from the specified table.
core.List<Row>? rows;
ListRowsResponse({
this.nextPageToken,
this.rows,
});
ListRowsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
rows: json_.containsKey('rows')
? (json_['rows'] as core.List)
.map((value) => Row.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
if (rows != null) 'rows': rows!,
};
}
/// Response message for TablesService.ListTables.
class ListTablesResponse {
/// A token, which can be sent as `page_token` to retrieve the next page.
///
/// If this field is empty, there are no subsequent pages.
core.String? nextPageToken;
/// The list of tables.
core.List<Table>? tables;
ListTablesResponse({
this.nextPageToken,
this.tables,
});
ListTablesResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
tables: json_.containsKey('tables')
? (json_['tables'] as core.List)
.map((value) => Table.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
if (tables != null) 'tables': tables!,
};
}
/// Response message for TablesService.ListWorkspaces.
class ListWorkspacesResponse {
/// A token, which can be sent as `page_token` to retrieve the next page.
///
/// If this field is empty, there are no subsequent pages.
core.String? nextPageToken;
/// The list of workspaces.
core.List<Workspace>? workspaces;
ListWorkspacesResponse({
this.nextPageToken,
this.workspaces,
});
ListWorkspacesResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_.containsKey('nextPageToken')
? json_['nextPageToken'] as core.String
: null,
workspaces: json_.containsKey('workspaces')
? (json_['workspaces'] as core.List)
.map((value) => Workspace.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (nextPageToken != null) 'nextPageToken': nextPageToken!,
if (workspaces != null) 'workspaces': workspaces!,
};
}
/// Details about a lookup column whose value comes from the associated
/// relationship.
class LookupDetails {
/// The name of the relationship column associated with the lookup.
core.String? relationshipColumn;
/// The id of the relationship column.
core.String? relationshipColumnId;
LookupDetails({
this.relationshipColumn,
this.relationshipColumnId,
});
LookupDetails.fromJson(core.Map json_)
: this(
relationshipColumn: json_.containsKey('relationshipColumn')
? json_['relationshipColumn'] as core.String
: null,
relationshipColumnId: json_.containsKey('relationshipColumnId')
? json_['relationshipColumnId'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (relationshipColumn != null)
'relationshipColumn': relationshipColumn!,
if (relationshipColumnId != null)
'relationshipColumnId': relationshipColumnId!,
};
}
/// Details about a relationship column.
class RelationshipDetails {
/// The name of the table this relationship is linked to.
core.String? linkedTable;
RelationshipDetails({
this.linkedTable,
});
RelationshipDetails.fromJson(core.Map json_)
: this(
linkedTable: json_.containsKey('linkedTable')
? json_['linkedTable'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (linkedTable != null) 'linkedTable': linkedTable!,
};
}
/// A single row in a table.
class Row {
/// Time when the row was created.
core.String? createTime;
/// The resource name of the row.
///
/// Row names have the form `tables/{table}/rows/{row}`. The name is ignored
/// when creating a row.
core.String? name;
/// Time when the row was last updated.
core.String? updateTime;
/// The values of the row.
///
/// This is a map of column key to value. Key is user entered name(default) or
/// the internal column id based on the view in the request.
///
/// 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?>? values;
Row({
this.createTime,
this.name,
this.updateTime,
this.values,
});
Row.fromJson(core.Map json_)
: this(
createTime: json_.containsKey('createTime')
? json_['createTime'] as core.String
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
updateTime: json_.containsKey('updateTime')
? json_['updateTime'] as core.String
: null,
values: json_.containsKey('values')
? json_['values'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (createTime != null) 'createTime': createTime!,
if (name != null) 'name': name!,
if (updateTime != null) 'updateTime': updateTime!,
if (values != null) 'values': values!,
};
}
/// A saved view of a table.
///
/// NextId: 3
class SavedView {
/// Internal id associated with the saved view.
core.String? id;
/// Display name of the saved view.
core.String? name;
SavedView({
this.id,
this.name,
});
SavedView.fromJson(core.Map json_)
: this(
id: json_.containsKey('id') ? json_['id'] as core.String : null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (id != null) 'id': id!,
if (name != null) 'name': name!,
};
}
/// A single table.
///
/// NextId: 8
class Table {
/// List of columns in this table.
///
/// Order of columns matches the display order.
core.List<ColumnDescription>? columns;
/// Time when the table was created.
core.String? createTime;
/// The human readable title of the table.
core.String? displayName;
/// The resource name of the table.
///
/// Table names have the form `tables/{table}`.
core.String? name;
/// Saved views for this table.
core.List<SavedView>? savedViews;
/// The time zone of the table.
///
/// IANA Time Zone Database time zone, e.g. "America/New_York".
core.String? timeZone;
/// Time when the table was last updated excluding updates to individual rows
core.String? updateTime;
Table({
this.columns,
this.createTime,
this.displayName,
this.name,
this.savedViews,
this.timeZone,
this.updateTime,
});
Table.fromJson(core.Map json_)
: this(
columns: json_.containsKey('columns')
? (json_['columns'] as core.List)
.map((value) => ColumnDescription.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
createTime: json_.containsKey('createTime')
? json_['createTime'] as core.String
: null,
displayName: json_.containsKey('displayName')
? json_['displayName'] as core.String
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
savedViews: json_.containsKey('savedViews')
? (json_['savedViews'] as core.List)
.map((value) => SavedView.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
timeZone: json_.containsKey('timeZone')
? json_['timeZone'] as core.String
: null,
updateTime: json_.containsKey('updateTime')
? json_['updateTime'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (columns != null) 'columns': columns!,
if (createTime != null) 'createTime': createTime!,
if (displayName != null) 'displayName': displayName!,
if (name != null) 'name': name!,
if (savedViews != null) 'savedViews': savedViews!,
if (timeZone != null) 'timeZone': timeZone!,
if (updateTime != null) 'updateTime': updateTime!,
};
}
/// Request message for TablesService.UpdateRow.
class UpdateRowRequest {
/// The row to update.
///
/// Required.
Row? row;
/// The list of fields to update.
core.String? updateMask;
/// Column key to use for values in the row.
///
/// Defaults to user entered name.
///
/// Optional.
/// Possible string values are:
/// - "VIEW_UNSPECIFIED" : Defaults to user entered text.
/// - "COLUMN_ID_VIEW" : Uses internally generated column id to identify
/// values.
core.String? view;
UpdateRowRequest({
this.row,
this.updateMask,
this.view,
});
UpdateRowRequest.fromJson(core.Map json_)
: this(
row: json_.containsKey('row')
? Row.fromJson(
json_['row'] as core.Map<core.String, core.dynamic>)
: null,
updateMask: json_.containsKey('updateMask')
? json_['updateMask'] as core.String
: null,
view: json_.containsKey('view') ? json_['view'] as core.String : null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (row != null) 'row': row!,
if (updateMask != null) 'updateMask': updateMask!,
if (view != null) 'view': view!,
};
}
/// A single workspace.
class Workspace {
/// Time when the workspace was created.
core.String? createTime;
/// The human readable title of the workspace.
core.String? displayName;
/// The resource name of the workspace.
///
/// Workspace names have the form `workspaces/{workspace}`.
core.String? name;
/// The list of tables in the workspace.
core.List<Table>? tables;
/// Time when the workspace was last updated.
core.String? updateTime;
Workspace({
this.createTime,
this.displayName,
this.name,
this.tables,
this.updateTime,
});
Workspace.fromJson(core.Map json_)
: this(
createTime: json_.containsKey('createTime')
? json_['createTime'] as core.String
: null,
displayName: json_.containsKey('displayName')
? json_['displayName'] as core.String
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
tables: json_.containsKey('tables')
? (json_['tables'] as core.List)
.map((value) => Table.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
updateTime: json_.containsKey('updateTime')
? json_['updateTime'] as core.String
: null,
);
core.Map<core.String, core.dynamic> toJson() => {
if (createTime != null) 'createTime': createTime!,
if (displayName != null) 'displayName': displayName!,
if (name != null) 'name': name!,
if (tables != null) 'tables': tables!,
if (updateTime != null) 'updateTime': updateTime!,
};
}
| googleapis.dart/generated/googleapis_beta/lib/area120tables/v1alpha1.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis_beta/lib/area120tables/v1alpha1.dart', 'repo_id': 'googleapis.dart', 'token_count': 16590} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis_beta/dataflow/v1b3.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterApproximateProgress = 0;
api.ApproximateProgress buildApproximateProgress() {
final o = api.ApproximateProgress();
buildCounterApproximateProgress++;
if (buildCounterApproximateProgress < 3) {
o.percentComplete = 42.0;
o.position = buildPosition();
o.remainingTime = 'foo';
}
buildCounterApproximateProgress--;
return o;
}
void checkApproximateProgress(api.ApproximateProgress o) {
buildCounterApproximateProgress++;
if (buildCounterApproximateProgress < 3) {
unittest.expect(
o.percentComplete!,
unittest.equals(42.0),
);
checkPosition(o.position!);
unittest.expect(
o.remainingTime!,
unittest.equals('foo'),
);
}
buildCounterApproximateProgress--;
}
core.int buildCounterApproximateReportedProgress = 0;
api.ApproximateReportedProgress buildApproximateReportedProgress() {
final o = api.ApproximateReportedProgress();
buildCounterApproximateReportedProgress++;
if (buildCounterApproximateReportedProgress < 3) {
o.consumedParallelism = buildReportedParallelism();
o.fractionConsumed = 42.0;
o.position = buildPosition();
o.remainingParallelism = buildReportedParallelism();
}
buildCounterApproximateReportedProgress--;
return o;
}
void checkApproximateReportedProgress(api.ApproximateReportedProgress o) {
buildCounterApproximateReportedProgress++;
if (buildCounterApproximateReportedProgress < 3) {
checkReportedParallelism(o.consumedParallelism!);
unittest.expect(
o.fractionConsumed!,
unittest.equals(42.0),
);
checkPosition(o.position!);
checkReportedParallelism(o.remainingParallelism!);
}
buildCounterApproximateReportedProgress--;
}
core.int buildCounterApproximateSplitRequest = 0;
api.ApproximateSplitRequest buildApproximateSplitRequest() {
final o = api.ApproximateSplitRequest();
buildCounterApproximateSplitRequest++;
if (buildCounterApproximateSplitRequest < 3) {
o.fractionConsumed = 42.0;
o.fractionOfRemainder = 42.0;
o.position = buildPosition();
}
buildCounterApproximateSplitRequest--;
return o;
}
void checkApproximateSplitRequest(api.ApproximateSplitRequest o) {
buildCounterApproximateSplitRequest++;
if (buildCounterApproximateSplitRequest < 3) {
unittest.expect(
o.fractionConsumed!,
unittest.equals(42.0),
);
unittest.expect(
o.fractionOfRemainder!,
unittest.equals(42.0),
);
checkPosition(o.position!);
}
buildCounterApproximateSplitRequest--;
}
core.int buildCounterAutoscalingEvent = 0;
api.AutoscalingEvent buildAutoscalingEvent() {
final o = api.AutoscalingEvent();
buildCounterAutoscalingEvent++;
if (buildCounterAutoscalingEvent < 3) {
o.currentNumWorkers = 'foo';
o.description = buildStructuredMessage();
o.eventType = 'foo';
o.targetNumWorkers = 'foo';
o.time = 'foo';
o.workerPool = 'foo';
}
buildCounterAutoscalingEvent--;
return o;
}
void checkAutoscalingEvent(api.AutoscalingEvent o) {
buildCounterAutoscalingEvent++;
if (buildCounterAutoscalingEvent < 3) {
unittest.expect(
o.currentNumWorkers!,
unittest.equals('foo'),
);
checkStructuredMessage(o.description!);
unittest.expect(
o.eventType!,
unittest.equals('foo'),
);
unittest.expect(
o.targetNumWorkers!,
unittest.equals('foo'),
);
unittest.expect(
o.time!,
unittest.equals('foo'),
);
unittest.expect(
o.workerPool!,
unittest.equals('foo'),
);
}
buildCounterAutoscalingEvent--;
}
core.int buildCounterAutoscalingSettings = 0;
api.AutoscalingSettings buildAutoscalingSettings() {
final o = api.AutoscalingSettings();
buildCounterAutoscalingSettings++;
if (buildCounterAutoscalingSettings < 3) {
o.algorithm = 'foo';
o.maxNumWorkers = 42;
}
buildCounterAutoscalingSettings--;
return o;
}
void checkAutoscalingSettings(api.AutoscalingSettings o) {
buildCounterAutoscalingSettings++;
if (buildCounterAutoscalingSettings < 3) {
unittest.expect(
o.algorithm!,
unittest.equals('foo'),
);
unittest.expect(
o.maxNumWorkers!,
unittest.equals(42),
);
}
buildCounterAutoscalingSettings--;
}
core.int buildCounterBigQueryIODetails = 0;
api.BigQueryIODetails buildBigQueryIODetails() {
final o = api.BigQueryIODetails();
buildCounterBigQueryIODetails++;
if (buildCounterBigQueryIODetails < 3) {
o.dataset = 'foo';
o.projectId = 'foo';
o.query = 'foo';
o.table = 'foo';
}
buildCounterBigQueryIODetails--;
return o;
}
void checkBigQueryIODetails(api.BigQueryIODetails o) {
buildCounterBigQueryIODetails++;
if (buildCounterBigQueryIODetails < 3) {
unittest.expect(
o.dataset!,
unittest.equals('foo'),
);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
unittest.expect(
o.query!,
unittest.equals('foo'),
);
unittest.expect(
o.table!,
unittest.equals('foo'),
);
}
buildCounterBigQueryIODetails--;
}
core.int buildCounterBigTableIODetails = 0;
api.BigTableIODetails buildBigTableIODetails() {
final o = api.BigTableIODetails();
buildCounterBigTableIODetails++;
if (buildCounterBigTableIODetails < 3) {
o.instanceId = 'foo';
o.projectId = 'foo';
o.tableId = 'foo';
}
buildCounterBigTableIODetails--;
return o;
}
void checkBigTableIODetails(api.BigTableIODetails o) {
buildCounterBigTableIODetails++;
if (buildCounterBigTableIODetails < 3) {
unittest.expect(
o.instanceId!,
unittest.equals('foo'),
);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
unittest.expect(
o.tableId!,
unittest.equals('foo'),
);
}
buildCounterBigTableIODetails--;
}
core.int buildCounterCPUTime = 0;
api.CPUTime buildCPUTime() {
final o = api.CPUTime();
buildCounterCPUTime++;
if (buildCounterCPUTime < 3) {
o.rate = 42.0;
o.timestamp = 'foo';
o.totalMs = 'foo';
}
buildCounterCPUTime--;
return o;
}
void checkCPUTime(api.CPUTime o) {
buildCounterCPUTime++;
if (buildCounterCPUTime < 3) {
unittest.expect(
o.rate!,
unittest.equals(42.0),
);
unittest.expect(
o.timestamp!,
unittest.equals('foo'),
);
unittest.expect(
o.totalMs!,
unittest.equals('foo'),
);
}
buildCounterCPUTime--;
}
core.int buildCounterComponentSource = 0;
api.ComponentSource buildComponentSource() {
final o = api.ComponentSource();
buildCounterComponentSource++;
if (buildCounterComponentSource < 3) {
o.name = 'foo';
o.originalTransformOrCollection = 'foo';
o.userName = 'foo';
}
buildCounterComponentSource--;
return o;
}
void checkComponentSource(api.ComponentSource o) {
buildCounterComponentSource++;
if (buildCounterComponentSource < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.originalTransformOrCollection!,
unittest.equals('foo'),
);
unittest.expect(
o.userName!,
unittest.equals('foo'),
);
}
buildCounterComponentSource--;
}
core.int buildCounterComponentTransform = 0;
api.ComponentTransform buildComponentTransform() {
final o = api.ComponentTransform();
buildCounterComponentTransform++;
if (buildCounterComponentTransform < 3) {
o.name = 'foo';
o.originalTransform = 'foo';
o.userName = 'foo';
}
buildCounterComponentTransform--;
return o;
}
void checkComponentTransform(api.ComponentTransform o) {
buildCounterComponentTransform++;
if (buildCounterComponentTransform < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.originalTransform!,
unittest.equals('foo'),
);
unittest.expect(
o.userName!,
unittest.equals('foo'),
);
}
buildCounterComponentTransform--;
}
core.List<api.StreamLocation> buildUnnamed0() => [
buildStreamLocation(),
buildStreamLocation(),
];
void checkUnnamed0(core.List<api.StreamLocation> o) {
unittest.expect(o, unittest.hasLength(2));
checkStreamLocation(o[0]);
checkStreamLocation(o[1]);
}
core.List<api.KeyRangeLocation> buildUnnamed1() => [
buildKeyRangeLocation(),
buildKeyRangeLocation(),
];
void checkUnnamed1(core.List<api.KeyRangeLocation> o) {
unittest.expect(o, unittest.hasLength(2));
checkKeyRangeLocation(o[0]);
checkKeyRangeLocation(o[1]);
}
core.List<api.StreamLocation> buildUnnamed2() => [
buildStreamLocation(),
buildStreamLocation(),
];
void checkUnnamed2(core.List<api.StreamLocation> o) {
unittest.expect(o, unittest.hasLength(2));
checkStreamLocation(o[0]);
checkStreamLocation(o[1]);
}
core.List<api.StateFamilyConfig> buildUnnamed3() => [
buildStateFamilyConfig(),
buildStateFamilyConfig(),
];
void checkUnnamed3(core.List<api.StateFamilyConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkStateFamilyConfig(o[0]);
checkStateFamilyConfig(o[1]);
}
core.int buildCounterComputationTopology = 0;
api.ComputationTopology buildComputationTopology() {
final o = api.ComputationTopology();
buildCounterComputationTopology++;
if (buildCounterComputationTopology < 3) {
o.computationId = 'foo';
o.inputs = buildUnnamed0();
o.keyRanges = buildUnnamed1();
o.outputs = buildUnnamed2();
o.stateFamilies = buildUnnamed3();
o.systemStageName = 'foo';
}
buildCounterComputationTopology--;
return o;
}
void checkComputationTopology(api.ComputationTopology o) {
buildCounterComputationTopology++;
if (buildCounterComputationTopology < 3) {
unittest.expect(
o.computationId!,
unittest.equals('foo'),
);
checkUnnamed0(o.inputs!);
checkUnnamed1(o.keyRanges!);
checkUnnamed2(o.outputs!);
checkUnnamed3(o.stateFamilies!);
unittest.expect(
o.systemStageName!,
unittest.equals('foo'),
);
}
buildCounterComputationTopology--;
}
core.int buildCounterConcatPosition = 0;
api.ConcatPosition buildConcatPosition() {
final o = api.ConcatPosition();
buildCounterConcatPosition++;
if (buildCounterConcatPosition < 3) {
o.index = 42;
o.position = buildPosition();
}
buildCounterConcatPosition--;
return o;
}
void checkConcatPosition(api.ConcatPosition o) {
buildCounterConcatPosition++;
if (buildCounterConcatPosition < 3) {
unittest.expect(
o.index!,
unittest.equals(42),
);
checkPosition(o.position!);
}
buildCounterConcatPosition--;
}
core.int buildCounterContainerSpec = 0;
api.ContainerSpec buildContainerSpec() {
final o = api.ContainerSpec();
buildCounterContainerSpec++;
if (buildCounterContainerSpec < 3) {
o.defaultEnvironment = buildFlexTemplateRuntimeEnvironment();
o.image = 'foo';
o.imageRepositoryCertPath = 'foo';
o.imageRepositoryPasswordSecretId = 'foo';
o.imageRepositoryUsernameSecretId = 'foo';
o.metadata = buildTemplateMetadata();
o.sdkInfo = buildSDKInfo();
}
buildCounterContainerSpec--;
return o;
}
void checkContainerSpec(api.ContainerSpec o) {
buildCounterContainerSpec++;
if (buildCounterContainerSpec < 3) {
checkFlexTemplateRuntimeEnvironment(o.defaultEnvironment!);
unittest.expect(
o.image!,
unittest.equals('foo'),
);
unittest.expect(
o.imageRepositoryCertPath!,
unittest.equals('foo'),
);
unittest.expect(
o.imageRepositoryPasswordSecretId!,
unittest.equals('foo'),
);
unittest.expect(
o.imageRepositoryUsernameSecretId!,
unittest.equals('foo'),
);
checkTemplateMetadata(o.metadata!);
checkSDKInfo(o.sdkInfo!);
}
buildCounterContainerSpec--;
}
core.int buildCounterCounterMetadata = 0;
api.CounterMetadata buildCounterMetadata() {
final o = api.CounterMetadata();
buildCounterCounterMetadata++;
if (buildCounterCounterMetadata < 3) {
o.description = 'foo';
o.kind = 'foo';
o.otherUnits = 'foo';
o.standardUnits = 'foo';
}
buildCounterCounterMetadata--;
return o;
}
void checkCounterMetadata(api.CounterMetadata o) {
buildCounterCounterMetadata++;
if (buildCounterCounterMetadata < 3) {
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.otherUnits!,
unittest.equals('foo'),
);
unittest.expect(
o.standardUnits!,
unittest.equals('foo'),
);
}
buildCounterCounterMetadata--;
}
core.int buildCounterCounterStructuredName = 0;
api.CounterStructuredName buildCounterStructuredName() {
final o = api.CounterStructuredName();
buildCounterCounterStructuredName++;
if (buildCounterCounterStructuredName < 3) {
o.componentStepName = 'foo';
o.executionStepName = 'foo';
o.inputIndex = 42;
o.name = 'foo';
o.origin = 'foo';
o.originNamespace = 'foo';
o.originalRequestingStepName = 'foo';
o.originalStepName = 'foo';
o.portion = 'foo';
o.workerId = 'foo';
}
buildCounterCounterStructuredName--;
return o;
}
void checkCounterStructuredName(api.CounterStructuredName o) {
buildCounterCounterStructuredName++;
if (buildCounterCounterStructuredName < 3) {
unittest.expect(
o.componentStepName!,
unittest.equals('foo'),
);
unittest.expect(
o.executionStepName!,
unittest.equals('foo'),
);
unittest.expect(
o.inputIndex!,
unittest.equals(42),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.origin!,
unittest.equals('foo'),
);
unittest.expect(
o.originNamespace!,
unittest.equals('foo'),
);
unittest.expect(
o.originalRequestingStepName!,
unittest.equals('foo'),
);
unittest.expect(
o.originalStepName!,
unittest.equals('foo'),
);
unittest.expect(
o.portion!,
unittest.equals('foo'),
);
unittest.expect(
o.workerId!,
unittest.equals('foo'),
);
}
buildCounterCounterStructuredName--;
}
core.int buildCounterCounterStructuredNameAndMetadata = 0;
api.CounterStructuredNameAndMetadata buildCounterStructuredNameAndMetadata() {
final o = api.CounterStructuredNameAndMetadata();
buildCounterCounterStructuredNameAndMetadata++;
if (buildCounterCounterStructuredNameAndMetadata < 3) {
o.metadata = buildCounterMetadata();
o.name = buildCounterStructuredName();
}
buildCounterCounterStructuredNameAndMetadata--;
return o;
}
void checkCounterStructuredNameAndMetadata(
api.CounterStructuredNameAndMetadata o) {
buildCounterCounterStructuredNameAndMetadata++;
if (buildCounterCounterStructuredNameAndMetadata < 3) {
checkCounterMetadata(o.metadata!);
checkCounterStructuredName(o.name!);
}
buildCounterCounterStructuredNameAndMetadata--;
}
core.int buildCounterCounterUpdate = 0;
api.CounterUpdate buildCounterUpdate() {
final o = api.CounterUpdate();
buildCounterCounterUpdate++;
if (buildCounterCounterUpdate < 3) {
o.boolean = true;
o.cumulative = true;
o.distribution = buildDistributionUpdate();
o.floatingPoint = 42.0;
o.floatingPointList = buildFloatingPointList();
o.floatingPointMean = buildFloatingPointMean();
o.integer = buildSplitInt64();
o.integerGauge = buildIntegerGauge();
o.integerList = buildIntegerList();
o.integerMean = buildIntegerMean();
o.internal = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o.nameAndKind = buildNameAndKind();
o.shortId = 'foo';
o.stringList = buildStringList();
o.structuredNameAndMetadata = buildCounterStructuredNameAndMetadata();
}
buildCounterCounterUpdate--;
return o;
}
void checkCounterUpdate(api.CounterUpdate o) {
buildCounterCounterUpdate++;
if (buildCounterCounterUpdate < 3) {
unittest.expect(o.boolean!, unittest.isTrue);
unittest.expect(o.cumulative!, unittest.isTrue);
checkDistributionUpdate(o.distribution!);
unittest.expect(
o.floatingPoint!,
unittest.equals(42.0),
);
checkFloatingPointList(o.floatingPointList!);
checkFloatingPointMean(o.floatingPointMean!);
checkSplitInt64(o.integer!);
checkIntegerGauge(o.integerGauge!);
checkIntegerList(o.integerList!);
checkIntegerMean(o.integerMean!);
var casted1 = (o.internal!) 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'),
);
checkNameAndKind(o.nameAndKind!);
unittest.expect(
o.shortId!,
unittest.equals('foo'),
);
checkStringList(o.stringList!);
checkCounterStructuredNameAndMetadata(o.structuredNameAndMetadata!);
}
buildCounterCounterUpdate--;
}
core.Map<core.String, core.String> buildUnnamed4() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed4(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 buildCounterCreateJobFromTemplateRequest = 0;
api.CreateJobFromTemplateRequest buildCreateJobFromTemplateRequest() {
final o = api.CreateJobFromTemplateRequest();
buildCounterCreateJobFromTemplateRequest++;
if (buildCounterCreateJobFromTemplateRequest < 3) {
o.environment = buildRuntimeEnvironment();
o.gcsPath = 'foo';
o.jobName = 'foo';
o.location = 'foo';
o.parameters = buildUnnamed4();
}
buildCounterCreateJobFromTemplateRequest--;
return o;
}
void checkCreateJobFromTemplateRequest(api.CreateJobFromTemplateRequest o) {
buildCounterCreateJobFromTemplateRequest++;
if (buildCounterCreateJobFromTemplateRequest < 3) {
checkRuntimeEnvironment(o.environment!);
unittest.expect(
o.gcsPath!,
unittest.equals('foo'),
);
unittest.expect(
o.jobName!,
unittest.equals('foo'),
);
unittest.expect(
o.location!,
unittest.equals('foo'),
);
checkUnnamed4(o.parameters!);
}
buildCounterCreateJobFromTemplateRequest--;
}
core.int buildCounterCustomSourceLocation = 0;
api.CustomSourceLocation buildCustomSourceLocation() {
final o = api.CustomSourceLocation();
buildCounterCustomSourceLocation++;
if (buildCounterCustomSourceLocation < 3) {
o.stateful = true;
}
buildCounterCustomSourceLocation--;
return o;
}
void checkCustomSourceLocation(api.CustomSourceLocation o) {
buildCounterCustomSourceLocation++;
if (buildCounterCustomSourceLocation < 3) {
unittest.expect(o.stateful!, unittest.isTrue);
}
buildCounterCustomSourceLocation--;
}
core.List<core.String> buildUnnamed5() => [
'foo',
'foo',
];
void checkUnnamed5(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 buildCounterDataDiskAssignment = 0;
api.DataDiskAssignment buildDataDiskAssignment() {
final o = api.DataDiskAssignment();
buildCounterDataDiskAssignment++;
if (buildCounterDataDiskAssignment < 3) {
o.dataDisks = buildUnnamed5();
o.vmInstance = 'foo';
}
buildCounterDataDiskAssignment--;
return o;
}
void checkDataDiskAssignment(api.DataDiskAssignment o) {
buildCounterDataDiskAssignment++;
if (buildCounterDataDiskAssignment < 3) {
checkUnnamed5(o.dataDisks!);
unittest.expect(
o.vmInstance!,
unittest.equals('foo'),
);
}
buildCounterDataDiskAssignment--;
}
core.List<core.String> buildUnnamed6() => [
'foo',
'foo',
];
void checkUnnamed6(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 buildCounterDataSamplingConfig = 0;
api.DataSamplingConfig buildDataSamplingConfig() {
final o = api.DataSamplingConfig();
buildCounterDataSamplingConfig++;
if (buildCounterDataSamplingConfig < 3) {
o.behaviors = buildUnnamed6();
}
buildCounterDataSamplingConfig--;
return o;
}
void checkDataSamplingConfig(api.DataSamplingConfig o) {
buildCounterDataSamplingConfig++;
if (buildCounterDataSamplingConfig < 3) {
checkUnnamed6(o.behaviors!);
}
buildCounterDataSamplingConfig--;
}
core.int buildCounterDataSamplingReport = 0;
api.DataSamplingReport buildDataSamplingReport() {
final o = api.DataSamplingReport();
buildCounterDataSamplingReport++;
if (buildCounterDataSamplingReport < 3) {
o.bytesWrittenDelta = 'foo';
o.elementsSampledBytes = 'foo';
o.elementsSampledCount = 'foo';
o.exceptionsSampledCount = 'foo';
o.pcollectionsSampledCount = 'foo';
o.persistenceErrorsCount = 'foo';
o.translationErrorsCount = 'foo';
}
buildCounterDataSamplingReport--;
return o;
}
void checkDataSamplingReport(api.DataSamplingReport o) {
buildCounterDataSamplingReport++;
if (buildCounterDataSamplingReport < 3) {
unittest.expect(
o.bytesWrittenDelta!,
unittest.equals('foo'),
);
unittest.expect(
o.elementsSampledBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.elementsSampledCount!,
unittest.equals('foo'),
);
unittest.expect(
o.exceptionsSampledCount!,
unittest.equals('foo'),
);
unittest.expect(
o.pcollectionsSampledCount!,
unittest.equals('foo'),
);
unittest.expect(
o.persistenceErrorsCount!,
unittest.equals('foo'),
);
unittest.expect(
o.translationErrorsCount!,
unittest.equals('foo'),
);
}
buildCounterDataSamplingReport--;
}
core.int buildCounterDatastoreIODetails = 0;
api.DatastoreIODetails buildDatastoreIODetails() {
final o = api.DatastoreIODetails();
buildCounterDatastoreIODetails++;
if (buildCounterDatastoreIODetails < 3) {
o.namespace = 'foo';
o.projectId = 'foo';
}
buildCounterDatastoreIODetails--;
return o;
}
void checkDatastoreIODetails(api.DatastoreIODetails o) {
buildCounterDatastoreIODetails++;
if (buildCounterDatastoreIODetails < 3) {
unittest.expect(
o.namespace!,
unittest.equals('foo'),
);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
}
buildCounterDatastoreIODetails--;
}
core.int buildCounterDebugOptions = 0;
api.DebugOptions buildDebugOptions() {
final o = api.DebugOptions();
buildCounterDebugOptions++;
if (buildCounterDebugOptions < 3) {
o.dataSampling = buildDataSamplingConfig();
o.enableHotKeyLogging = true;
}
buildCounterDebugOptions--;
return o;
}
void checkDebugOptions(api.DebugOptions o) {
buildCounterDebugOptions++;
if (buildCounterDebugOptions < 3) {
checkDataSamplingConfig(o.dataSampling!);
unittest.expect(o.enableHotKeyLogging!, unittest.isTrue);
}
buildCounterDebugOptions--;
}
core.int buildCounterDeleteSnapshotResponse = 0;
api.DeleteSnapshotResponse buildDeleteSnapshotResponse() {
final o = api.DeleteSnapshotResponse();
buildCounterDeleteSnapshotResponse++;
if (buildCounterDeleteSnapshotResponse < 3) {}
buildCounterDeleteSnapshotResponse--;
return o;
}
void checkDeleteSnapshotResponse(api.DeleteSnapshotResponse o) {
buildCounterDeleteSnapshotResponse++;
if (buildCounterDeleteSnapshotResponse < 3) {}
buildCounterDeleteSnapshotResponse--;
}
core.int buildCounterDerivedSource = 0;
api.DerivedSource buildDerivedSource() {
final o = api.DerivedSource();
buildCounterDerivedSource++;
if (buildCounterDerivedSource < 3) {
o.derivationMode = 'foo';
o.source = buildSource();
}
buildCounterDerivedSource--;
return o;
}
void checkDerivedSource(api.DerivedSource o) {
buildCounterDerivedSource++;
if (buildCounterDerivedSource < 3) {
unittest.expect(
o.derivationMode!,
unittest.equals('foo'),
);
checkSource(o.source!);
}
buildCounterDerivedSource--;
}
core.int buildCounterDisk = 0;
api.Disk buildDisk() {
final o = api.Disk();
buildCounterDisk++;
if (buildCounterDisk < 3) {
o.diskType = 'foo';
o.mountPoint = 'foo';
o.sizeGb = 42;
}
buildCounterDisk--;
return o;
}
void checkDisk(api.Disk o) {
buildCounterDisk++;
if (buildCounterDisk < 3) {
unittest.expect(
o.diskType!,
unittest.equals('foo'),
);
unittest.expect(
o.mountPoint!,
unittest.equals('foo'),
);
unittest.expect(
o.sizeGb!,
unittest.equals(42),
);
}
buildCounterDisk--;
}
core.int buildCounterDisplayData = 0;
api.DisplayData buildDisplayData() {
final o = api.DisplayData();
buildCounterDisplayData++;
if (buildCounterDisplayData < 3) {
o.boolValue = true;
o.durationValue = 'foo';
o.floatValue = 42.0;
o.int64Value = 'foo';
o.javaClassValue = 'foo';
o.key = 'foo';
o.label = 'foo';
o.namespace = 'foo';
o.shortStrValue = 'foo';
o.strValue = 'foo';
o.timestampValue = 'foo';
o.url = 'foo';
}
buildCounterDisplayData--;
return o;
}
void checkDisplayData(api.DisplayData o) {
buildCounterDisplayData++;
if (buildCounterDisplayData < 3) {
unittest.expect(o.boolValue!, unittest.isTrue);
unittest.expect(
o.durationValue!,
unittest.equals('foo'),
);
unittest.expect(
o.floatValue!,
unittest.equals(42.0),
);
unittest.expect(
o.int64Value!,
unittest.equals('foo'),
);
unittest.expect(
o.javaClassValue!,
unittest.equals('foo'),
);
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(
o.label!,
unittest.equals('foo'),
);
unittest.expect(
o.namespace!,
unittest.equals('foo'),
);
unittest.expect(
o.shortStrValue!,
unittest.equals('foo'),
);
unittest.expect(
o.strValue!,
unittest.equals('foo'),
);
unittest.expect(
o.timestampValue!,
unittest.equals('foo'),
);
unittest.expect(
o.url!,
unittest.equals('foo'),
);
}
buildCounterDisplayData--;
}
core.int buildCounterDistributionUpdate = 0;
api.DistributionUpdate buildDistributionUpdate() {
final o = api.DistributionUpdate();
buildCounterDistributionUpdate++;
if (buildCounterDistributionUpdate < 3) {
o.count = buildSplitInt64();
o.histogram = buildHistogram();
o.max = buildSplitInt64();
o.min = buildSplitInt64();
o.sum = buildSplitInt64();
o.sumOfSquares = 42.0;
}
buildCounterDistributionUpdate--;
return o;
}
void checkDistributionUpdate(api.DistributionUpdate o) {
buildCounterDistributionUpdate++;
if (buildCounterDistributionUpdate < 3) {
checkSplitInt64(o.count!);
checkHistogram(o.histogram!);
checkSplitInt64(o.max!);
checkSplitInt64(o.min!);
checkSplitInt64(o.sum!);
unittest.expect(
o.sumOfSquares!,
unittest.equals(42.0),
);
}
buildCounterDistributionUpdate--;
}
core.int buildCounterDynamicSourceSplit = 0;
api.DynamicSourceSplit buildDynamicSourceSplit() {
final o = api.DynamicSourceSplit();
buildCounterDynamicSourceSplit++;
if (buildCounterDynamicSourceSplit < 3) {
o.primary = buildDerivedSource();
o.residual = buildDerivedSource();
}
buildCounterDynamicSourceSplit--;
return o;
}
void checkDynamicSourceSplit(api.DynamicSourceSplit o) {
buildCounterDynamicSourceSplit++;
if (buildCounterDynamicSourceSplit < 3) {
checkDerivedSource(o.primary!);
checkDerivedSource(o.residual!);
}
buildCounterDynamicSourceSplit--;
}
core.List<core.String> buildUnnamed7() => [
'foo',
'foo',
];
void checkUnnamed7(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.Map<core.String, core.Object?> buildUnnamed8() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed8(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));
unittest.expect(
casted2['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted2['bool'],
unittest.equals(true),
);
unittest.expect(
casted2['string'],
unittest.equals('foo'),
);
var casted3 = (o['y']!) 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'),
);
}
core.Map<core.String, core.Object?> buildUnnamed9() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed9(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));
unittest.expect(
casted4['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted4['bool'],
unittest.equals(true),
);
unittest.expect(
casted4['string'],
unittest.equals('foo'),
);
var casted5 = (o['y']!) 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'),
);
}
core.List<core.String> buildUnnamed10() => [
'foo',
'foo',
];
void checkUnnamed10(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.Map<core.String, core.Object?> buildUnnamed11() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed11(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));
unittest.expect(
casted6['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted6['bool'],
unittest.equals(true),
);
unittest.expect(
casted6['string'],
unittest.equals('foo'),
);
var casted7 = (o['y']!) 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'),
);
}
core.Map<core.String, core.Object?> buildUnnamed12() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed12(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));
unittest.expect(
casted8['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted8['bool'],
unittest.equals(true),
);
unittest.expect(
casted8['string'],
unittest.equals('foo'),
);
var casted9 = (o['y']!) 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'),
);
}
core.List<api.WorkerPool> buildUnnamed13() => [
buildWorkerPool(),
buildWorkerPool(),
];
void checkUnnamed13(core.List<api.WorkerPool> o) {
unittest.expect(o, unittest.hasLength(2));
checkWorkerPool(o[0]);
checkWorkerPool(o[1]);
}
core.int buildCounterEnvironment = 0;
api.Environment buildEnvironment() {
final o = api.Environment();
buildCounterEnvironment++;
if (buildCounterEnvironment < 3) {
o.clusterManagerApiService = 'foo';
o.dataset = 'foo';
o.debugOptions = buildDebugOptions();
o.experiments = buildUnnamed7();
o.flexResourceSchedulingGoal = 'foo';
o.internalExperiments = buildUnnamed8();
o.sdkPipelineOptions = buildUnnamed9();
o.serviceAccountEmail = 'foo';
o.serviceKmsKeyName = 'foo';
o.serviceOptions = buildUnnamed10();
o.shuffleMode = 'foo';
o.tempStoragePrefix = 'foo';
o.useStreamingEngineResourceBasedBilling = true;
o.userAgent = buildUnnamed11();
o.version = buildUnnamed12();
o.workerPools = buildUnnamed13();
o.workerRegion = 'foo';
o.workerZone = 'foo';
}
buildCounterEnvironment--;
return o;
}
void checkEnvironment(api.Environment o) {
buildCounterEnvironment++;
if (buildCounterEnvironment < 3) {
unittest.expect(
o.clusterManagerApiService!,
unittest.equals('foo'),
);
unittest.expect(
o.dataset!,
unittest.equals('foo'),
);
checkDebugOptions(o.debugOptions!);
checkUnnamed7(o.experiments!);
unittest.expect(
o.flexResourceSchedulingGoal!,
unittest.equals('foo'),
);
checkUnnamed8(o.internalExperiments!);
checkUnnamed9(o.sdkPipelineOptions!);
unittest.expect(
o.serviceAccountEmail!,
unittest.equals('foo'),
);
unittest.expect(
o.serviceKmsKeyName!,
unittest.equals('foo'),
);
checkUnnamed10(o.serviceOptions!);
unittest.expect(
o.shuffleMode!,
unittest.equals('foo'),
);
unittest.expect(
o.tempStoragePrefix!,
unittest.equals('foo'),
);
unittest.expect(o.useStreamingEngineResourceBasedBilling!, unittest.isTrue);
checkUnnamed11(o.userAgent!);
checkUnnamed12(o.version!);
checkUnnamed13(o.workerPools!);
unittest.expect(
o.workerRegion!,
unittest.equals('foo'),
);
unittest.expect(
o.workerZone!,
unittest.equals('foo'),
);
}
buildCounterEnvironment--;
}
core.int buildCounterExecutionStageState = 0;
api.ExecutionStageState buildExecutionStageState() {
final o = api.ExecutionStageState();
buildCounterExecutionStageState++;
if (buildCounterExecutionStageState < 3) {
o.currentStateTime = 'foo';
o.executionStageName = 'foo';
o.executionStageState = 'foo';
}
buildCounterExecutionStageState--;
return o;
}
void checkExecutionStageState(api.ExecutionStageState o) {
buildCounterExecutionStageState++;
if (buildCounterExecutionStageState < 3) {
unittest.expect(
o.currentStateTime!,
unittest.equals('foo'),
);
unittest.expect(
o.executionStageName!,
unittest.equals('foo'),
);
unittest.expect(
o.executionStageState!,
unittest.equals('foo'),
);
}
buildCounterExecutionStageState--;
}
core.List<api.ComponentSource> buildUnnamed14() => [
buildComponentSource(),
buildComponentSource(),
];
void checkUnnamed14(core.List<api.ComponentSource> o) {
unittest.expect(o, unittest.hasLength(2));
checkComponentSource(o[0]);
checkComponentSource(o[1]);
}
core.List<api.ComponentTransform> buildUnnamed15() => [
buildComponentTransform(),
buildComponentTransform(),
];
void checkUnnamed15(core.List<api.ComponentTransform> o) {
unittest.expect(o, unittest.hasLength(2));
checkComponentTransform(o[0]);
checkComponentTransform(o[1]);
}
core.List<api.StageSource> buildUnnamed16() => [
buildStageSource(),
buildStageSource(),
];
void checkUnnamed16(core.List<api.StageSource> o) {
unittest.expect(o, unittest.hasLength(2));
checkStageSource(o[0]);
checkStageSource(o[1]);
}
core.List<api.StageSource> buildUnnamed17() => [
buildStageSource(),
buildStageSource(),
];
void checkUnnamed17(core.List<api.StageSource> o) {
unittest.expect(o, unittest.hasLength(2));
checkStageSource(o[0]);
checkStageSource(o[1]);
}
core.List<core.String> buildUnnamed18() => [
'foo',
'foo',
];
void checkUnnamed18(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 buildCounterExecutionStageSummary = 0;
api.ExecutionStageSummary buildExecutionStageSummary() {
final o = api.ExecutionStageSummary();
buildCounterExecutionStageSummary++;
if (buildCounterExecutionStageSummary < 3) {
o.componentSource = buildUnnamed14();
o.componentTransform = buildUnnamed15();
o.id = 'foo';
o.inputSource = buildUnnamed16();
o.kind = 'foo';
o.name = 'foo';
o.outputSource = buildUnnamed17();
o.prerequisiteStage = buildUnnamed18();
}
buildCounterExecutionStageSummary--;
return o;
}
void checkExecutionStageSummary(api.ExecutionStageSummary o) {
buildCounterExecutionStageSummary++;
if (buildCounterExecutionStageSummary < 3) {
checkUnnamed14(o.componentSource!);
checkUnnamed15(o.componentTransform!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkUnnamed16(o.inputSource!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed17(o.outputSource!);
checkUnnamed18(o.prerequisiteStage!);
}
buildCounterExecutionStageSummary--;
}
core.int buildCounterFailedLocation = 0;
api.FailedLocation buildFailedLocation() {
final o = api.FailedLocation();
buildCounterFailedLocation++;
if (buildCounterFailedLocation < 3) {
o.name = 'foo';
}
buildCounterFailedLocation--;
return o;
}
void checkFailedLocation(api.FailedLocation o) {
buildCounterFailedLocation++;
if (buildCounterFailedLocation < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterFailedLocation--;
}
core.int buildCounterFileIODetails = 0;
api.FileIODetails buildFileIODetails() {
final o = api.FileIODetails();
buildCounterFileIODetails++;
if (buildCounterFileIODetails < 3) {
o.filePattern = 'foo';
}
buildCounterFileIODetails--;
return o;
}
void checkFileIODetails(api.FileIODetails o) {
buildCounterFileIODetails++;
if (buildCounterFileIODetails < 3) {
unittest.expect(
o.filePattern!,
unittest.equals('foo'),
);
}
buildCounterFileIODetails--;
}
core.List<api.InstructionInput> buildUnnamed19() => [
buildInstructionInput(),
buildInstructionInput(),
];
void checkUnnamed19(core.List<api.InstructionInput> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstructionInput(o[0]);
checkInstructionInput(o[1]);
}
core.int buildCounterFlattenInstruction = 0;
api.FlattenInstruction buildFlattenInstruction() {
final o = api.FlattenInstruction();
buildCounterFlattenInstruction++;
if (buildCounterFlattenInstruction < 3) {
o.inputs = buildUnnamed19();
}
buildCounterFlattenInstruction--;
return o;
}
void checkFlattenInstruction(api.FlattenInstruction o) {
buildCounterFlattenInstruction++;
if (buildCounterFlattenInstruction < 3) {
checkUnnamed19(o.inputs!);
}
buildCounterFlattenInstruction--;
}
core.List<core.String> buildUnnamed20() => [
'foo',
'foo',
];
void checkUnnamed20(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.Map<core.String, core.String> buildUnnamed21() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed21(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 buildCounterFlexTemplateRuntimeEnvironment = 0;
api.FlexTemplateRuntimeEnvironment buildFlexTemplateRuntimeEnvironment() {
final o = api.FlexTemplateRuntimeEnvironment();
buildCounterFlexTemplateRuntimeEnvironment++;
if (buildCounterFlexTemplateRuntimeEnvironment < 3) {
o.additionalExperiments = buildUnnamed20();
o.additionalUserLabels = buildUnnamed21();
o.autoscalingAlgorithm = 'foo';
o.diskSizeGb = 42;
o.dumpHeapOnOom = true;
o.enableLauncherVmSerialPortLogging = true;
o.enableStreamingEngine = true;
o.flexrsGoal = 'foo';
o.ipConfiguration = 'foo';
o.kmsKeyName = 'foo';
o.launcherMachineType = 'foo';
o.machineType = 'foo';
o.maxWorkers = 42;
o.network = 'foo';
o.numWorkers = 42;
o.saveHeapDumpsToGcsPath = 'foo';
o.sdkContainerImage = 'foo';
o.serviceAccountEmail = 'foo';
o.stagingLocation = 'foo';
o.subnetwork = 'foo';
o.tempLocation = 'foo';
o.workerRegion = 'foo';
o.workerZone = 'foo';
o.zone = 'foo';
}
buildCounterFlexTemplateRuntimeEnvironment--;
return o;
}
void checkFlexTemplateRuntimeEnvironment(api.FlexTemplateRuntimeEnvironment o) {
buildCounterFlexTemplateRuntimeEnvironment++;
if (buildCounterFlexTemplateRuntimeEnvironment < 3) {
checkUnnamed20(o.additionalExperiments!);
checkUnnamed21(o.additionalUserLabels!);
unittest.expect(
o.autoscalingAlgorithm!,
unittest.equals('foo'),
);
unittest.expect(
o.diskSizeGb!,
unittest.equals(42),
);
unittest.expect(o.dumpHeapOnOom!, unittest.isTrue);
unittest.expect(o.enableLauncherVmSerialPortLogging!, unittest.isTrue);
unittest.expect(o.enableStreamingEngine!, unittest.isTrue);
unittest.expect(
o.flexrsGoal!,
unittest.equals('foo'),
);
unittest.expect(
o.ipConfiguration!,
unittest.equals('foo'),
);
unittest.expect(
o.kmsKeyName!,
unittest.equals('foo'),
);
unittest.expect(
o.launcherMachineType!,
unittest.equals('foo'),
);
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.saveHeapDumpsToGcsPath!,
unittest.equals('foo'),
);
unittest.expect(
o.sdkContainerImage!,
unittest.equals('foo'),
);
unittest.expect(
o.serviceAccountEmail!,
unittest.equals('foo'),
);
unittest.expect(
o.stagingLocation!,
unittest.equals('foo'),
);
unittest.expect(
o.subnetwork!,
unittest.equals('foo'),
);
unittest.expect(
o.tempLocation!,
unittest.equals('foo'),
);
unittest.expect(
o.workerRegion!,
unittest.equals('foo'),
);
unittest.expect(
o.workerZone!,
unittest.equals('foo'),
);
unittest.expect(
o.zone!,
unittest.equals('foo'),
);
}
buildCounterFlexTemplateRuntimeEnvironment--;
}
core.List<core.double> buildUnnamed22() => [
42.0,
42.0,
];
void checkUnnamed22(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),
);
}
core.int buildCounterFloatingPointList = 0;
api.FloatingPointList buildFloatingPointList() {
final o = api.FloatingPointList();
buildCounterFloatingPointList++;
if (buildCounterFloatingPointList < 3) {
o.elements = buildUnnamed22();
}
buildCounterFloatingPointList--;
return o;
}
void checkFloatingPointList(api.FloatingPointList o) {
buildCounterFloatingPointList++;
if (buildCounterFloatingPointList < 3) {
checkUnnamed22(o.elements!);
}
buildCounterFloatingPointList--;
}
core.int buildCounterFloatingPointMean = 0;
api.FloatingPointMean buildFloatingPointMean() {
final o = api.FloatingPointMean();
buildCounterFloatingPointMean++;
if (buildCounterFloatingPointMean < 3) {
o.count = buildSplitInt64();
o.sum = 42.0;
}
buildCounterFloatingPointMean--;
return o;
}
void checkFloatingPointMean(api.FloatingPointMean o) {
buildCounterFloatingPointMean++;
if (buildCounterFloatingPointMean < 3) {
checkSplitInt64(o.count!);
unittest.expect(
o.sum!,
unittest.equals(42.0),
);
}
buildCounterFloatingPointMean--;
}
core.int buildCounterGetDebugConfigRequest = 0;
api.GetDebugConfigRequest buildGetDebugConfigRequest() {
final o = api.GetDebugConfigRequest();
buildCounterGetDebugConfigRequest++;
if (buildCounterGetDebugConfigRequest < 3) {
o.componentId = 'foo';
o.location = 'foo';
o.workerId = 'foo';
}
buildCounterGetDebugConfigRequest--;
return o;
}
void checkGetDebugConfigRequest(api.GetDebugConfigRequest o) {
buildCounterGetDebugConfigRequest++;
if (buildCounterGetDebugConfigRequest < 3) {
unittest.expect(
o.componentId!,
unittest.equals('foo'),
);
unittest.expect(
o.location!,
unittest.equals('foo'),
);
unittest.expect(
o.workerId!,
unittest.equals('foo'),
);
}
buildCounterGetDebugConfigRequest--;
}
core.int buildCounterGetDebugConfigResponse = 0;
api.GetDebugConfigResponse buildGetDebugConfigResponse() {
final o = api.GetDebugConfigResponse();
buildCounterGetDebugConfigResponse++;
if (buildCounterGetDebugConfigResponse < 3) {
o.config = 'foo';
}
buildCounterGetDebugConfigResponse--;
return o;
}
void checkGetDebugConfigResponse(api.GetDebugConfigResponse o) {
buildCounterGetDebugConfigResponse++;
if (buildCounterGetDebugConfigResponse < 3) {
unittest.expect(
o.config!,
unittest.equals('foo'),
);
}
buildCounterGetDebugConfigResponse--;
}
core.int buildCounterGetTemplateResponse = 0;
api.GetTemplateResponse buildGetTemplateResponse() {
final o = api.GetTemplateResponse();
buildCounterGetTemplateResponse++;
if (buildCounterGetTemplateResponse < 3) {
o.metadata = buildTemplateMetadata();
o.runtimeMetadata = buildRuntimeMetadata();
o.status = buildStatus();
o.templateType = 'foo';
}
buildCounterGetTemplateResponse--;
return o;
}
void checkGetTemplateResponse(api.GetTemplateResponse o) {
buildCounterGetTemplateResponse++;
if (buildCounterGetTemplateResponse < 3) {
checkTemplateMetadata(o.metadata!);
checkRuntimeMetadata(o.runtimeMetadata!);
checkStatus(o.status!);
unittest.expect(
o.templateType!,
unittest.equals('foo'),
);
}
buildCounterGetTemplateResponse--;
}
core.List<core.String> buildUnnamed23() => [
'foo',
'foo',
];
void checkUnnamed23(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 buildCounterHistogram = 0;
api.Histogram buildHistogram() {
final o = api.Histogram();
buildCounterHistogram++;
if (buildCounterHistogram < 3) {
o.bucketCounts = buildUnnamed23();
o.firstBucketOffset = 42;
}
buildCounterHistogram--;
return o;
}
void checkHistogram(api.Histogram o) {
buildCounterHistogram++;
if (buildCounterHistogram < 3) {
checkUnnamed23(o.bucketCounts!);
unittest.expect(
o.firstBucketOffset!,
unittest.equals(42),
);
}
buildCounterHistogram--;
}
core.Map<core.String, api.HotKeyInfo> buildUnnamed24() => {
'x': buildHotKeyInfo(),
'y': buildHotKeyInfo(),
};
void checkUnnamed24(core.Map<core.String, api.HotKeyInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkHotKeyInfo(o['x']!);
checkHotKeyInfo(o['y']!);
}
core.int buildCounterHotKeyDebuggingInfo = 0;
api.HotKeyDebuggingInfo buildHotKeyDebuggingInfo() {
final o = api.HotKeyDebuggingInfo();
buildCounterHotKeyDebuggingInfo++;
if (buildCounterHotKeyDebuggingInfo < 3) {
o.detectedHotKeys = buildUnnamed24();
}
buildCounterHotKeyDebuggingInfo--;
return o;
}
void checkHotKeyDebuggingInfo(api.HotKeyDebuggingInfo o) {
buildCounterHotKeyDebuggingInfo++;
if (buildCounterHotKeyDebuggingInfo < 3) {
checkUnnamed24(o.detectedHotKeys!);
}
buildCounterHotKeyDebuggingInfo--;
}
core.int buildCounterHotKeyDetection = 0;
api.HotKeyDetection buildHotKeyDetection() {
final o = api.HotKeyDetection();
buildCounterHotKeyDetection++;
if (buildCounterHotKeyDetection < 3) {
o.hotKeyAge = 'foo';
o.systemName = 'foo';
o.userStepName = 'foo';
}
buildCounterHotKeyDetection--;
return o;
}
void checkHotKeyDetection(api.HotKeyDetection o) {
buildCounterHotKeyDetection++;
if (buildCounterHotKeyDetection < 3) {
unittest.expect(
o.hotKeyAge!,
unittest.equals('foo'),
);
unittest.expect(
o.systemName!,
unittest.equals('foo'),
);
unittest.expect(
o.userStepName!,
unittest.equals('foo'),
);
}
buildCounterHotKeyDetection--;
}
core.int buildCounterHotKeyInfo = 0;
api.HotKeyInfo buildHotKeyInfo() {
final o = api.HotKeyInfo();
buildCounterHotKeyInfo++;
if (buildCounterHotKeyInfo < 3) {
o.hotKeyAge = 'foo';
o.key = 'foo';
o.keyTruncated = true;
}
buildCounterHotKeyInfo--;
return o;
}
void checkHotKeyInfo(api.HotKeyInfo o) {
buildCounterHotKeyInfo++;
if (buildCounterHotKeyInfo < 3) {
unittest.expect(
o.hotKeyAge!,
unittest.equals('foo'),
);
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(o.keyTruncated!, unittest.isTrue);
}
buildCounterHotKeyInfo--;
}
core.int buildCounterInstructionInput = 0;
api.InstructionInput buildInstructionInput() {
final o = api.InstructionInput();
buildCounterInstructionInput++;
if (buildCounterInstructionInput < 3) {
o.outputNum = 42;
o.producerInstructionIndex = 42;
}
buildCounterInstructionInput--;
return o;
}
void checkInstructionInput(api.InstructionInput o) {
buildCounterInstructionInput++;
if (buildCounterInstructionInput < 3) {
unittest.expect(
o.outputNum!,
unittest.equals(42),
);
unittest.expect(
o.producerInstructionIndex!,
unittest.equals(42),
);
}
buildCounterInstructionInput--;
}
core.Map<core.String, core.Object?> buildUnnamed25() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed25(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));
unittest.expect(
casted10['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted10['bool'],
unittest.equals(true),
);
unittest.expect(
casted10['string'],
unittest.equals('foo'),
);
var casted11 = (o['y']!) as core.Map;
unittest.expect(casted11, unittest.hasLength(3));
unittest.expect(
casted11['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted11['bool'],
unittest.equals(true),
);
unittest.expect(
casted11['string'],
unittest.equals('foo'),
);
}
core.int buildCounterInstructionOutput = 0;
api.InstructionOutput buildInstructionOutput() {
final o = api.InstructionOutput();
buildCounterInstructionOutput++;
if (buildCounterInstructionOutput < 3) {
o.codec = buildUnnamed25();
o.name = 'foo';
o.onlyCountKeyBytes = true;
o.onlyCountValueBytes = true;
o.originalName = 'foo';
o.systemName = 'foo';
}
buildCounterInstructionOutput--;
return o;
}
void checkInstructionOutput(api.InstructionOutput o) {
buildCounterInstructionOutput++;
if (buildCounterInstructionOutput < 3) {
checkUnnamed25(o.codec!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(o.onlyCountKeyBytes!, unittest.isTrue);
unittest.expect(o.onlyCountValueBytes!, unittest.isTrue);
unittest.expect(
o.originalName!,
unittest.equals('foo'),
);
unittest.expect(
o.systemName!,
unittest.equals('foo'),
);
}
buildCounterInstructionOutput--;
}
core.int buildCounterIntegerGauge = 0;
api.IntegerGauge buildIntegerGauge() {
final o = api.IntegerGauge();
buildCounterIntegerGauge++;
if (buildCounterIntegerGauge < 3) {
o.timestamp = 'foo';
o.value = buildSplitInt64();
}
buildCounterIntegerGauge--;
return o;
}
void checkIntegerGauge(api.IntegerGauge o) {
buildCounterIntegerGauge++;
if (buildCounterIntegerGauge < 3) {
unittest.expect(
o.timestamp!,
unittest.equals('foo'),
);
checkSplitInt64(o.value!);
}
buildCounterIntegerGauge--;
}
core.List<api.SplitInt64> buildUnnamed26() => [
buildSplitInt64(),
buildSplitInt64(),
];
void checkUnnamed26(core.List<api.SplitInt64> o) {
unittest.expect(o, unittest.hasLength(2));
checkSplitInt64(o[0]);
checkSplitInt64(o[1]);
}
core.int buildCounterIntegerList = 0;
api.IntegerList buildIntegerList() {
final o = api.IntegerList();
buildCounterIntegerList++;
if (buildCounterIntegerList < 3) {
o.elements = buildUnnamed26();
}
buildCounterIntegerList--;
return o;
}
void checkIntegerList(api.IntegerList o) {
buildCounterIntegerList++;
if (buildCounterIntegerList < 3) {
checkUnnamed26(o.elements!);
}
buildCounterIntegerList--;
}
core.int buildCounterIntegerMean = 0;
api.IntegerMean buildIntegerMean() {
final o = api.IntegerMean();
buildCounterIntegerMean++;
if (buildCounterIntegerMean < 3) {
o.count = buildSplitInt64();
o.sum = buildSplitInt64();
}
buildCounterIntegerMean--;
return o;
}
void checkIntegerMean(api.IntegerMean o) {
buildCounterIntegerMean++;
if (buildCounterIntegerMean < 3) {
checkSplitInt64(o.count!);
checkSplitInt64(o.sum!);
}
buildCounterIntegerMean--;
}
core.Map<core.String, core.String> buildUnnamed27() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed27(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.List<api.ExecutionStageState> buildUnnamed28() => [
buildExecutionStageState(),
buildExecutionStageState(),
];
void checkUnnamed28(core.List<api.ExecutionStageState> o) {
unittest.expect(o, unittest.hasLength(2));
checkExecutionStageState(o[0]);
checkExecutionStageState(o[1]);
}
core.List<api.Step> buildUnnamed29() => [
buildStep(),
buildStep(),
];
void checkUnnamed29(core.List<api.Step> o) {
unittest.expect(o, unittest.hasLength(2));
checkStep(o[0]);
checkStep(o[1]);
}
core.List<core.String> buildUnnamed30() => [
'foo',
'foo',
];
void checkUnnamed30(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.Map<core.String, core.String> buildUnnamed31() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed31(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 buildCounterJob = 0;
api.Job buildJob() {
final o = api.Job();
buildCounterJob++;
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 = buildUnnamed27();
o.location = 'foo';
o.name = 'foo';
o.pipelineDescription = buildPipelineDescription();
o.projectId = 'foo';
o.replaceJobId = 'foo';
o.replacedByJobId = 'foo';
o.requestedState = 'foo';
o.runtimeUpdatableParams = buildRuntimeUpdatableParams();
o.satisfiesPzs = true;
o.stageStates = buildUnnamed28();
o.startTime = 'foo';
o.steps = buildUnnamed29();
o.stepsLocation = 'foo';
o.tempFiles = buildUnnamed30();
o.transformNameMapping = buildUnnamed31();
o.type = 'foo';
}
buildCounterJob--;
return o;
}
void checkJob(api.Job o) {
buildCounterJob++;
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!);
checkUnnamed27(o.labels!);
unittest.expect(
o.location!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkPipelineDescription(o.pipelineDescription!);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
unittest.expect(
o.replaceJobId!,
unittest.equals('foo'),
);
unittest.expect(
o.replacedByJobId!,
unittest.equals('foo'),
);
unittest.expect(
o.requestedState!,
unittest.equals('foo'),
);
checkRuntimeUpdatableParams(o.runtimeUpdatableParams!);
unittest.expect(o.satisfiesPzs!, unittest.isTrue);
checkUnnamed28(o.stageStates!);
unittest.expect(
o.startTime!,
unittest.equals('foo'),
);
checkUnnamed29(o.steps!);
unittest.expect(
o.stepsLocation!,
unittest.equals('foo'),
);
checkUnnamed30(o.tempFiles!);
checkUnnamed31(o.transformNameMapping!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
}
buildCounterJob--;
}
core.List<api.StageSummary> buildUnnamed32() => [
buildStageSummary(),
buildStageSummary(),
];
void checkUnnamed32(core.List<api.StageSummary> o) {
unittest.expect(o, unittest.hasLength(2));
checkStageSummary(o[0]);
checkStageSummary(o[1]);
}
core.int buildCounterJobExecutionDetails = 0;
api.JobExecutionDetails buildJobExecutionDetails() {
final o = api.JobExecutionDetails();
buildCounterJobExecutionDetails++;
if (buildCounterJobExecutionDetails < 3) {
o.nextPageToken = 'foo';
o.stages = buildUnnamed32();
}
buildCounterJobExecutionDetails--;
return o;
}
void checkJobExecutionDetails(api.JobExecutionDetails o) {
buildCounterJobExecutionDetails++;
if (buildCounterJobExecutionDetails < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed32(o.stages!);
}
buildCounterJobExecutionDetails--;
}
core.Map<core.String, api.JobExecutionStageInfo> buildUnnamed33() => {
'x': buildJobExecutionStageInfo(),
'y': buildJobExecutionStageInfo(),
};
void checkUnnamed33(core.Map<core.String, api.JobExecutionStageInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkJobExecutionStageInfo(o['x']!);
checkJobExecutionStageInfo(o['y']!);
}
core.int buildCounterJobExecutionInfo = 0;
api.JobExecutionInfo buildJobExecutionInfo() {
final o = api.JobExecutionInfo();
buildCounterJobExecutionInfo++;
if (buildCounterJobExecutionInfo < 3) {
o.stages = buildUnnamed33();
}
buildCounterJobExecutionInfo--;
return o;
}
void checkJobExecutionInfo(api.JobExecutionInfo o) {
buildCounterJobExecutionInfo++;
if (buildCounterJobExecutionInfo < 3) {
checkUnnamed33(o.stages!);
}
buildCounterJobExecutionInfo--;
}
core.List<core.String> buildUnnamed34() => [
'foo',
'foo',
];
void checkUnnamed34(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 buildCounterJobExecutionStageInfo = 0;
api.JobExecutionStageInfo buildJobExecutionStageInfo() {
final o = api.JobExecutionStageInfo();
buildCounterJobExecutionStageInfo++;
if (buildCounterJobExecutionStageInfo < 3) {
o.stepName = buildUnnamed34();
}
buildCounterJobExecutionStageInfo--;
return o;
}
void checkJobExecutionStageInfo(api.JobExecutionStageInfo o) {
buildCounterJobExecutionStageInfo++;
if (buildCounterJobExecutionStageInfo < 3) {
checkUnnamed34(o.stepName!);
}
buildCounterJobExecutionStageInfo--;
}
core.int buildCounterJobMessage = 0;
api.JobMessage buildJobMessage() {
final o = api.JobMessage();
buildCounterJobMessage++;
if (buildCounterJobMessage < 3) {
o.id = 'foo';
o.messageImportance = 'foo';
o.messageText = 'foo';
o.time = 'foo';
}
buildCounterJobMessage--;
return o;
}
void checkJobMessage(api.JobMessage o) {
buildCounterJobMessage++;
if (buildCounterJobMessage < 3) {
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.messageImportance!,
unittest.equals('foo'),
);
unittest.expect(
o.messageText!,
unittest.equals('foo'),
);
unittest.expect(
o.time!,
unittest.equals('foo'),
);
}
buildCounterJobMessage--;
}
core.List<api.BigTableIODetails> buildUnnamed35() => [
buildBigTableIODetails(),
buildBigTableIODetails(),
];
void checkUnnamed35(core.List<api.BigTableIODetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkBigTableIODetails(o[0]);
checkBigTableIODetails(o[1]);
}
core.List<api.BigQueryIODetails> buildUnnamed36() => [
buildBigQueryIODetails(),
buildBigQueryIODetails(),
];
void checkUnnamed36(core.List<api.BigQueryIODetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkBigQueryIODetails(o[0]);
checkBigQueryIODetails(o[1]);
}
core.List<api.DatastoreIODetails> buildUnnamed37() => [
buildDatastoreIODetails(),
buildDatastoreIODetails(),
];
void checkUnnamed37(core.List<api.DatastoreIODetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkDatastoreIODetails(o[0]);
checkDatastoreIODetails(o[1]);
}
core.List<api.FileIODetails> buildUnnamed38() => [
buildFileIODetails(),
buildFileIODetails(),
];
void checkUnnamed38(core.List<api.FileIODetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkFileIODetails(o[0]);
checkFileIODetails(o[1]);
}
core.List<api.PubSubIODetails> buildUnnamed39() => [
buildPubSubIODetails(),
buildPubSubIODetails(),
];
void checkUnnamed39(core.List<api.PubSubIODetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkPubSubIODetails(o[0]);
checkPubSubIODetails(o[1]);
}
core.List<api.SpannerIODetails> buildUnnamed40() => [
buildSpannerIODetails(),
buildSpannerIODetails(),
];
void checkUnnamed40(core.List<api.SpannerIODetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkSpannerIODetails(o[0]);
checkSpannerIODetails(o[1]);
}
core.Map<core.String, core.String> buildUnnamed41() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed41(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 buildCounterJobMetadata = 0;
api.JobMetadata buildJobMetadata() {
final o = api.JobMetadata();
buildCounterJobMetadata++;
if (buildCounterJobMetadata < 3) {
o.bigTableDetails = buildUnnamed35();
o.bigqueryDetails = buildUnnamed36();
o.datastoreDetails = buildUnnamed37();
o.fileDetails = buildUnnamed38();
o.pubsubDetails = buildUnnamed39();
o.sdkVersion = buildSdkVersion();
o.spannerDetails = buildUnnamed40();
o.userDisplayProperties = buildUnnamed41();
}
buildCounterJobMetadata--;
return o;
}
void checkJobMetadata(api.JobMetadata o) {
buildCounterJobMetadata++;
if (buildCounterJobMetadata < 3) {
checkUnnamed35(o.bigTableDetails!);
checkUnnamed36(o.bigqueryDetails!);
checkUnnamed37(o.datastoreDetails!);
checkUnnamed38(o.fileDetails!);
checkUnnamed39(o.pubsubDetails!);
checkSdkVersion(o.sdkVersion!);
checkUnnamed40(o.spannerDetails!);
checkUnnamed41(o.userDisplayProperties!);
}
buildCounterJobMetadata--;
}
core.List<api.MetricUpdate> buildUnnamed42() => [
buildMetricUpdate(),
buildMetricUpdate(),
];
void checkUnnamed42(core.List<api.MetricUpdate> o) {
unittest.expect(o, unittest.hasLength(2));
checkMetricUpdate(o[0]);
checkMetricUpdate(o[1]);
}
core.int buildCounterJobMetrics = 0;
api.JobMetrics buildJobMetrics() {
final o = api.JobMetrics();
buildCounterJobMetrics++;
if (buildCounterJobMetrics < 3) {
o.metricTime = 'foo';
o.metrics = buildUnnamed42();
}
buildCounterJobMetrics--;
return o;
}
void checkJobMetrics(api.JobMetrics o) {
buildCounterJobMetrics++;
if (buildCounterJobMetrics < 3) {
unittest.expect(
o.metricTime!,
unittest.equals('foo'),
);
checkUnnamed42(o.metrics!);
}
buildCounterJobMetrics--;
}
core.int buildCounterKeyRangeDataDiskAssignment = 0;
api.KeyRangeDataDiskAssignment buildKeyRangeDataDiskAssignment() {
final o = api.KeyRangeDataDiskAssignment();
buildCounterKeyRangeDataDiskAssignment++;
if (buildCounterKeyRangeDataDiskAssignment < 3) {
o.dataDisk = 'foo';
o.end = 'foo';
o.start = 'foo';
}
buildCounterKeyRangeDataDiskAssignment--;
return o;
}
void checkKeyRangeDataDiskAssignment(api.KeyRangeDataDiskAssignment o) {
buildCounterKeyRangeDataDiskAssignment++;
if (buildCounterKeyRangeDataDiskAssignment < 3) {
unittest.expect(
o.dataDisk!,
unittest.equals('foo'),
);
unittest.expect(
o.end!,
unittest.equals('foo'),
);
unittest.expect(
o.start!,
unittest.equals('foo'),
);
}
buildCounterKeyRangeDataDiskAssignment--;
}
core.int buildCounterKeyRangeLocation = 0;
api.KeyRangeLocation buildKeyRangeLocation() {
final o = api.KeyRangeLocation();
buildCounterKeyRangeLocation++;
if (buildCounterKeyRangeLocation < 3) {
o.dataDisk = 'foo';
o.deliveryEndpoint = 'foo';
o.deprecatedPersistentDirectory = 'foo';
o.end = 'foo';
o.start = 'foo';
}
buildCounterKeyRangeLocation--;
return o;
}
void checkKeyRangeLocation(api.KeyRangeLocation o) {
buildCounterKeyRangeLocation++;
if (buildCounterKeyRangeLocation < 3) {
unittest.expect(
o.dataDisk!,
unittest.equals('foo'),
);
unittest.expect(
o.deliveryEndpoint!,
unittest.equals('foo'),
);
unittest.expect(
o.deprecatedPersistentDirectory!,
unittest.equals('foo'),
);
unittest.expect(
o.end!,
unittest.equals('foo'),
);
unittest.expect(
o.start!,
unittest.equals('foo'),
);
}
buildCounterKeyRangeLocation--;
}
core.Map<core.String, core.String> buildUnnamed43() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed43(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.Map<core.String, core.String> buildUnnamed44() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed44(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.Map<core.String, core.String> buildUnnamed45() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed45(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 buildCounterLaunchFlexTemplateParameter = 0;
api.LaunchFlexTemplateParameter buildLaunchFlexTemplateParameter() {
final o = api.LaunchFlexTemplateParameter();
buildCounterLaunchFlexTemplateParameter++;
if (buildCounterLaunchFlexTemplateParameter < 3) {
o.containerSpec = buildContainerSpec();
o.containerSpecGcsPath = 'foo';
o.environment = buildFlexTemplateRuntimeEnvironment();
o.jobName = 'foo';
o.launchOptions = buildUnnamed43();
o.parameters = buildUnnamed44();
o.transformNameMappings = buildUnnamed45();
o.update = true;
}
buildCounterLaunchFlexTemplateParameter--;
return o;
}
void checkLaunchFlexTemplateParameter(api.LaunchFlexTemplateParameter o) {
buildCounterLaunchFlexTemplateParameter++;
if (buildCounterLaunchFlexTemplateParameter < 3) {
checkContainerSpec(o.containerSpec!);
unittest.expect(
o.containerSpecGcsPath!,
unittest.equals('foo'),
);
checkFlexTemplateRuntimeEnvironment(o.environment!);
unittest.expect(
o.jobName!,
unittest.equals('foo'),
);
checkUnnamed43(o.launchOptions!);
checkUnnamed44(o.parameters!);
checkUnnamed45(o.transformNameMappings!);
unittest.expect(o.update!, unittest.isTrue);
}
buildCounterLaunchFlexTemplateParameter--;
}
core.int buildCounterLaunchFlexTemplateRequest = 0;
api.LaunchFlexTemplateRequest buildLaunchFlexTemplateRequest() {
final o = api.LaunchFlexTemplateRequest();
buildCounterLaunchFlexTemplateRequest++;
if (buildCounterLaunchFlexTemplateRequest < 3) {
o.launchParameter = buildLaunchFlexTemplateParameter();
o.validateOnly = true;
}
buildCounterLaunchFlexTemplateRequest--;
return o;
}
void checkLaunchFlexTemplateRequest(api.LaunchFlexTemplateRequest o) {
buildCounterLaunchFlexTemplateRequest++;
if (buildCounterLaunchFlexTemplateRequest < 3) {
checkLaunchFlexTemplateParameter(o.launchParameter!);
unittest.expect(o.validateOnly!, unittest.isTrue);
}
buildCounterLaunchFlexTemplateRequest--;
}
core.int buildCounterLaunchFlexTemplateResponse = 0;
api.LaunchFlexTemplateResponse buildLaunchFlexTemplateResponse() {
final o = api.LaunchFlexTemplateResponse();
buildCounterLaunchFlexTemplateResponse++;
if (buildCounterLaunchFlexTemplateResponse < 3) {
o.job = buildJob();
}
buildCounterLaunchFlexTemplateResponse--;
return o;
}
void checkLaunchFlexTemplateResponse(api.LaunchFlexTemplateResponse o) {
buildCounterLaunchFlexTemplateResponse++;
if (buildCounterLaunchFlexTemplateResponse < 3) {
checkJob(o.job!);
}
buildCounterLaunchFlexTemplateResponse--;
}
core.Map<core.String, core.String> buildUnnamed46() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed46(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.Map<core.String, core.String> buildUnnamed47() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed47(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 buildCounterLaunchTemplateParameters = 0;
api.LaunchTemplateParameters buildLaunchTemplateParameters() {
final o = api.LaunchTemplateParameters();
buildCounterLaunchTemplateParameters++;
if (buildCounterLaunchTemplateParameters < 3) {
o.environment = buildRuntimeEnvironment();
o.jobName = 'foo';
o.parameters = buildUnnamed46();
o.transformNameMapping = buildUnnamed47();
o.update = true;
}
buildCounterLaunchTemplateParameters--;
return o;
}
void checkLaunchTemplateParameters(api.LaunchTemplateParameters o) {
buildCounterLaunchTemplateParameters++;
if (buildCounterLaunchTemplateParameters < 3) {
checkRuntimeEnvironment(o.environment!);
unittest.expect(
o.jobName!,
unittest.equals('foo'),
);
checkUnnamed46(o.parameters!);
checkUnnamed47(o.transformNameMapping!);
unittest.expect(o.update!, unittest.isTrue);
}
buildCounterLaunchTemplateParameters--;
}
core.int buildCounterLaunchTemplateResponse = 0;
api.LaunchTemplateResponse buildLaunchTemplateResponse() {
final o = api.LaunchTemplateResponse();
buildCounterLaunchTemplateResponse++;
if (buildCounterLaunchTemplateResponse < 3) {
o.job = buildJob();
}
buildCounterLaunchTemplateResponse--;
return o;
}
void checkLaunchTemplateResponse(api.LaunchTemplateResponse o) {
buildCounterLaunchTemplateResponse++;
if (buildCounterLaunchTemplateResponse < 3) {
checkJob(o.job!);
}
buildCounterLaunchTemplateResponse--;
}
core.Map<core.String, core.Object?> buildUnnamed48() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed48(core.Map<core.String, core.Object?> o) {
unittest.expect(o, unittest.hasLength(2));
var casted12 = (o['x']!) as core.Map;
unittest.expect(casted12, unittest.hasLength(3));
unittest.expect(
casted12['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted12['bool'],
unittest.equals(true),
);
unittest.expect(
casted12['string'],
unittest.equals('foo'),
);
var casted13 = (o['y']!) as core.Map;
unittest.expect(casted13, unittest.hasLength(3));
unittest.expect(
casted13['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted13['bool'],
unittest.equals(true),
);
unittest.expect(
casted13['string'],
unittest.equals('foo'),
);
}
core.List<core.String> buildUnnamed49() => [
'foo',
'foo',
];
void checkUnnamed49(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.List<core.String> buildUnnamed50() => [
'foo',
'foo',
];
void checkUnnamed50(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 buildCounterLeaseWorkItemRequest = 0;
api.LeaseWorkItemRequest buildLeaseWorkItemRequest() {
final o = api.LeaseWorkItemRequest();
buildCounterLeaseWorkItemRequest++;
if (buildCounterLeaseWorkItemRequest < 3) {
o.currentWorkerTime = 'foo';
o.location = 'foo';
o.requestedLeaseDuration = 'foo';
o.unifiedWorkerRequest = buildUnnamed48();
o.workItemTypes = buildUnnamed49();
o.workerCapabilities = buildUnnamed50();
o.workerId = 'foo';
}
buildCounterLeaseWorkItemRequest--;
return o;
}
void checkLeaseWorkItemRequest(api.LeaseWorkItemRequest o) {
buildCounterLeaseWorkItemRequest++;
if (buildCounterLeaseWorkItemRequest < 3) {
unittest.expect(
o.currentWorkerTime!,
unittest.equals('foo'),
);
unittest.expect(
o.location!,
unittest.equals('foo'),
);
unittest.expect(
o.requestedLeaseDuration!,
unittest.equals('foo'),
);
checkUnnamed48(o.unifiedWorkerRequest!);
checkUnnamed49(o.workItemTypes!);
checkUnnamed50(o.workerCapabilities!);
unittest.expect(
o.workerId!,
unittest.equals('foo'),
);
}
buildCounterLeaseWorkItemRequest--;
}
core.Map<core.String, core.Object?> buildUnnamed51() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed51(core.Map<core.String, core.Object?> o) {
unittest.expect(o, unittest.hasLength(2));
var casted14 = (o['x']!) as core.Map;
unittest.expect(casted14, unittest.hasLength(3));
unittest.expect(
casted14['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted14['bool'],
unittest.equals(true),
);
unittest.expect(
casted14['string'],
unittest.equals('foo'),
);
var casted15 = (o['y']!) as core.Map;
unittest.expect(casted15, unittest.hasLength(3));
unittest.expect(
casted15['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted15['bool'],
unittest.equals(true),
);
unittest.expect(
casted15['string'],
unittest.equals('foo'),
);
}
core.List<api.WorkItem> buildUnnamed52() => [
buildWorkItem(),
buildWorkItem(),
];
void checkUnnamed52(core.List<api.WorkItem> o) {
unittest.expect(o, unittest.hasLength(2));
checkWorkItem(o[0]);
checkWorkItem(o[1]);
}
core.int buildCounterLeaseWorkItemResponse = 0;
api.LeaseWorkItemResponse buildLeaseWorkItemResponse() {
final o = api.LeaseWorkItemResponse();
buildCounterLeaseWorkItemResponse++;
if (buildCounterLeaseWorkItemResponse < 3) {
o.unifiedWorkerResponse = buildUnnamed51();
o.workItems = buildUnnamed52();
}
buildCounterLeaseWorkItemResponse--;
return o;
}
void checkLeaseWorkItemResponse(api.LeaseWorkItemResponse o) {
buildCounterLeaseWorkItemResponse++;
if (buildCounterLeaseWorkItemResponse < 3) {
checkUnnamed51(o.unifiedWorkerResponse!);
checkUnnamed52(o.workItems!);
}
buildCounterLeaseWorkItemResponse--;
}
core.List<api.AutoscalingEvent> buildUnnamed53() => [
buildAutoscalingEvent(),
buildAutoscalingEvent(),
];
void checkUnnamed53(core.List<api.AutoscalingEvent> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscalingEvent(o[0]);
checkAutoscalingEvent(o[1]);
}
core.List<api.JobMessage> buildUnnamed54() => [
buildJobMessage(),
buildJobMessage(),
];
void checkUnnamed54(core.List<api.JobMessage> o) {
unittest.expect(o, unittest.hasLength(2));
checkJobMessage(o[0]);
checkJobMessage(o[1]);
}
core.int buildCounterListJobMessagesResponse = 0;
api.ListJobMessagesResponse buildListJobMessagesResponse() {
final o = api.ListJobMessagesResponse();
buildCounterListJobMessagesResponse++;
if (buildCounterListJobMessagesResponse < 3) {
o.autoscalingEvents = buildUnnamed53();
o.jobMessages = buildUnnamed54();
o.nextPageToken = 'foo';
}
buildCounterListJobMessagesResponse--;
return o;
}
void checkListJobMessagesResponse(api.ListJobMessagesResponse o) {
buildCounterListJobMessagesResponse++;
if (buildCounterListJobMessagesResponse < 3) {
checkUnnamed53(o.autoscalingEvents!);
checkUnnamed54(o.jobMessages!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListJobMessagesResponse--;
}
core.List<api.FailedLocation> buildUnnamed55() => [
buildFailedLocation(),
buildFailedLocation(),
];
void checkUnnamed55(core.List<api.FailedLocation> o) {
unittest.expect(o, unittest.hasLength(2));
checkFailedLocation(o[0]);
checkFailedLocation(o[1]);
}
core.List<api.Job> buildUnnamed56() => [
buildJob(),
buildJob(),
];
void checkUnnamed56(core.List<api.Job> o) {
unittest.expect(o, unittest.hasLength(2));
checkJob(o[0]);
checkJob(o[1]);
}
core.int buildCounterListJobsResponse = 0;
api.ListJobsResponse buildListJobsResponse() {
final o = api.ListJobsResponse();
buildCounterListJobsResponse++;
if (buildCounterListJobsResponse < 3) {
o.failedLocation = buildUnnamed55();
o.jobs = buildUnnamed56();
o.nextPageToken = 'foo';
}
buildCounterListJobsResponse--;
return o;
}
void checkListJobsResponse(api.ListJobsResponse o) {
buildCounterListJobsResponse++;
if (buildCounterListJobsResponse < 3) {
checkUnnamed55(o.failedLocation!);
checkUnnamed56(o.jobs!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListJobsResponse--;
}
core.List<api.Snapshot> buildUnnamed57() => [
buildSnapshot(),
buildSnapshot(),
];
void checkUnnamed57(core.List<api.Snapshot> o) {
unittest.expect(o, unittest.hasLength(2));
checkSnapshot(o[0]);
checkSnapshot(o[1]);
}
core.int buildCounterListSnapshotsResponse = 0;
api.ListSnapshotsResponse buildListSnapshotsResponse() {
final o = api.ListSnapshotsResponse();
buildCounterListSnapshotsResponse++;
if (buildCounterListSnapshotsResponse < 3) {
o.snapshots = buildUnnamed57();
}
buildCounterListSnapshotsResponse--;
return o;
}
void checkListSnapshotsResponse(api.ListSnapshotsResponse o) {
buildCounterListSnapshotsResponse++;
if (buildCounterListSnapshotsResponse < 3) {
checkUnnamed57(o.snapshots!);
}
buildCounterListSnapshotsResponse--;
}
core.List<api.ParallelInstruction> buildUnnamed58() => [
buildParallelInstruction(),
buildParallelInstruction(),
];
void checkUnnamed58(core.List<api.ParallelInstruction> o) {
unittest.expect(o, unittest.hasLength(2));
checkParallelInstruction(o[0]);
checkParallelInstruction(o[1]);
}
core.int buildCounterMapTask = 0;
api.MapTask buildMapTask() {
final o = api.MapTask();
buildCounterMapTask++;
if (buildCounterMapTask < 3) {
o.counterPrefix = 'foo';
o.instructions = buildUnnamed58();
o.stageName = 'foo';
o.systemName = 'foo';
}
buildCounterMapTask--;
return o;
}
void checkMapTask(api.MapTask o) {
buildCounterMapTask++;
if (buildCounterMapTask < 3) {
unittest.expect(
o.counterPrefix!,
unittest.equals('foo'),
);
checkUnnamed58(o.instructions!);
unittest.expect(
o.stageName!,
unittest.equals('foo'),
);
unittest.expect(
o.systemName!,
unittest.equals('foo'),
);
}
buildCounterMapTask--;
}
core.int buildCounterMemInfo = 0;
api.MemInfo buildMemInfo() {
final o = api.MemInfo();
buildCounterMemInfo++;
if (buildCounterMemInfo < 3) {
o.currentLimitBytes = 'foo';
o.currentOoms = 'foo';
o.currentRssBytes = 'foo';
o.timestamp = 'foo';
o.totalGbMs = 'foo';
}
buildCounterMemInfo--;
return o;
}
void checkMemInfo(api.MemInfo o) {
buildCounterMemInfo++;
if (buildCounterMemInfo < 3) {
unittest.expect(
o.currentLimitBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.currentOoms!,
unittest.equals('foo'),
);
unittest.expect(
o.currentRssBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.timestamp!,
unittest.equals('foo'),
);
unittest.expect(
o.totalGbMs!,
unittest.equals('foo'),
);
}
buildCounterMemInfo--;
}
core.int buildCounterMetricShortId = 0;
api.MetricShortId buildMetricShortId() {
final o = api.MetricShortId();
buildCounterMetricShortId++;
if (buildCounterMetricShortId < 3) {
o.metricIndex = 42;
o.shortId = 'foo';
}
buildCounterMetricShortId--;
return o;
}
void checkMetricShortId(api.MetricShortId o) {
buildCounterMetricShortId++;
if (buildCounterMetricShortId < 3) {
unittest.expect(
o.metricIndex!,
unittest.equals(42),
);
unittest.expect(
o.shortId!,
unittest.equals('foo'),
);
}
buildCounterMetricShortId--;
}
core.Map<core.String, core.String> buildUnnamed59() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed59(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 buildCounterMetricStructuredName = 0;
api.MetricStructuredName buildMetricStructuredName() {
final o = api.MetricStructuredName();
buildCounterMetricStructuredName++;
if (buildCounterMetricStructuredName < 3) {
o.context = buildUnnamed59();
o.name = 'foo';
o.origin = 'foo';
}
buildCounterMetricStructuredName--;
return o;
}
void checkMetricStructuredName(api.MetricStructuredName o) {
buildCounterMetricStructuredName++;
if (buildCounterMetricStructuredName < 3) {
checkUnnamed59(o.context!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.origin!,
unittest.equals('foo'),
);
}
buildCounterMetricStructuredName--;
}
core.int buildCounterMetricUpdate = 0;
api.MetricUpdate buildMetricUpdate() {
final o = api.MetricUpdate();
buildCounterMetricUpdate++;
if (buildCounterMetricUpdate < 3) {
o.cumulative = true;
o.distribution = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o.gauge = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o.internal = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o.kind = 'foo';
o.meanCount = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o.meanSum = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o.name = buildMetricStructuredName();
o.scalar = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o.set = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o.updateTime = 'foo';
}
buildCounterMetricUpdate--;
return o;
}
void checkMetricUpdate(api.MetricUpdate o) {
buildCounterMetricUpdate++;
if (buildCounterMetricUpdate < 3) {
unittest.expect(o.cumulative!, unittest.isTrue);
var casted16 = (o.distribution!) as core.Map;
unittest.expect(casted16, unittest.hasLength(3));
unittest.expect(
casted16['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted16['bool'],
unittest.equals(true),
);
unittest.expect(
casted16['string'],
unittest.equals('foo'),
);
var casted17 = (o.gauge!) as core.Map;
unittest.expect(casted17, unittest.hasLength(3));
unittest.expect(
casted17['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted17['bool'],
unittest.equals(true),
);
unittest.expect(
casted17['string'],
unittest.equals('foo'),
);
var casted18 = (o.internal!) as core.Map;
unittest.expect(casted18, unittest.hasLength(3));
unittest.expect(
casted18['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted18['bool'],
unittest.equals(true),
);
unittest.expect(
casted18['string'],
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
var casted19 = (o.meanCount!) as core.Map;
unittest.expect(casted19, unittest.hasLength(3));
unittest.expect(
casted19['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted19['bool'],
unittest.equals(true),
);
unittest.expect(
casted19['string'],
unittest.equals('foo'),
);
var casted20 = (o.meanSum!) as core.Map;
unittest.expect(casted20, unittest.hasLength(3));
unittest.expect(
casted20['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted20['bool'],
unittest.equals(true),
);
unittest.expect(
casted20['string'],
unittest.equals('foo'),
);
checkMetricStructuredName(o.name!);
var casted21 = (o.scalar!) as core.Map;
unittest.expect(casted21, unittest.hasLength(3));
unittest.expect(
casted21['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted21['bool'],
unittest.equals(true),
);
unittest.expect(
casted21['string'],
unittest.equals('foo'),
);
var casted22 = (o.set!) as core.Map;
unittest.expect(casted22, unittest.hasLength(3));
unittest.expect(
casted22['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted22['bool'],
unittest.equals(true),
);
unittest.expect(
casted22['string'],
unittest.equals('foo'),
);
unittest.expect(
o.updateTime!,
unittest.equals('foo'),
);
}
buildCounterMetricUpdate--;
}
core.int buildCounterMountedDataDisk = 0;
api.MountedDataDisk buildMountedDataDisk() {
final o = api.MountedDataDisk();
buildCounterMountedDataDisk++;
if (buildCounterMountedDataDisk < 3) {
o.dataDisk = 'foo';
}
buildCounterMountedDataDisk--;
return o;
}
void checkMountedDataDisk(api.MountedDataDisk o) {
buildCounterMountedDataDisk++;
if (buildCounterMountedDataDisk < 3) {
unittest.expect(
o.dataDisk!,
unittest.equals('foo'),
);
}
buildCounterMountedDataDisk--;
}
core.int buildCounterMultiOutputInfo = 0;
api.MultiOutputInfo buildMultiOutputInfo() {
final o = api.MultiOutputInfo();
buildCounterMultiOutputInfo++;
if (buildCounterMultiOutputInfo < 3) {
o.tag = 'foo';
}
buildCounterMultiOutputInfo--;
return o;
}
void checkMultiOutputInfo(api.MultiOutputInfo o) {
buildCounterMultiOutputInfo++;
if (buildCounterMultiOutputInfo < 3) {
unittest.expect(
o.tag!,
unittest.equals('foo'),
);
}
buildCounterMultiOutputInfo--;
}
core.int buildCounterNameAndKind = 0;
api.NameAndKind buildNameAndKind() {
final o = api.NameAndKind();
buildCounterNameAndKind++;
if (buildCounterNameAndKind < 3) {
o.kind = 'foo';
o.name = 'foo';
}
buildCounterNameAndKind--;
return o;
}
void checkNameAndKind(api.NameAndKind o) {
buildCounterNameAndKind++;
if (buildCounterNameAndKind < 3) {
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterNameAndKind--;
}
core.int buildCounterPackage = 0;
api.Package buildPackage() {
final o = api.Package();
buildCounterPackage++;
if (buildCounterPackage < 3) {
o.location = 'foo';
o.name = 'foo';
}
buildCounterPackage--;
return o;
}
void checkPackage(api.Package o) {
buildCounterPackage++;
if (buildCounterPackage < 3) {
unittest.expect(
o.location!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterPackage--;
}
core.List<api.MultiOutputInfo> buildUnnamed60() => [
buildMultiOutputInfo(),
buildMultiOutputInfo(),
];
void checkUnnamed60(core.List<api.MultiOutputInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkMultiOutputInfo(o[0]);
checkMultiOutputInfo(o[1]);
}
core.List<api.SideInputInfo> buildUnnamed61() => [
buildSideInputInfo(),
buildSideInputInfo(),
];
void checkUnnamed61(core.List<api.SideInputInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkSideInputInfo(o[0]);
checkSideInputInfo(o[1]);
}
core.Map<core.String, core.Object?> buildUnnamed62() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed62(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));
unittest.expect(
casted23['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted23['bool'],
unittest.equals(true),
);
unittest.expect(
casted23['string'],
unittest.equals('foo'),
);
var casted24 = (o['y']!) as core.Map;
unittest.expect(casted24, unittest.hasLength(3));
unittest.expect(
casted24['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted24['bool'],
unittest.equals(true),
);
unittest.expect(
casted24['string'],
unittest.equals('foo'),
);
}
core.int buildCounterParDoInstruction = 0;
api.ParDoInstruction buildParDoInstruction() {
final o = api.ParDoInstruction();
buildCounterParDoInstruction++;
if (buildCounterParDoInstruction < 3) {
o.input = buildInstructionInput();
o.multiOutputInfos = buildUnnamed60();
o.numOutputs = 42;
o.sideInputs = buildUnnamed61();
o.userFn = buildUnnamed62();
}
buildCounterParDoInstruction--;
return o;
}
void checkParDoInstruction(api.ParDoInstruction o) {
buildCounterParDoInstruction++;
if (buildCounterParDoInstruction < 3) {
checkInstructionInput(o.input!);
checkUnnamed60(o.multiOutputInfos!);
unittest.expect(
o.numOutputs!,
unittest.equals(42),
);
checkUnnamed61(o.sideInputs!);
checkUnnamed62(o.userFn!);
}
buildCounterParDoInstruction--;
}
core.List<api.InstructionOutput> buildUnnamed63() => [
buildInstructionOutput(),
buildInstructionOutput(),
];
void checkUnnamed63(core.List<api.InstructionOutput> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstructionOutput(o[0]);
checkInstructionOutput(o[1]);
}
core.int buildCounterParallelInstruction = 0;
api.ParallelInstruction buildParallelInstruction() {
final o = api.ParallelInstruction();
buildCounterParallelInstruction++;
if (buildCounterParallelInstruction < 3) {
o.flatten = buildFlattenInstruction();
o.name = 'foo';
o.originalName = 'foo';
o.outputs = buildUnnamed63();
o.parDo = buildParDoInstruction();
o.partialGroupByKey = buildPartialGroupByKeyInstruction();
o.read = buildReadInstruction();
o.systemName = 'foo';
o.write = buildWriteInstruction();
}
buildCounterParallelInstruction--;
return o;
}
void checkParallelInstruction(api.ParallelInstruction o) {
buildCounterParallelInstruction++;
if (buildCounterParallelInstruction < 3) {
checkFlattenInstruction(o.flatten!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.originalName!,
unittest.equals('foo'),
);
checkUnnamed63(o.outputs!);
checkParDoInstruction(o.parDo!);
checkPartialGroupByKeyInstruction(o.partialGroupByKey!);
checkReadInstruction(o.read!);
unittest.expect(
o.systemName!,
unittest.equals('foo'),
);
checkWriteInstruction(o.write!);
}
buildCounterParallelInstruction--;
}
core.int buildCounterParameter = 0;
api.Parameter buildParameter() {
final o = api.Parameter();
buildCounterParameter++;
if (buildCounterParameter < 3) {
o.key = 'foo';
o.value = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
}
buildCounterParameter--;
return o;
}
void checkParameter(api.Parameter o) {
buildCounterParameter++;
if (buildCounterParameter < 3) {
unittest.expect(
o.key!,
unittest.equals('foo'),
);
var casted25 = (o.value!) as core.Map;
unittest.expect(casted25, unittest.hasLength(3));
unittest.expect(
casted25['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted25['bool'],
unittest.equals(true),
);
unittest.expect(
casted25['string'],
unittest.equals('foo'),
);
}
buildCounterParameter--;
}
core.Map<core.String, core.String> buildUnnamed64() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed64(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.List<api.ParameterMetadataEnumOption> buildUnnamed65() => [
buildParameterMetadataEnumOption(),
buildParameterMetadataEnumOption(),
];
void checkUnnamed65(core.List<api.ParameterMetadataEnumOption> o) {
unittest.expect(o, unittest.hasLength(2));
checkParameterMetadataEnumOption(o[0]);
checkParameterMetadataEnumOption(o[1]);
}
core.List<core.String> buildUnnamed66() => [
'foo',
'foo',
];
void checkUnnamed66(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.List<core.String> buildUnnamed67() => [
'foo',
'foo',
];
void checkUnnamed67(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 buildCounterParameterMetadata = 0;
api.ParameterMetadata buildParameterMetadata() {
final o = api.ParameterMetadata();
buildCounterParameterMetadata++;
if (buildCounterParameterMetadata < 3) {
o.customMetadata = buildUnnamed64();
o.enumOptions = buildUnnamed65();
o.groupName = 'foo';
o.helpText = 'foo';
o.isOptional = true;
o.label = 'foo';
o.name = 'foo';
o.paramType = 'foo';
o.parentName = 'foo';
o.parentTriggerValues = buildUnnamed66();
o.regexes = buildUnnamed67();
}
buildCounterParameterMetadata--;
return o;
}
void checkParameterMetadata(api.ParameterMetadata o) {
buildCounterParameterMetadata++;
if (buildCounterParameterMetadata < 3) {
checkUnnamed64(o.customMetadata!);
checkUnnamed65(o.enumOptions!);
unittest.expect(
o.groupName!,
unittest.equals('foo'),
);
unittest.expect(
o.helpText!,
unittest.equals('foo'),
);
unittest.expect(o.isOptional!, unittest.isTrue);
unittest.expect(
o.label!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.paramType!,
unittest.equals('foo'),
);
unittest.expect(
o.parentName!,
unittest.equals('foo'),
);
checkUnnamed66(o.parentTriggerValues!);
checkUnnamed67(o.regexes!);
}
buildCounterParameterMetadata--;
}
core.int buildCounterParameterMetadataEnumOption = 0;
api.ParameterMetadataEnumOption buildParameterMetadataEnumOption() {
final o = api.ParameterMetadataEnumOption();
buildCounterParameterMetadataEnumOption++;
if (buildCounterParameterMetadataEnumOption < 3) {
o.description = 'foo';
o.label = 'foo';
o.value = 'foo';
}
buildCounterParameterMetadataEnumOption--;
return o;
}
void checkParameterMetadataEnumOption(api.ParameterMetadataEnumOption o) {
buildCounterParameterMetadataEnumOption++;
if (buildCounterParameterMetadataEnumOption < 3) {
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.label!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterParameterMetadataEnumOption--;
}
core.Map<core.String, core.Object?> buildUnnamed68() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed68(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));
unittest.expect(
casted26['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted26['bool'],
unittest.equals(true),
);
unittest.expect(
casted26['string'],
unittest.equals('foo'),
);
var casted27 = (o['y']!) as core.Map;
unittest.expect(casted27, unittest.hasLength(3));
unittest.expect(
casted27['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted27['bool'],
unittest.equals(true),
);
unittest.expect(
casted27['string'],
unittest.equals('foo'),
);
}
core.List<api.SideInputInfo> buildUnnamed69() => [
buildSideInputInfo(),
buildSideInputInfo(),
];
void checkUnnamed69(core.List<api.SideInputInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkSideInputInfo(o[0]);
checkSideInputInfo(o[1]);
}
core.Map<core.String, core.Object?> buildUnnamed70() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed70(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));
unittest.expect(
casted28['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted28['bool'],
unittest.equals(true),
);
unittest.expect(
casted28['string'],
unittest.equals('foo'),
);
var casted29 = (o['y']!) as core.Map;
unittest.expect(casted29, unittest.hasLength(3));
unittest.expect(
casted29['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted29['bool'],
unittest.equals(true),
);
unittest.expect(
casted29['string'],
unittest.equals('foo'),
);
}
core.int buildCounterPartialGroupByKeyInstruction = 0;
api.PartialGroupByKeyInstruction buildPartialGroupByKeyInstruction() {
final o = api.PartialGroupByKeyInstruction();
buildCounterPartialGroupByKeyInstruction++;
if (buildCounterPartialGroupByKeyInstruction < 3) {
o.input = buildInstructionInput();
o.inputElementCodec = buildUnnamed68();
o.originalCombineValuesInputStoreName = 'foo';
o.originalCombineValuesStepName = 'foo';
o.sideInputs = buildUnnamed69();
o.valueCombiningFn = buildUnnamed70();
}
buildCounterPartialGroupByKeyInstruction--;
return o;
}
void checkPartialGroupByKeyInstruction(api.PartialGroupByKeyInstruction o) {
buildCounterPartialGroupByKeyInstruction++;
if (buildCounterPartialGroupByKeyInstruction < 3) {
checkInstructionInput(o.input!);
checkUnnamed68(o.inputElementCodec!);
unittest.expect(
o.originalCombineValuesInputStoreName!,
unittest.equals('foo'),
);
unittest.expect(
o.originalCombineValuesStepName!,
unittest.equals('foo'),
);
checkUnnamed69(o.sideInputs!);
checkUnnamed70(o.valueCombiningFn!);
}
buildCounterPartialGroupByKeyInstruction--;
}
core.List<api.DisplayData> buildUnnamed71() => [
buildDisplayData(),
buildDisplayData(),
];
void checkUnnamed71(core.List<api.DisplayData> o) {
unittest.expect(o, unittest.hasLength(2));
checkDisplayData(o[0]);
checkDisplayData(o[1]);
}
core.List<api.ExecutionStageSummary> buildUnnamed72() => [
buildExecutionStageSummary(),
buildExecutionStageSummary(),
];
void checkUnnamed72(core.List<api.ExecutionStageSummary> o) {
unittest.expect(o, unittest.hasLength(2));
checkExecutionStageSummary(o[0]);
checkExecutionStageSummary(o[1]);
}
core.List<api.TransformSummary> buildUnnamed73() => [
buildTransformSummary(),
buildTransformSummary(),
];
void checkUnnamed73(core.List<api.TransformSummary> o) {
unittest.expect(o, unittest.hasLength(2));
checkTransformSummary(o[0]);
checkTransformSummary(o[1]);
}
core.int buildCounterPipelineDescription = 0;
api.PipelineDescription buildPipelineDescription() {
final o = api.PipelineDescription();
buildCounterPipelineDescription++;
if (buildCounterPipelineDescription < 3) {
o.displayData = buildUnnamed71();
o.executionPipelineStage = buildUnnamed72();
o.originalPipelineTransform = buildUnnamed73();
o.stepNamesHash = 'foo';
}
buildCounterPipelineDescription--;
return o;
}
void checkPipelineDescription(api.PipelineDescription o) {
buildCounterPipelineDescription++;
if (buildCounterPipelineDescription < 3) {
checkUnnamed71(o.displayData!);
checkUnnamed72(o.executionPipelineStage!);
checkUnnamed73(o.originalPipelineTransform!);
unittest.expect(
o.stepNamesHash!,
unittest.equals('foo'),
);
}
buildCounterPipelineDescription--;
}
core.int buildCounterPoint = 0;
api.Point buildPoint() {
final o = api.Point();
buildCounterPoint++;
if (buildCounterPoint < 3) {
o.time = 'foo';
o.value = 42.0;
}
buildCounterPoint--;
return o;
}
void checkPoint(api.Point o) {
buildCounterPoint++;
if (buildCounterPoint < 3) {
unittest.expect(
o.time!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals(42.0),
);
}
buildCounterPoint--;
}
core.int buildCounterPosition = 0;
api.Position buildPosition() {
final o = api.Position();
buildCounterPosition++;
if (buildCounterPosition < 3) {
o.byteOffset = 'foo';
o.concatPosition = buildConcatPosition();
o.end = true;
o.key = 'foo';
o.recordIndex = 'foo';
o.shufflePosition = 'foo';
}
buildCounterPosition--;
return o;
}
void checkPosition(api.Position o) {
buildCounterPosition++;
if (buildCounterPosition < 3) {
unittest.expect(
o.byteOffset!,
unittest.equals('foo'),
);
checkConcatPosition(o.concatPosition!);
unittest.expect(o.end!, unittest.isTrue);
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(
o.recordIndex!,
unittest.equals('foo'),
);
unittest.expect(
o.shufflePosition!,
unittest.equals('foo'),
);
}
buildCounterPosition--;
}
core.List<api.Point> buildUnnamed74() => [
buildPoint(),
buildPoint(),
];
void checkUnnamed74(core.List<api.Point> o) {
unittest.expect(o, unittest.hasLength(2));
checkPoint(o[0]);
checkPoint(o[1]);
}
core.int buildCounterProgressTimeseries = 0;
api.ProgressTimeseries buildProgressTimeseries() {
final o = api.ProgressTimeseries();
buildCounterProgressTimeseries++;
if (buildCounterProgressTimeseries < 3) {
o.currentProgress = 42.0;
o.dataPoints = buildUnnamed74();
}
buildCounterProgressTimeseries--;
return o;
}
void checkProgressTimeseries(api.ProgressTimeseries o) {
buildCounterProgressTimeseries++;
if (buildCounterProgressTimeseries < 3) {
unittest.expect(
o.currentProgress!,
unittest.equals(42.0),
);
checkUnnamed74(o.dataPoints!);
}
buildCounterProgressTimeseries--;
}
core.int buildCounterPubSubIODetails = 0;
api.PubSubIODetails buildPubSubIODetails() {
final o = api.PubSubIODetails();
buildCounterPubSubIODetails++;
if (buildCounterPubSubIODetails < 3) {
o.subscription = 'foo';
o.topic = 'foo';
}
buildCounterPubSubIODetails--;
return o;
}
void checkPubSubIODetails(api.PubSubIODetails o) {
buildCounterPubSubIODetails++;
if (buildCounterPubSubIODetails < 3) {
unittest.expect(
o.subscription!,
unittest.equals('foo'),
);
unittest.expect(
o.topic!,
unittest.equals('foo'),
);
}
buildCounterPubSubIODetails--;
}
core.int buildCounterPubsubLocation = 0;
api.PubsubLocation buildPubsubLocation() {
final o = api.PubsubLocation();
buildCounterPubsubLocation++;
if (buildCounterPubsubLocation < 3) {
o.dropLateData = true;
o.dynamicDestinations = true;
o.idLabel = 'foo';
o.subscription = 'foo';
o.timestampLabel = 'foo';
o.topic = 'foo';
o.trackingSubscription = 'foo';
o.withAttributes = true;
}
buildCounterPubsubLocation--;
return o;
}
void checkPubsubLocation(api.PubsubLocation o) {
buildCounterPubsubLocation++;
if (buildCounterPubsubLocation < 3) {
unittest.expect(o.dropLateData!, unittest.isTrue);
unittest.expect(o.dynamicDestinations!, unittest.isTrue);
unittest.expect(
o.idLabel!,
unittest.equals('foo'),
);
unittest.expect(
o.subscription!,
unittest.equals('foo'),
);
unittest.expect(
o.timestampLabel!,
unittest.equals('foo'),
);
unittest.expect(
o.topic!,
unittest.equals('foo'),
);
unittest.expect(
o.trackingSubscription!,
unittest.equals('foo'),
);
unittest.expect(o.withAttributes!, unittest.isTrue);
}
buildCounterPubsubLocation--;
}
core.int buildCounterPubsubSnapshotMetadata = 0;
api.PubsubSnapshotMetadata buildPubsubSnapshotMetadata() {
final o = api.PubsubSnapshotMetadata();
buildCounterPubsubSnapshotMetadata++;
if (buildCounterPubsubSnapshotMetadata < 3) {
o.expireTime = 'foo';
o.snapshotName = 'foo';
o.topicName = 'foo';
}
buildCounterPubsubSnapshotMetadata--;
return o;
}
void checkPubsubSnapshotMetadata(api.PubsubSnapshotMetadata o) {
buildCounterPubsubSnapshotMetadata++;
if (buildCounterPubsubSnapshotMetadata < 3) {
unittest.expect(
o.expireTime!,
unittest.equals('foo'),
);
unittest.expect(
o.snapshotName!,
unittest.equals('foo'),
);
unittest.expect(
o.topicName!,
unittest.equals('foo'),
);
}
buildCounterPubsubSnapshotMetadata--;
}
core.int buildCounterReadInstruction = 0;
api.ReadInstruction buildReadInstruction() {
final o = api.ReadInstruction();
buildCounterReadInstruction++;
if (buildCounterReadInstruction < 3) {
o.source = buildSource();
}
buildCounterReadInstruction--;
return o;
}
void checkReadInstruction(api.ReadInstruction o) {
buildCounterReadInstruction++;
if (buildCounterReadInstruction < 3) {
checkSource(o.source!);
}
buildCounterReadInstruction--;
}
core.Map<core.String, core.Object?> buildUnnamed75() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed75(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));
unittest.expect(
casted30['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted30['bool'],
unittest.equals(true),
);
unittest.expect(
casted30['string'],
unittest.equals('foo'),
);
var casted31 = (o['y']!) as core.Map;
unittest.expect(casted31, unittest.hasLength(3));
unittest.expect(
casted31['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted31['bool'],
unittest.equals(true),
);
unittest.expect(
casted31['string'],
unittest.equals('foo'),
);
}
core.List<api.WorkItemStatus> buildUnnamed76() => [
buildWorkItemStatus(),
buildWorkItemStatus(),
];
void checkUnnamed76(core.List<api.WorkItemStatus> o) {
unittest.expect(o, unittest.hasLength(2));
checkWorkItemStatus(o[0]);
checkWorkItemStatus(o[1]);
}
core.int buildCounterReportWorkItemStatusRequest = 0;
api.ReportWorkItemStatusRequest buildReportWorkItemStatusRequest() {
final o = api.ReportWorkItemStatusRequest();
buildCounterReportWorkItemStatusRequest++;
if (buildCounterReportWorkItemStatusRequest < 3) {
o.currentWorkerTime = 'foo';
o.location = 'foo';
o.unifiedWorkerRequest = buildUnnamed75();
o.workItemStatuses = buildUnnamed76();
o.workerId = 'foo';
}
buildCounterReportWorkItemStatusRequest--;
return o;
}
void checkReportWorkItemStatusRequest(api.ReportWorkItemStatusRequest o) {
buildCounterReportWorkItemStatusRequest++;
if (buildCounterReportWorkItemStatusRequest < 3) {
unittest.expect(
o.currentWorkerTime!,
unittest.equals('foo'),
);
unittest.expect(
o.location!,
unittest.equals('foo'),
);
checkUnnamed75(o.unifiedWorkerRequest!);
checkUnnamed76(o.workItemStatuses!);
unittest.expect(
o.workerId!,
unittest.equals('foo'),
);
}
buildCounterReportWorkItemStatusRequest--;
}
core.Map<core.String, core.Object?> buildUnnamed77() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed77(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));
unittest.expect(
casted32['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted32['bool'],
unittest.equals(true),
);
unittest.expect(
casted32['string'],
unittest.equals('foo'),
);
var casted33 = (o['y']!) as core.Map;
unittest.expect(casted33, unittest.hasLength(3));
unittest.expect(
casted33['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted33['bool'],
unittest.equals(true),
);
unittest.expect(
casted33['string'],
unittest.equals('foo'),
);
}
core.List<api.WorkItemServiceState> buildUnnamed78() => [
buildWorkItemServiceState(),
buildWorkItemServiceState(),
];
void checkUnnamed78(core.List<api.WorkItemServiceState> o) {
unittest.expect(o, unittest.hasLength(2));
checkWorkItemServiceState(o[0]);
checkWorkItemServiceState(o[1]);
}
core.int buildCounterReportWorkItemStatusResponse = 0;
api.ReportWorkItemStatusResponse buildReportWorkItemStatusResponse() {
final o = api.ReportWorkItemStatusResponse();
buildCounterReportWorkItemStatusResponse++;
if (buildCounterReportWorkItemStatusResponse < 3) {
o.unifiedWorkerResponse = buildUnnamed77();
o.workItemServiceStates = buildUnnamed78();
}
buildCounterReportWorkItemStatusResponse--;
return o;
}
void checkReportWorkItemStatusResponse(api.ReportWorkItemStatusResponse o) {
buildCounterReportWorkItemStatusResponse++;
if (buildCounterReportWorkItemStatusResponse < 3) {
checkUnnamed77(o.unifiedWorkerResponse!);
checkUnnamed78(o.workItemServiceStates!);
}
buildCounterReportWorkItemStatusResponse--;
}
core.int buildCounterReportedParallelism = 0;
api.ReportedParallelism buildReportedParallelism() {
final o = api.ReportedParallelism();
buildCounterReportedParallelism++;
if (buildCounterReportedParallelism < 3) {
o.isInfinite = true;
o.value = 42.0;
}
buildCounterReportedParallelism--;
return o;
}
void checkReportedParallelism(api.ReportedParallelism o) {
buildCounterReportedParallelism++;
if (buildCounterReportedParallelism < 3) {
unittest.expect(o.isInfinite!, unittest.isTrue);
unittest.expect(
o.value!,
unittest.equals(42.0),
);
}
buildCounterReportedParallelism--;
}
core.Map<core.String, api.ResourceUtilizationReport> buildUnnamed79() => {
'x': buildResourceUtilizationReport(),
'y': buildResourceUtilizationReport(),
};
void checkUnnamed79(core.Map<core.String, api.ResourceUtilizationReport> o) {
unittest.expect(o, unittest.hasLength(2));
checkResourceUtilizationReport(o['x']!);
checkResourceUtilizationReport(o['y']!);
}
core.List<api.CPUTime> buildUnnamed80() => [
buildCPUTime(),
buildCPUTime(),
];
void checkUnnamed80(core.List<api.CPUTime> o) {
unittest.expect(o, unittest.hasLength(2));
checkCPUTime(o[0]);
checkCPUTime(o[1]);
}
core.List<api.MemInfo> buildUnnamed81() => [
buildMemInfo(),
buildMemInfo(),
];
void checkUnnamed81(core.List<api.MemInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkMemInfo(o[0]);
checkMemInfo(o[1]);
}
core.int buildCounterResourceUtilizationReport = 0;
api.ResourceUtilizationReport buildResourceUtilizationReport() {
final o = api.ResourceUtilizationReport();
buildCounterResourceUtilizationReport++;
if (buildCounterResourceUtilizationReport < 3) {
o.containers = buildUnnamed79();
o.cpuTime = buildUnnamed80();
o.memoryInfo = buildUnnamed81();
}
buildCounterResourceUtilizationReport--;
return o;
}
void checkResourceUtilizationReport(api.ResourceUtilizationReport o) {
buildCounterResourceUtilizationReport++;
if (buildCounterResourceUtilizationReport < 3) {
checkUnnamed79(o.containers!);
checkUnnamed80(o.cpuTime!);
checkUnnamed81(o.memoryInfo!);
}
buildCounterResourceUtilizationReport--;
}
core.int buildCounterResourceUtilizationReportResponse = 0;
api.ResourceUtilizationReportResponse buildResourceUtilizationReportResponse() {
final o = api.ResourceUtilizationReportResponse();
buildCounterResourceUtilizationReportResponse++;
if (buildCounterResourceUtilizationReportResponse < 3) {}
buildCounterResourceUtilizationReportResponse--;
return o;
}
void checkResourceUtilizationReportResponse(
api.ResourceUtilizationReportResponse o) {
buildCounterResourceUtilizationReportResponse++;
if (buildCounterResourceUtilizationReportResponse < 3) {}
buildCounterResourceUtilizationReportResponse--;
}
core.List<core.String> buildUnnamed82() => [
'foo',
'foo',
];
void checkUnnamed82(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.Map<core.String, core.String> buildUnnamed83() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed83(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;
api.RuntimeEnvironment buildRuntimeEnvironment() {
final o = api.RuntimeEnvironment();
buildCounterRuntimeEnvironment++;
if (buildCounterRuntimeEnvironment < 3) {
o.additionalExperiments = buildUnnamed82();
o.additionalUserLabels = buildUnnamed83();
o.bypassTempDirValidation = true;
o.diskSizeGb = 42;
o.enableStreamingEngine = true;
o.ipConfiguration = 'foo';
o.kmsKeyName = 'foo';
o.machineType = 'foo';
o.maxWorkers = 42;
o.network = 'foo';
o.numWorkers = 42;
o.serviceAccountEmail = 'foo';
o.subnetwork = 'foo';
o.tempLocation = 'foo';
o.workerRegion = 'foo';
o.workerZone = 'foo';
o.zone = 'foo';
}
buildCounterRuntimeEnvironment--;
return o;
}
void checkRuntimeEnvironment(api.RuntimeEnvironment o) {
buildCounterRuntimeEnvironment++;
if (buildCounterRuntimeEnvironment < 3) {
checkUnnamed82(o.additionalExperiments!);
checkUnnamed83(o.additionalUserLabels!);
unittest.expect(o.bypassTempDirValidation!, unittest.isTrue);
unittest.expect(
o.diskSizeGb!,
unittest.equals(42),
);
unittest.expect(o.enableStreamingEngine!, unittest.isTrue);
unittest.expect(
o.ipConfiguration!,
unittest.equals('foo'),
);
unittest.expect(
o.kmsKeyName!,
unittest.equals('foo'),
);
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'),
);
unittest.expect(
o.workerRegion!,
unittest.equals('foo'),
);
unittest.expect(
o.workerZone!,
unittest.equals('foo'),
);
unittest.expect(
o.zone!,
unittest.equals('foo'),
);
}
buildCounterRuntimeEnvironment--;
}
core.List<api.ParameterMetadata> buildUnnamed84() => [
buildParameterMetadata(),
buildParameterMetadata(),
];
void checkUnnamed84(core.List<api.ParameterMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkParameterMetadata(o[0]);
checkParameterMetadata(o[1]);
}
core.int buildCounterRuntimeMetadata = 0;
api.RuntimeMetadata buildRuntimeMetadata() {
final o = api.RuntimeMetadata();
buildCounterRuntimeMetadata++;
if (buildCounterRuntimeMetadata < 3) {
o.parameters = buildUnnamed84();
o.sdkInfo = buildSDKInfo();
}
buildCounterRuntimeMetadata--;
return o;
}
void checkRuntimeMetadata(api.RuntimeMetadata o) {
buildCounterRuntimeMetadata++;
if (buildCounterRuntimeMetadata < 3) {
checkUnnamed84(o.parameters!);
checkSDKInfo(o.sdkInfo!);
}
buildCounterRuntimeMetadata--;
}
core.int buildCounterRuntimeUpdatableParams = 0;
api.RuntimeUpdatableParams buildRuntimeUpdatableParams() {
final o = api.RuntimeUpdatableParams();
buildCounterRuntimeUpdatableParams++;
if (buildCounterRuntimeUpdatableParams < 3) {
o.maxNumWorkers = 42;
o.minNumWorkers = 42;
}
buildCounterRuntimeUpdatableParams--;
return o;
}
void checkRuntimeUpdatableParams(api.RuntimeUpdatableParams o) {
buildCounterRuntimeUpdatableParams++;
if (buildCounterRuntimeUpdatableParams < 3) {
unittest.expect(
o.maxNumWorkers!,
unittest.equals(42),
);
unittest.expect(
o.minNumWorkers!,
unittest.equals(42),
);
}
buildCounterRuntimeUpdatableParams--;
}
core.int buildCounterSDKInfo = 0;
api.SDKInfo buildSDKInfo() {
final o = api.SDKInfo();
buildCounterSDKInfo++;
if (buildCounterSDKInfo < 3) {
o.language = 'foo';
o.version = 'foo';
}
buildCounterSDKInfo--;
return o;
}
void checkSDKInfo(api.SDKInfo o) {
buildCounterSDKInfo++;
if (buildCounterSDKInfo < 3) {
unittest.expect(
o.language!,
unittest.equals('foo'),
);
unittest.expect(
o.version!,
unittest.equals('foo'),
);
}
buildCounterSDKInfo--;
}
core.int buildCounterSdkBug = 0;
api.SdkBug buildSdkBug() {
final o = api.SdkBug();
buildCounterSdkBug++;
if (buildCounterSdkBug < 3) {
o.severity = 'foo';
o.type = 'foo';
o.uri = 'foo';
}
buildCounterSdkBug--;
return o;
}
void checkSdkBug(api.SdkBug o) {
buildCounterSdkBug++;
if (buildCounterSdkBug < 3) {
unittest.expect(
o.severity!,
unittest.equals('foo'),
);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
unittest.expect(
o.uri!,
unittest.equals('foo'),
);
}
buildCounterSdkBug--;
}
core.List<core.String> buildUnnamed85() => [
'foo',
'foo',
];
void checkUnnamed85(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 buildCounterSdkHarnessContainerImage = 0;
api.SdkHarnessContainerImage buildSdkHarnessContainerImage() {
final o = api.SdkHarnessContainerImage();
buildCounterSdkHarnessContainerImage++;
if (buildCounterSdkHarnessContainerImage < 3) {
o.capabilities = buildUnnamed85();
o.containerImage = 'foo';
o.environmentId = 'foo';
o.useSingleCorePerContainer = true;
}
buildCounterSdkHarnessContainerImage--;
return o;
}
void checkSdkHarnessContainerImage(api.SdkHarnessContainerImage o) {
buildCounterSdkHarnessContainerImage++;
if (buildCounterSdkHarnessContainerImage < 3) {
checkUnnamed85(o.capabilities!);
unittest.expect(
o.containerImage!,
unittest.equals('foo'),
);
unittest.expect(
o.environmentId!,
unittest.equals('foo'),
);
unittest.expect(o.useSingleCorePerContainer!, unittest.isTrue);
}
buildCounterSdkHarnessContainerImage--;
}
core.List<api.SdkBug> buildUnnamed86() => [
buildSdkBug(),
buildSdkBug(),
];
void checkUnnamed86(core.List<api.SdkBug> o) {
unittest.expect(o, unittest.hasLength(2));
checkSdkBug(o[0]);
checkSdkBug(o[1]);
}
core.int buildCounterSdkVersion = 0;
api.SdkVersion buildSdkVersion() {
final o = api.SdkVersion();
buildCounterSdkVersion++;
if (buildCounterSdkVersion < 3) {
o.bugs = buildUnnamed86();
o.sdkSupportStatus = 'foo';
o.version = 'foo';
o.versionDisplayName = 'foo';
}
buildCounterSdkVersion--;
return o;
}
void checkSdkVersion(api.SdkVersion o) {
buildCounterSdkVersion++;
if (buildCounterSdkVersion < 3) {
checkUnnamed86(o.bugs!);
unittest.expect(
o.sdkSupportStatus!,
unittest.equals('foo'),
);
unittest.expect(
o.version!,
unittest.equals('foo'),
);
unittest.expect(
o.versionDisplayName!,
unittest.equals('foo'),
);
}
buildCounterSdkVersion--;
}
core.int buildCounterSendDebugCaptureRequest = 0;
api.SendDebugCaptureRequest buildSendDebugCaptureRequest() {
final o = api.SendDebugCaptureRequest();
buildCounterSendDebugCaptureRequest++;
if (buildCounterSendDebugCaptureRequest < 3) {
o.componentId = 'foo';
o.data = 'foo';
o.dataFormat = 'foo';
o.location = 'foo';
o.workerId = 'foo';
}
buildCounterSendDebugCaptureRequest--;
return o;
}
void checkSendDebugCaptureRequest(api.SendDebugCaptureRequest o) {
buildCounterSendDebugCaptureRequest++;
if (buildCounterSendDebugCaptureRequest < 3) {
unittest.expect(
o.componentId!,
unittest.equals('foo'),
);
unittest.expect(
o.data!,
unittest.equals('foo'),
);
unittest.expect(
o.dataFormat!,
unittest.equals('foo'),
);
unittest.expect(
o.location!,
unittest.equals('foo'),
);
unittest.expect(
o.workerId!,
unittest.equals('foo'),
);
}
buildCounterSendDebugCaptureRequest--;
}
core.int buildCounterSendDebugCaptureResponse = 0;
api.SendDebugCaptureResponse buildSendDebugCaptureResponse() {
final o = api.SendDebugCaptureResponse();
buildCounterSendDebugCaptureResponse++;
if (buildCounterSendDebugCaptureResponse < 3) {}
buildCounterSendDebugCaptureResponse--;
return o;
}
void checkSendDebugCaptureResponse(api.SendDebugCaptureResponse o) {
buildCounterSendDebugCaptureResponse++;
if (buildCounterSendDebugCaptureResponse < 3) {}
buildCounterSendDebugCaptureResponse--;
}
core.List<api.WorkerMessage> buildUnnamed87() => [
buildWorkerMessage(),
buildWorkerMessage(),
];
void checkUnnamed87(core.List<api.WorkerMessage> o) {
unittest.expect(o, unittest.hasLength(2));
checkWorkerMessage(o[0]);
checkWorkerMessage(o[1]);
}
core.int buildCounterSendWorkerMessagesRequest = 0;
api.SendWorkerMessagesRequest buildSendWorkerMessagesRequest() {
final o = api.SendWorkerMessagesRequest();
buildCounterSendWorkerMessagesRequest++;
if (buildCounterSendWorkerMessagesRequest < 3) {
o.location = 'foo';
o.workerMessages = buildUnnamed87();
}
buildCounterSendWorkerMessagesRequest--;
return o;
}
void checkSendWorkerMessagesRequest(api.SendWorkerMessagesRequest o) {
buildCounterSendWorkerMessagesRequest++;
if (buildCounterSendWorkerMessagesRequest < 3) {
unittest.expect(
o.location!,
unittest.equals('foo'),
);
checkUnnamed87(o.workerMessages!);
}
buildCounterSendWorkerMessagesRequest--;
}
core.List<api.WorkerMessageResponse> buildUnnamed88() => [
buildWorkerMessageResponse(),
buildWorkerMessageResponse(),
];
void checkUnnamed88(core.List<api.WorkerMessageResponse> o) {
unittest.expect(o, unittest.hasLength(2));
checkWorkerMessageResponse(o[0]);
checkWorkerMessageResponse(o[1]);
}
core.int buildCounterSendWorkerMessagesResponse = 0;
api.SendWorkerMessagesResponse buildSendWorkerMessagesResponse() {
final o = api.SendWorkerMessagesResponse();
buildCounterSendWorkerMessagesResponse++;
if (buildCounterSendWorkerMessagesResponse < 3) {
o.workerMessageResponses = buildUnnamed88();
}
buildCounterSendWorkerMessagesResponse--;
return o;
}
void checkSendWorkerMessagesResponse(api.SendWorkerMessagesResponse o) {
buildCounterSendWorkerMessagesResponse++;
if (buildCounterSendWorkerMessagesResponse < 3) {
checkUnnamed88(o.workerMessageResponses!);
}
buildCounterSendWorkerMessagesResponse--;
}
core.List<api.SideInputInfo> buildUnnamed89() => [
buildSideInputInfo(),
buildSideInputInfo(),
];
void checkUnnamed89(core.List<api.SideInputInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkSideInputInfo(o[0]);
checkSideInputInfo(o[1]);
}
core.List<api.SeqMapTaskOutputInfo> buildUnnamed90() => [
buildSeqMapTaskOutputInfo(),
buildSeqMapTaskOutputInfo(),
];
void checkUnnamed90(core.List<api.SeqMapTaskOutputInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkSeqMapTaskOutputInfo(o[0]);
checkSeqMapTaskOutputInfo(o[1]);
}
core.Map<core.String, core.Object?> buildUnnamed91() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed91(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));
unittest.expect(
casted34['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted34['bool'],
unittest.equals(true),
);
unittest.expect(
casted34['string'],
unittest.equals('foo'),
);
var casted35 = (o['y']!) as core.Map;
unittest.expect(casted35, unittest.hasLength(3));
unittest.expect(
casted35['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted35['bool'],
unittest.equals(true),
);
unittest.expect(
casted35['string'],
unittest.equals('foo'),
);
}
core.int buildCounterSeqMapTask = 0;
api.SeqMapTask buildSeqMapTask() {
final o = api.SeqMapTask();
buildCounterSeqMapTask++;
if (buildCounterSeqMapTask < 3) {
o.inputs = buildUnnamed89();
o.name = 'foo';
o.outputInfos = buildUnnamed90();
o.stageName = 'foo';
o.systemName = 'foo';
o.userFn = buildUnnamed91();
}
buildCounterSeqMapTask--;
return o;
}
void checkSeqMapTask(api.SeqMapTask o) {
buildCounterSeqMapTask++;
if (buildCounterSeqMapTask < 3) {
checkUnnamed89(o.inputs!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed90(o.outputInfos!);
unittest.expect(
o.stageName!,
unittest.equals('foo'),
);
unittest.expect(
o.systemName!,
unittest.equals('foo'),
);
checkUnnamed91(o.userFn!);
}
buildCounterSeqMapTask--;
}
core.int buildCounterSeqMapTaskOutputInfo = 0;
api.SeqMapTaskOutputInfo buildSeqMapTaskOutputInfo() {
final o = api.SeqMapTaskOutputInfo();
buildCounterSeqMapTaskOutputInfo++;
if (buildCounterSeqMapTaskOutputInfo < 3) {
o.sink = buildSink();
o.tag = 'foo';
}
buildCounterSeqMapTaskOutputInfo--;
return o;
}
void checkSeqMapTaskOutputInfo(api.SeqMapTaskOutputInfo o) {
buildCounterSeqMapTaskOutputInfo++;
if (buildCounterSeqMapTaskOutputInfo < 3) {
checkSink(o.sink!);
unittest.expect(
o.tag!,
unittest.equals('foo'),
);
}
buildCounterSeqMapTaskOutputInfo--;
}
core.int buildCounterShellTask = 0;
api.ShellTask buildShellTask() {
final o = api.ShellTask();
buildCounterShellTask++;
if (buildCounterShellTask < 3) {
o.command = 'foo';
o.exitCode = 42;
}
buildCounterShellTask--;
return o;
}
void checkShellTask(api.ShellTask o) {
buildCounterShellTask++;
if (buildCounterShellTask < 3) {
unittest.expect(
o.command!,
unittest.equals('foo'),
);
unittest.expect(
o.exitCode!,
unittest.equals(42),
);
}
buildCounterShellTask--;
}
core.Map<core.String, core.Object?> buildUnnamed92() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed92(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));
unittest.expect(
casted36['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted36['bool'],
unittest.equals(true),
);
unittest.expect(
casted36['string'],
unittest.equals('foo'),
);
var casted37 = (o['y']!) as core.Map;
unittest.expect(casted37, unittest.hasLength(3));
unittest.expect(
casted37['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted37['bool'],
unittest.equals(true),
);
unittest.expect(
casted37['string'],
unittest.equals('foo'),
);
}
core.List<api.Source> buildUnnamed93() => [
buildSource(),
buildSource(),
];
void checkUnnamed93(core.List<api.Source> o) {
unittest.expect(o, unittest.hasLength(2));
checkSource(o[0]);
checkSource(o[1]);
}
core.int buildCounterSideInputInfo = 0;
api.SideInputInfo buildSideInputInfo() {
final o = api.SideInputInfo();
buildCounterSideInputInfo++;
if (buildCounterSideInputInfo < 3) {
o.kind = buildUnnamed92();
o.sources = buildUnnamed93();
o.tag = 'foo';
}
buildCounterSideInputInfo--;
return o;
}
void checkSideInputInfo(api.SideInputInfo o) {
buildCounterSideInputInfo++;
if (buildCounterSideInputInfo < 3) {
checkUnnamed92(o.kind!);
checkUnnamed93(o.sources!);
unittest.expect(
o.tag!,
unittest.equals('foo'),
);
}
buildCounterSideInputInfo--;
}
core.Map<core.String, core.Object?> buildUnnamed94() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed94(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));
unittest.expect(
casted38['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted38['bool'],
unittest.equals(true),
);
unittest.expect(
casted38['string'],
unittest.equals('foo'),
);
var casted39 = (o['y']!) as core.Map;
unittest.expect(casted39, unittest.hasLength(3));
unittest.expect(
casted39['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted39['bool'],
unittest.equals(true),
);
unittest.expect(
casted39['string'],
unittest.equals('foo'),
);
}
core.Map<core.String, core.Object?> buildUnnamed95() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed95(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));
unittest.expect(
casted40['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted40['bool'],
unittest.equals(true),
);
unittest.expect(
casted40['string'],
unittest.equals('foo'),
);
var casted41 = (o['y']!) as core.Map;
unittest.expect(casted41, unittest.hasLength(3));
unittest.expect(
casted41['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted41['bool'],
unittest.equals(true),
);
unittest.expect(
casted41['string'],
unittest.equals('foo'),
);
}
core.int buildCounterSink = 0;
api.Sink buildSink() {
final o = api.Sink();
buildCounterSink++;
if (buildCounterSink < 3) {
o.codec = buildUnnamed94();
o.spec = buildUnnamed95();
}
buildCounterSink--;
return o;
}
void checkSink(api.Sink o) {
buildCounterSink++;
if (buildCounterSink < 3) {
checkUnnamed94(o.codec!);
checkUnnamed95(o.spec!);
}
buildCounterSink--;
}
core.List<api.PubsubSnapshotMetadata> buildUnnamed96() => [
buildPubsubSnapshotMetadata(),
buildPubsubSnapshotMetadata(),
];
void checkUnnamed96(core.List<api.PubsubSnapshotMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkPubsubSnapshotMetadata(o[0]);
checkPubsubSnapshotMetadata(o[1]);
}
core.int buildCounterSnapshot = 0;
api.Snapshot buildSnapshot() {
final o = api.Snapshot();
buildCounterSnapshot++;
if (buildCounterSnapshot < 3) {
o.creationTime = 'foo';
o.description = 'foo';
o.diskSizeBytes = 'foo';
o.id = 'foo';
o.projectId = 'foo';
o.pubsubMetadata = buildUnnamed96();
o.region = 'foo';
o.sourceJobId = 'foo';
o.state = 'foo';
o.ttl = 'foo';
}
buildCounterSnapshot--;
return o;
}
void checkSnapshot(api.Snapshot o) {
buildCounterSnapshot++;
if (buildCounterSnapshot < 3) {
unittest.expect(
o.creationTime!,
unittest.equals('foo'),
);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.diskSizeBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
checkUnnamed96(o.pubsubMetadata!);
unittest.expect(
o.region!,
unittest.equals('foo'),
);
unittest.expect(
o.sourceJobId!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.ttl!,
unittest.equals('foo'),
);
}
buildCounterSnapshot--;
}
core.int buildCounterSnapshotJobRequest = 0;
api.SnapshotJobRequest buildSnapshotJobRequest() {
final o = api.SnapshotJobRequest();
buildCounterSnapshotJobRequest++;
if (buildCounterSnapshotJobRequest < 3) {
o.description = 'foo';
o.location = 'foo';
o.snapshotSources = true;
o.ttl = 'foo';
}
buildCounterSnapshotJobRequest--;
return o;
}
void checkSnapshotJobRequest(api.SnapshotJobRequest o) {
buildCounterSnapshotJobRequest++;
if (buildCounterSnapshotJobRequest < 3) {
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.location!,
unittest.equals('foo'),
);
unittest.expect(o.snapshotSources!, unittest.isTrue);
unittest.expect(
o.ttl!,
unittest.equals('foo'),
);
}
buildCounterSnapshotJobRequest--;
}
core.Map<core.String, core.Object?> buildUnnamed97() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed97(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));
unittest.expect(
casted42['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted42['bool'],
unittest.equals(true),
);
unittest.expect(
casted42['string'],
unittest.equals('foo'),
);
var casted43 = (o['y']!) as core.Map;
unittest.expect(casted43, unittest.hasLength(3));
unittest.expect(
casted43['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted43['bool'],
unittest.equals(true),
);
unittest.expect(
casted43['string'],
unittest.equals('foo'),
);
}
core.List<core.Map<core.String, core.Object?>> buildUnnamed98() => [
buildUnnamed97(),
buildUnnamed97(),
];
void checkUnnamed98(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed97(o[0]);
checkUnnamed97(o[1]);
}
core.Map<core.String, core.Object?> buildUnnamed99() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed99(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));
unittest.expect(
casted44['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted44['bool'],
unittest.equals(true),
);
unittest.expect(
casted44['string'],
unittest.equals('foo'),
);
var casted45 = (o['y']!) as core.Map;
unittest.expect(casted45, unittest.hasLength(3));
unittest.expect(
casted45['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted45['bool'],
unittest.equals(true),
);
unittest.expect(
casted45['string'],
unittest.equals('foo'),
);
}
core.Map<core.String, core.Object?> buildUnnamed100() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed100(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));
unittest.expect(
casted46['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted46['bool'],
unittest.equals(true),
);
unittest.expect(
casted46['string'],
unittest.equals('foo'),
);
var casted47 = (o['y']!) as core.Map;
unittest.expect(casted47, unittest.hasLength(3));
unittest.expect(
casted47['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted47['bool'],
unittest.equals(true),
);
unittest.expect(
casted47['string'],
unittest.equals('foo'),
);
}
core.int buildCounterSource = 0;
api.Source buildSource() {
final o = api.Source();
buildCounterSource++;
if (buildCounterSource < 3) {
o.baseSpecs = buildUnnamed98();
o.codec = buildUnnamed99();
o.doesNotNeedSplitting = true;
o.metadata = buildSourceMetadata();
o.spec = buildUnnamed100();
}
buildCounterSource--;
return o;
}
void checkSource(api.Source o) {
buildCounterSource++;
if (buildCounterSource < 3) {
checkUnnamed98(o.baseSpecs!);
checkUnnamed99(o.codec!);
unittest.expect(o.doesNotNeedSplitting!, unittest.isTrue);
checkSourceMetadata(o.metadata!);
checkUnnamed100(o.spec!);
}
buildCounterSource--;
}
core.int buildCounterSourceFork = 0;
api.SourceFork buildSourceFork() {
final o = api.SourceFork();
buildCounterSourceFork++;
if (buildCounterSourceFork < 3) {
o.primary = buildSourceSplitShard();
o.primarySource = buildDerivedSource();
o.residual = buildSourceSplitShard();
o.residualSource = buildDerivedSource();
}
buildCounterSourceFork--;
return o;
}
void checkSourceFork(api.SourceFork o) {
buildCounterSourceFork++;
if (buildCounterSourceFork < 3) {
checkSourceSplitShard(o.primary!);
checkDerivedSource(o.primarySource!);
checkSourceSplitShard(o.residual!);
checkDerivedSource(o.residualSource!);
}
buildCounterSourceFork--;
}
core.int buildCounterSourceGetMetadataRequest = 0;
api.SourceGetMetadataRequest buildSourceGetMetadataRequest() {
final o = api.SourceGetMetadataRequest();
buildCounterSourceGetMetadataRequest++;
if (buildCounterSourceGetMetadataRequest < 3) {
o.source = buildSource();
}
buildCounterSourceGetMetadataRequest--;
return o;
}
void checkSourceGetMetadataRequest(api.SourceGetMetadataRequest o) {
buildCounterSourceGetMetadataRequest++;
if (buildCounterSourceGetMetadataRequest < 3) {
checkSource(o.source!);
}
buildCounterSourceGetMetadataRequest--;
}
core.int buildCounterSourceGetMetadataResponse = 0;
api.SourceGetMetadataResponse buildSourceGetMetadataResponse() {
final o = api.SourceGetMetadataResponse();
buildCounterSourceGetMetadataResponse++;
if (buildCounterSourceGetMetadataResponse < 3) {
o.metadata = buildSourceMetadata();
}
buildCounterSourceGetMetadataResponse--;
return o;
}
void checkSourceGetMetadataResponse(api.SourceGetMetadataResponse o) {
buildCounterSourceGetMetadataResponse++;
if (buildCounterSourceGetMetadataResponse < 3) {
checkSourceMetadata(o.metadata!);
}
buildCounterSourceGetMetadataResponse--;
}
core.int buildCounterSourceMetadata = 0;
api.SourceMetadata buildSourceMetadata() {
final o = api.SourceMetadata();
buildCounterSourceMetadata++;
if (buildCounterSourceMetadata < 3) {
o.estimatedSizeBytes = 'foo';
o.infinite = true;
o.producesSortedKeys = true;
}
buildCounterSourceMetadata--;
return o;
}
void checkSourceMetadata(api.SourceMetadata o) {
buildCounterSourceMetadata++;
if (buildCounterSourceMetadata < 3) {
unittest.expect(
o.estimatedSizeBytes!,
unittest.equals('foo'),
);
unittest.expect(o.infinite!, unittest.isTrue);
unittest.expect(o.producesSortedKeys!, unittest.isTrue);
}
buildCounterSourceMetadata--;
}
core.int buildCounterSourceOperationRequest = 0;
api.SourceOperationRequest buildSourceOperationRequest() {
final o = api.SourceOperationRequest();
buildCounterSourceOperationRequest++;
if (buildCounterSourceOperationRequest < 3) {
o.getMetadata = buildSourceGetMetadataRequest();
o.name = 'foo';
o.originalName = 'foo';
o.split = buildSourceSplitRequest();
o.stageName = 'foo';
o.systemName = 'foo';
}
buildCounterSourceOperationRequest--;
return o;
}
void checkSourceOperationRequest(api.SourceOperationRequest o) {
buildCounterSourceOperationRequest++;
if (buildCounterSourceOperationRequest < 3) {
checkSourceGetMetadataRequest(o.getMetadata!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.originalName!,
unittest.equals('foo'),
);
checkSourceSplitRequest(o.split!);
unittest.expect(
o.stageName!,
unittest.equals('foo'),
);
unittest.expect(
o.systemName!,
unittest.equals('foo'),
);
}
buildCounterSourceOperationRequest--;
}
core.int buildCounterSourceOperationResponse = 0;
api.SourceOperationResponse buildSourceOperationResponse() {
final o = api.SourceOperationResponse();
buildCounterSourceOperationResponse++;
if (buildCounterSourceOperationResponse < 3) {
o.getMetadata = buildSourceGetMetadataResponse();
o.split = buildSourceSplitResponse();
}
buildCounterSourceOperationResponse--;
return o;
}
void checkSourceOperationResponse(api.SourceOperationResponse o) {
buildCounterSourceOperationResponse++;
if (buildCounterSourceOperationResponse < 3) {
checkSourceGetMetadataResponse(o.getMetadata!);
checkSourceSplitResponse(o.split!);
}
buildCounterSourceOperationResponse--;
}
core.int buildCounterSourceSplitOptions = 0;
api.SourceSplitOptions buildSourceSplitOptions() {
final o = api.SourceSplitOptions();
buildCounterSourceSplitOptions++;
if (buildCounterSourceSplitOptions < 3) {
o.desiredBundleSizeBytes = 'foo';
o.desiredShardSizeBytes = 'foo';
}
buildCounterSourceSplitOptions--;
return o;
}
void checkSourceSplitOptions(api.SourceSplitOptions o) {
buildCounterSourceSplitOptions++;
if (buildCounterSourceSplitOptions < 3) {
unittest.expect(
o.desiredBundleSizeBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.desiredShardSizeBytes!,
unittest.equals('foo'),
);
}
buildCounterSourceSplitOptions--;
}
core.int buildCounterSourceSplitRequest = 0;
api.SourceSplitRequest buildSourceSplitRequest() {
final o = api.SourceSplitRequest();
buildCounterSourceSplitRequest++;
if (buildCounterSourceSplitRequest < 3) {
o.options = buildSourceSplitOptions();
o.source = buildSource();
}
buildCounterSourceSplitRequest--;
return o;
}
void checkSourceSplitRequest(api.SourceSplitRequest o) {
buildCounterSourceSplitRequest++;
if (buildCounterSourceSplitRequest < 3) {
checkSourceSplitOptions(o.options!);
checkSource(o.source!);
}
buildCounterSourceSplitRequest--;
}
core.List<api.DerivedSource> buildUnnamed101() => [
buildDerivedSource(),
buildDerivedSource(),
];
void checkUnnamed101(core.List<api.DerivedSource> o) {
unittest.expect(o, unittest.hasLength(2));
checkDerivedSource(o[0]);
checkDerivedSource(o[1]);
}
core.List<api.SourceSplitShard> buildUnnamed102() => [
buildSourceSplitShard(),
buildSourceSplitShard(),
];
void checkUnnamed102(core.List<api.SourceSplitShard> o) {
unittest.expect(o, unittest.hasLength(2));
checkSourceSplitShard(o[0]);
checkSourceSplitShard(o[1]);
}
core.int buildCounterSourceSplitResponse = 0;
api.SourceSplitResponse buildSourceSplitResponse() {
final o = api.SourceSplitResponse();
buildCounterSourceSplitResponse++;
if (buildCounterSourceSplitResponse < 3) {
o.bundles = buildUnnamed101();
o.outcome = 'foo';
o.shards = buildUnnamed102();
}
buildCounterSourceSplitResponse--;
return o;
}
void checkSourceSplitResponse(api.SourceSplitResponse o) {
buildCounterSourceSplitResponse++;
if (buildCounterSourceSplitResponse < 3) {
checkUnnamed101(o.bundles!);
unittest.expect(
o.outcome!,
unittest.equals('foo'),
);
checkUnnamed102(o.shards!);
}
buildCounterSourceSplitResponse--;
}
core.int buildCounterSourceSplitShard = 0;
api.SourceSplitShard buildSourceSplitShard() {
final o = api.SourceSplitShard();
buildCounterSourceSplitShard++;
if (buildCounterSourceSplitShard < 3) {
o.derivationMode = 'foo';
o.source = buildSource();
}
buildCounterSourceSplitShard--;
return o;
}
void checkSourceSplitShard(api.SourceSplitShard o) {
buildCounterSourceSplitShard++;
if (buildCounterSourceSplitShard < 3) {
unittest.expect(
o.derivationMode!,
unittest.equals('foo'),
);
checkSource(o.source!);
}
buildCounterSourceSplitShard--;
}
core.int buildCounterSpannerIODetails = 0;
api.SpannerIODetails buildSpannerIODetails() {
final o = api.SpannerIODetails();
buildCounterSpannerIODetails++;
if (buildCounterSpannerIODetails < 3) {
o.databaseId = 'foo';
o.instanceId = 'foo';
o.projectId = 'foo';
}
buildCounterSpannerIODetails--;
return o;
}
void checkSpannerIODetails(api.SpannerIODetails o) {
buildCounterSpannerIODetails++;
if (buildCounterSpannerIODetails < 3) {
unittest.expect(
o.databaseId!,
unittest.equals('foo'),
);
unittest.expect(
o.instanceId!,
unittest.equals('foo'),
);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
}
buildCounterSpannerIODetails--;
}
core.int buildCounterSplitInt64 = 0;
api.SplitInt64 buildSplitInt64() {
final o = api.SplitInt64();
buildCounterSplitInt64++;
if (buildCounterSplitInt64 < 3) {
o.highBits = 42;
o.lowBits = 42;
}
buildCounterSplitInt64--;
return o;
}
void checkSplitInt64(api.SplitInt64 o) {
buildCounterSplitInt64++;
if (buildCounterSplitInt64 < 3) {
unittest.expect(
o.highBits!,
unittest.equals(42),
);
unittest.expect(
o.lowBits!,
unittest.equals(42),
);
}
buildCounterSplitInt64--;
}
core.List<api.WorkerDetails> buildUnnamed103() => [
buildWorkerDetails(),
buildWorkerDetails(),
];
void checkUnnamed103(core.List<api.WorkerDetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkWorkerDetails(o[0]);
checkWorkerDetails(o[1]);
}
core.int buildCounterStageExecutionDetails = 0;
api.StageExecutionDetails buildStageExecutionDetails() {
final o = api.StageExecutionDetails();
buildCounterStageExecutionDetails++;
if (buildCounterStageExecutionDetails < 3) {
o.nextPageToken = 'foo';
o.workers = buildUnnamed103();
}
buildCounterStageExecutionDetails--;
return o;
}
void checkStageExecutionDetails(api.StageExecutionDetails o) {
buildCounterStageExecutionDetails++;
if (buildCounterStageExecutionDetails < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed103(o.workers!);
}
buildCounterStageExecutionDetails--;
}
core.int buildCounterStageSource = 0;
api.StageSource buildStageSource() {
final o = api.StageSource();
buildCounterStageSource++;
if (buildCounterStageSource < 3) {
o.name = 'foo';
o.originalTransformOrCollection = 'foo';
o.sizeBytes = 'foo';
o.userName = 'foo';
}
buildCounterStageSource--;
return o;
}
void checkStageSource(api.StageSource o) {
buildCounterStageSource++;
if (buildCounterStageSource < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.originalTransformOrCollection!,
unittest.equals('foo'),
);
unittest.expect(
o.sizeBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.userName!,
unittest.equals('foo'),
);
}
buildCounterStageSource--;
}
core.List<api.MetricUpdate> buildUnnamed104() => [
buildMetricUpdate(),
buildMetricUpdate(),
];
void checkUnnamed104(core.List<api.MetricUpdate> o) {
unittest.expect(o, unittest.hasLength(2));
checkMetricUpdate(o[0]);
checkMetricUpdate(o[1]);
}
core.int buildCounterStageSummary = 0;
api.StageSummary buildStageSummary() {
final o = api.StageSummary();
buildCounterStageSummary++;
if (buildCounterStageSummary < 3) {
o.endTime = 'foo';
o.metrics = buildUnnamed104();
o.progress = buildProgressTimeseries();
o.stageId = 'foo';
o.startTime = 'foo';
o.state = 'foo';
o.stragglerSummary = buildStragglerSummary();
}
buildCounterStageSummary--;
return o;
}
void checkStageSummary(api.StageSummary o) {
buildCounterStageSummary++;
if (buildCounterStageSummary < 3) {
unittest.expect(
o.endTime!,
unittest.equals('foo'),
);
checkUnnamed104(o.metrics!);
checkProgressTimeseries(o.progress!);
unittest.expect(
o.stageId!,
unittest.equals('foo'),
);
unittest.expect(
o.startTime!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
checkStragglerSummary(o.stragglerSummary!);
}
buildCounterStageSummary--;
}
core.int buildCounterStateFamilyConfig = 0;
api.StateFamilyConfig buildStateFamilyConfig() {
final o = api.StateFamilyConfig();
buildCounterStateFamilyConfig++;
if (buildCounterStateFamilyConfig < 3) {
o.isRead = true;
o.stateFamily = 'foo';
}
buildCounterStateFamilyConfig--;
return o;
}
void checkStateFamilyConfig(api.StateFamilyConfig o) {
buildCounterStateFamilyConfig++;
if (buildCounterStateFamilyConfig < 3) {
unittest.expect(o.isRead!, unittest.isTrue);
unittest.expect(
o.stateFamily!,
unittest.equals('foo'),
);
}
buildCounterStateFamilyConfig--;
}
core.Map<core.String, core.Object?> buildUnnamed105() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed105(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));
unittest.expect(
casted48['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted48['bool'],
unittest.equals(true),
);
unittest.expect(
casted48['string'],
unittest.equals('foo'),
);
var casted49 = (o['y']!) as core.Map;
unittest.expect(casted49, unittest.hasLength(3));
unittest.expect(
casted49['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted49['bool'],
unittest.equals(true),
);
unittest.expect(
casted49['string'],
unittest.equals('foo'),
);
}
core.List<core.Map<core.String, core.Object?>> buildUnnamed106() => [
buildUnnamed105(),
buildUnnamed105(),
];
void checkUnnamed106(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed105(o[0]);
checkUnnamed105(o[1]);
}
core.int buildCounterStatus = 0;
api.Status buildStatus() {
final o = api.Status();
buildCounterStatus++;
if (buildCounterStatus < 3) {
o.code = 42;
o.details = buildUnnamed106();
o.message = 'foo';
}
buildCounterStatus--;
return o;
}
void checkStatus(api.Status o) {
buildCounterStatus++;
if (buildCounterStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed106(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterStatus--;
}
core.Map<core.String, core.Object?> buildUnnamed107() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed107(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));
unittest.expect(
casted50['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted50['bool'],
unittest.equals(true),
);
unittest.expect(
casted50['string'],
unittest.equals('foo'),
);
var casted51 = (o['y']!) as core.Map;
unittest.expect(casted51, unittest.hasLength(3));
unittest.expect(
casted51['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted51['bool'],
unittest.equals(true),
);
unittest.expect(
casted51['string'],
unittest.equals('foo'),
);
}
core.int buildCounterStep = 0;
api.Step buildStep() {
final o = api.Step();
buildCounterStep++;
if (buildCounterStep < 3) {
o.kind = 'foo';
o.name = 'foo';
o.properties = buildUnnamed107();
}
buildCounterStep--;
return o;
}
void checkStep(api.Step o) {
buildCounterStep++;
if (buildCounterStep < 3) {
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed107(o.properties!);
}
buildCounterStep--;
}
core.int buildCounterStraggler = 0;
api.Straggler buildStraggler() {
final o = api.Straggler();
buildCounterStraggler++;
if (buildCounterStraggler < 3) {
o.batchStraggler = buildStragglerInfo();
o.streamingStraggler = buildStreamingStragglerInfo();
}
buildCounterStraggler--;
return o;
}
void checkStraggler(api.Straggler o) {
buildCounterStraggler++;
if (buildCounterStraggler < 3) {
checkStragglerInfo(o.batchStraggler!);
checkStreamingStragglerInfo(o.streamingStraggler!);
}
buildCounterStraggler--;
}
core.int buildCounterStragglerDebuggingInfo = 0;
api.StragglerDebuggingInfo buildStragglerDebuggingInfo() {
final o = api.StragglerDebuggingInfo();
buildCounterStragglerDebuggingInfo++;
if (buildCounterStragglerDebuggingInfo < 3) {
o.hotKey = buildHotKeyDebuggingInfo();
}
buildCounterStragglerDebuggingInfo--;
return o;
}
void checkStragglerDebuggingInfo(api.StragglerDebuggingInfo o) {
buildCounterStragglerDebuggingInfo++;
if (buildCounterStragglerDebuggingInfo < 3) {
checkHotKeyDebuggingInfo(o.hotKey!);
}
buildCounterStragglerDebuggingInfo--;
}
core.Map<core.String, api.StragglerDebuggingInfo> buildUnnamed108() => {
'x': buildStragglerDebuggingInfo(),
'y': buildStragglerDebuggingInfo(),
};
void checkUnnamed108(core.Map<core.String, api.StragglerDebuggingInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkStragglerDebuggingInfo(o['x']!);
checkStragglerDebuggingInfo(o['y']!);
}
core.int buildCounterStragglerInfo = 0;
api.StragglerInfo buildStragglerInfo() {
final o = api.StragglerInfo();
buildCounterStragglerInfo++;
if (buildCounterStragglerInfo < 3) {
o.causes = buildUnnamed108();
o.startTime = 'foo';
}
buildCounterStragglerInfo--;
return o;
}
void checkStragglerInfo(api.StragglerInfo o) {
buildCounterStragglerInfo++;
if (buildCounterStragglerInfo < 3) {
checkUnnamed108(o.causes!);
unittest.expect(
o.startTime!,
unittest.equals('foo'),
);
}
buildCounterStragglerInfo--;
}
core.List<api.Straggler> buildUnnamed109() => [
buildStraggler(),
buildStraggler(),
];
void checkUnnamed109(core.List<api.Straggler> o) {
unittest.expect(o, unittest.hasLength(2));
checkStraggler(o[0]);
checkStraggler(o[1]);
}
core.Map<core.String, core.String> buildUnnamed110() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed110(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 buildCounterStragglerSummary = 0;
api.StragglerSummary buildStragglerSummary() {
final o = api.StragglerSummary();
buildCounterStragglerSummary++;
if (buildCounterStragglerSummary < 3) {
o.recentStragglers = buildUnnamed109();
o.stragglerCauseCount = buildUnnamed110();
o.totalStragglerCount = 'foo';
}
buildCounterStragglerSummary--;
return o;
}
void checkStragglerSummary(api.StragglerSummary o) {
buildCounterStragglerSummary++;
if (buildCounterStragglerSummary < 3) {
checkUnnamed109(o.recentStragglers!);
checkUnnamed110(o.stragglerCauseCount!);
unittest.expect(
o.totalStragglerCount!,
unittest.equals('foo'),
);
}
buildCounterStragglerSummary--;
}
core.int buildCounterStreamLocation = 0;
api.StreamLocation buildStreamLocation() {
final o = api.StreamLocation();
buildCounterStreamLocation++;
if (buildCounterStreamLocation < 3) {
o.customSourceLocation = buildCustomSourceLocation();
o.pubsubLocation = buildPubsubLocation();
o.sideInputLocation = buildStreamingSideInputLocation();
o.streamingStageLocation = buildStreamingStageLocation();
}
buildCounterStreamLocation--;
return o;
}
void checkStreamLocation(api.StreamLocation o) {
buildCounterStreamLocation++;
if (buildCounterStreamLocation < 3) {
checkCustomSourceLocation(o.customSourceLocation!);
checkPubsubLocation(o.pubsubLocation!);
checkStreamingSideInputLocation(o.sideInputLocation!);
checkStreamingStageLocation(o.streamingStageLocation!);
}
buildCounterStreamLocation--;
}
core.int buildCounterStreamingApplianceSnapshotConfig = 0;
api.StreamingApplianceSnapshotConfig buildStreamingApplianceSnapshotConfig() {
final o = api.StreamingApplianceSnapshotConfig();
buildCounterStreamingApplianceSnapshotConfig++;
if (buildCounterStreamingApplianceSnapshotConfig < 3) {
o.importStateEndpoint = 'foo';
o.snapshotId = 'foo';
}
buildCounterStreamingApplianceSnapshotConfig--;
return o;
}
void checkStreamingApplianceSnapshotConfig(
api.StreamingApplianceSnapshotConfig o) {
buildCounterStreamingApplianceSnapshotConfig++;
if (buildCounterStreamingApplianceSnapshotConfig < 3) {
unittest.expect(
o.importStateEndpoint!,
unittest.equals('foo'),
);
unittest.expect(
o.snapshotId!,
unittest.equals('foo'),
);
}
buildCounterStreamingApplianceSnapshotConfig--;
}
core.List<api.ParallelInstruction> buildUnnamed111() => [
buildParallelInstruction(),
buildParallelInstruction(),
];
void checkUnnamed111(core.List<api.ParallelInstruction> o) {
unittest.expect(o, unittest.hasLength(2));
checkParallelInstruction(o[0]);
checkParallelInstruction(o[1]);
}
core.Map<core.String, core.String> buildUnnamed112() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed112(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 buildCounterStreamingComputationConfig = 0;
api.StreamingComputationConfig buildStreamingComputationConfig() {
final o = api.StreamingComputationConfig();
buildCounterStreamingComputationConfig++;
if (buildCounterStreamingComputationConfig < 3) {
o.computationId = 'foo';
o.instructions = buildUnnamed111();
o.stageName = 'foo';
o.systemName = 'foo';
o.transformUserNameToStateFamily = buildUnnamed112();
}
buildCounterStreamingComputationConfig--;
return o;
}
void checkStreamingComputationConfig(api.StreamingComputationConfig o) {
buildCounterStreamingComputationConfig++;
if (buildCounterStreamingComputationConfig < 3) {
unittest.expect(
o.computationId!,
unittest.equals('foo'),
);
checkUnnamed111(o.instructions!);
unittest.expect(
o.stageName!,
unittest.equals('foo'),
);
unittest.expect(
o.systemName!,
unittest.equals('foo'),
);
checkUnnamed112(o.transformUserNameToStateFamily!);
}
buildCounterStreamingComputationConfig--;
}
core.List<api.KeyRangeDataDiskAssignment> buildUnnamed113() => [
buildKeyRangeDataDiskAssignment(),
buildKeyRangeDataDiskAssignment(),
];
void checkUnnamed113(core.List<api.KeyRangeDataDiskAssignment> o) {
unittest.expect(o, unittest.hasLength(2));
checkKeyRangeDataDiskAssignment(o[0]);
checkKeyRangeDataDiskAssignment(o[1]);
}
core.int buildCounterStreamingComputationRanges = 0;
api.StreamingComputationRanges buildStreamingComputationRanges() {
final o = api.StreamingComputationRanges();
buildCounterStreamingComputationRanges++;
if (buildCounterStreamingComputationRanges < 3) {
o.computationId = 'foo';
o.rangeAssignments = buildUnnamed113();
}
buildCounterStreamingComputationRanges--;
return o;
}
void checkStreamingComputationRanges(api.StreamingComputationRanges o) {
buildCounterStreamingComputationRanges++;
if (buildCounterStreamingComputationRanges < 3) {
unittest.expect(
o.computationId!,
unittest.equals('foo'),
);
checkUnnamed113(o.rangeAssignments!);
}
buildCounterStreamingComputationRanges--;
}
core.List<api.StreamingComputationRanges> buildUnnamed114() => [
buildStreamingComputationRanges(),
buildStreamingComputationRanges(),
];
void checkUnnamed114(core.List<api.StreamingComputationRanges> o) {
unittest.expect(o, unittest.hasLength(2));
checkStreamingComputationRanges(o[0]);
checkStreamingComputationRanges(o[1]);
}
core.List<api.MountedDataDisk> buildUnnamed115() => [
buildMountedDataDisk(),
buildMountedDataDisk(),
];
void checkUnnamed115(core.List<api.MountedDataDisk> o) {
unittest.expect(o, unittest.hasLength(2));
checkMountedDataDisk(o[0]);
checkMountedDataDisk(o[1]);
}
core.int buildCounterStreamingComputationTask = 0;
api.StreamingComputationTask buildStreamingComputationTask() {
final o = api.StreamingComputationTask();
buildCounterStreamingComputationTask++;
if (buildCounterStreamingComputationTask < 3) {
o.computationRanges = buildUnnamed114();
o.dataDisks = buildUnnamed115();
o.taskType = 'foo';
}
buildCounterStreamingComputationTask--;
return o;
}
void checkStreamingComputationTask(api.StreamingComputationTask o) {
buildCounterStreamingComputationTask++;
if (buildCounterStreamingComputationTask < 3) {
checkUnnamed114(o.computationRanges!);
checkUnnamed115(o.dataDisks!);
unittest.expect(
o.taskType!,
unittest.equals('foo'),
);
}
buildCounterStreamingComputationTask--;
}
core.List<api.StreamingComputationConfig> buildUnnamed116() => [
buildStreamingComputationConfig(),
buildStreamingComputationConfig(),
];
void checkUnnamed116(core.List<api.StreamingComputationConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkStreamingComputationConfig(o[0]);
checkStreamingComputationConfig(o[1]);
}
core.Map<core.String, core.String> buildUnnamed117() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed117(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 buildCounterStreamingConfigTask = 0;
api.StreamingConfigTask buildStreamingConfigTask() {
final o = api.StreamingConfigTask();
buildCounterStreamingConfigTask++;
if (buildCounterStreamingConfigTask < 3) {
o.commitStreamChunkSizeBytes = 'foo';
o.getDataStreamChunkSizeBytes = 'foo';
o.maxWorkItemCommitBytes = 'foo';
o.streamingComputationConfigs = buildUnnamed116();
o.userStepToStateFamilyNameMap = buildUnnamed117();
o.windmillServiceEndpoint = 'foo';
o.windmillServicePort = 'foo';
}
buildCounterStreamingConfigTask--;
return o;
}
void checkStreamingConfigTask(api.StreamingConfigTask o) {
buildCounterStreamingConfigTask++;
if (buildCounterStreamingConfigTask < 3) {
unittest.expect(
o.commitStreamChunkSizeBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.getDataStreamChunkSizeBytes!,
unittest.equals('foo'),
);
unittest.expect(
o.maxWorkItemCommitBytes!,
unittest.equals('foo'),
);
checkUnnamed116(o.streamingComputationConfigs!);
checkUnnamed117(o.userStepToStateFamilyNameMap!);
unittest.expect(
o.windmillServiceEndpoint!,
unittest.equals('foo'),
);
unittest.expect(
o.windmillServicePort!,
unittest.equals('foo'),
);
}
buildCounterStreamingConfigTask--;
}
core.int buildCounterStreamingSetupTask = 0;
api.StreamingSetupTask buildStreamingSetupTask() {
final o = api.StreamingSetupTask();
buildCounterStreamingSetupTask++;
if (buildCounterStreamingSetupTask < 3) {
o.drain = true;
o.receiveWorkPort = 42;
o.snapshotConfig = buildStreamingApplianceSnapshotConfig();
o.streamingComputationTopology = buildTopologyConfig();
o.workerHarnessPort = 42;
}
buildCounterStreamingSetupTask--;
return o;
}
void checkStreamingSetupTask(api.StreamingSetupTask o) {
buildCounterStreamingSetupTask++;
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),
);
}
buildCounterStreamingSetupTask--;
}
core.int buildCounterStreamingSideInputLocation = 0;
api.StreamingSideInputLocation buildStreamingSideInputLocation() {
final o = api.StreamingSideInputLocation();
buildCounterStreamingSideInputLocation++;
if (buildCounterStreamingSideInputLocation < 3) {
o.stateFamily = 'foo';
o.tag = 'foo';
}
buildCounterStreamingSideInputLocation--;
return o;
}
void checkStreamingSideInputLocation(api.StreamingSideInputLocation o) {
buildCounterStreamingSideInputLocation++;
if (buildCounterStreamingSideInputLocation < 3) {
unittest.expect(
o.stateFamily!,
unittest.equals('foo'),
);
unittest.expect(
o.tag!,
unittest.equals('foo'),
);
}
buildCounterStreamingSideInputLocation--;
}
core.int buildCounterStreamingStageLocation = 0;
api.StreamingStageLocation buildStreamingStageLocation() {
final o = api.StreamingStageLocation();
buildCounterStreamingStageLocation++;
if (buildCounterStreamingStageLocation < 3) {
o.streamId = 'foo';
}
buildCounterStreamingStageLocation--;
return o;
}
void checkStreamingStageLocation(api.StreamingStageLocation o) {
buildCounterStreamingStageLocation++;
if (buildCounterStreamingStageLocation < 3) {
unittest.expect(
o.streamId!,
unittest.equals('foo'),
);
}
buildCounterStreamingStageLocation--;
}
core.int buildCounterStreamingStragglerInfo = 0;
api.StreamingStragglerInfo buildStreamingStragglerInfo() {
final o = api.StreamingStragglerInfo();
buildCounterStreamingStragglerInfo++;
if (buildCounterStreamingStragglerInfo < 3) {
o.dataWatermarkLag = 'foo';
o.endTime = 'foo';
o.startTime = 'foo';
o.systemWatermarkLag = 'foo';
o.workerName = 'foo';
}
buildCounterStreamingStragglerInfo--;
return o;
}
void checkStreamingStragglerInfo(api.StreamingStragglerInfo o) {
buildCounterStreamingStragglerInfo++;
if (buildCounterStreamingStragglerInfo < 3) {
unittest.expect(
o.dataWatermarkLag!,
unittest.equals('foo'),
);
unittest.expect(
o.endTime!,
unittest.equals('foo'),
);
unittest.expect(
o.startTime!,
unittest.equals('foo'),
);
unittest.expect(
o.systemWatermarkLag!,
unittest.equals('foo'),
);
unittest.expect(
o.workerName!,
unittest.equals('foo'),
);
}
buildCounterStreamingStragglerInfo--;
}
core.List<core.String> buildUnnamed118() => [
'foo',
'foo',
];
void checkUnnamed118(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 buildCounterStringList = 0;
api.StringList buildStringList() {
final o = api.StringList();
buildCounterStringList++;
if (buildCounterStringList < 3) {
o.elements = buildUnnamed118();
}
buildCounterStringList--;
return o;
}
void checkStringList(api.StringList o) {
buildCounterStringList++;
if (buildCounterStringList < 3) {
checkUnnamed118(o.elements!);
}
buildCounterStringList--;
}
core.List<api.Parameter> buildUnnamed119() => [
buildParameter(),
buildParameter(),
];
void checkUnnamed119(core.List<api.Parameter> o) {
unittest.expect(o, unittest.hasLength(2));
checkParameter(o[0]);
checkParameter(o[1]);
}
core.int buildCounterStructuredMessage = 0;
api.StructuredMessage buildStructuredMessage() {
final o = api.StructuredMessage();
buildCounterStructuredMessage++;
if (buildCounterStructuredMessage < 3) {
o.messageKey = 'foo';
o.messageText = 'foo';
o.parameters = buildUnnamed119();
}
buildCounterStructuredMessage--;
return o;
}
void checkStructuredMessage(api.StructuredMessage o) {
buildCounterStructuredMessage++;
if (buildCounterStructuredMessage < 3) {
unittest.expect(
o.messageKey!,
unittest.equals('foo'),
);
unittest.expect(
o.messageText!,
unittest.equals('foo'),
);
checkUnnamed119(o.parameters!);
}
buildCounterStructuredMessage--;
}
core.List<core.String> buildUnnamed120() => [
'foo',
'foo',
];
void checkUnnamed120(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 buildCounterTaskRunnerSettings = 0;
api.TaskRunnerSettings buildTaskRunnerSettings() {
final o = api.TaskRunnerSettings();
buildCounterTaskRunnerSettings++;
if (buildCounterTaskRunnerSettings < 3) {
o.alsologtostderr = true;
o.baseTaskDir = 'foo';
o.baseUrl = 'foo';
o.commandlinesFileName = 'foo';
o.continueOnException = true;
o.dataflowApiVersion = 'foo';
o.harnessCommand = 'foo';
o.languageHint = 'foo';
o.logDir = 'foo';
o.logToSerialconsole = true;
o.logUploadLocation = 'foo';
o.oauthScopes = buildUnnamed120();
o.parallelWorkerSettings = buildWorkerSettings();
o.streamingWorkerMainClass = 'foo';
o.taskGroup = 'foo';
o.taskUser = 'foo';
o.tempStoragePrefix = 'foo';
o.vmId = 'foo';
o.workflowFileName = 'foo';
}
buildCounterTaskRunnerSettings--;
return o;
}
void checkTaskRunnerSettings(api.TaskRunnerSettings o) {
buildCounterTaskRunnerSettings++;
if (buildCounterTaskRunnerSettings < 3) {
unittest.expect(o.alsologtostderr!, unittest.isTrue);
unittest.expect(
o.baseTaskDir!,
unittest.equals('foo'),
);
unittest.expect(
o.baseUrl!,
unittest.equals('foo'),
);
unittest.expect(
o.commandlinesFileName!,
unittest.equals('foo'),
);
unittest.expect(o.continueOnException!, unittest.isTrue);
unittest.expect(
o.dataflowApiVersion!,
unittest.equals('foo'),
);
unittest.expect(
o.harnessCommand!,
unittest.equals('foo'),
);
unittest.expect(
o.languageHint!,
unittest.equals('foo'),
);
unittest.expect(
o.logDir!,
unittest.equals('foo'),
);
unittest.expect(o.logToSerialconsole!, unittest.isTrue);
unittest.expect(
o.logUploadLocation!,
unittest.equals('foo'),
);
checkUnnamed120(o.oauthScopes!);
checkWorkerSettings(o.parallelWorkerSettings!);
unittest.expect(
o.streamingWorkerMainClass!,
unittest.equals('foo'),
);
unittest.expect(
o.taskGroup!,
unittest.equals('foo'),
);
unittest.expect(
o.taskUser!,
unittest.equals('foo'),
);
unittest.expect(
o.tempStoragePrefix!,
unittest.equals('foo'),
);
unittest.expect(
o.vmId!,
unittest.equals('foo'),
);
unittest.expect(
o.workflowFileName!,
unittest.equals('foo'),
);
}
buildCounterTaskRunnerSettings--;
}
core.List<api.ParameterMetadata> buildUnnamed121() => [
buildParameterMetadata(),
buildParameterMetadata(),
];
void checkUnnamed121(core.List<api.ParameterMetadata> o) {
unittest.expect(o, unittest.hasLength(2));
checkParameterMetadata(o[0]);
checkParameterMetadata(o[1]);
}
core.int buildCounterTemplateMetadata = 0;
api.TemplateMetadata buildTemplateMetadata() {
final o = api.TemplateMetadata();
buildCounterTemplateMetadata++;
if (buildCounterTemplateMetadata < 3) {
o.description = 'foo';
o.name = 'foo';
o.parameters = buildUnnamed121();
}
buildCounterTemplateMetadata--;
return o;
}
void checkTemplateMetadata(api.TemplateMetadata o) {
buildCounterTemplateMetadata++;
if (buildCounterTemplateMetadata < 3) {
unittest.expect(
o.description!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed121(o.parameters!);
}
buildCounterTemplateMetadata--;
}
core.List<api.ComputationTopology> buildUnnamed122() => [
buildComputationTopology(),
buildComputationTopology(),
];
void checkUnnamed122(core.List<api.ComputationTopology> o) {
unittest.expect(o, unittest.hasLength(2));
checkComputationTopology(o[0]);
checkComputationTopology(o[1]);
}
core.List<api.DataDiskAssignment> buildUnnamed123() => [
buildDataDiskAssignment(),
buildDataDiskAssignment(),
];
void checkUnnamed123(core.List<api.DataDiskAssignment> o) {
unittest.expect(o, unittest.hasLength(2));
checkDataDiskAssignment(o[0]);
checkDataDiskAssignment(o[1]);
}
core.Map<core.String, core.String> buildUnnamed124() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed124(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 buildCounterTopologyConfig = 0;
api.TopologyConfig buildTopologyConfig() {
final o = api.TopologyConfig();
buildCounterTopologyConfig++;
if (buildCounterTopologyConfig < 3) {
o.computations = buildUnnamed122();
o.dataDiskAssignments = buildUnnamed123();
o.forwardingKeyBits = 42;
o.persistentStateVersion = 42;
o.userStageToComputationNameMap = buildUnnamed124();
}
buildCounterTopologyConfig--;
return o;
}
void checkTopologyConfig(api.TopologyConfig o) {
buildCounterTopologyConfig++;
if (buildCounterTopologyConfig < 3) {
checkUnnamed122(o.computations!);
checkUnnamed123(o.dataDiskAssignments!);
unittest.expect(
o.forwardingKeyBits!,
unittest.equals(42),
);
unittest.expect(
o.persistentStateVersion!,
unittest.equals(42),
);
checkUnnamed124(o.userStageToComputationNameMap!);
}
buildCounterTopologyConfig--;
}
core.List<api.DisplayData> buildUnnamed125() => [
buildDisplayData(),
buildDisplayData(),
];
void checkUnnamed125(core.List<api.DisplayData> o) {
unittest.expect(o, unittest.hasLength(2));
checkDisplayData(o[0]);
checkDisplayData(o[1]);
}
core.List<core.String> buildUnnamed126() => [
'foo',
'foo',
];
void checkUnnamed126(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.List<core.String> buildUnnamed127() => [
'foo',
'foo',
];
void checkUnnamed127(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 buildCounterTransformSummary = 0;
api.TransformSummary buildTransformSummary() {
final o = api.TransformSummary();
buildCounterTransformSummary++;
if (buildCounterTransformSummary < 3) {
o.displayData = buildUnnamed125();
o.id = 'foo';
o.inputCollectionName = buildUnnamed126();
o.kind = 'foo';
o.name = 'foo';
o.outputCollectionName = buildUnnamed127();
}
buildCounterTransformSummary--;
return o;
}
void checkTransformSummary(api.TransformSummary o) {
buildCounterTransformSummary++;
if (buildCounterTransformSummary < 3) {
checkUnnamed125(o.displayData!);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
checkUnnamed126(o.inputCollectionName!);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkUnnamed127(o.outputCollectionName!);
}
buildCounterTransformSummary--;
}
core.List<api.Package> buildUnnamed128() => [
buildPackage(),
buildPackage(),
];
void checkUnnamed128(core.List<api.Package> o) {
unittest.expect(o, unittest.hasLength(2));
checkPackage(o[0]);
checkPackage(o[1]);
}
core.int buildCounterWorkItem = 0;
api.WorkItem buildWorkItem() {
final o = api.WorkItem();
buildCounterWorkItem++;
if (buildCounterWorkItem < 3) {
o.configuration = 'foo';
o.id = 'foo';
o.initialReportIndex = 'foo';
o.jobId = 'foo';
o.leaseExpireTime = 'foo';
o.mapTask = buildMapTask();
o.packages = buildUnnamed128();
o.projectId = 'foo';
o.reportStatusInterval = 'foo';
o.seqMapTask = buildSeqMapTask();
o.shellTask = buildShellTask();
o.sourceOperationTask = buildSourceOperationRequest();
o.streamingComputationTask = buildStreamingComputationTask();
o.streamingConfigTask = buildStreamingConfigTask();
o.streamingSetupTask = buildStreamingSetupTask();
}
buildCounterWorkItem--;
return o;
}
void checkWorkItem(api.WorkItem o) {
buildCounterWorkItem++;
if (buildCounterWorkItem < 3) {
unittest.expect(
o.configuration!,
unittest.equals('foo'),
);
unittest.expect(
o.id!,
unittest.equals('foo'),
);
unittest.expect(
o.initialReportIndex!,
unittest.equals('foo'),
);
unittest.expect(
o.jobId!,
unittest.equals('foo'),
);
unittest.expect(
o.leaseExpireTime!,
unittest.equals('foo'),
);
checkMapTask(o.mapTask!);
checkUnnamed128(o.packages!);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
unittest.expect(
o.reportStatusInterval!,
unittest.equals('foo'),
);
checkSeqMapTask(o.seqMapTask!);
checkShellTask(o.shellTask!);
checkSourceOperationRequest(o.sourceOperationTask!);
checkStreamingComputationTask(o.streamingComputationTask!);
checkStreamingConfigTask(o.streamingConfigTask!);
checkStreamingSetupTask(o.streamingSetupTask!);
}
buildCounterWorkItem--;
}
core.List<api.MetricUpdate> buildUnnamed129() => [
buildMetricUpdate(),
buildMetricUpdate(),
];
void checkUnnamed129(core.List<api.MetricUpdate> o) {
unittest.expect(o, unittest.hasLength(2));
checkMetricUpdate(o[0]);
checkMetricUpdate(o[1]);
}
core.int buildCounterWorkItemDetails = 0;
api.WorkItemDetails buildWorkItemDetails() {
final o = api.WorkItemDetails();
buildCounterWorkItemDetails++;
if (buildCounterWorkItemDetails < 3) {
o.attemptId = 'foo';
o.endTime = 'foo';
o.metrics = buildUnnamed129();
o.progress = buildProgressTimeseries();
o.startTime = 'foo';
o.state = 'foo';
o.stragglerInfo = buildStragglerInfo();
o.taskId = 'foo';
}
buildCounterWorkItemDetails--;
return o;
}
void checkWorkItemDetails(api.WorkItemDetails o) {
buildCounterWorkItemDetails++;
if (buildCounterWorkItemDetails < 3) {
unittest.expect(
o.attemptId!,
unittest.equals('foo'),
);
unittest.expect(
o.endTime!,
unittest.equals('foo'),
);
checkUnnamed129(o.metrics!);
checkProgressTimeseries(o.progress!);
unittest.expect(
o.startTime!,
unittest.equals('foo'),
);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
checkStragglerInfo(o.stragglerInfo!);
unittest.expect(
o.taskId!,
unittest.equals('foo'),
);
}
buildCounterWorkItemDetails--;
}
core.Map<core.String, core.Object?> buildUnnamed130() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed130(core.Map<core.String, core.Object?> o) {
unittest.expect(o, unittest.hasLength(2));
var casted52 = (o['x']!) as core.Map;
unittest.expect(casted52, unittest.hasLength(3));
unittest.expect(
casted52['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted52['bool'],
unittest.equals(true),
);
unittest.expect(
casted52['string'],
unittest.equals('foo'),
);
var casted53 = (o['y']!) as core.Map;
unittest.expect(casted53, unittest.hasLength(3));
unittest.expect(
casted53['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted53['bool'],
unittest.equals(true),
);
unittest.expect(
casted53['string'],
unittest.equals('foo'),
);
}
core.List<api.MetricShortId> buildUnnamed131() => [
buildMetricShortId(),
buildMetricShortId(),
];
void checkUnnamed131(core.List<api.MetricShortId> o) {
unittest.expect(o, unittest.hasLength(2));
checkMetricShortId(o[0]);
checkMetricShortId(o[1]);
}
core.int buildCounterWorkItemServiceState = 0;
api.WorkItemServiceState buildWorkItemServiceState() {
final o = api.WorkItemServiceState();
buildCounterWorkItemServiceState++;
if (buildCounterWorkItemServiceState < 3) {
o.completeWorkStatus = buildStatus();
o.harnessData = buildUnnamed130();
o.hotKeyDetection = buildHotKeyDetection();
o.leaseExpireTime = 'foo';
o.metricShortId = buildUnnamed131();
o.nextReportIndex = 'foo';
o.reportStatusInterval = 'foo';
o.splitRequest = buildApproximateSplitRequest();
o.suggestedStopPoint = buildApproximateProgress();
o.suggestedStopPosition = buildPosition();
}
buildCounterWorkItemServiceState--;
return o;
}
void checkWorkItemServiceState(api.WorkItemServiceState o) {
buildCounterWorkItemServiceState++;
if (buildCounterWorkItemServiceState < 3) {
checkStatus(o.completeWorkStatus!);
checkUnnamed130(o.harnessData!);
checkHotKeyDetection(o.hotKeyDetection!);
unittest.expect(
o.leaseExpireTime!,
unittest.equals('foo'),
);
checkUnnamed131(o.metricShortId!);
unittest.expect(
o.nextReportIndex!,
unittest.equals('foo'),
);
unittest.expect(
o.reportStatusInterval!,
unittest.equals('foo'),
);
checkApproximateSplitRequest(o.splitRequest!);
checkApproximateProgress(o.suggestedStopPoint!);
checkPosition(o.suggestedStopPosition!);
}
buildCounterWorkItemServiceState--;
}
core.List<api.CounterUpdate> buildUnnamed132() => [
buildCounterUpdate(),
buildCounterUpdate(),
];
void checkUnnamed132(core.List<api.CounterUpdate> o) {
unittest.expect(o, unittest.hasLength(2));
checkCounterUpdate(o[0]);
checkCounterUpdate(o[1]);
}
core.List<api.Status> buildUnnamed133() => [
buildStatus(),
buildStatus(),
];
void checkUnnamed133(core.List<api.Status> o) {
unittest.expect(o, unittest.hasLength(2));
checkStatus(o[0]);
checkStatus(o[1]);
}
core.List<api.MetricUpdate> buildUnnamed134() => [
buildMetricUpdate(),
buildMetricUpdate(),
];
void checkUnnamed134(core.List<api.MetricUpdate> o) {
unittest.expect(o, unittest.hasLength(2));
checkMetricUpdate(o[0]);
checkMetricUpdate(o[1]);
}
core.int buildCounterWorkItemStatus = 0;
api.WorkItemStatus buildWorkItemStatus() {
final o = api.WorkItemStatus();
buildCounterWorkItemStatus++;
if (buildCounterWorkItemStatus < 3) {
o.completed = true;
o.counterUpdates = buildUnnamed132();
o.dynamicSourceSplit = buildDynamicSourceSplit();
o.errors = buildUnnamed133();
o.metricUpdates = buildUnnamed134();
o.progress = buildApproximateProgress();
o.reportIndex = 'foo';
o.reportedProgress = buildApproximateReportedProgress();
o.requestedLeaseDuration = 'foo';
o.sourceFork = buildSourceFork();
o.sourceOperationResponse = buildSourceOperationResponse();
o.stopPosition = buildPosition();
o.totalThrottlerWaitTimeSeconds = 42.0;
o.workItemId = 'foo';
}
buildCounterWorkItemStatus--;
return o;
}
void checkWorkItemStatus(api.WorkItemStatus o) {
buildCounterWorkItemStatus++;
if (buildCounterWorkItemStatus < 3) {
unittest.expect(o.completed!, unittest.isTrue);
checkUnnamed132(o.counterUpdates!);
checkDynamicSourceSplit(o.dynamicSourceSplit!);
checkUnnamed133(o.errors!);
checkUnnamed134(o.metricUpdates!);
checkApproximateProgress(o.progress!);
unittest.expect(
o.reportIndex!,
unittest.equals('foo'),
);
checkApproximateReportedProgress(o.reportedProgress!);
unittest.expect(
o.requestedLeaseDuration!,
unittest.equals('foo'),
);
checkSourceFork(o.sourceFork!);
checkSourceOperationResponse(o.sourceOperationResponse!);
checkPosition(o.stopPosition!);
unittest.expect(
o.totalThrottlerWaitTimeSeconds!,
unittest.equals(42.0),
);
unittest.expect(
o.workItemId!,
unittest.equals('foo'),
);
}
buildCounterWorkItemStatus--;
}
core.List<api.WorkItemDetails> buildUnnamed135() => [
buildWorkItemDetails(),
buildWorkItemDetails(),
];
void checkUnnamed135(core.List<api.WorkItemDetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkWorkItemDetails(o[0]);
checkWorkItemDetails(o[1]);
}
core.int buildCounterWorkerDetails = 0;
api.WorkerDetails buildWorkerDetails() {
final o = api.WorkerDetails();
buildCounterWorkerDetails++;
if (buildCounterWorkerDetails < 3) {
o.workItems = buildUnnamed135();
o.workerName = 'foo';
}
buildCounterWorkerDetails--;
return o;
}
void checkWorkerDetails(api.WorkerDetails o) {
buildCounterWorkerDetails++;
if (buildCounterWorkerDetails < 3) {
checkUnnamed135(o.workItems!);
unittest.expect(
o.workerName!,
unittest.equals('foo'),
);
}
buildCounterWorkerDetails--;
}
core.Map<core.String, core.Object?> buildUnnamed136() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed136(core.Map<core.String, core.Object?> o) {
unittest.expect(o, unittest.hasLength(2));
var casted54 = (o['x']!) as core.Map;
unittest.expect(casted54, unittest.hasLength(3));
unittest.expect(
casted54['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted54['bool'],
unittest.equals(true),
);
unittest.expect(
casted54['string'],
unittest.equals('foo'),
);
var casted55 = (o['y']!) as core.Map;
unittest.expect(casted55, unittest.hasLength(3));
unittest.expect(
casted55['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted55['bool'],
unittest.equals(true),
);
unittest.expect(
casted55['string'],
unittest.equals('foo'),
);
}
core.List<core.Map<core.String, core.Object?>> buildUnnamed137() => [
buildUnnamed136(),
buildUnnamed136(),
];
void checkUnnamed137(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed136(o[0]);
checkUnnamed136(o[1]);
}
core.int buildCounterWorkerHealthReport = 0;
api.WorkerHealthReport buildWorkerHealthReport() {
final o = api.WorkerHealthReport();
buildCounterWorkerHealthReport++;
if (buildCounterWorkerHealthReport < 3) {
o.msg = 'foo';
o.pods = buildUnnamed137();
o.reportInterval = 'foo';
o.vmBrokenCode = 'foo';
o.vmIsBroken = true;
o.vmIsHealthy = true;
o.vmStartupTime = 'foo';
}
buildCounterWorkerHealthReport--;
return o;
}
void checkWorkerHealthReport(api.WorkerHealthReport o) {
buildCounterWorkerHealthReport++;
if (buildCounterWorkerHealthReport < 3) {
unittest.expect(
o.msg!,
unittest.equals('foo'),
);
checkUnnamed137(o.pods!);
unittest.expect(
o.reportInterval!,
unittest.equals('foo'),
);
unittest.expect(
o.vmBrokenCode!,
unittest.equals('foo'),
);
unittest.expect(o.vmIsBroken!, unittest.isTrue);
unittest.expect(o.vmIsHealthy!, unittest.isTrue);
unittest.expect(
o.vmStartupTime!,
unittest.equals('foo'),
);
}
buildCounterWorkerHealthReport--;
}
core.int buildCounterWorkerHealthReportResponse = 0;
api.WorkerHealthReportResponse buildWorkerHealthReportResponse() {
final o = api.WorkerHealthReportResponse();
buildCounterWorkerHealthReportResponse++;
if (buildCounterWorkerHealthReportResponse < 3) {
o.reportInterval = 'foo';
}
buildCounterWorkerHealthReportResponse--;
return o;
}
void checkWorkerHealthReportResponse(api.WorkerHealthReportResponse o) {
buildCounterWorkerHealthReportResponse++;
if (buildCounterWorkerHealthReportResponse < 3) {
unittest.expect(
o.reportInterval!,
unittest.equals('foo'),
);
}
buildCounterWorkerHealthReportResponse--;
}
core.Map<core.String, core.String> buildUnnamed138() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed138(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 buildCounterWorkerLifecycleEvent = 0;
api.WorkerLifecycleEvent buildWorkerLifecycleEvent() {
final o = api.WorkerLifecycleEvent();
buildCounterWorkerLifecycleEvent++;
if (buildCounterWorkerLifecycleEvent < 3) {
o.containerStartTime = 'foo';
o.event = 'foo';
o.metadata = buildUnnamed138();
}
buildCounterWorkerLifecycleEvent--;
return o;
}
void checkWorkerLifecycleEvent(api.WorkerLifecycleEvent o) {
buildCounterWorkerLifecycleEvent++;
if (buildCounterWorkerLifecycleEvent < 3) {
unittest.expect(
o.containerStartTime!,
unittest.equals('foo'),
);
unittest.expect(
o.event!,
unittest.equals('foo'),
);
checkUnnamed138(o.metadata!);
}
buildCounterWorkerLifecycleEvent--;
}
core.Map<core.String, core.String> buildUnnamed139() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed139(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 buildCounterWorkerMessage = 0;
api.WorkerMessage buildWorkerMessage() {
final o = api.WorkerMessage();
buildCounterWorkerMessage++;
if (buildCounterWorkerMessage < 3) {
o.dataSamplingReport = buildDataSamplingReport();
o.labels = buildUnnamed139();
o.time = 'foo';
o.workerHealthReport = buildWorkerHealthReport();
o.workerLifecycleEvent = buildWorkerLifecycleEvent();
o.workerMessageCode = buildWorkerMessageCode();
o.workerMetrics = buildResourceUtilizationReport();
o.workerShutdownNotice = buildWorkerShutdownNotice();
o.workerThreadScalingReport = buildWorkerThreadScalingReport();
}
buildCounterWorkerMessage--;
return o;
}
void checkWorkerMessage(api.WorkerMessage o) {
buildCounterWorkerMessage++;
if (buildCounterWorkerMessage < 3) {
checkDataSamplingReport(o.dataSamplingReport!);
checkUnnamed139(o.labels!);
unittest.expect(
o.time!,
unittest.equals('foo'),
);
checkWorkerHealthReport(o.workerHealthReport!);
checkWorkerLifecycleEvent(o.workerLifecycleEvent!);
checkWorkerMessageCode(o.workerMessageCode!);
checkResourceUtilizationReport(o.workerMetrics!);
checkWorkerShutdownNotice(o.workerShutdownNotice!);
checkWorkerThreadScalingReport(o.workerThreadScalingReport!);
}
buildCounterWorkerMessage--;
}
core.Map<core.String, core.Object?> buildUnnamed140() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed140(core.Map<core.String, core.Object?> o) {
unittest.expect(o, unittest.hasLength(2));
var casted56 = (o['x']!) as core.Map;
unittest.expect(casted56, unittest.hasLength(3));
unittest.expect(
casted56['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted56['bool'],
unittest.equals(true),
);
unittest.expect(
casted56['string'],
unittest.equals('foo'),
);
var casted57 = (o['y']!) as core.Map;
unittest.expect(casted57, unittest.hasLength(3));
unittest.expect(
casted57['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted57['bool'],
unittest.equals(true),
);
unittest.expect(
casted57['string'],
unittest.equals('foo'),
);
}
core.int buildCounterWorkerMessageCode = 0;
api.WorkerMessageCode buildWorkerMessageCode() {
final o = api.WorkerMessageCode();
buildCounterWorkerMessageCode++;
if (buildCounterWorkerMessageCode < 3) {
o.code = 'foo';
o.parameters = buildUnnamed140();
}
buildCounterWorkerMessageCode--;
return o;
}
void checkWorkerMessageCode(api.WorkerMessageCode o) {
buildCounterWorkerMessageCode++;
if (buildCounterWorkerMessageCode < 3) {
unittest.expect(
o.code!,
unittest.equals('foo'),
);
checkUnnamed140(o.parameters!);
}
buildCounterWorkerMessageCode--;
}
core.int buildCounterWorkerMessageResponse = 0;
api.WorkerMessageResponse buildWorkerMessageResponse() {
final o = api.WorkerMessageResponse();
buildCounterWorkerMessageResponse++;
if (buildCounterWorkerMessageResponse < 3) {
o.workerHealthReportResponse = buildWorkerHealthReportResponse();
o.workerMetricsResponse = buildResourceUtilizationReportResponse();
o.workerShutdownNoticeResponse = buildWorkerShutdownNoticeResponse();
o.workerThreadScalingReportResponse =
buildWorkerThreadScalingReportResponse();
}
buildCounterWorkerMessageResponse--;
return o;
}
void checkWorkerMessageResponse(api.WorkerMessageResponse o) {
buildCounterWorkerMessageResponse++;
if (buildCounterWorkerMessageResponse < 3) {
checkWorkerHealthReportResponse(o.workerHealthReportResponse!);
checkResourceUtilizationReportResponse(o.workerMetricsResponse!);
checkWorkerShutdownNoticeResponse(o.workerShutdownNoticeResponse!);
checkWorkerThreadScalingReportResponse(
o.workerThreadScalingReportResponse!);
}
buildCounterWorkerMessageResponse--;
}
core.List<api.Disk> buildUnnamed141() => [
buildDisk(),
buildDisk(),
];
void checkUnnamed141(core.List<api.Disk> o) {
unittest.expect(o, unittest.hasLength(2));
checkDisk(o[0]);
checkDisk(o[1]);
}
core.Map<core.String, core.String> buildUnnamed142() => {
'x': 'foo',
'y': 'foo',
};
void checkUnnamed142(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.List<api.Package> buildUnnamed143() => [
buildPackage(),
buildPackage(),
];
void checkUnnamed143(core.List<api.Package> o) {
unittest.expect(o, unittest.hasLength(2));
checkPackage(o[0]);
checkPackage(o[1]);
}
core.Map<core.String, core.Object?> buildUnnamed144() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed144(core.Map<core.String, core.Object?> o) {
unittest.expect(o, unittest.hasLength(2));
var casted58 = (o['x']!) as core.Map;
unittest.expect(casted58, unittest.hasLength(3));
unittest.expect(
casted58['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted58['bool'],
unittest.equals(true),
);
unittest.expect(
casted58['string'],
unittest.equals('foo'),
);
var casted59 = (o['y']!) as core.Map;
unittest.expect(casted59, unittest.hasLength(3));
unittest.expect(
casted59['list'],
unittest.equals([1, 2, 3]),
);
unittest.expect(
casted59['bool'],
unittest.equals(true),
);
unittest.expect(
casted59['string'],
unittest.equals('foo'),
);
}
core.List<api.SdkHarnessContainerImage> buildUnnamed145() => [
buildSdkHarnessContainerImage(),
buildSdkHarnessContainerImage(),
];
void checkUnnamed145(core.List<api.SdkHarnessContainerImage> o) {
unittest.expect(o, unittest.hasLength(2));
checkSdkHarnessContainerImage(o[0]);
checkSdkHarnessContainerImage(o[1]);
}
core.int buildCounterWorkerPool = 0;
api.WorkerPool buildWorkerPool() {
final o = api.WorkerPool();
buildCounterWorkerPool++;
if (buildCounterWorkerPool < 3) {
o.autoscalingSettings = buildAutoscalingSettings();
o.dataDisks = buildUnnamed141();
o.defaultPackageSet = 'foo';
o.diskSizeGb = 42;
o.diskSourceImage = 'foo';
o.diskType = 'foo';
o.ipConfiguration = 'foo';
o.kind = 'foo';
o.machineType = 'foo';
o.metadata = buildUnnamed142();
o.network = 'foo';
o.numThreadsPerWorker = 42;
o.numWorkers = 42;
o.onHostMaintenance = 'foo';
o.packages = buildUnnamed143();
o.poolArgs = buildUnnamed144();
o.sdkHarnessContainerImages = buildUnnamed145();
o.subnetwork = 'foo';
o.taskrunnerSettings = buildTaskRunnerSettings();
o.teardownPolicy = 'foo';
o.workerHarnessContainerImage = 'foo';
o.zone = 'foo';
}
buildCounterWorkerPool--;
return o;
}
void checkWorkerPool(api.WorkerPool o) {
buildCounterWorkerPool++;
if (buildCounterWorkerPool < 3) {
checkAutoscalingSettings(o.autoscalingSettings!);
checkUnnamed141(o.dataDisks!);
unittest.expect(
o.defaultPackageSet!,
unittest.equals('foo'),
);
unittest.expect(
o.diskSizeGb!,
unittest.equals(42),
);
unittest.expect(
o.diskSourceImage!,
unittest.equals('foo'),
);
unittest.expect(
o.diskType!,
unittest.equals('foo'),
);
unittest.expect(
o.ipConfiguration!,
unittest.equals('foo'),
);
unittest.expect(
o.kind!,
unittest.equals('foo'),
);
unittest.expect(
o.machineType!,
unittest.equals('foo'),
);
checkUnnamed142(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'),
);
checkUnnamed143(o.packages!);
checkUnnamed144(o.poolArgs!);
checkUnnamed145(o.sdkHarnessContainerImages!);
unittest.expect(
o.subnetwork!,
unittest.equals('foo'),
);
checkTaskRunnerSettings(o.taskrunnerSettings!);
unittest.expect(
o.teardownPolicy!,
unittest.equals('foo'),
);
unittest.expect(
o.workerHarnessContainerImage!,
unittest.equals('foo'),
);
unittest.expect(
o.zone!,
unittest.equals('foo'),
);
}
buildCounterWorkerPool--;
}
core.int buildCounterWorkerSettings = 0;
api.WorkerSettings buildWorkerSettings() {
final o = api.WorkerSettings();
buildCounterWorkerSettings++;
if (buildCounterWorkerSettings < 3) {
o.baseUrl = 'foo';
o.reportingEnabled = true;
o.servicePath = 'foo';
o.shuffleServicePath = 'foo';
o.tempStoragePrefix = 'foo';
o.workerId = 'foo';
}
buildCounterWorkerSettings--;
return o;
}
void checkWorkerSettings(api.WorkerSettings o) {
buildCounterWorkerSettings++;
if (buildCounterWorkerSettings < 3) {
unittest.expect(
o.baseUrl!,
unittest.equals('foo'),
);
unittest.expect(o.reportingEnabled!, unittest.isTrue);
unittest.expect(
o.servicePath!,
unittest.equals('foo'),
);
unittest.expect(
o.shuffleServicePath!,
unittest.equals('foo'),
);
unittest.expect(
o.tempStoragePrefix!,
unittest.equals('foo'),
);
unittest.expect(
o.workerId!,
unittest.equals('foo'),
);
}
buildCounterWorkerSettings--;
}
core.int buildCounterWorkerShutdownNotice = 0;
api.WorkerShutdownNotice buildWorkerShutdownNotice() {
final o = api.WorkerShutdownNotice();
buildCounterWorkerShutdownNotice++;
if (buildCounterWorkerShutdownNotice < 3) {
o.reason = 'foo';
}
buildCounterWorkerShutdownNotice--;
return o;
}
void checkWorkerShutdownNotice(api.WorkerShutdownNotice o) {
buildCounterWorkerShutdownNotice++;
if (buildCounterWorkerShutdownNotice < 3) {
unittest.expect(
o.reason!,
unittest.equals('foo'),
);
}
buildCounterWorkerShutdownNotice--;
}
core.int buildCounterWorkerShutdownNoticeResponse = 0;
api.WorkerShutdownNoticeResponse buildWorkerShutdownNoticeResponse() {
final o = api.WorkerShutdownNoticeResponse();
buildCounterWorkerShutdownNoticeResponse++;
if (buildCounterWorkerShutdownNoticeResponse < 3) {}
buildCounterWorkerShutdownNoticeResponse--;
return o;
}
void checkWorkerShutdownNoticeResponse(api.WorkerShutdownNoticeResponse o) {
buildCounterWorkerShutdownNoticeResponse++;
if (buildCounterWorkerShutdownNoticeResponse < 3) {}
buildCounterWorkerShutdownNoticeResponse--;
}
core.int buildCounterWorkerThreadScalingReport = 0;
api.WorkerThreadScalingReport buildWorkerThreadScalingReport() {
final o = api.WorkerThreadScalingReport();
buildCounterWorkerThreadScalingReport++;
if (buildCounterWorkerThreadScalingReport < 3) {
o.currentThreadCount = 42;
}
buildCounterWorkerThreadScalingReport--;
return o;
}
void checkWorkerThreadScalingReport(api.WorkerThreadScalingReport o) {
buildCounterWorkerThreadScalingReport++;
if (buildCounterWorkerThreadScalingReport < 3) {
unittest.expect(
o.currentThreadCount!,
unittest.equals(42),
);
}
buildCounterWorkerThreadScalingReport--;
}
core.int buildCounterWorkerThreadScalingReportResponse = 0;
api.WorkerThreadScalingReportResponse buildWorkerThreadScalingReportResponse() {
final o = api.WorkerThreadScalingReportResponse();
buildCounterWorkerThreadScalingReportResponse++;
if (buildCounterWorkerThreadScalingReportResponse < 3) {
o.recommendedThreadCount = 42;
}
buildCounterWorkerThreadScalingReportResponse--;
return o;
}
void checkWorkerThreadScalingReportResponse(
api.WorkerThreadScalingReportResponse o) {
buildCounterWorkerThreadScalingReportResponse++;
if (buildCounterWorkerThreadScalingReportResponse < 3) {
unittest.expect(
o.recommendedThreadCount!,
unittest.equals(42),
);
}
buildCounterWorkerThreadScalingReportResponse--;
}
core.int buildCounterWriteInstruction = 0;
api.WriteInstruction buildWriteInstruction() {
final o = api.WriteInstruction();
buildCounterWriteInstruction++;
if (buildCounterWriteInstruction < 3) {
o.input = buildInstructionInput();
o.sink = buildSink();
}
buildCounterWriteInstruction--;
return o;
}
void checkWriteInstruction(api.WriteInstruction o) {
buildCounterWriteInstruction++;
if (buildCounterWriteInstruction < 3) {
checkInstructionInput(o.input!);
checkSink(o.sink!);
}
buildCounterWriteInstruction--;
}
void main() {
unittest.group('obj-schema-ApproximateProgress', () {
unittest.test('to-json--from-json', () async {
final o = buildApproximateProgress();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ApproximateProgress.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkApproximateProgress(od);
});
});
unittest.group('obj-schema-ApproximateReportedProgress', () {
unittest.test('to-json--from-json', () async {
final o = buildApproximateReportedProgress();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ApproximateReportedProgress.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkApproximateReportedProgress(od);
});
});
unittest.group('obj-schema-ApproximateSplitRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildApproximateSplitRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ApproximateSplitRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkApproximateSplitRequest(od);
});
});
unittest.group('obj-schema-AutoscalingEvent', () {
unittest.test('to-json--from-json', () async {
final o = buildAutoscalingEvent();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AutoscalingEvent.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAutoscalingEvent(od);
});
});
unittest.group('obj-schema-AutoscalingSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildAutoscalingSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AutoscalingSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAutoscalingSettings(od);
});
});
unittest.group('obj-schema-BigQueryIODetails', () {
unittest.test('to-json--from-json', () async {
final o = buildBigQueryIODetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BigQueryIODetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBigQueryIODetails(od);
});
});
unittest.group('obj-schema-BigTableIODetails', () {
unittest.test('to-json--from-json', () async {
final o = buildBigTableIODetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BigTableIODetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBigTableIODetails(od);
});
});
unittest.group('obj-schema-CPUTime', () {
unittest.test('to-json--from-json', () async {
final o = buildCPUTime();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.CPUTime.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkCPUTime(od);
});
});
unittest.group('obj-schema-ComponentSource', () {
unittest.test('to-json--from-json', () async {
final o = buildComponentSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ComponentSource.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkComponentSource(od);
});
});
unittest.group('obj-schema-ComponentTransform', () {
unittest.test('to-json--from-json', () async {
final o = buildComponentTransform();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ComponentTransform.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkComponentTransform(od);
});
});
unittest.group('obj-schema-ComputationTopology', () {
unittest.test('to-json--from-json', () async {
final o = buildComputationTopology();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ComputationTopology.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkComputationTopology(od);
});
});
unittest.group('obj-schema-ConcatPosition', () {
unittest.test('to-json--from-json', () async {
final o = buildConcatPosition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ConcatPosition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkConcatPosition(od);
});
});
unittest.group('obj-schema-ContainerSpec', () {
unittest.test('to-json--from-json', () async {
final o = buildContainerSpec();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ContainerSpec.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkContainerSpec(od);
});
});
unittest.group('obj-schema-CounterMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildCounterMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CounterMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCounterMetadata(od);
});
});
unittest.group('obj-schema-CounterStructuredName', () {
unittest.test('to-json--from-json', () async {
final o = buildCounterStructuredName();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CounterStructuredName.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCounterStructuredName(od);
});
});
unittest.group('obj-schema-CounterStructuredNameAndMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildCounterStructuredNameAndMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CounterStructuredNameAndMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCounterStructuredNameAndMetadata(od);
});
});
unittest.group('obj-schema-CounterUpdate', () {
unittest.test('to-json--from-json', () async {
final o = buildCounterUpdate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CounterUpdate.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCounterUpdate(od);
});
});
unittest.group('obj-schema-CreateJobFromTemplateRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildCreateJobFromTemplateRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CreateJobFromTemplateRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCreateJobFromTemplateRequest(od);
});
});
unittest.group('obj-schema-CustomSourceLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildCustomSourceLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.CustomSourceLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkCustomSourceLocation(od);
});
});
unittest.group('obj-schema-DataDiskAssignment', () {
unittest.test('to-json--from-json', () async {
final o = buildDataDiskAssignment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataDiskAssignment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataDiskAssignment(od);
});
});
unittest.group('obj-schema-DataSamplingConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSamplingConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSamplingConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSamplingConfig(od);
});
});
unittest.group('obj-schema-DataSamplingReport', () {
unittest.test('to-json--from-json', () async {
final o = buildDataSamplingReport();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DataSamplingReport.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDataSamplingReport(od);
});
});
unittest.group('obj-schema-DatastoreIODetails', () {
unittest.test('to-json--from-json', () async {
final o = buildDatastoreIODetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DatastoreIODetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDatastoreIODetails(od);
});
});
unittest.group('obj-schema-DebugOptions', () {
unittest.test('to-json--from-json', () async {
final o = buildDebugOptions();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DebugOptions.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDebugOptions(od);
});
});
unittest.group('obj-schema-DeleteSnapshotResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildDeleteSnapshotResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DeleteSnapshotResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDeleteSnapshotResponse(od);
});
});
unittest.group('obj-schema-DerivedSource', () {
unittest.test('to-json--from-json', () async {
final o = buildDerivedSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DerivedSource.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDerivedSource(od);
});
});
unittest.group('obj-schema-Disk', () {
unittest.test('to-json--from-json', () async {
final o = buildDisk();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Disk.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDisk(od);
});
});
unittest.group('obj-schema-DisplayData', () {
unittest.test('to-json--from-json', () async {
final o = buildDisplayData();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DisplayData.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDisplayData(od);
});
});
unittest.group('obj-schema-DistributionUpdate', () {
unittest.test('to-json--from-json', () async {
final o = buildDistributionUpdate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DistributionUpdate.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDistributionUpdate(od);
});
});
unittest.group('obj-schema-DynamicSourceSplit', () {
unittest.test('to-json--from-json', () async {
final o = buildDynamicSourceSplit();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.DynamicSourceSplit.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkDynamicSourceSplit(od);
});
});
unittest.group('obj-schema-Environment', () {
unittest.test('to-json--from-json', () async {
final o = buildEnvironment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Environment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkEnvironment(od);
});
});
unittest.group('obj-schema-ExecutionStageState', () {
unittest.test('to-json--from-json', () async {
final o = buildExecutionStageState();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ExecutionStageState.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkExecutionStageState(od);
});
});
unittest.group('obj-schema-ExecutionStageSummary', () {
unittest.test('to-json--from-json', () async {
final o = buildExecutionStageSummary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ExecutionStageSummary.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkExecutionStageSummary(od);
});
});
unittest.group('obj-schema-FailedLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildFailedLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FailedLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFailedLocation(od);
});
});
unittest.group('obj-schema-FileIODetails', () {
unittest.test('to-json--from-json', () async {
final o = buildFileIODetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileIODetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileIODetails(od);
});
});
unittest.group('obj-schema-FlattenInstruction', () {
unittest.test('to-json--from-json', () async {
final o = buildFlattenInstruction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FlattenInstruction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFlattenInstruction(od);
});
});
unittest.group('obj-schema-FlexTemplateRuntimeEnvironment', () {
unittest.test('to-json--from-json', () async {
final o = buildFlexTemplateRuntimeEnvironment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FlexTemplateRuntimeEnvironment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFlexTemplateRuntimeEnvironment(od);
});
});
unittest.group('obj-schema-FloatingPointList', () {
unittest.test('to-json--from-json', () async {
final o = buildFloatingPointList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FloatingPointList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFloatingPointList(od);
});
});
unittest.group('obj-schema-FloatingPointMean', () {
unittest.test('to-json--from-json', () async {
final o = buildFloatingPointMean();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FloatingPointMean.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFloatingPointMean(od);
});
});
unittest.group('obj-schema-GetDebugConfigRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildGetDebugConfigRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GetDebugConfigRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGetDebugConfigRequest(od);
});
});
unittest.group('obj-schema-GetDebugConfigResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGetDebugConfigResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GetDebugConfigResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGetDebugConfigResponse(od);
});
});
unittest.group('obj-schema-GetTemplateResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildGetTemplateResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GetTemplateResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGetTemplateResponse(od);
});
});
unittest.group('obj-schema-Histogram', () {
unittest.test('to-json--from-json', () async {
final o = buildHistogram();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Histogram.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkHistogram(od);
});
});
unittest.group('obj-schema-HotKeyDebuggingInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildHotKeyDebuggingInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.HotKeyDebuggingInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkHotKeyDebuggingInfo(od);
});
});
unittest.group('obj-schema-HotKeyDetection', () {
unittest.test('to-json--from-json', () async {
final o = buildHotKeyDetection();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.HotKeyDetection.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkHotKeyDetection(od);
});
});
unittest.group('obj-schema-HotKeyInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildHotKeyInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.HotKeyInfo.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkHotKeyInfo(od);
});
});
unittest.group('obj-schema-InstructionInput', () {
unittest.test('to-json--from-json', () async {
final o = buildInstructionInput();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InstructionInput.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInstructionInput(od);
});
});
unittest.group('obj-schema-InstructionOutput', () {
unittest.test('to-json--from-json', () async {
final o = buildInstructionOutput();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InstructionOutput.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInstructionOutput(od);
});
});
unittest.group('obj-schema-IntegerGauge', () {
unittest.test('to-json--from-json', () async {
final o = buildIntegerGauge();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IntegerGauge.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIntegerGauge(od);
});
});
unittest.group('obj-schema-IntegerList', () {
unittest.test('to-json--from-json', () async {
final o = buildIntegerList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IntegerList.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIntegerList(od);
});
});
unittest.group('obj-schema-IntegerMean', () {
unittest.test('to-json--from-json', () async {
final o = buildIntegerMean();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IntegerMean.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIntegerMean(od);
});
});
unittest.group('obj-schema-Job', () {
unittest.test('to-json--from-json', () async {
final o = buildJob();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Job.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkJob(od);
});
});
unittest.group('obj-schema-JobExecutionDetails', () {
unittest.test('to-json--from-json', () async {
final o = buildJobExecutionDetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.JobExecutionDetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkJobExecutionDetails(od);
});
});
unittest.group('obj-schema-JobExecutionInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildJobExecutionInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.JobExecutionInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkJobExecutionInfo(od);
});
});
unittest.group('obj-schema-JobExecutionStageInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildJobExecutionStageInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.JobExecutionStageInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkJobExecutionStageInfo(od);
});
});
unittest.group('obj-schema-JobMessage', () {
unittest.test('to-json--from-json', () async {
final o = buildJobMessage();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.JobMessage.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkJobMessage(od);
});
});
unittest.group('obj-schema-JobMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildJobMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.JobMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkJobMetadata(od);
});
});
unittest.group('obj-schema-JobMetrics', () {
unittest.test('to-json--from-json', () async {
final o = buildJobMetrics();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.JobMetrics.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkJobMetrics(od);
});
});
unittest.group('obj-schema-KeyRangeDataDiskAssignment', () {
unittest.test('to-json--from-json', () async {
final o = buildKeyRangeDataDiskAssignment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.KeyRangeDataDiskAssignment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkKeyRangeDataDiskAssignment(od);
});
});
unittest.group('obj-schema-KeyRangeLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildKeyRangeLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.KeyRangeLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkKeyRangeLocation(od);
});
});
unittest.group('obj-schema-LaunchFlexTemplateParameter', () {
unittest.test('to-json--from-json', () async {
final o = buildLaunchFlexTemplateParameter();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LaunchFlexTemplateParameter.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLaunchFlexTemplateParameter(od);
});
});
unittest.group('obj-schema-LaunchFlexTemplateRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildLaunchFlexTemplateRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LaunchFlexTemplateRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLaunchFlexTemplateRequest(od);
});
});
unittest.group('obj-schema-LaunchFlexTemplateResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildLaunchFlexTemplateResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LaunchFlexTemplateResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLaunchFlexTemplateResponse(od);
});
});
unittest.group('obj-schema-LaunchTemplateParameters', () {
unittest.test('to-json--from-json', () async {
final o = buildLaunchTemplateParameters();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LaunchTemplateParameters.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLaunchTemplateParameters(od);
});
});
unittest.group('obj-schema-LaunchTemplateResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildLaunchTemplateResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LaunchTemplateResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLaunchTemplateResponse(od);
});
});
unittest.group('obj-schema-LeaseWorkItemRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildLeaseWorkItemRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LeaseWorkItemRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLeaseWorkItemRequest(od);
});
});
unittest.group('obj-schema-LeaseWorkItemResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildLeaseWorkItemResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.LeaseWorkItemResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkLeaseWorkItemResponse(od);
});
});
unittest.group('obj-schema-ListJobMessagesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListJobMessagesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListJobMessagesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListJobMessagesResponse(od);
});
});
unittest.group('obj-schema-ListJobsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListJobsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListJobsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListJobsResponse(od);
});
});
unittest.group('obj-schema-ListSnapshotsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListSnapshotsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListSnapshotsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListSnapshotsResponse(od);
});
});
unittest.group('obj-schema-MapTask', () {
unittest.test('to-json--from-json', () async {
final o = buildMapTask();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.MapTask.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkMapTask(od);
});
});
unittest.group('obj-schema-MemInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildMemInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.MemInfo.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkMemInfo(od);
});
});
unittest.group('obj-schema-MetricShortId', () {
unittest.test('to-json--from-json', () async {
final o = buildMetricShortId();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MetricShortId.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMetricShortId(od);
});
});
unittest.group('obj-schema-MetricStructuredName', () {
unittest.test('to-json--from-json', () async {
final o = buildMetricStructuredName();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MetricStructuredName.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMetricStructuredName(od);
});
});
unittest.group('obj-schema-MetricUpdate', () {
unittest.test('to-json--from-json', () async {
final o = buildMetricUpdate();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MetricUpdate.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMetricUpdate(od);
});
});
unittest.group('obj-schema-MountedDataDisk', () {
unittest.test('to-json--from-json', () async {
final o = buildMountedDataDisk();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MountedDataDisk.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMountedDataDisk(od);
});
});
unittest.group('obj-schema-MultiOutputInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildMultiOutputInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MultiOutputInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMultiOutputInfo(od);
});
});
unittest.group('obj-schema-NameAndKind', () {
unittest.test('to-json--from-json', () async {
final o = buildNameAndKind();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.NameAndKind.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkNameAndKind(od);
});
});
unittest.group('obj-schema-Package', () {
unittest.test('to-json--from-json', () async {
final o = buildPackage();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Package.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPackage(od);
});
});
unittest.group('obj-schema-ParDoInstruction', () {
unittest.test('to-json--from-json', () async {
final o = buildParDoInstruction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ParDoInstruction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkParDoInstruction(od);
});
});
unittest.group('obj-schema-ParallelInstruction', () {
unittest.test('to-json--from-json', () async {
final o = buildParallelInstruction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ParallelInstruction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkParallelInstruction(od);
});
});
unittest.group('obj-schema-Parameter', () {
unittest.test('to-json--from-json', () async {
final o = buildParameter();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Parameter.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkParameter(od);
});
});
unittest.group('obj-schema-ParameterMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildParameterMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ParameterMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkParameterMetadata(od);
});
});
unittest.group('obj-schema-ParameterMetadataEnumOption', () {
unittest.test('to-json--from-json', () async {
final o = buildParameterMetadataEnumOption();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ParameterMetadataEnumOption.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkParameterMetadataEnumOption(od);
});
});
unittest.group('obj-schema-PartialGroupByKeyInstruction', () {
unittest.test('to-json--from-json', () async {
final o = buildPartialGroupByKeyInstruction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PartialGroupByKeyInstruction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPartialGroupByKeyInstruction(od);
});
});
unittest.group('obj-schema-PipelineDescription', () {
unittest.test('to-json--from-json', () async {
final o = buildPipelineDescription();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PipelineDescription.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPipelineDescription(od);
});
});
unittest.group('obj-schema-Point', () {
unittest.test('to-json--from-json', () async {
final o = buildPoint();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Point.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPoint(od);
});
});
unittest.group('obj-schema-Position', () {
unittest.test('to-json--from-json', () async {
final o = buildPosition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Position.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPosition(od);
});
});
unittest.group('obj-schema-ProgressTimeseries', () {
unittest.test('to-json--from-json', () async {
final o = buildProgressTimeseries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ProgressTimeseries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkProgressTimeseries(od);
});
});
unittest.group('obj-schema-PubSubIODetails', () {
unittest.test('to-json--from-json', () async {
final o = buildPubSubIODetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PubSubIODetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPubSubIODetails(od);
});
});
unittest.group('obj-schema-PubsubLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildPubsubLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PubsubLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPubsubLocation(od);
});
});
unittest.group('obj-schema-PubsubSnapshotMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildPubsubSnapshotMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PubsubSnapshotMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPubsubSnapshotMetadata(od);
});
});
unittest.group('obj-schema-ReadInstruction', () {
unittest.test('to-json--from-json', () async {
final o = buildReadInstruction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReadInstruction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReadInstruction(od);
});
});
unittest.group('obj-schema-ReportWorkItemStatusRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildReportWorkItemStatusRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReportWorkItemStatusRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReportWorkItemStatusRequest(od);
});
});
unittest.group('obj-schema-ReportWorkItemStatusResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildReportWorkItemStatusResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReportWorkItemStatusResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReportWorkItemStatusResponse(od);
});
});
unittest.group('obj-schema-ReportedParallelism', () {
unittest.test('to-json--from-json', () async {
final o = buildReportedParallelism();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ReportedParallelism.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkReportedParallelism(od);
});
});
unittest.group('obj-schema-ResourceUtilizationReport', () {
unittest.test('to-json--from-json', () async {
final o = buildResourceUtilizationReport();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ResourceUtilizationReport.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkResourceUtilizationReport(od);
});
});
unittest.group('obj-schema-ResourceUtilizationReportResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildResourceUtilizationReportResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ResourceUtilizationReportResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkResourceUtilizationReportResponse(od);
});
});
unittest.group('obj-schema-RuntimeEnvironment', () {
unittest.test('to-json--from-json', () async {
final o = buildRuntimeEnvironment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RuntimeEnvironment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRuntimeEnvironment(od);
});
});
unittest.group('obj-schema-RuntimeMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildRuntimeMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RuntimeMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRuntimeMetadata(od);
});
});
unittest.group('obj-schema-RuntimeUpdatableParams', () {
unittest.test('to-json--from-json', () async {
final o = buildRuntimeUpdatableParams();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RuntimeUpdatableParams.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRuntimeUpdatableParams(od);
});
});
unittest.group('obj-schema-SDKInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildSDKInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.SDKInfo.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSDKInfo(od);
});
});
unittest.group('obj-schema-SdkBug', () {
unittest.test('to-json--from-json', () async {
final o = buildSdkBug();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.SdkBug.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSdkBug(od);
});
});
unittest.group('obj-schema-SdkHarnessContainerImage', () {
unittest.test('to-json--from-json', () async {
final o = buildSdkHarnessContainerImage();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SdkHarnessContainerImage.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSdkHarnessContainerImage(od);
});
});
unittest.group('obj-schema-SdkVersion', () {
unittest.test('to-json--from-json', () async {
final o = buildSdkVersion();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.SdkVersion.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSdkVersion(od);
});
});
unittest.group('obj-schema-SendDebugCaptureRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSendDebugCaptureRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SendDebugCaptureRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSendDebugCaptureRequest(od);
});
});
unittest.group('obj-schema-SendDebugCaptureResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSendDebugCaptureResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SendDebugCaptureResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSendDebugCaptureResponse(od);
});
});
unittest.group('obj-schema-SendWorkerMessagesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSendWorkerMessagesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SendWorkerMessagesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSendWorkerMessagesRequest(od);
});
});
unittest.group('obj-schema-SendWorkerMessagesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSendWorkerMessagesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SendWorkerMessagesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSendWorkerMessagesResponse(od);
});
});
unittest.group('obj-schema-SeqMapTask', () {
unittest.test('to-json--from-json', () async {
final o = buildSeqMapTask();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.SeqMapTask.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSeqMapTask(od);
});
});
unittest.group('obj-schema-SeqMapTaskOutputInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildSeqMapTaskOutputInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SeqMapTaskOutputInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSeqMapTaskOutputInfo(od);
});
});
unittest.group('obj-schema-ShellTask', () {
unittest.test('to-json--from-json', () async {
final o = buildShellTask();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.ShellTask.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkShellTask(od);
});
});
unittest.group('obj-schema-SideInputInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildSideInputInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SideInputInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSideInputInfo(od);
});
});
unittest.group('obj-schema-Sink', () {
unittest.test('to-json--from-json', () async {
final o = buildSink();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Sink.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSink(od);
});
});
unittest.group('obj-schema-Snapshot', () {
unittest.test('to-json--from-json', () async {
final o = buildSnapshot();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Snapshot.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSnapshot(od);
});
});
unittest.group('obj-schema-SnapshotJobRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSnapshotJobRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SnapshotJobRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSnapshotJobRequest(od);
});
});
unittest.group('obj-schema-Source', () {
unittest.test('to-json--from-json', () async {
final o = buildSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Source.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSource(od);
});
});
unittest.group('obj-schema-SourceFork', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceFork();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.SourceFork.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSourceFork(od);
});
});
unittest.group('obj-schema-SourceGetMetadataRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceGetMetadataRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceGetMetadataRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceGetMetadataRequest(od);
});
});
unittest.group('obj-schema-SourceGetMetadataResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceGetMetadataResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceGetMetadataResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceGetMetadataResponse(od);
});
});
unittest.group('obj-schema-SourceMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceMetadata(od);
});
});
unittest.group('obj-schema-SourceOperationRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceOperationRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceOperationRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceOperationRequest(od);
});
});
unittest.group('obj-schema-SourceOperationResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceOperationResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceOperationResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceOperationResponse(od);
});
});
unittest.group('obj-schema-SourceSplitOptions', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceSplitOptions();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceSplitOptions.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceSplitOptions(od);
});
});
unittest.group('obj-schema-SourceSplitRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceSplitRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceSplitRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceSplitRequest(od);
});
});
unittest.group('obj-schema-SourceSplitResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceSplitResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceSplitResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceSplitResponse(od);
});
});
unittest.group('obj-schema-SourceSplitShard', () {
unittest.test('to-json--from-json', () async {
final o = buildSourceSplitShard();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SourceSplitShard.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSourceSplitShard(od);
});
});
unittest.group('obj-schema-SpannerIODetails', () {
unittest.test('to-json--from-json', () async {
final o = buildSpannerIODetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SpannerIODetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpannerIODetails(od);
});
});
unittest.group('obj-schema-SplitInt64', () {
unittest.test('to-json--from-json', () async {
final o = buildSplitInt64();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.SplitInt64.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkSplitInt64(od);
});
});
unittest.group('obj-schema-StageExecutionDetails', () {
unittest.test('to-json--from-json', () async {
final o = buildStageExecutionDetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StageExecutionDetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStageExecutionDetails(od);
});
});
unittest.group('obj-schema-StageSource', () {
unittest.test('to-json--from-json', () async {
final o = buildStageSource();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StageSource.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStageSource(od);
});
});
unittest.group('obj-schema-StageSummary', () {
unittest.test('to-json--from-json', () async {
final o = buildStageSummary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StageSummary.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStageSummary(od);
});
});
unittest.group('obj-schema-StateFamilyConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildStateFamilyConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StateFamilyConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStateFamilyConfig(od);
});
});
unittest.group('obj-schema-Status', () {
unittest.test('to-json--from-json', () async {
final o = buildStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Status.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStatus(od);
});
});
unittest.group('obj-schema-Step', () {
unittest.test('to-json--from-json', () async {
final o = buildStep();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Step.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStep(od);
});
});
unittest.group('obj-schema-Straggler', () {
unittest.test('to-json--from-json', () async {
final o = buildStraggler();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Straggler.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStraggler(od);
});
});
unittest.group('obj-schema-StragglerDebuggingInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildStragglerDebuggingInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StragglerDebuggingInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStragglerDebuggingInfo(od);
});
});
unittest.group('obj-schema-StragglerInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildStragglerInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StragglerInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStragglerInfo(od);
});
});
unittest.group('obj-schema-StragglerSummary', () {
unittest.test('to-json--from-json', () async {
final o = buildStragglerSummary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StragglerSummary.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStragglerSummary(od);
});
});
unittest.group('obj-schema-StreamLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamLocation(od);
});
});
unittest.group('obj-schema-StreamingApplianceSnapshotConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingApplianceSnapshotConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingApplianceSnapshotConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingApplianceSnapshotConfig(od);
});
});
unittest.group('obj-schema-StreamingComputationConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingComputationConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingComputationConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingComputationConfig(od);
});
});
unittest.group('obj-schema-StreamingComputationRanges', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingComputationRanges();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingComputationRanges.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingComputationRanges(od);
});
});
unittest.group('obj-schema-StreamingComputationTask', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingComputationTask();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingComputationTask.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingComputationTask(od);
});
});
unittest.group('obj-schema-StreamingConfigTask', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingConfigTask();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingConfigTask.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingConfigTask(od);
});
});
unittest.group('obj-schema-StreamingSetupTask', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingSetupTask();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingSetupTask.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingSetupTask(od);
});
});
unittest.group('obj-schema-StreamingSideInputLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingSideInputLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingSideInputLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingSideInputLocation(od);
});
});
unittest.group('obj-schema-StreamingStageLocation', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingStageLocation();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingStageLocation.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingStageLocation(od);
});
});
unittest.group('obj-schema-StreamingStragglerInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildStreamingStragglerInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StreamingStragglerInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStreamingStragglerInfo(od);
});
});
unittest.group('obj-schema-StringList', () {
unittest.test('to-json--from-json', () async {
final o = buildStringList();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.StringList.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStringList(od);
});
});
unittest.group('obj-schema-StructuredMessage', () {
unittest.test('to-json--from-json', () async {
final o = buildStructuredMessage();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StructuredMessage.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStructuredMessage(od);
});
});
unittest.group('obj-schema-TaskRunnerSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildTaskRunnerSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TaskRunnerSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTaskRunnerSettings(od);
});
});
unittest.group('obj-schema-TemplateMetadata', () {
unittest.test('to-json--from-json', () async {
final o = buildTemplateMetadata();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TemplateMetadata.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTemplateMetadata(od);
});
});
unittest.group('obj-schema-TopologyConfig', () {
unittest.test('to-json--from-json', () async {
final o = buildTopologyConfig();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TopologyConfig.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTopologyConfig(od);
});
});
unittest.group('obj-schema-TransformSummary', () {
unittest.test('to-json--from-json', () async {
final o = buildTransformSummary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TransformSummary.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTransformSummary(od);
});
});
unittest.group('obj-schema-WorkItem', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkItem();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.WorkItem.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkWorkItem(od);
});
});
unittest.group('obj-schema-WorkItemDetails', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkItemDetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkItemDetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkItemDetails(od);
});
});
unittest.group('obj-schema-WorkItemServiceState', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkItemServiceState();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkItemServiceState.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkItemServiceState(od);
});
});
unittest.group('obj-schema-WorkItemStatus', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkItemStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkItemStatus.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkItemStatus(od);
});
});
unittest.group('obj-schema-WorkerDetails', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerDetails();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerDetails.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerDetails(od);
});
});
unittest.group('obj-schema-WorkerHealthReport', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerHealthReport();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerHealthReport.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerHealthReport(od);
});
});
unittest.group('obj-schema-WorkerHealthReportResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerHealthReportResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerHealthReportResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerHealthReportResponse(od);
});
});
unittest.group('obj-schema-WorkerLifecycleEvent', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerLifecycleEvent();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerLifecycleEvent.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerLifecycleEvent(od);
});
});
unittest.group('obj-schema-WorkerMessage', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerMessage();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerMessage.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerMessage(od);
});
});
unittest.group('obj-schema-WorkerMessageCode', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerMessageCode();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerMessageCode.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerMessageCode(od);
});
});
unittest.group('obj-schema-WorkerMessageResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerMessageResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerMessageResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerMessageResponse(od);
});
});
unittest.group('obj-schema-WorkerPool', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerPool();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.WorkerPool.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkWorkerPool(od);
});
});
unittest.group('obj-schema-WorkerSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerSettings(od);
});
});
unittest.group('obj-schema-WorkerShutdownNotice', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerShutdownNotice();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerShutdownNotice.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerShutdownNotice(od);
});
});
unittest.group('obj-schema-WorkerShutdownNoticeResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerShutdownNoticeResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerShutdownNoticeResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerShutdownNoticeResponse(od);
});
});
unittest.group('obj-schema-WorkerThreadScalingReport', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerThreadScalingReport();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerThreadScalingReport.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerThreadScalingReport(od);
});
});
unittest.group('obj-schema-WorkerThreadScalingReportResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildWorkerThreadScalingReportResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WorkerThreadScalingReportResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWorkerThreadScalingReportResponse(od);
});
});
unittest.group('obj-schema-WriteInstruction', () {
unittest.test('to-json--from-json', () async {
final o = buildWriteInstruction();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.WriteInstruction.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkWriteInstruction(od);
});
});
unittest.group('resource-ProjectsResource', () {
unittest.test('method--deleteSnapshots', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_snapshotId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/snapshots', 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 + 10),
unittest.equals('/snapshots'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['snapshotId']!.first,
unittest.equals(arg_snapshotId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDeleteSnapshotResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.deleteSnapshots(arg_projectId,
location: arg_location,
snapshotId: arg_snapshotId,
$fields: arg_$fields);
checkDeleteSnapshotResponse(response as api.DeleteSnapshotResponse);
});
unittest.test('method--workerMessages', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects;
final arg_request = buildSendWorkerMessagesRequest();
final arg_projectId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SendWorkerMessagesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSendWorkerMessagesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/WorkerMessages', 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 + 15),
unittest.equals('/WorkerMessages'),
);
pathOffset += 15;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSendWorkerMessagesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.workerMessages(arg_request, arg_projectId,
$fields: arg_$fields);
checkSendWorkerMessagesResponse(
response as api.SendWorkerMessagesResponse);
});
});
unittest.group('resource-ProjectsJobsResource', () {
unittest.test('method--aggregated', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs;
final arg_projectId = 'foo';
final arg_filter = 'foo';
final arg_location = 'foo';
final arg_name = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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:aggregated', 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 + 16),
unittest.equals('/jobs:aggregated'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['name']!.first,
unittest.equals(arg_name),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListJobsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.aggregated(arg_projectId,
filter: arg_filter,
location: arg_location,
name: arg_name,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
view: arg_view,
$fields: arg_$fields);
checkListJobsResponse(response as api.ListJobsResponse);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs;
final arg_request = buildJob();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_replaceJobId = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Job.fromJson(json as core.Map<core.String, core.dynamic>);
checkJob(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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 + 5),
unittest.equals('/jobs'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJob());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_projectId,
location: arg_location,
replaceJobId: arg_replaceJobId,
view: arg_view,
$fields: arg_$fields);
checkJob(response as api.Job);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs;
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_location = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_jobId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJob());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_projectId, arg_jobId,
location: arg_location, view: arg_view, $fields: arg_$fields);
checkJob(response as api.Job);
});
unittest.test('method--getMetrics', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs;
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_location = 'foo';
final arg_startTime = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/metrics', 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 + 8),
unittest.equals('/metrics'),
);
pathOffset += 8;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['startTime']!.first,
unittest.equals(arg_startTime),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJobMetrics());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getMetrics(arg_projectId, arg_jobId,
location: arg_location,
startTime: arg_startTime,
$fields: arg_$fields);
checkJobMetrics(response as api.JobMetrics);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs;
final arg_projectId = 'foo';
final arg_filter = 'foo';
final arg_location = 'foo';
final arg_name = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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 + 5),
unittest.equals('/jobs'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['name']!.first,
unittest.equals(arg_name),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListJobsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId,
filter: arg_filter,
location: arg_location,
name: arg_name,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
view: arg_view,
$fields: arg_$fields);
checkListJobsResponse(response as api.ListJobsResponse);
});
unittest.test('method--snapshot', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs;
final arg_request = buildSnapshotJobRequest();
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SnapshotJobRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSnapshotJobRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSnapshot());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.snapshot(arg_request, arg_projectId, arg_jobId,
$fields: arg_$fields);
checkSnapshot(response as api.Snapshot);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs;
final arg_request = buildJob();
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_location = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Job.fromJson(json as core.Map<core.String, core.dynamic>);
checkJob(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_jobId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['updateMask']!.first,
unittest.equals(arg_updateMask),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJob());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(arg_request, arg_projectId, arg_jobId,
location: arg_location,
updateMask: arg_updateMask,
$fields: arg_$fields);
checkJob(response as api.Job);
});
});
unittest.group('resource-ProjectsJobsDebugResource', () {
unittest.test('method--getConfig', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs.debug;
final arg_request = buildGetDebugConfigRequest();
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GetDebugConfigRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGetDebugConfigRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/debug/getConfig', 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 + 16),
unittest.equals('/debug/getConfig'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGetDebugConfigResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getConfig(
arg_request, arg_projectId, arg_jobId,
$fields: arg_$fields);
checkGetDebugConfigResponse(response as api.GetDebugConfigResponse);
});
unittest.test('method--sendCapture', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs.debug;
final arg_request = buildSendDebugCaptureRequest();
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SendDebugCaptureRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSendDebugCaptureRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/debug/sendCapture', 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 + 18),
unittest.equals('/debug/sendCapture'),
);
pathOffset += 18;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSendDebugCaptureResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.sendCapture(
arg_request, arg_projectId, arg_jobId,
$fields: arg_$fields);
checkSendDebugCaptureResponse(response as api.SendDebugCaptureResponse);
});
});
unittest.group('resource-ProjectsJobsMessagesResource', () {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs.messages;
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_endTime = 'foo';
final arg_location = 'foo';
final arg_minimumImportance = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_startTime = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/messages', 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('/messages'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['endTime']!.first,
unittest.equals(arg_endTime),
);
unittest.expect(
queryMap['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['minimumImportance']!.first,
unittest.equals(arg_minimumImportance),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['startTime']!.first,
unittest.equals(arg_startTime),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListJobMessagesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId, arg_jobId,
endTime: arg_endTime,
location: arg_location,
minimumImportance: arg_minimumImportance,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
startTime: arg_startTime,
$fields: arg_$fields);
checkListJobMessagesResponse(response as api.ListJobMessagesResponse);
});
});
unittest.group('resource-ProjectsJobsWorkItemsResource', () {
unittest.test('method--lease', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs.workItems;
final arg_request = buildLeaseWorkItemRequest();
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.LeaseWorkItemRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkLeaseWorkItemRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/workItems:lease', 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 + 16),
unittest.equals('/workItems:lease'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLeaseWorkItemResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.lease(arg_request, arg_projectId, arg_jobId,
$fields: arg_$fields);
checkLeaseWorkItemResponse(response as api.LeaseWorkItemResponse);
});
unittest.test('method--reportStatus', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.jobs.workItems;
final arg_request = buildReportWorkItemStatusRequest();
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ReportWorkItemStatusRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkReportWorkItemStatusRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/workItems:reportStatus', 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 + 23),
unittest.equals('/workItems:reportStatus'),
);
pathOffset += 23;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildReportWorkItemStatusResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.reportStatus(
arg_request, arg_projectId, arg_jobId,
$fields: arg_$fields);
checkReportWorkItemStatusResponse(
response as api.ReportWorkItemStatusResponse);
});
});
unittest.group('resource-ProjectsLocationsResource', () {
unittest.test('method--workerMessages', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations;
final arg_request = buildSendWorkerMessagesRequest();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SendWorkerMessagesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSendWorkerMessagesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/WorkerMessages', 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 + 15),
unittest.equals('/WorkerMessages'),
);
pathOffset += 15;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSendWorkerMessagesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.workerMessages(
arg_request, arg_projectId, arg_location,
$fields: arg_$fields);
checkSendWorkerMessagesResponse(
response as api.SendWorkerMessagesResponse);
});
});
unittest.group('resource-ProjectsLocationsFlexTemplatesResource', () {
unittest.test('method--launch', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.flexTemplates;
final arg_request = buildLaunchFlexTemplateRequest();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.LaunchFlexTemplateRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkLaunchFlexTemplateRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/flexTemplates:launch', 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 + 21),
unittest.equals('/flexTemplates:launch'),
);
pathOffset += 21;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLaunchFlexTemplateResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.launch(
arg_request, arg_projectId, arg_location,
$fields: arg_$fields);
checkLaunchFlexTemplateResponse(
response as api.LaunchFlexTemplateResponse);
});
});
unittest.group('resource-ProjectsLocationsJobsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs;
final arg_request = buildJob();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_replaceJobId = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Job.fromJson(json as core.Map<core.String, core.dynamic>);
checkJob(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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 + 5),
unittest.equals('/jobs'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJob());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(
arg_request, arg_projectId, arg_location,
replaceJobId: arg_replaceJobId, view: arg_view, $fields: arg_$fields);
checkJob(response as api.Job);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_jobId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJob());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_projectId, arg_location, arg_jobId,
view: arg_view, $fields: arg_$fields);
checkJob(response as api.Job);
});
unittest.test('method--getExecutionDetails', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/executionDetails', 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 + 17),
unittest.equals('/executionDetails'),
);
pathOffset += 17;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJobExecutionDetails());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getExecutionDetails(
arg_projectId, arg_location, arg_jobId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkJobExecutionDetails(response as api.JobExecutionDetails);
});
unittest.test('method--getMetrics', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_startTime = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/metrics', 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 + 8),
unittest.equals('/metrics'),
);
pathOffset += 8;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['startTime']!.first,
unittest.equals(arg_startTime),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJobMetrics());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getMetrics(
arg_projectId, arg_location, arg_jobId,
startTime: arg_startTime, $fields: arg_$fields);
checkJobMetrics(response as api.JobMetrics);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_filter = 'foo';
final arg_name = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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 + 5),
unittest.equals('/jobs'),
);
pathOffset += 5;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['name']!.first,
unittest.equals(arg_name),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListJobsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId, arg_location,
filter: arg_filter,
name: arg_name,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
view: arg_view,
$fields: arg_$fields);
checkListJobsResponse(response as api.ListJobsResponse);
});
unittest.test('method--snapshot', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs;
final arg_request = buildSnapshotJobRequest();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SnapshotJobRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSnapshotJobRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSnapshot());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.snapshot(
arg_request, arg_projectId, arg_location, arg_jobId,
$fields: arg_$fields);
checkSnapshot(response as api.Snapshot);
});
unittest.test('method--update', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs;
final arg_request = buildJob();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_updateMask = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Job.fromJson(json as core.Map<core.String, core.dynamic>);
checkJob(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_jobId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJob());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.update(
arg_request, arg_projectId, arg_location, arg_jobId,
updateMask: arg_updateMask, $fields: arg_$fields);
checkJob(response as api.Job);
});
});
unittest.group('resource-ProjectsLocationsJobsDebugResource', () {
unittest.test('method--getConfig', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs.debug;
final arg_request = buildGetDebugConfigRequest();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.GetDebugConfigRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkGetDebugConfigRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/debug/getConfig', 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 + 16),
unittest.equals('/debug/getConfig'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGetDebugConfigResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getConfig(
arg_request, arg_projectId, arg_location, arg_jobId,
$fields: arg_$fields);
checkGetDebugConfigResponse(response as api.GetDebugConfigResponse);
});
unittest.test('method--sendCapture', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs.debug;
final arg_request = buildSendDebugCaptureRequest();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.SendDebugCaptureRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkSendDebugCaptureRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/debug/sendCapture', 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 + 18),
unittest.equals('/debug/sendCapture'),
);
pathOffset += 18;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSendDebugCaptureResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.sendCapture(
arg_request, arg_projectId, arg_location, arg_jobId,
$fields: arg_$fields);
checkSendDebugCaptureResponse(response as api.SendDebugCaptureResponse);
});
});
unittest.group('resource-ProjectsLocationsJobsMessagesResource', () {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs.messages;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_endTime = 'foo';
final arg_minimumImportance = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_startTime = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/messages', 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('/messages'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['endTime']!.first,
unittest.equals(arg_endTime),
);
unittest.expect(
queryMap['minimumImportance']!.first,
unittest.equals(arg_minimumImportance),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['startTime']!.first,
unittest.equals(arg_startTime),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListJobMessagesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId, arg_location, arg_jobId,
endTime: arg_endTime,
minimumImportance: arg_minimumImportance,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
startTime: arg_startTime,
$fields: arg_$fields);
checkListJobMessagesResponse(response as api.ListJobMessagesResponse);
});
});
unittest.group('resource-ProjectsLocationsJobsSnapshotsResource', () {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs.snapshots;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/snapshots', 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 + 10),
unittest.equals('/snapshots'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListSnapshotsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId, arg_location, arg_jobId,
$fields: arg_$fields);
checkListSnapshotsResponse(response as api.ListSnapshotsResponse);
});
});
unittest.group('resource-ProjectsLocationsJobsStagesResource', () {
unittest.test('method--getExecutionDetails', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs.stages;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_stageId = 'foo';
final arg_endTime = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_startTime = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/stages/', 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 + 8),
unittest.equals('/stages/'),
);
pathOffset += 8;
index = path.indexOf('/executionDetails', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stageId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 17),
unittest.equals('/executionDetails'),
);
pathOffset += 17;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['endTime']!.first,
unittest.equals(arg_endTime),
);
unittest.expect(
core.int.parse(queryMap['pageSize']!.first),
unittest.equals(arg_pageSize),
);
unittest.expect(
queryMap['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['startTime']!.first,
unittest.equals(arg_startTime),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildStageExecutionDetails());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getExecutionDetails(
arg_projectId, arg_location, arg_jobId, arg_stageId,
endTime: arg_endTime,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
startTime: arg_startTime,
$fields: arg_$fields);
checkStageExecutionDetails(response as api.StageExecutionDetails);
});
});
unittest.group('resource-ProjectsLocationsJobsWorkItemsResource', () {
unittest.test('method--lease', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs.workItems;
final arg_request = buildLeaseWorkItemRequest();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.LeaseWorkItemRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkLeaseWorkItemRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/workItems:lease', 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 + 16),
unittest.equals('/workItems:lease'),
);
pathOffset += 16;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLeaseWorkItemResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.lease(
arg_request, arg_projectId, arg_location, arg_jobId,
$fields: arg_$fields);
checkLeaseWorkItemResponse(response as api.LeaseWorkItemResponse);
});
unittest.test('method--reportStatus', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.jobs.workItems;
final arg_request = buildReportWorkItemStatusRequest();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.ReportWorkItemStatusRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkReportWorkItemStatusRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/workItems:reportStatus', 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 + 23),
unittest.equals('/workItems:reportStatus'),
);
pathOffset += 23;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildReportWorkItemStatusResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.reportStatus(
arg_request, arg_projectId, arg_location, arg_jobId,
$fields: arg_$fields);
checkReportWorkItemStatusResponse(
response as api.ReportWorkItemStatusResponse);
});
});
unittest.group('resource-ProjectsLocationsSnapshotsResource', () {
unittest.test('method--delete', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.snapshots;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_snapshotId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/snapshots/', 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 + 11),
unittest.equals('/snapshots/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_snapshotId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildDeleteSnapshotResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.delete(
arg_projectId, arg_location, arg_snapshotId,
$fields: arg_$fields);
checkDeleteSnapshotResponse(response as api.DeleteSnapshotResponse);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.snapshots;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_snapshotId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/snapshots/', 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 + 11),
unittest.equals('/snapshots/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_snapshotId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSnapshot());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(
arg_projectId, arg_location, arg_snapshotId,
$fields: arg_$fields);
checkSnapshot(response as api.Snapshot);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.snapshots;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_jobId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/snapshots', 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 + 10),
unittest.equals('/snapshots'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['jobId']!.first,
unittest.equals(arg_jobId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListSnapshotsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId, arg_location,
jobId: arg_jobId, $fields: arg_$fields);
checkListSnapshotsResponse(response as api.ListSnapshotsResponse);
});
});
unittest.group('resource-ProjectsLocationsTemplatesResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.templates;
final arg_request = buildCreateJobFromTemplateRequest();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CreateJobFromTemplateRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCreateJobFromTemplateRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/templates', 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 + 10),
unittest.equals('/templates'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJob());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(
arg_request, arg_projectId, arg_location,
$fields: arg_$fields);
checkJob(response as api.Job);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.templates;
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_gcsPath = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/templates:get', 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 + 14),
unittest.equals('/templates:get'),
);
pathOffset += 14;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['gcsPath']!.first,
unittest.equals(arg_gcsPath),
);
unittest.expect(
queryMap['view']!.first,
unittest.equals(arg_view),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGetTemplateResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_projectId, arg_location,
gcsPath: arg_gcsPath, view: arg_view, $fields: arg_$fields);
checkGetTemplateResponse(response as api.GetTemplateResponse);
});
unittest.test('method--launch', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.locations.templates;
final arg_request = buildLaunchTemplateParameters();
final arg_projectId = 'foo';
final arg_location = 'foo';
final arg_dynamicTemplate_gcsPath = 'foo';
final arg_dynamicTemplate_stagingLocation = 'foo';
final arg_gcsPath = 'foo';
final arg_validateOnly = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.LaunchTemplateParameters.fromJson(
json as core.Map<core.String, core.dynamic>);
checkLaunchTemplateParameters(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/templates:launch', 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 + 17),
unittest.equals('/templates:launch'),
);
pathOffset += 17;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
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['gcsPath']!.first,
unittest.equals(arg_gcsPath),
);
unittest.expect(
queryMap['validateOnly']!.first,
unittest.equals('$arg_validateOnly'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLaunchTemplateResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.launch(
arg_request, arg_projectId, arg_location,
dynamicTemplate_gcsPath: arg_dynamicTemplate_gcsPath,
dynamicTemplate_stagingLocation: arg_dynamicTemplate_stagingLocation,
gcsPath: arg_gcsPath,
validateOnly: arg_validateOnly,
$fields: arg_$fields);
checkLaunchTemplateResponse(response as api.LaunchTemplateResponse);
});
});
unittest.group('resource-ProjectsSnapshotsResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.snapshots;
final arg_projectId = 'foo';
final arg_snapshotId = 'foo';
final arg_location = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/snapshots/', 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('/snapshots/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_snapshotId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildSnapshot());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_projectId, arg_snapshotId,
location: arg_location, $fields: arg_$fields);
checkSnapshot(response as api.Snapshot);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.snapshots;
final arg_projectId = 'foo';
final arg_jobId = 'foo';
final arg_location = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/snapshots', 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 + 10),
unittest.equals('/snapshots'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['jobId']!.first,
unittest.equals(arg_jobId),
);
unittest.expect(
queryMap['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListSnapshotsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId,
jobId: arg_jobId, location: arg_location, $fields: arg_$fields);
checkListSnapshotsResponse(response as api.ListSnapshotsResponse);
});
});
unittest.group('resource-ProjectsTemplatesResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.templates;
final arg_request = buildCreateJobFromTemplateRequest();
final arg_projectId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.CreateJobFromTemplateRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCreateJobFromTemplateRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/templates', 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 + 10),
unittest.equals('/templates'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildJob());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.create(arg_request, arg_projectId, $fields: arg_$fields);
checkJob(response as api.Job);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.templates;
final arg_projectId = 'foo';
final arg_gcsPath = 'foo';
final arg_location = 'foo';
final arg_view = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/templates:get', 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 + 14),
unittest.equals('/templates:get'),
);
pathOffset += 14;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
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['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildGetTemplateResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_projectId,
gcsPath: arg_gcsPath,
location: arg_location,
view: arg_view,
$fields: arg_$fields);
checkGetTemplateResponse(response as api.GetTemplateResponse);
});
unittest.test('method--launch', () async {
final mock = HttpServerMock();
final res = api.DataflowApi(mock).projects.templates;
final arg_request = buildLaunchTemplateParameters();
final arg_projectId = 'foo';
final arg_dynamicTemplate_gcsPath = 'foo';
final arg_dynamicTemplate_stagingLocation = 'foo';
final arg_gcsPath = 'foo';
final arg_location = 'foo';
final arg_validateOnly = true;
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.LaunchTemplateParameters.fromJson(
json as core.Map<core.String, core.dynamic>);
checkLaunchTemplateParameters(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String 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('/templates:launch', 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 + 17),
unittest.equals('/templates:launch'),
);
pathOffset += 17;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
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['gcsPath']!.first,
unittest.equals(arg_gcsPath),
);
unittest.expect(
queryMap['location']!.first,
unittest.equals(arg_location),
);
unittest.expect(
queryMap['validateOnly']!.first,
unittest.equals('$arg_validateOnly'),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildLaunchTemplateResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.launch(arg_request, arg_projectId,
dynamicTemplate_gcsPath: arg_dynamicTemplate_gcsPath,
dynamicTemplate_stagingLocation: arg_dynamicTemplate_stagingLocation,
gcsPath: arg_gcsPath,
location: arg_location,
validateOnly: arg_validateOnly,
$fields: arg_$fields);
checkLaunchTemplateResponse(response as api.LaunchTemplateResponse);
});
});
}
| googleapis.dart/generated/googleapis_beta/test/dataflow/v1b3_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis_beta/test/dataflow/v1b3_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 177824} |
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// 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_const_declarations
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_library_directive
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: unreachable_from_main
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:googleapis_beta/toolresults/v1beta3.dart' as api;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import '../test_shared.dart';
core.int buildCounterAndroidAppInfo = 0;
api.AndroidAppInfo buildAndroidAppInfo() {
final o = api.AndroidAppInfo();
buildCounterAndroidAppInfo++;
if (buildCounterAndroidAppInfo < 3) {
o.name = 'foo';
o.packageName = 'foo';
o.versionCode = 'foo';
o.versionName = 'foo';
}
buildCounterAndroidAppInfo--;
return o;
}
void checkAndroidAppInfo(api.AndroidAppInfo o) {
buildCounterAndroidAppInfo++;
if (buildCounterAndroidAppInfo < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.packageName!,
unittest.equals('foo'),
);
unittest.expect(
o.versionCode!,
unittest.equals('foo'),
);
unittest.expect(
o.versionName!,
unittest.equals('foo'),
);
}
buildCounterAndroidAppInfo--;
}
core.List<core.String> buildUnnamed0() => [
'foo',
'foo',
];
void checkUnnamed0(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 buildCounterAndroidInstrumentationTest = 0;
api.AndroidInstrumentationTest buildAndroidInstrumentationTest() {
final o = api.AndroidInstrumentationTest();
buildCounterAndroidInstrumentationTest++;
if (buildCounterAndroidInstrumentationTest < 3) {
o.testPackageId = 'foo';
o.testRunnerClass = 'foo';
o.testTargets = buildUnnamed0();
o.useOrchestrator = true;
}
buildCounterAndroidInstrumentationTest--;
return o;
}
void checkAndroidInstrumentationTest(api.AndroidInstrumentationTest o) {
buildCounterAndroidInstrumentationTest++;
if (buildCounterAndroidInstrumentationTest < 3) {
unittest.expect(
o.testPackageId!,
unittest.equals('foo'),
);
unittest.expect(
o.testRunnerClass!,
unittest.equals('foo'),
);
checkUnnamed0(o.testTargets!);
unittest.expect(o.useOrchestrator!, unittest.isTrue);
}
buildCounterAndroidInstrumentationTest--;
}
core.int buildCounterAndroidRoboTest = 0;
api.AndroidRoboTest buildAndroidRoboTest() {
final o = api.AndroidRoboTest();
buildCounterAndroidRoboTest++;
if (buildCounterAndroidRoboTest < 3) {
o.appInitialActivity = 'foo';
o.bootstrapPackageId = 'foo';
o.bootstrapRunnerClass = 'foo';
o.maxDepth = 42;
o.maxSteps = 42;
}
buildCounterAndroidRoboTest--;
return o;
}
void checkAndroidRoboTest(api.AndroidRoboTest o) {
buildCounterAndroidRoboTest++;
if (buildCounterAndroidRoboTest < 3) {
unittest.expect(
o.appInitialActivity!,
unittest.equals('foo'),
);
unittest.expect(
o.bootstrapPackageId!,
unittest.equals('foo'),
);
unittest.expect(
o.bootstrapRunnerClass!,
unittest.equals('foo'),
);
unittest.expect(
o.maxDepth!,
unittest.equals(42),
);
unittest.expect(
o.maxSteps!,
unittest.equals(42),
);
}
buildCounterAndroidRoboTest--;
}
core.int buildCounterAndroidTest = 0;
api.AndroidTest buildAndroidTest() {
final o = api.AndroidTest();
buildCounterAndroidTest++;
if (buildCounterAndroidTest < 3) {
o.androidAppInfo = buildAndroidAppInfo();
o.androidInstrumentationTest = buildAndroidInstrumentationTest();
o.androidRoboTest = buildAndroidRoboTest();
o.androidTestLoop = buildAndroidTestLoop();
o.testTimeout = buildDuration();
}
buildCounterAndroidTest--;
return o;
}
void checkAndroidTest(api.AndroidTest o) {
buildCounterAndroidTest++;
if (buildCounterAndroidTest < 3) {
checkAndroidAppInfo(o.androidAppInfo!);
checkAndroidInstrumentationTest(o.androidInstrumentationTest!);
checkAndroidRoboTest(o.androidRoboTest!);
checkAndroidTestLoop(o.androidTestLoop!);
checkDuration(o.testTimeout!);
}
buildCounterAndroidTest--;
}
core.int buildCounterAndroidTestLoop = 0;
api.AndroidTestLoop buildAndroidTestLoop() {
final o = api.AndroidTestLoop();
buildCounterAndroidTestLoop++;
if (buildCounterAndroidTestLoop < 3) {}
buildCounterAndroidTestLoop--;
return o;
}
void checkAndroidTestLoop(api.AndroidTestLoop o) {
buildCounterAndroidTestLoop++;
if (buildCounterAndroidTestLoop < 3) {}
buildCounterAndroidTestLoop--;
}
core.int buildCounterAny = 0;
api.Any buildAny() {
final o = api.Any();
buildCounterAny++;
if (buildCounterAny < 3) {
o.typeUrl = 'foo';
o.value = 'foo';
}
buildCounterAny--;
return o;
}
void checkAny(api.Any o) {
buildCounterAny++;
if (buildCounterAny < 3) {
unittest.expect(
o.typeUrl!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterAny--;
}
core.int buildCounterAppStartTime = 0;
api.AppStartTime buildAppStartTime() {
final o = api.AppStartTime();
buildCounterAppStartTime++;
if (buildCounterAppStartTime < 3) {
o.fullyDrawnTime = buildDuration();
o.initialDisplayTime = buildDuration();
}
buildCounterAppStartTime--;
return o;
}
void checkAppStartTime(api.AppStartTime o) {
buildCounterAppStartTime++;
if (buildCounterAppStartTime < 3) {
checkDuration(o.fullyDrawnTime!);
checkDuration(o.initialDisplayTime!);
}
buildCounterAppStartTime--;
}
core.int buildCounterBasicPerfSampleSeries = 0;
api.BasicPerfSampleSeries buildBasicPerfSampleSeries() {
final o = api.BasicPerfSampleSeries();
buildCounterBasicPerfSampleSeries++;
if (buildCounterBasicPerfSampleSeries < 3) {
o.perfMetricType = 'foo';
o.perfUnit = 'foo';
o.sampleSeriesLabel = 'foo';
}
buildCounterBasicPerfSampleSeries--;
return o;
}
void checkBasicPerfSampleSeries(api.BasicPerfSampleSeries o) {
buildCounterBasicPerfSampleSeries++;
if (buildCounterBasicPerfSampleSeries < 3) {
unittest.expect(
o.perfMetricType!,
unittest.equals('foo'),
);
unittest.expect(
o.perfUnit!,
unittest.equals('foo'),
);
unittest.expect(
o.sampleSeriesLabel!,
unittest.equals('foo'),
);
}
buildCounterBasicPerfSampleSeries--;
}
core.List<api.PerfSample> buildUnnamed1() => [
buildPerfSample(),
buildPerfSample(),
];
void checkUnnamed1(core.List<api.PerfSample> o) {
unittest.expect(o, unittest.hasLength(2));
checkPerfSample(o[0]);
checkPerfSample(o[1]);
}
core.int buildCounterBatchCreatePerfSamplesRequest = 0;
api.BatchCreatePerfSamplesRequest buildBatchCreatePerfSamplesRequest() {
final o = api.BatchCreatePerfSamplesRequest();
buildCounterBatchCreatePerfSamplesRequest++;
if (buildCounterBatchCreatePerfSamplesRequest < 3) {
o.perfSamples = buildUnnamed1();
}
buildCounterBatchCreatePerfSamplesRequest--;
return o;
}
void checkBatchCreatePerfSamplesRequest(api.BatchCreatePerfSamplesRequest o) {
buildCounterBatchCreatePerfSamplesRequest++;
if (buildCounterBatchCreatePerfSamplesRequest < 3) {
checkUnnamed1(o.perfSamples!);
}
buildCounterBatchCreatePerfSamplesRequest--;
}
core.List<api.PerfSample> buildUnnamed2() => [
buildPerfSample(),
buildPerfSample(),
];
void checkUnnamed2(core.List<api.PerfSample> o) {
unittest.expect(o, unittest.hasLength(2));
checkPerfSample(o[0]);
checkPerfSample(o[1]);
}
core.int buildCounterBatchCreatePerfSamplesResponse = 0;
api.BatchCreatePerfSamplesResponse buildBatchCreatePerfSamplesResponse() {
final o = api.BatchCreatePerfSamplesResponse();
buildCounterBatchCreatePerfSamplesResponse++;
if (buildCounterBatchCreatePerfSamplesResponse < 3) {
o.perfSamples = buildUnnamed2();
}
buildCounterBatchCreatePerfSamplesResponse--;
return o;
}
void checkBatchCreatePerfSamplesResponse(api.BatchCreatePerfSamplesResponse o) {
buildCounterBatchCreatePerfSamplesResponse++;
if (buildCounterBatchCreatePerfSamplesResponse < 3) {
checkUnnamed2(o.perfSamples!);
}
buildCounterBatchCreatePerfSamplesResponse--;
}
core.int buildCounterCPUInfo = 0;
api.CPUInfo buildCPUInfo() {
final o = api.CPUInfo();
buildCounterCPUInfo++;
if (buildCounterCPUInfo < 3) {
o.cpuProcessor = 'foo';
o.cpuSpeedInGhz = 42.0;
o.numberOfCores = 42;
}
buildCounterCPUInfo--;
return o;
}
void checkCPUInfo(api.CPUInfo o) {
buildCounterCPUInfo++;
if (buildCounterCPUInfo < 3) {
unittest.expect(
o.cpuProcessor!,
unittest.equals('foo'),
);
unittest.expect(
o.cpuSpeedInGhz!,
unittest.equals(42.0),
);
unittest.expect(
o.numberOfCores!,
unittest.equals(42),
);
}
buildCounterCPUInfo--;
}
core.int buildCounterDuration = 0;
api.Duration buildDuration() {
final o = api.Duration();
buildCounterDuration++;
if (buildCounterDuration < 3) {
o.nanos = 42;
o.seconds = 'foo';
}
buildCounterDuration--;
return o;
}
void checkDuration(api.Duration o) {
buildCounterDuration++;
if (buildCounterDuration < 3) {
unittest.expect(
o.nanos!,
unittest.equals(42),
);
unittest.expect(
o.seconds!,
unittest.equals('foo'),
);
}
buildCounterDuration--;
}
core.List<api.EnvironmentDimensionValueEntry> buildUnnamed3() => [
buildEnvironmentDimensionValueEntry(),
buildEnvironmentDimensionValueEntry(),
];
void checkUnnamed3(core.List<api.EnvironmentDimensionValueEntry> o) {
unittest.expect(o, unittest.hasLength(2));
checkEnvironmentDimensionValueEntry(o[0]);
checkEnvironmentDimensionValueEntry(o[1]);
}
core.List<api.ShardSummary> buildUnnamed4() => [
buildShardSummary(),
buildShardSummary(),
];
void checkUnnamed4(core.List<api.ShardSummary> o) {
unittest.expect(o, unittest.hasLength(2));
checkShardSummary(o[0]);
checkShardSummary(o[1]);
}
core.int buildCounterEnvironment = 0;
api.Environment buildEnvironment() {
final o = api.Environment();
buildCounterEnvironment++;
if (buildCounterEnvironment < 3) {
o.completionTime = buildTimestamp();
o.creationTime = buildTimestamp();
o.dimensionValue = buildUnnamed3();
o.displayName = 'foo';
o.environmentId = 'foo';
o.environmentResult = buildMergedResult();
o.executionId = 'foo';
o.historyId = 'foo';
o.projectId = 'foo';
o.resultsStorage = buildResultsStorage();
o.shardSummaries = buildUnnamed4();
}
buildCounterEnvironment--;
return o;
}
void checkEnvironment(api.Environment o) {
buildCounterEnvironment++;
if (buildCounterEnvironment < 3) {
checkTimestamp(o.completionTime!);
checkTimestamp(o.creationTime!);
checkUnnamed3(o.dimensionValue!);
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.environmentId!,
unittest.equals('foo'),
);
checkMergedResult(o.environmentResult!);
unittest.expect(
o.executionId!,
unittest.equals('foo'),
);
unittest.expect(
o.historyId!,
unittest.equals('foo'),
);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
checkResultsStorage(o.resultsStorage!);
checkUnnamed4(o.shardSummaries!);
}
buildCounterEnvironment--;
}
core.int buildCounterEnvironmentDimensionValueEntry = 0;
api.EnvironmentDimensionValueEntry buildEnvironmentDimensionValueEntry() {
final o = api.EnvironmentDimensionValueEntry();
buildCounterEnvironmentDimensionValueEntry++;
if (buildCounterEnvironmentDimensionValueEntry < 3) {
o.key = 'foo';
o.value = 'foo';
}
buildCounterEnvironmentDimensionValueEntry--;
return o;
}
void checkEnvironmentDimensionValueEntry(api.EnvironmentDimensionValueEntry o) {
buildCounterEnvironmentDimensionValueEntry++;
if (buildCounterEnvironmentDimensionValueEntry < 3) {
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterEnvironmentDimensionValueEntry--;
}
core.List<api.MatrixDimensionDefinition> buildUnnamed5() => [
buildMatrixDimensionDefinition(),
buildMatrixDimensionDefinition(),
];
void checkUnnamed5(core.List<api.MatrixDimensionDefinition> o) {
unittest.expect(o, unittest.hasLength(2));
checkMatrixDimensionDefinition(o[0]);
checkMatrixDimensionDefinition(o[1]);
}
core.int buildCounterExecution = 0;
api.Execution buildExecution() {
final o = api.Execution();
buildCounterExecution++;
if (buildCounterExecution < 3) {
o.completionTime = buildTimestamp();
o.creationTime = buildTimestamp();
o.dimensionDefinitions = buildUnnamed5();
o.executionId = 'foo';
o.outcome = buildOutcome();
o.specification = buildSpecification();
o.state = 'foo';
o.testExecutionMatrixId = 'foo';
}
buildCounterExecution--;
return o;
}
void checkExecution(api.Execution o) {
buildCounterExecution++;
if (buildCounterExecution < 3) {
checkTimestamp(o.completionTime!);
checkTimestamp(o.creationTime!);
checkUnnamed5(o.dimensionDefinitions!);
unittest.expect(
o.executionId!,
unittest.equals('foo'),
);
checkOutcome(o.outcome!);
checkSpecification(o.specification!);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.testExecutionMatrixId!,
unittest.equals('foo'),
);
}
buildCounterExecution--;
}
core.int buildCounterFailureDetail = 0;
api.FailureDetail buildFailureDetail() {
final o = api.FailureDetail();
buildCounterFailureDetail++;
if (buildCounterFailureDetail < 3) {
o.crashed = true;
o.deviceOutOfMemory = true;
o.failedRoboscript = true;
o.notInstalled = true;
o.otherNativeCrash = true;
o.timedOut = true;
o.unableToCrawl = true;
}
buildCounterFailureDetail--;
return o;
}
void checkFailureDetail(api.FailureDetail o) {
buildCounterFailureDetail++;
if (buildCounterFailureDetail < 3) {
unittest.expect(o.crashed!, unittest.isTrue);
unittest.expect(o.deviceOutOfMemory!, unittest.isTrue);
unittest.expect(o.failedRoboscript!, unittest.isTrue);
unittest.expect(o.notInstalled!, unittest.isTrue);
unittest.expect(o.otherNativeCrash!, unittest.isTrue);
unittest.expect(o.timedOut!, unittest.isTrue);
unittest.expect(o.unableToCrawl!, unittest.isTrue);
}
buildCounterFailureDetail--;
}
core.int buildCounterFileReference = 0;
api.FileReference buildFileReference() {
final o = api.FileReference();
buildCounterFileReference++;
if (buildCounterFileReference < 3) {
o.fileUri = 'foo';
}
buildCounterFileReference--;
return o;
}
void checkFileReference(api.FileReference o) {
buildCounterFileReference++;
if (buildCounterFileReference < 3) {
unittest.expect(
o.fileUri!,
unittest.equals('foo'),
);
}
buildCounterFileReference--;
}
core.List<api.GraphicsStatsBucket> buildUnnamed6() => [
buildGraphicsStatsBucket(),
buildGraphicsStatsBucket(),
];
void checkUnnamed6(core.List<api.GraphicsStatsBucket> o) {
unittest.expect(o, unittest.hasLength(2));
checkGraphicsStatsBucket(o[0]);
checkGraphicsStatsBucket(o[1]);
}
core.int buildCounterGraphicsStats = 0;
api.GraphicsStats buildGraphicsStats() {
final o = api.GraphicsStats();
buildCounterGraphicsStats++;
if (buildCounterGraphicsStats < 3) {
o.buckets = buildUnnamed6();
o.highInputLatencyCount = 'foo';
o.jankyFrames = 'foo';
o.missedVsyncCount = 'foo';
o.p50Millis = 'foo';
o.p90Millis = 'foo';
o.p95Millis = 'foo';
o.p99Millis = 'foo';
o.slowBitmapUploadCount = 'foo';
o.slowDrawCount = 'foo';
o.slowUiThreadCount = 'foo';
o.totalFrames = 'foo';
}
buildCounterGraphicsStats--;
return o;
}
void checkGraphicsStats(api.GraphicsStats o) {
buildCounterGraphicsStats++;
if (buildCounterGraphicsStats < 3) {
checkUnnamed6(o.buckets!);
unittest.expect(
o.highInputLatencyCount!,
unittest.equals('foo'),
);
unittest.expect(
o.jankyFrames!,
unittest.equals('foo'),
);
unittest.expect(
o.missedVsyncCount!,
unittest.equals('foo'),
);
unittest.expect(
o.p50Millis!,
unittest.equals('foo'),
);
unittest.expect(
o.p90Millis!,
unittest.equals('foo'),
);
unittest.expect(
o.p95Millis!,
unittest.equals('foo'),
);
unittest.expect(
o.p99Millis!,
unittest.equals('foo'),
);
unittest.expect(
o.slowBitmapUploadCount!,
unittest.equals('foo'),
);
unittest.expect(
o.slowDrawCount!,
unittest.equals('foo'),
);
unittest.expect(
o.slowUiThreadCount!,
unittest.equals('foo'),
);
unittest.expect(
o.totalFrames!,
unittest.equals('foo'),
);
}
buildCounterGraphicsStats--;
}
core.int buildCounterGraphicsStatsBucket = 0;
api.GraphicsStatsBucket buildGraphicsStatsBucket() {
final o = api.GraphicsStatsBucket();
buildCounterGraphicsStatsBucket++;
if (buildCounterGraphicsStatsBucket < 3) {
o.frameCount = 'foo';
o.renderMillis = 'foo';
}
buildCounterGraphicsStatsBucket--;
return o;
}
void checkGraphicsStatsBucket(api.GraphicsStatsBucket o) {
buildCounterGraphicsStatsBucket++;
if (buildCounterGraphicsStatsBucket < 3) {
unittest.expect(
o.frameCount!,
unittest.equals('foo'),
);
unittest.expect(
o.renderMillis!,
unittest.equals('foo'),
);
}
buildCounterGraphicsStatsBucket--;
}
core.int buildCounterHistory = 0;
api.History buildHistory() {
final o = api.History();
buildCounterHistory++;
if (buildCounterHistory < 3) {
o.displayName = 'foo';
o.historyId = 'foo';
o.name = 'foo';
o.testPlatform = 'foo';
}
buildCounterHistory--;
return o;
}
void checkHistory(api.History o) {
buildCounterHistory++;
if (buildCounterHistory < 3) {
unittest.expect(
o.displayName!,
unittest.equals('foo'),
);
unittest.expect(
o.historyId!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.testPlatform!,
unittest.equals('foo'),
);
}
buildCounterHistory--;
}
core.int buildCounterImage = 0;
api.Image buildImage() {
final o = api.Image();
buildCounterImage++;
if (buildCounterImage < 3) {
o.error = buildStatus();
o.sourceImage = buildToolOutputReference();
o.stepId = 'foo';
o.thumbnail = buildThumbnail();
}
buildCounterImage--;
return o;
}
void checkImage(api.Image o) {
buildCounterImage++;
if (buildCounterImage < 3) {
checkStatus(o.error!);
checkToolOutputReference(o.sourceImage!);
unittest.expect(
o.stepId!,
unittest.equals('foo'),
);
checkThumbnail(o.thumbnail!);
}
buildCounterImage--;
}
core.int buildCounterInconclusiveDetail = 0;
api.InconclusiveDetail buildInconclusiveDetail() {
final o = api.InconclusiveDetail();
buildCounterInconclusiveDetail++;
if (buildCounterInconclusiveDetail < 3) {
o.abortedByUser = true;
o.hasErrorLogs = true;
o.infrastructureFailure = true;
}
buildCounterInconclusiveDetail--;
return o;
}
void checkInconclusiveDetail(api.InconclusiveDetail o) {
buildCounterInconclusiveDetail++;
if (buildCounterInconclusiveDetail < 3) {
unittest.expect(o.abortedByUser!, unittest.isTrue);
unittest.expect(o.hasErrorLogs!, unittest.isTrue);
unittest.expect(o.infrastructureFailure!, unittest.isTrue);
}
buildCounterInconclusiveDetail--;
}
core.int buildCounterIndividualOutcome = 0;
api.IndividualOutcome buildIndividualOutcome() {
final o = api.IndividualOutcome();
buildCounterIndividualOutcome++;
if (buildCounterIndividualOutcome < 3) {
o.multistepNumber = 42;
o.outcomeSummary = 'foo';
o.runDuration = buildDuration();
o.stepId = 'foo';
}
buildCounterIndividualOutcome--;
return o;
}
void checkIndividualOutcome(api.IndividualOutcome o) {
buildCounterIndividualOutcome++;
if (buildCounterIndividualOutcome < 3) {
unittest.expect(
o.multistepNumber!,
unittest.equals(42),
);
unittest.expect(
o.outcomeSummary!,
unittest.equals('foo'),
);
checkDuration(o.runDuration!);
unittest.expect(
o.stepId!,
unittest.equals('foo'),
);
}
buildCounterIndividualOutcome--;
}
core.int buildCounterIosAppInfo = 0;
api.IosAppInfo buildIosAppInfo() {
final o = api.IosAppInfo();
buildCounterIosAppInfo++;
if (buildCounterIosAppInfo < 3) {
o.name = 'foo';
}
buildCounterIosAppInfo--;
return o;
}
void checkIosAppInfo(api.IosAppInfo o) {
buildCounterIosAppInfo++;
if (buildCounterIosAppInfo < 3) {
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterIosAppInfo--;
}
core.int buildCounterIosRoboTest = 0;
api.IosRoboTest buildIosRoboTest() {
final o = api.IosRoboTest();
buildCounterIosRoboTest++;
if (buildCounterIosRoboTest < 3) {}
buildCounterIosRoboTest--;
return o;
}
void checkIosRoboTest(api.IosRoboTest o) {
buildCounterIosRoboTest++;
if (buildCounterIosRoboTest < 3) {}
buildCounterIosRoboTest--;
}
core.int buildCounterIosTest = 0;
api.IosTest buildIosTest() {
final o = api.IosTest();
buildCounterIosTest++;
if (buildCounterIosTest < 3) {
o.iosAppInfo = buildIosAppInfo();
o.iosRoboTest = buildIosRoboTest();
o.iosTestLoop = buildIosTestLoop();
o.iosXcTest = buildIosXcTest();
o.testTimeout = buildDuration();
}
buildCounterIosTest--;
return o;
}
void checkIosTest(api.IosTest o) {
buildCounterIosTest++;
if (buildCounterIosTest < 3) {
checkIosAppInfo(o.iosAppInfo!);
checkIosRoboTest(o.iosRoboTest!);
checkIosTestLoop(o.iosTestLoop!);
checkIosXcTest(o.iosXcTest!);
checkDuration(o.testTimeout!);
}
buildCounterIosTest--;
}
core.int buildCounterIosTestLoop = 0;
api.IosTestLoop buildIosTestLoop() {
final o = api.IosTestLoop();
buildCounterIosTestLoop++;
if (buildCounterIosTestLoop < 3) {
o.bundleId = 'foo';
}
buildCounterIosTestLoop--;
return o;
}
void checkIosTestLoop(api.IosTestLoop o) {
buildCounterIosTestLoop++;
if (buildCounterIosTestLoop < 3) {
unittest.expect(
o.bundleId!,
unittest.equals('foo'),
);
}
buildCounterIosTestLoop--;
}
core.int buildCounterIosXcTest = 0;
api.IosXcTest buildIosXcTest() {
final o = api.IosXcTest();
buildCounterIosXcTest++;
if (buildCounterIosXcTest < 3) {
o.bundleId = 'foo';
o.xcodeVersion = 'foo';
}
buildCounterIosXcTest--;
return o;
}
void checkIosXcTest(api.IosXcTest o) {
buildCounterIosXcTest++;
if (buildCounterIosXcTest < 3) {
unittest.expect(
o.bundleId!,
unittest.equals('foo'),
);
unittest.expect(
o.xcodeVersion!,
unittest.equals('foo'),
);
}
buildCounterIosXcTest--;
}
core.List<api.Environment> buildUnnamed7() => [
buildEnvironment(),
buildEnvironment(),
];
void checkUnnamed7(core.List<api.Environment> o) {
unittest.expect(o, unittest.hasLength(2));
checkEnvironment(o[0]);
checkEnvironment(o[1]);
}
core.int buildCounterListEnvironmentsResponse = 0;
api.ListEnvironmentsResponse buildListEnvironmentsResponse() {
final o = api.ListEnvironmentsResponse();
buildCounterListEnvironmentsResponse++;
if (buildCounterListEnvironmentsResponse < 3) {
o.environments = buildUnnamed7();
o.executionId = 'foo';
o.historyId = 'foo';
o.nextPageToken = 'foo';
o.projectId = 'foo';
}
buildCounterListEnvironmentsResponse--;
return o;
}
void checkListEnvironmentsResponse(api.ListEnvironmentsResponse o) {
buildCounterListEnvironmentsResponse++;
if (buildCounterListEnvironmentsResponse < 3) {
checkUnnamed7(o.environments!);
unittest.expect(
o.executionId!,
unittest.equals('foo'),
);
unittest.expect(
o.historyId!,
unittest.equals('foo'),
);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
}
buildCounterListEnvironmentsResponse--;
}
core.List<api.Execution> buildUnnamed8() => [
buildExecution(),
buildExecution(),
];
void checkUnnamed8(core.List<api.Execution> o) {
unittest.expect(o, unittest.hasLength(2));
checkExecution(o[0]);
checkExecution(o[1]);
}
core.int buildCounterListExecutionsResponse = 0;
api.ListExecutionsResponse buildListExecutionsResponse() {
final o = api.ListExecutionsResponse();
buildCounterListExecutionsResponse++;
if (buildCounterListExecutionsResponse < 3) {
o.executions = buildUnnamed8();
o.nextPageToken = 'foo';
}
buildCounterListExecutionsResponse--;
return o;
}
void checkListExecutionsResponse(api.ListExecutionsResponse o) {
buildCounterListExecutionsResponse++;
if (buildCounterListExecutionsResponse < 3) {
checkUnnamed8(o.executions!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListExecutionsResponse--;
}
core.List<api.History> buildUnnamed9() => [
buildHistory(),
buildHistory(),
];
void checkUnnamed9(core.List<api.History> o) {
unittest.expect(o, unittest.hasLength(2));
checkHistory(o[0]);
checkHistory(o[1]);
}
core.int buildCounterListHistoriesResponse = 0;
api.ListHistoriesResponse buildListHistoriesResponse() {
final o = api.ListHistoriesResponse();
buildCounterListHistoriesResponse++;
if (buildCounterListHistoriesResponse < 3) {
o.histories = buildUnnamed9();
o.nextPageToken = 'foo';
}
buildCounterListHistoriesResponse--;
return o;
}
void checkListHistoriesResponse(api.ListHistoriesResponse o) {
buildCounterListHistoriesResponse++;
if (buildCounterListHistoriesResponse < 3) {
checkUnnamed9(o.histories!);
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
}
buildCounterListHistoriesResponse--;
}
core.List<api.PerfSampleSeries> buildUnnamed10() => [
buildPerfSampleSeries(),
buildPerfSampleSeries(),
];
void checkUnnamed10(core.List<api.PerfSampleSeries> o) {
unittest.expect(o, unittest.hasLength(2));
checkPerfSampleSeries(o[0]);
checkPerfSampleSeries(o[1]);
}
core.int buildCounterListPerfSampleSeriesResponse = 0;
api.ListPerfSampleSeriesResponse buildListPerfSampleSeriesResponse() {
final o = api.ListPerfSampleSeriesResponse();
buildCounterListPerfSampleSeriesResponse++;
if (buildCounterListPerfSampleSeriesResponse < 3) {
o.perfSampleSeries = buildUnnamed10();
}
buildCounterListPerfSampleSeriesResponse--;
return o;
}
void checkListPerfSampleSeriesResponse(api.ListPerfSampleSeriesResponse o) {
buildCounterListPerfSampleSeriesResponse++;
if (buildCounterListPerfSampleSeriesResponse < 3) {
checkUnnamed10(o.perfSampleSeries!);
}
buildCounterListPerfSampleSeriesResponse--;
}
core.List<api.PerfSample> buildUnnamed11() => [
buildPerfSample(),
buildPerfSample(),
];
void checkUnnamed11(core.List<api.PerfSample> o) {
unittest.expect(o, unittest.hasLength(2));
checkPerfSample(o[0]);
checkPerfSample(o[1]);
}
core.int buildCounterListPerfSamplesResponse = 0;
api.ListPerfSamplesResponse buildListPerfSamplesResponse() {
final o = api.ListPerfSamplesResponse();
buildCounterListPerfSamplesResponse++;
if (buildCounterListPerfSamplesResponse < 3) {
o.nextPageToken = 'foo';
o.perfSamples = buildUnnamed11();
}
buildCounterListPerfSamplesResponse--;
return o;
}
void checkListPerfSamplesResponse(api.ListPerfSamplesResponse o) {
buildCounterListPerfSamplesResponse++;
if (buildCounterListPerfSamplesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed11(o.perfSamples!);
}
buildCounterListPerfSamplesResponse--;
}
core.List<api.ScreenshotCluster> buildUnnamed12() => [
buildScreenshotCluster(),
buildScreenshotCluster(),
];
void checkUnnamed12(core.List<api.ScreenshotCluster> o) {
unittest.expect(o, unittest.hasLength(2));
checkScreenshotCluster(o[0]);
checkScreenshotCluster(o[1]);
}
core.int buildCounterListScreenshotClustersResponse = 0;
api.ListScreenshotClustersResponse buildListScreenshotClustersResponse() {
final o = api.ListScreenshotClustersResponse();
buildCounterListScreenshotClustersResponse++;
if (buildCounterListScreenshotClustersResponse < 3) {
o.clusters = buildUnnamed12();
}
buildCounterListScreenshotClustersResponse--;
return o;
}
void checkListScreenshotClustersResponse(api.ListScreenshotClustersResponse o) {
buildCounterListScreenshotClustersResponse++;
if (buildCounterListScreenshotClustersResponse < 3) {
checkUnnamed12(o.clusters!);
}
buildCounterListScreenshotClustersResponse--;
}
core.List<api.SuggestionClusterProto> buildUnnamed13() => [
buildSuggestionClusterProto(),
buildSuggestionClusterProto(),
];
void checkUnnamed13(core.List<api.SuggestionClusterProto> o) {
unittest.expect(o, unittest.hasLength(2));
checkSuggestionClusterProto(o[0]);
checkSuggestionClusterProto(o[1]);
}
core.int buildCounterListStepAccessibilityClustersResponse = 0;
api.ListStepAccessibilityClustersResponse
buildListStepAccessibilityClustersResponse() {
final o = api.ListStepAccessibilityClustersResponse();
buildCounterListStepAccessibilityClustersResponse++;
if (buildCounterListStepAccessibilityClustersResponse < 3) {
o.clusters = buildUnnamed13();
o.name = 'foo';
}
buildCounterListStepAccessibilityClustersResponse--;
return o;
}
void checkListStepAccessibilityClustersResponse(
api.ListStepAccessibilityClustersResponse o) {
buildCounterListStepAccessibilityClustersResponse++;
if (buildCounterListStepAccessibilityClustersResponse < 3) {
checkUnnamed13(o.clusters!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterListStepAccessibilityClustersResponse--;
}
core.List<api.Image> buildUnnamed14() => [
buildImage(),
buildImage(),
];
void checkUnnamed14(core.List<api.Image> o) {
unittest.expect(o, unittest.hasLength(2));
checkImage(o[0]);
checkImage(o[1]);
}
core.int buildCounterListStepThumbnailsResponse = 0;
api.ListStepThumbnailsResponse buildListStepThumbnailsResponse() {
final o = api.ListStepThumbnailsResponse();
buildCounterListStepThumbnailsResponse++;
if (buildCounterListStepThumbnailsResponse < 3) {
o.nextPageToken = 'foo';
o.thumbnails = buildUnnamed14();
}
buildCounterListStepThumbnailsResponse--;
return o;
}
void checkListStepThumbnailsResponse(api.ListStepThumbnailsResponse o) {
buildCounterListStepThumbnailsResponse++;
if (buildCounterListStepThumbnailsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed14(o.thumbnails!);
}
buildCounterListStepThumbnailsResponse--;
}
core.List<api.Step> buildUnnamed15() => [
buildStep(),
buildStep(),
];
void checkUnnamed15(core.List<api.Step> o) {
unittest.expect(o, unittest.hasLength(2));
checkStep(o[0]);
checkStep(o[1]);
}
core.int buildCounterListStepsResponse = 0;
api.ListStepsResponse buildListStepsResponse() {
final o = api.ListStepsResponse();
buildCounterListStepsResponse++;
if (buildCounterListStepsResponse < 3) {
o.nextPageToken = 'foo';
o.steps = buildUnnamed15();
}
buildCounterListStepsResponse--;
return o;
}
void checkListStepsResponse(api.ListStepsResponse o) {
buildCounterListStepsResponse++;
if (buildCounterListStepsResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed15(o.steps!);
}
buildCounterListStepsResponse--;
}
core.List<api.TestCase> buildUnnamed16() => [
buildTestCase(),
buildTestCase(),
];
void checkUnnamed16(core.List<api.TestCase> o) {
unittest.expect(o, unittest.hasLength(2));
checkTestCase(o[0]);
checkTestCase(o[1]);
}
core.int buildCounterListTestCasesResponse = 0;
api.ListTestCasesResponse buildListTestCasesResponse() {
final o = api.ListTestCasesResponse();
buildCounterListTestCasesResponse++;
if (buildCounterListTestCasesResponse < 3) {
o.nextPageToken = 'foo';
o.testCases = buildUnnamed16();
}
buildCounterListTestCasesResponse--;
return o;
}
void checkListTestCasesResponse(api.ListTestCasesResponse o) {
buildCounterListTestCasesResponse++;
if (buildCounterListTestCasesResponse < 3) {
unittest.expect(
o.nextPageToken!,
unittest.equals('foo'),
);
checkUnnamed16(o.testCases!);
}
buildCounterListTestCasesResponse--;
}
core.int buildCounterMatrixDimensionDefinition = 0;
api.MatrixDimensionDefinition buildMatrixDimensionDefinition() {
final o = api.MatrixDimensionDefinition();
buildCounterMatrixDimensionDefinition++;
if (buildCounterMatrixDimensionDefinition < 3) {}
buildCounterMatrixDimensionDefinition--;
return o;
}
void checkMatrixDimensionDefinition(api.MatrixDimensionDefinition o) {
buildCounterMatrixDimensionDefinition++;
if (buildCounterMatrixDimensionDefinition < 3) {}
buildCounterMatrixDimensionDefinition--;
}
core.int buildCounterMemoryInfo = 0;
api.MemoryInfo buildMemoryInfo() {
final o = api.MemoryInfo();
buildCounterMemoryInfo++;
if (buildCounterMemoryInfo < 3) {
o.memoryCapInKibibyte = 'foo';
o.memoryTotalInKibibyte = 'foo';
}
buildCounterMemoryInfo--;
return o;
}
void checkMemoryInfo(api.MemoryInfo o) {
buildCounterMemoryInfo++;
if (buildCounterMemoryInfo < 3) {
unittest.expect(
o.memoryCapInKibibyte!,
unittest.equals('foo'),
);
unittest.expect(
o.memoryTotalInKibibyte!,
unittest.equals('foo'),
);
}
buildCounterMemoryInfo--;
}
core.List<api.TestSuiteOverview> buildUnnamed17() => [
buildTestSuiteOverview(),
buildTestSuiteOverview(),
];
void checkUnnamed17(core.List<api.TestSuiteOverview> o) {
unittest.expect(o, unittest.hasLength(2));
checkTestSuiteOverview(o[0]);
checkTestSuiteOverview(o[1]);
}
core.int buildCounterMergedResult = 0;
api.MergedResult buildMergedResult() {
final o = api.MergedResult();
buildCounterMergedResult++;
if (buildCounterMergedResult < 3) {
o.outcome = buildOutcome();
o.state = 'foo';
o.testSuiteOverviews = buildUnnamed17();
}
buildCounterMergedResult--;
return o;
}
void checkMergedResult(api.MergedResult o) {
buildCounterMergedResult++;
if (buildCounterMergedResult < 3) {
checkOutcome(o.outcome!);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
checkUnnamed17(o.testSuiteOverviews!);
}
buildCounterMergedResult--;
}
core.int buildCounterMultiStep = 0;
api.MultiStep buildMultiStep() {
final o = api.MultiStep();
buildCounterMultiStep++;
if (buildCounterMultiStep < 3) {
o.multistepNumber = 42;
o.primaryStep = buildPrimaryStep();
o.primaryStepId = 'foo';
}
buildCounterMultiStep--;
return o;
}
void checkMultiStep(api.MultiStep o) {
buildCounterMultiStep++;
if (buildCounterMultiStep < 3) {
unittest.expect(
o.multistepNumber!,
unittest.equals(42),
);
checkPrimaryStep(o.primaryStep!);
unittest.expect(
o.primaryStepId!,
unittest.equals('foo'),
);
}
buildCounterMultiStep--;
}
core.int buildCounterOutcome = 0;
api.Outcome buildOutcome() {
final o = api.Outcome();
buildCounterOutcome++;
if (buildCounterOutcome < 3) {
o.failureDetail = buildFailureDetail();
o.inconclusiveDetail = buildInconclusiveDetail();
o.skippedDetail = buildSkippedDetail();
o.successDetail = buildSuccessDetail();
o.summary = 'foo';
}
buildCounterOutcome--;
return o;
}
void checkOutcome(api.Outcome o) {
buildCounterOutcome++;
if (buildCounterOutcome < 3) {
checkFailureDetail(o.failureDetail!);
checkInconclusiveDetail(o.inconclusiveDetail!);
checkSkippedDetail(o.skippedDetail!);
checkSuccessDetail(o.successDetail!);
unittest.expect(
o.summary!,
unittest.equals('foo'),
);
}
buildCounterOutcome--;
}
core.int buildCounterPerfEnvironment = 0;
api.PerfEnvironment buildPerfEnvironment() {
final o = api.PerfEnvironment();
buildCounterPerfEnvironment++;
if (buildCounterPerfEnvironment < 3) {
o.cpuInfo = buildCPUInfo();
o.memoryInfo = buildMemoryInfo();
}
buildCounterPerfEnvironment--;
return o;
}
void checkPerfEnvironment(api.PerfEnvironment o) {
buildCounterPerfEnvironment++;
if (buildCounterPerfEnvironment < 3) {
checkCPUInfo(o.cpuInfo!);
checkMemoryInfo(o.memoryInfo!);
}
buildCounterPerfEnvironment--;
}
core.List<core.String> buildUnnamed18() => [
'foo',
'foo',
];
void checkUnnamed18(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 buildCounterPerfMetricsSummary = 0;
api.PerfMetricsSummary buildPerfMetricsSummary() {
final o = api.PerfMetricsSummary();
buildCounterPerfMetricsSummary++;
if (buildCounterPerfMetricsSummary < 3) {
o.appStartTime = buildAppStartTime();
o.executionId = 'foo';
o.graphicsStats = buildGraphicsStats();
o.historyId = 'foo';
o.perfEnvironment = buildPerfEnvironment();
o.perfMetrics = buildUnnamed18();
o.projectId = 'foo';
o.stepId = 'foo';
}
buildCounterPerfMetricsSummary--;
return o;
}
void checkPerfMetricsSummary(api.PerfMetricsSummary o) {
buildCounterPerfMetricsSummary++;
if (buildCounterPerfMetricsSummary < 3) {
checkAppStartTime(o.appStartTime!);
unittest.expect(
o.executionId!,
unittest.equals('foo'),
);
checkGraphicsStats(o.graphicsStats!);
unittest.expect(
o.historyId!,
unittest.equals('foo'),
);
checkPerfEnvironment(o.perfEnvironment!);
checkUnnamed18(o.perfMetrics!);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
unittest.expect(
o.stepId!,
unittest.equals('foo'),
);
}
buildCounterPerfMetricsSummary--;
}
core.int buildCounterPerfSample = 0;
api.PerfSample buildPerfSample() {
final o = api.PerfSample();
buildCounterPerfSample++;
if (buildCounterPerfSample < 3) {
o.sampleTime = buildTimestamp();
o.value = 42.0;
}
buildCounterPerfSample--;
return o;
}
void checkPerfSample(api.PerfSample o) {
buildCounterPerfSample++;
if (buildCounterPerfSample < 3) {
checkTimestamp(o.sampleTime!);
unittest.expect(
o.value!,
unittest.equals(42.0),
);
}
buildCounterPerfSample--;
}
core.int buildCounterPerfSampleSeries = 0;
api.PerfSampleSeries buildPerfSampleSeries() {
final o = api.PerfSampleSeries();
buildCounterPerfSampleSeries++;
if (buildCounterPerfSampleSeries < 3) {
o.basicPerfSampleSeries = buildBasicPerfSampleSeries();
o.executionId = 'foo';
o.historyId = 'foo';
o.projectId = 'foo';
o.sampleSeriesId = 'foo';
o.stepId = 'foo';
}
buildCounterPerfSampleSeries--;
return o;
}
void checkPerfSampleSeries(api.PerfSampleSeries o) {
buildCounterPerfSampleSeries++;
if (buildCounterPerfSampleSeries < 3) {
checkBasicPerfSampleSeries(o.basicPerfSampleSeries!);
unittest.expect(
o.executionId!,
unittest.equals('foo'),
);
unittest.expect(
o.historyId!,
unittest.equals('foo'),
);
unittest.expect(
o.projectId!,
unittest.equals('foo'),
);
unittest.expect(
o.sampleSeriesId!,
unittest.equals('foo'),
);
unittest.expect(
o.stepId!,
unittest.equals('foo'),
);
}
buildCounterPerfSampleSeries--;
}
core.List<api.IndividualOutcome> buildUnnamed19() => [
buildIndividualOutcome(),
buildIndividualOutcome(),
];
void checkUnnamed19(core.List<api.IndividualOutcome> o) {
unittest.expect(o, unittest.hasLength(2));
checkIndividualOutcome(o[0]);
checkIndividualOutcome(o[1]);
}
core.int buildCounterPrimaryStep = 0;
api.PrimaryStep buildPrimaryStep() {
final o = api.PrimaryStep();
buildCounterPrimaryStep++;
if (buildCounterPrimaryStep < 3) {
o.individualOutcome = buildUnnamed19();
o.rollUp = 'foo';
}
buildCounterPrimaryStep--;
return o;
}
void checkPrimaryStep(api.PrimaryStep o) {
buildCounterPrimaryStep++;
if (buildCounterPrimaryStep < 3) {
checkUnnamed19(o.individualOutcome!);
unittest.expect(
o.rollUp!,
unittest.equals('foo'),
);
}
buildCounterPrimaryStep--;
}
core.int buildCounterProjectSettings = 0;
api.ProjectSettings buildProjectSettings() {
final o = api.ProjectSettings();
buildCounterProjectSettings++;
if (buildCounterProjectSettings < 3) {
o.defaultBucket = 'foo';
o.name = 'foo';
}
buildCounterProjectSettings--;
return o;
}
void checkProjectSettings(api.ProjectSettings o) {
buildCounterProjectSettings++;
if (buildCounterProjectSettings < 3) {
unittest.expect(
o.defaultBucket!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
}
buildCounterProjectSettings--;
}
core.List<api.FileReference> buildUnnamed20() => [
buildFileReference(),
buildFileReference(),
];
void checkUnnamed20(core.List<api.FileReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkFileReference(o[0]);
checkFileReference(o[1]);
}
core.int buildCounterPublishXunitXmlFilesRequest = 0;
api.PublishXunitXmlFilesRequest buildPublishXunitXmlFilesRequest() {
final o = api.PublishXunitXmlFilesRequest();
buildCounterPublishXunitXmlFilesRequest++;
if (buildCounterPublishXunitXmlFilesRequest < 3) {
o.xunitXmlFiles = buildUnnamed20();
}
buildCounterPublishXunitXmlFilesRequest--;
return o;
}
void checkPublishXunitXmlFilesRequest(api.PublishXunitXmlFilesRequest o) {
buildCounterPublishXunitXmlFilesRequest++;
if (buildCounterPublishXunitXmlFilesRequest < 3) {
checkUnnamed20(o.xunitXmlFiles!);
}
buildCounterPublishXunitXmlFilesRequest--;
}
core.int buildCounterRegionProto = 0;
api.RegionProto buildRegionProto() {
final o = api.RegionProto();
buildCounterRegionProto++;
if (buildCounterRegionProto < 3) {
o.heightPx = 42;
o.leftPx = 42;
o.topPx = 42;
o.widthPx = 42;
}
buildCounterRegionProto--;
return o;
}
void checkRegionProto(api.RegionProto o) {
buildCounterRegionProto++;
if (buildCounterRegionProto < 3) {
unittest.expect(
o.heightPx!,
unittest.equals(42),
);
unittest.expect(
o.leftPx!,
unittest.equals(42),
);
unittest.expect(
o.topPx!,
unittest.equals(42),
);
unittest.expect(
o.widthPx!,
unittest.equals(42),
);
}
buildCounterRegionProto--;
}
core.int buildCounterResultsStorage = 0;
api.ResultsStorage buildResultsStorage() {
final o = api.ResultsStorage();
buildCounterResultsStorage++;
if (buildCounterResultsStorage < 3) {
o.resultsStoragePath = buildFileReference();
o.xunitXmlFile = buildFileReference();
}
buildCounterResultsStorage--;
return o;
}
void checkResultsStorage(api.ResultsStorage o) {
buildCounterResultsStorage++;
if (buildCounterResultsStorage < 3) {
checkFileReference(o.resultsStoragePath!);
checkFileReference(o.xunitXmlFile!);
}
buildCounterResultsStorage--;
}
core.int buildCounterSafeHtmlProto = 0;
api.SafeHtmlProto buildSafeHtmlProto() {
final o = api.SafeHtmlProto();
buildCounterSafeHtmlProto++;
if (buildCounterSafeHtmlProto < 3) {
o.privateDoNotAccessOrElseSafeHtmlWrappedValue = 'foo';
}
buildCounterSafeHtmlProto--;
return o;
}
void checkSafeHtmlProto(api.SafeHtmlProto o) {
buildCounterSafeHtmlProto++;
if (buildCounterSafeHtmlProto < 3) {
unittest.expect(
o.privateDoNotAccessOrElseSafeHtmlWrappedValue!,
unittest.equals('foo'),
);
}
buildCounterSafeHtmlProto--;
}
core.int buildCounterScreen = 0;
api.Screen buildScreen() {
final o = api.Screen();
buildCounterScreen++;
if (buildCounterScreen < 3) {
o.fileReference = 'foo';
o.locale = 'foo';
o.model = 'foo';
o.version = 'foo';
}
buildCounterScreen--;
return o;
}
void checkScreen(api.Screen o) {
buildCounterScreen++;
if (buildCounterScreen < 3) {
unittest.expect(
o.fileReference!,
unittest.equals('foo'),
);
unittest.expect(
o.locale!,
unittest.equals('foo'),
);
unittest.expect(
o.model!,
unittest.equals('foo'),
);
unittest.expect(
o.version!,
unittest.equals('foo'),
);
}
buildCounterScreen--;
}
core.List<api.Screen> buildUnnamed21() => [
buildScreen(),
buildScreen(),
];
void checkUnnamed21(core.List<api.Screen> o) {
unittest.expect(o, unittest.hasLength(2));
checkScreen(o[0]);
checkScreen(o[1]);
}
core.int buildCounterScreenshotCluster = 0;
api.ScreenshotCluster buildScreenshotCluster() {
final o = api.ScreenshotCluster();
buildCounterScreenshotCluster++;
if (buildCounterScreenshotCluster < 3) {
o.activity = 'foo';
o.clusterId = 'foo';
o.keyScreen = buildScreen();
o.screens = buildUnnamed21();
}
buildCounterScreenshotCluster--;
return o;
}
void checkScreenshotCluster(api.ScreenshotCluster o) {
buildCounterScreenshotCluster++;
if (buildCounterScreenshotCluster < 3) {
unittest.expect(
o.activity!,
unittest.equals('foo'),
);
unittest.expect(
o.clusterId!,
unittest.equals('foo'),
);
checkScreen(o.keyScreen!);
checkUnnamed21(o.screens!);
}
buildCounterScreenshotCluster--;
}
core.List<api.StepSummary> buildUnnamed22() => [
buildStepSummary(),
buildStepSummary(),
];
void checkUnnamed22(core.List<api.StepSummary> o) {
unittest.expect(o, unittest.hasLength(2));
checkStepSummary(o[0]);
checkStepSummary(o[1]);
}
core.int buildCounterShardSummary = 0;
api.ShardSummary buildShardSummary() {
final o = api.ShardSummary();
buildCounterShardSummary++;
if (buildCounterShardSummary < 3) {
o.runs = buildUnnamed22();
o.shardResult = buildMergedResult();
}
buildCounterShardSummary--;
return o;
}
void checkShardSummary(api.ShardSummary o) {
buildCounterShardSummary++;
if (buildCounterShardSummary < 3) {
checkUnnamed22(o.runs!);
checkMergedResult(o.shardResult!);
}
buildCounterShardSummary--;
}
core.int buildCounterSkippedDetail = 0;
api.SkippedDetail buildSkippedDetail() {
final o = api.SkippedDetail();
buildCounterSkippedDetail++;
if (buildCounterSkippedDetail < 3) {
o.incompatibleAppVersion = true;
o.incompatibleArchitecture = true;
o.incompatibleDevice = true;
}
buildCounterSkippedDetail--;
return o;
}
void checkSkippedDetail(api.SkippedDetail o) {
buildCounterSkippedDetail++;
if (buildCounterSkippedDetail < 3) {
unittest.expect(o.incompatibleAppVersion!, unittest.isTrue);
unittest.expect(o.incompatibleArchitecture!, unittest.isTrue);
unittest.expect(o.incompatibleDevice!, unittest.isTrue);
}
buildCounterSkippedDetail--;
}
core.int buildCounterSpecification = 0;
api.Specification buildSpecification() {
final o = api.Specification();
buildCounterSpecification++;
if (buildCounterSpecification < 3) {
o.androidTest = buildAndroidTest();
o.iosTest = buildIosTest();
}
buildCounterSpecification--;
return o;
}
void checkSpecification(api.Specification o) {
buildCounterSpecification++;
if (buildCounterSpecification < 3) {
checkAndroidTest(o.androidTest!);
checkIosTest(o.iosTest!);
}
buildCounterSpecification--;
}
core.int buildCounterStackTrace = 0;
api.StackTrace buildStackTrace() {
final o = api.StackTrace();
buildCounterStackTrace++;
if (buildCounterStackTrace < 3) {
o.exception = 'foo';
}
buildCounterStackTrace--;
return o;
}
void checkStackTrace(api.StackTrace o) {
buildCounterStackTrace++;
if (buildCounterStackTrace < 3) {
unittest.expect(
o.exception!,
unittest.equals('foo'),
);
}
buildCounterStackTrace--;
}
core.Map<core.String, core.Object?> buildUnnamed23() => {
'x': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
'y': {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
},
};
void checkUnnamed23(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.List<core.Map<core.String, core.Object?>> buildUnnamed24() => [
buildUnnamed23(),
buildUnnamed23(),
];
void checkUnnamed24(core.List<core.Map<core.String, core.Object?>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed23(o[0]);
checkUnnamed23(o[1]);
}
core.int buildCounterStatus = 0;
api.Status buildStatus() {
final o = api.Status();
buildCounterStatus++;
if (buildCounterStatus < 3) {
o.code = 42;
o.details = buildUnnamed24();
o.message = 'foo';
}
buildCounterStatus--;
return o;
}
void checkStatus(api.Status o) {
buildCounterStatus++;
if (buildCounterStatus < 3) {
unittest.expect(
o.code!,
unittest.equals(42),
);
checkUnnamed24(o.details!);
unittest.expect(
o.message!,
unittest.equals('foo'),
);
}
buildCounterStatus--;
}
core.List<api.StepDimensionValueEntry> buildUnnamed25() => [
buildStepDimensionValueEntry(),
buildStepDimensionValueEntry(),
];
void checkUnnamed25(core.List<api.StepDimensionValueEntry> o) {
unittest.expect(o, unittest.hasLength(2));
checkStepDimensionValueEntry(o[0]);
checkStepDimensionValueEntry(o[1]);
}
core.List<api.StepLabelsEntry> buildUnnamed26() => [
buildStepLabelsEntry(),
buildStepLabelsEntry(),
];
void checkUnnamed26(core.List<api.StepLabelsEntry> o) {
unittest.expect(o, unittest.hasLength(2));
checkStepLabelsEntry(o[0]);
checkStepLabelsEntry(o[1]);
}
core.int buildCounterStep = 0;
api.Step buildStep() {
final o = api.Step();
buildCounterStep++;
if (buildCounterStep < 3) {
o.completionTime = buildTimestamp();
o.creationTime = buildTimestamp();
o.description = 'foo';
o.deviceUsageDuration = buildDuration();
o.dimensionValue = buildUnnamed25();
o.hasImages = true;
o.labels = buildUnnamed26();
o.multiStep = buildMultiStep();
o.name = 'foo';
o.outcome = buildOutcome();
o.runDuration = buildDuration();
o.state = 'foo';
o.stepId = 'foo';
o.testExecutionStep = buildTestExecutionStep();
o.toolExecutionStep = buildToolExecutionStep();
}
buildCounterStep--;
return o;
}
void checkStep(api.Step o) {
buildCounterStep++;
if (buildCounterStep < 3) {
checkTimestamp(o.completionTime!);
checkTimestamp(o.creationTime!);
unittest.expect(
o.description!,
unittest.equals('foo'),
);
checkDuration(o.deviceUsageDuration!);
checkUnnamed25(o.dimensionValue!);
unittest.expect(o.hasImages!, unittest.isTrue);
checkUnnamed26(o.labels!);
checkMultiStep(o.multiStep!);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
checkOutcome(o.outcome!);
checkDuration(o.runDuration!);
unittest.expect(
o.state!,
unittest.equals('foo'),
);
unittest.expect(
o.stepId!,
unittest.equals('foo'),
);
checkTestExecutionStep(o.testExecutionStep!);
checkToolExecutionStep(o.toolExecutionStep!);
}
buildCounterStep--;
}
core.int buildCounterStepDimensionValueEntry = 0;
api.StepDimensionValueEntry buildStepDimensionValueEntry() {
final o = api.StepDimensionValueEntry();
buildCounterStepDimensionValueEntry++;
if (buildCounterStepDimensionValueEntry < 3) {
o.key = 'foo';
o.value = 'foo';
}
buildCounterStepDimensionValueEntry--;
return o;
}
void checkStepDimensionValueEntry(api.StepDimensionValueEntry o) {
buildCounterStepDimensionValueEntry++;
if (buildCounterStepDimensionValueEntry < 3) {
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterStepDimensionValueEntry--;
}
core.int buildCounterStepLabelsEntry = 0;
api.StepLabelsEntry buildStepLabelsEntry() {
final o = api.StepLabelsEntry();
buildCounterStepLabelsEntry++;
if (buildCounterStepLabelsEntry < 3) {
o.key = 'foo';
o.value = 'foo';
}
buildCounterStepLabelsEntry--;
return o;
}
void checkStepLabelsEntry(api.StepLabelsEntry o) {
buildCounterStepLabelsEntry++;
if (buildCounterStepLabelsEntry < 3) {
unittest.expect(
o.key!,
unittest.equals('foo'),
);
unittest.expect(
o.value!,
unittest.equals('foo'),
);
}
buildCounterStepLabelsEntry--;
}
core.int buildCounterStepSummary = 0;
api.StepSummary buildStepSummary() {
final o = api.StepSummary();
buildCounterStepSummary++;
if (buildCounterStepSummary < 3) {}
buildCounterStepSummary--;
return o;
}
void checkStepSummary(api.StepSummary o) {
buildCounterStepSummary++;
if (buildCounterStepSummary < 3) {}
buildCounterStepSummary--;
}
core.int buildCounterSuccessDetail = 0;
api.SuccessDetail buildSuccessDetail() {
final o = api.SuccessDetail();
buildCounterSuccessDetail++;
if (buildCounterSuccessDetail < 3) {
o.otherNativeCrash = true;
}
buildCounterSuccessDetail--;
return o;
}
void checkSuccessDetail(api.SuccessDetail o) {
buildCounterSuccessDetail++;
if (buildCounterSuccessDetail < 3) {
unittest.expect(o.otherNativeCrash!, unittest.isTrue);
}
buildCounterSuccessDetail--;
}
core.List<api.SuggestionProto> buildUnnamed27() => [
buildSuggestionProto(),
buildSuggestionProto(),
];
void checkUnnamed27(core.List<api.SuggestionProto> o) {
unittest.expect(o, unittest.hasLength(2));
checkSuggestionProto(o[0]);
checkSuggestionProto(o[1]);
}
core.int buildCounterSuggestionClusterProto = 0;
api.SuggestionClusterProto buildSuggestionClusterProto() {
final o = api.SuggestionClusterProto();
buildCounterSuggestionClusterProto++;
if (buildCounterSuggestionClusterProto < 3) {
o.category = 'foo';
o.suggestions = buildUnnamed27();
}
buildCounterSuggestionClusterProto--;
return o;
}
void checkSuggestionClusterProto(api.SuggestionClusterProto o) {
buildCounterSuggestionClusterProto++;
if (buildCounterSuggestionClusterProto < 3) {
unittest.expect(
o.category!,
unittest.equals('foo'),
);
checkUnnamed27(o.suggestions!);
}
buildCounterSuggestionClusterProto--;
}
core.int buildCounterSuggestionProto = 0;
api.SuggestionProto buildSuggestionProto() {
final o = api.SuggestionProto();
buildCounterSuggestionProto++;
if (buildCounterSuggestionProto < 3) {
o.helpUrl = 'foo';
o.longMessage = buildSafeHtmlProto();
o.priority = 'foo';
o.pseudoResourceId = 'foo';
o.region = buildRegionProto();
o.resourceName = 'foo';
o.screenId = 'foo';
o.secondaryPriority = 42.0;
o.shortMessage = buildSafeHtmlProto();
o.title = 'foo';
}
buildCounterSuggestionProto--;
return o;
}
void checkSuggestionProto(api.SuggestionProto o) {
buildCounterSuggestionProto++;
if (buildCounterSuggestionProto < 3) {
unittest.expect(
o.helpUrl!,
unittest.equals('foo'),
);
checkSafeHtmlProto(o.longMessage!);
unittest.expect(
o.priority!,
unittest.equals('foo'),
);
unittest.expect(
o.pseudoResourceId!,
unittest.equals('foo'),
);
checkRegionProto(o.region!);
unittest.expect(
o.resourceName!,
unittest.equals('foo'),
);
unittest.expect(
o.screenId!,
unittest.equals('foo'),
);
unittest.expect(
o.secondaryPriority!,
unittest.equals(42.0),
);
checkSafeHtmlProto(o.shortMessage!);
unittest.expect(
o.title!,
unittest.equals('foo'),
);
}
buildCounterSuggestionProto--;
}
core.List<api.StackTrace> buildUnnamed28() => [
buildStackTrace(),
buildStackTrace(),
];
void checkUnnamed28(core.List<api.StackTrace> o) {
unittest.expect(o, unittest.hasLength(2));
checkStackTrace(o[0]);
checkStackTrace(o[1]);
}
core.List<api.ToolOutputReference> buildUnnamed29() => [
buildToolOutputReference(),
buildToolOutputReference(),
];
void checkUnnamed29(core.List<api.ToolOutputReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkToolOutputReference(o[0]);
checkToolOutputReference(o[1]);
}
core.int buildCounterTestCase = 0;
api.TestCase buildTestCase() {
final o = api.TestCase();
buildCounterTestCase++;
if (buildCounterTestCase < 3) {
o.elapsedTime = buildDuration();
o.endTime = buildTimestamp();
o.skippedMessage = 'foo';
o.stackTraces = buildUnnamed28();
o.startTime = buildTimestamp();
o.status = 'foo';
o.testCaseId = 'foo';
o.testCaseReference = buildTestCaseReference();
o.toolOutputs = buildUnnamed29();
}
buildCounterTestCase--;
return o;
}
void checkTestCase(api.TestCase o) {
buildCounterTestCase++;
if (buildCounterTestCase < 3) {
checkDuration(o.elapsedTime!);
checkTimestamp(o.endTime!);
unittest.expect(
o.skippedMessage!,
unittest.equals('foo'),
);
checkUnnamed28(o.stackTraces!);
checkTimestamp(o.startTime!);
unittest.expect(
o.status!,
unittest.equals('foo'),
);
unittest.expect(
o.testCaseId!,
unittest.equals('foo'),
);
checkTestCaseReference(o.testCaseReference!);
checkUnnamed29(o.toolOutputs!);
}
buildCounterTestCase--;
}
core.int buildCounterTestCaseReference = 0;
api.TestCaseReference buildTestCaseReference() {
final o = api.TestCaseReference();
buildCounterTestCaseReference++;
if (buildCounterTestCaseReference < 3) {
o.className = 'foo';
o.name = 'foo';
o.testSuiteName = 'foo';
}
buildCounterTestCaseReference--;
return o;
}
void checkTestCaseReference(api.TestCaseReference o) {
buildCounterTestCaseReference++;
if (buildCounterTestCaseReference < 3) {
unittest.expect(
o.className!,
unittest.equals('foo'),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.testSuiteName!,
unittest.equals('foo'),
);
}
buildCounterTestCaseReference--;
}
core.List<api.TestIssue> buildUnnamed30() => [
buildTestIssue(),
buildTestIssue(),
];
void checkUnnamed30(core.List<api.TestIssue> o) {
unittest.expect(o, unittest.hasLength(2));
checkTestIssue(o[0]);
checkTestIssue(o[1]);
}
core.List<api.TestSuiteOverview> buildUnnamed31() => [
buildTestSuiteOverview(),
buildTestSuiteOverview(),
];
void checkUnnamed31(core.List<api.TestSuiteOverview> o) {
unittest.expect(o, unittest.hasLength(2));
checkTestSuiteOverview(o[0]);
checkTestSuiteOverview(o[1]);
}
core.int buildCounterTestExecutionStep = 0;
api.TestExecutionStep buildTestExecutionStep() {
final o = api.TestExecutionStep();
buildCounterTestExecutionStep++;
if (buildCounterTestExecutionStep < 3) {
o.testIssues = buildUnnamed30();
o.testSuiteOverviews = buildUnnamed31();
o.testTiming = buildTestTiming();
o.toolExecution = buildToolExecution();
}
buildCounterTestExecutionStep--;
return o;
}
void checkTestExecutionStep(api.TestExecutionStep o) {
buildCounterTestExecutionStep++;
if (buildCounterTestExecutionStep < 3) {
checkUnnamed30(o.testIssues!);
checkUnnamed31(o.testSuiteOverviews!);
checkTestTiming(o.testTiming!);
checkToolExecution(o.toolExecution!);
}
buildCounterTestExecutionStep--;
}
core.int buildCounterTestIssue = 0;
api.TestIssue buildTestIssue() {
final o = api.TestIssue();
buildCounterTestIssue++;
if (buildCounterTestIssue < 3) {
o.category = 'foo';
o.errorMessage = 'foo';
o.severity = 'foo';
o.stackTrace = buildStackTrace();
o.type = 'foo';
o.warning = buildAny();
}
buildCounterTestIssue--;
return o;
}
void checkTestIssue(api.TestIssue o) {
buildCounterTestIssue++;
if (buildCounterTestIssue < 3) {
unittest.expect(
o.category!,
unittest.equals('foo'),
);
unittest.expect(
o.errorMessage!,
unittest.equals('foo'),
);
unittest.expect(
o.severity!,
unittest.equals('foo'),
);
checkStackTrace(o.stackTrace!);
unittest.expect(
o.type!,
unittest.equals('foo'),
);
checkAny(o.warning!);
}
buildCounterTestIssue--;
}
core.int buildCounterTestSuiteOverview = 0;
api.TestSuiteOverview buildTestSuiteOverview() {
final o = api.TestSuiteOverview();
buildCounterTestSuiteOverview++;
if (buildCounterTestSuiteOverview < 3) {
o.elapsedTime = buildDuration();
o.errorCount = 42;
o.failureCount = 42;
o.flakyCount = 42;
o.name = 'foo';
o.skippedCount = 42;
o.totalCount = 42;
o.xmlSource = buildFileReference();
}
buildCounterTestSuiteOverview--;
return o;
}
void checkTestSuiteOverview(api.TestSuiteOverview o) {
buildCounterTestSuiteOverview++;
if (buildCounterTestSuiteOverview < 3) {
checkDuration(o.elapsedTime!);
unittest.expect(
o.errorCount!,
unittest.equals(42),
);
unittest.expect(
o.failureCount!,
unittest.equals(42),
);
unittest.expect(
o.flakyCount!,
unittest.equals(42),
);
unittest.expect(
o.name!,
unittest.equals('foo'),
);
unittest.expect(
o.skippedCount!,
unittest.equals(42),
);
unittest.expect(
o.totalCount!,
unittest.equals(42),
);
checkFileReference(o.xmlSource!);
}
buildCounterTestSuiteOverview--;
}
core.int buildCounterTestTiming = 0;
api.TestTiming buildTestTiming() {
final o = api.TestTiming();
buildCounterTestTiming++;
if (buildCounterTestTiming < 3) {
o.testProcessDuration = buildDuration();
}
buildCounterTestTiming--;
return o;
}
void checkTestTiming(api.TestTiming o) {
buildCounterTestTiming++;
if (buildCounterTestTiming < 3) {
checkDuration(o.testProcessDuration!);
}
buildCounterTestTiming--;
}
core.int buildCounterThumbnail = 0;
api.Thumbnail buildThumbnail() {
final o = api.Thumbnail();
buildCounterThumbnail++;
if (buildCounterThumbnail < 3) {
o.contentType = 'foo';
o.data = 'foo';
o.heightPx = 42;
o.widthPx = 42;
}
buildCounterThumbnail--;
return o;
}
void checkThumbnail(api.Thumbnail o) {
buildCounterThumbnail++;
if (buildCounterThumbnail < 3) {
unittest.expect(
o.contentType!,
unittest.equals('foo'),
);
unittest.expect(
o.data!,
unittest.equals('foo'),
);
unittest.expect(
o.heightPx!,
unittest.equals(42),
);
unittest.expect(
o.widthPx!,
unittest.equals(42),
);
}
buildCounterThumbnail--;
}
core.int buildCounterTimestamp = 0;
api.Timestamp buildTimestamp() {
final o = api.Timestamp();
buildCounterTimestamp++;
if (buildCounterTimestamp < 3) {
o.nanos = 42;
o.seconds = 'foo';
}
buildCounterTimestamp--;
return o;
}
void checkTimestamp(api.Timestamp o) {
buildCounterTimestamp++;
if (buildCounterTimestamp < 3) {
unittest.expect(
o.nanos!,
unittest.equals(42),
);
unittest.expect(
o.seconds!,
unittest.equals('foo'),
);
}
buildCounterTimestamp--;
}
core.List<core.String> buildUnnamed32() => [
'foo',
'foo',
];
void checkUnnamed32(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.List<api.FileReference> buildUnnamed33() => [
buildFileReference(),
buildFileReference(),
];
void checkUnnamed33(core.List<api.FileReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkFileReference(o[0]);
checkFileReference(o[1]);
}
core.List<api.ToolOutputReference> buildUnnamed34() => [
buildToolOutputReference(),
buildToolOutputReference(),
];
void checkUnnamed34(core.List<api.ToolOutputReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkToolOutputReference(o[0]);
checkToolOutputReference(o[1]);
}
core.int buildCounterToolExecution = 0;
api.ToolExecution buildToolExecution() {
final o = api.ToolExecution();
buildCounterToolExecution++;
if (buildCounterToolExecution < 3) {
o.commandLineArguments = buildUnnamed32();
o.exitCode = buildToolExitCode();
o.toolLogs = buildUnnamed33();
o.toolOutputs = buildUnnamed34();
}
buildCounterToolExecution--;
return o;
}
void checkToolExecution(api.ToolExecution o) {
buildCounterToolExecution++;
if (buildCounterToolExecution < 3) {
checkUnnamed32(o.commandLineArguments!);
checkToolExitCode(o.exitCode!);
checkUnnamed33(o.toolLogs!);
checkUnnamed34(o.toolOutputs!);
}
buildCounterToolExecution--;
}
core.int buildCounterToolExecutionStep = 0;
api.ToolExecutionStep buildToolExecutionStep() {
final o = api.ToolExecutionStep();
buildCounterToolExecutionStep++;
if (buildCounterToolExecutionStep < 3) {
o.toolExecution = buildToolExecution();
}
buildCounterToolExecutionStep--;
return o;
}
void checkToolExecutionStep(api.ToolExecutionStep o) {
buildCounterToolExecutionStep++;
if (buildCounterToolExecutionStep < 3) {
checkToolExecution(o.toolExecution!);
}
buildCounterToolExecutionStep--;
}
core.int buildCounterToolExitCode = 0;
api.ToolExitCode buildToolExitCode() {
final o = api.ToolExitCode();
buildCounterToolExitCode++;
if (buildCounterToolExitCode < 3) {
o.number = 42;
}
buildCounterToolExitCode--;
return o;
}
void checkToolExitCode(api.ToolExitCode o) {
buildCounterToolExitCode++;
if (buildCounterToolExitCode < 3) {
unittest.expect(
o.number!,
unittest.equals(42),
);
}
buildCounterToolExitCode--;
}
core.int buildCounterToolOutputReference = 0;
api.ToolOutputReference buildToolOutputReference() {
final o = api.ToolOutputReference();
buildCounterToolOutputReference++;
if (buildCounterToolOutputReference < 3) {
o.creationTime = buildTimestamp();
o.output = buildFileReference();
o.testCase = buildTestCaseReference();
}
buildCounterToolOutputReference--;
return o;
}
void checkToolOutputReference(api.ToolOutputReference o) {
buildCounterToolOutputReference++;
if (buildCounterToolOutputReference < 3) {
checkTimestamp(o.creationTime!);
checkFileReference(o.output!);
checkTestCaseReference(o.testCase!);
}
buildCounterToolOutputReference--;
}
core.List<core.String> buildUnnamed35() => [
'foo',
'foo',
];
void checkUnnamed35(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'),
);
}
void main() {
unittest.group('obj-schema-AndroidAppInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildAndroidAppInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AndroidAppInfo.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAndroidAppInfo(od);
});
});
unittest.group('obj-schema-AndroidInstrumentationTest', () {
unittest.test('to-json--from-json', () async {
final o = buildAndroidInstrumentationTest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AndroidInstrumentationTest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAndroidInstrumentationTest(od);
});
});
unittest.group('obj-schema-AndroidRoboTest', () {
unittest.test('to-json--from-json', () async {
final o = buildAndroidRoboTest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AndroidRoboTest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAndroidRoboTest(od);
});
});
unittest.group('obj-schema-AndroidTest', () {
unittest.test('to-json--from-json', () async {
final o = buildAndroidTest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AndroidTest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAndroidTest(od);
});
});
unittest.group('obj-schema-AndroidTestLoop', () {
unittest.test('to-json--from-json', () async {
final o = buildAndroidTestLoop();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AndroidTestLoop.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAndroidTestLoop(od);
});
});
unittest.group('obj-schema-Any', () {
unittest.test('to-json--from-json', () async {
final o = buildAny();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Any.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkAny(od);
});
});
unittest.group('obj-schema-AppStartTime', () {
unittest.test('to-json--from-json', () async {
final o = buildAppStartTime();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.AppStartTime.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkAppStartTime(od);
});
});
unittest.group('obj-schema-BasicPerfSampleSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildBasicPerfSampleSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BasicPerfSampleSeries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBasicPerfSampleSeries(od);
});
});
unittest.group('obj-schema-BatchCreatePerfSamplesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchCreatePerfSamplesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchCreatePerfSamplesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchCreatePerfSamplesRequest(od);
});
});
unittest.group('obj-schema-BatchCreatePerfSamplesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildBatchCreatePerfSamplesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.BatchCreatePerfSamplesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkBatchCreatePerfSamplesResponse(od);
});
});
unittest.group('obj-schema-CPUInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildCPUInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.CPUInfo.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkCPUInfo(od);
});
});
unittest.group('obj-schema-Duration', () {
unittest.test('to-json--from-json', () async {
final o = buildDuration();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Duration.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkDuration(od);
});
});
unittest.group('obj-schema-Environment', () {
unittest.test('to-json--from-json', () async {
final o = buildEnvironment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Environment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkEnvironment(od);
});
});
unittest.group('obj-schema-EnvironmentDimensionValueEntry', () {
unittest.test('to-json--from-json', () async {
final o = buildEnvironmentDimensionValueEntry();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.EnvironmentDimensionValueEntry.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkEnvironmentDimensionValueEntry(od);
});
});
unittest.group('obj-schema-Execution', () {
unittest.test('to-json--from-json', () async {
final o = buildExecution();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Execution.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkExecution(od);
});
});
unittest.group('obj-schema-FailureDetail', () {
unittest.test('to-json--from-json', () async {
final o = buildFailureDetail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FailureDetail.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFailureDetail(od);
});
});
unittest.group('obj-schema-FileReference', () {
unittest.test('to-json--from-json', () async {
final o = buildFileReference();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.FileReference.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkFileReference(od);
});
});
unittest.group('obj-schema-GraphicsStats', () {
unittest.test('to-json--from-json', () async {
final o = buildGraphicsStats();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GraphicsStats.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGraphicsStats(od);
});
});
unittest.group('obj-schema-GraphicsStatsBucket', () {
unittest.test('to-json--from-json', () async {
final o = buildGraphicsStatsBucket();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.GraphicsStatsBucket.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkGraphicsStatsBucket(od);
});
});
unittest.group('obj-schema-History', () {
unittest.test('to-json--from-json', () async {
final o = buildHistory();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.History.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkHistory(od);
});
});
unittest.group('obj-schema-Image', () {
unittest.test('to-json--from-json', () async {
final o = buildImage();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Image.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkImage(od);
});
});
unittest.group('obj-schema-InconclusiveDetail', () {
unittest.test('to-json--from-json', () async {
final o = buildInconclusiveDetail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.InconclusiveDetail.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkInconclusiveDetail(od);
});
});
unittest.group('obj-schema-IndividualOutcome', () {
unittest.test('to-json--from-json', () async {
final o = buildIndividualOutcome();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IndividualOutcome.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIndividualOutcome(od);
});
});
unittest.group('obj-schema-IosAppInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildIosAppInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.IosAppInfo.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkIosAppInfo(od);
});
});
unittest.group('obj-schema-IosRoboTest', () {
unittest.test('to-json--from-json', () async {
final o = buildIosRoboTest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IosRoboTest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIosRoboTest(od);
});
});
unittest.group('obj-schema-IosTest', () {
unittest.test('to-json--from-json', () async {
final o = buildIosTest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.IosTest.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkIosTest(od);
});
});
unittest.group('obj-schema-IosTestLoop', () {
unittest.test('to-json--from-json', () async {
final o = buildIosTestLoop();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.IosTestLoop.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkIosTestLoop(od);
});
});
unittest.group('obj-schema-IosXcTest', () {
unittest.test('to-json--from-json', () async {
final o = buildIosXcTest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.IosXcTest.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkIosXcTest(od);
});
});
unittest.group('obj-schema-ListEnvironmentsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListEnvironmentsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListEnvironmentsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListEnvironmentsResponse(od);
});
});
unittest.group('obj-schema-ListExecutionsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListExecutionsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListExecutionsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListExecutionsResponse(od);
});
});
unittest.group('obj-schema-ListHistoriesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListHistoriesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListHistoriesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListHistoriesResponse(od);
});
});
unittest.group('obj-schema-ListPerfSampleSeriesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListPerfSampleSeriesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListPerfSampleSeriesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListPerfSampleSeriesResponse(od);
});
});
unittest.group('obj-schema-ListPerfSamplesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListPerfSamplesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListPerfSamplesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListPerfSamplesResponse(od);
});
});
unittest.group('obj-schema-ListScreenshotClustersResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListScreenshotClustersResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListScreenshotClustersResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListScreenshotClustersResponse(od);
});
});
unittest.group('obj-schema-ListStepAccessibilityClustersResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListStepAccessibilityClustersResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListStepAccessibilityClustersResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListStepAccessibilityClustersResponse(od);
});
});
unittest.group('obj-schema-ListStepThumbnailsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListStepThumbnailsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListStepThumbnailsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListStepThumbnailsResponse(od);
});
});
unittest.group('obj-schema-ListStepsResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListStepsResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListStepsResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListStepsResponse(od);
});
});
unittest.group('obj-schema-ListTestCasesResponse', () {
unittest.test('to-json--from-json', () async {
final o = buildListTestCasesResponse();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ListTestCasesResponse.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkListTestCasesResponse(od);
});
});
unittest.group('obj-schema-MatrixDimensionDefinition', () {
unittest.test('to-json--from-json', () async {
final o = buildMatrixDimensionDefinition();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MatrixDimensionDefinition.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMatrixDimensionDefinition(od);
});
});
unittest.group('obj-schema-MemoryInfo', () {
unittest.test('to-json--from-json', () async {
final o = buildMemoryInfo();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.MemoryInfo.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkMemoryInfo(od);
});
});
unittest.group('obj-schema-MergedResult', () {
unittest.test('to-json--from-json', () async {
final o = buildMergedResult();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.MergedResult.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkMergedResult(od);
});
});
unittest.group('obj-schema-MultiStep', () {
unittest.test('to-json--from-json', () async {
final o = buildMultiStep();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.MultiStep.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkMultiStep(od);
});
});
unittest.group('obj-schema-Outcome', () {
unittest.test('to-json--from-json', () async {
final o = buildOutcome();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Outcome.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkOutcome(od);
});
});
unittest.group('obj-schema-PerfEnvironment', () {
unittest.test('to-json--from-json', () async {
final o = buildPerfEnvironment();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PerfEnvironment.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPerfEnvironment(od);
});
});
unittest.group('obj-schema-PerfMetricsSummary', () {
unittest.test('to-json--from-json', () async {
final o = buildPerfMetricsSummary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PerfMetricsSummary.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPerfMetricsSummary(od);
});
});
unittest.group('obj-schema-PerfSample', () {
unittest.test('to-json--from-json', () async {
final o = buildPerfSample();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.PerfSample.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkPerfSample(od);
});
});
unittest.group('obj-schema-PerfSampleSeries', () {
unittest.test('to-json--from-json', () async {
final o = buildPerfSampleSeries();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PerfSampleSeries.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPerfSampleSeries(od);
});
});
unittest.group('obj-schema-PrimaryStep', () {
unittest.test('to-json--from-json', () async {
final o = buildPrimaryStep();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PrimaryStep.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPrimaryStep(od);
});
});
unittest.group('obj-schema-ProjectSettings', () {
unittest.test('to-json--from-json', () async {
final o = buildProjectSettings();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ProjectSettings.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkProjectSettings(od);
});
});
unittest.group('obj-schema-PublishXunitXmlFilesRequest', () {
unittest.test('to-json--from-json', () async {
final o = buildPublishXunitXmlFilesRequest();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.PublishXunitXmlFilesRequest.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkPublishXunitXmlFilesRequest(od);
});
});
unittest.group('obj-schema-RegionProto', () {
unittest.test('to-json--from-json', () async {
final o = buildRegionProto();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.RegionProto.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkRegionProto(od);
});
});
unittest.group('obj-schema-ResultsStorage', () {
unittest.test('to-json--from-json', () async {
final o = buildResultsStorage();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ResultsStorage.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkResultsStorage(od);
});
});
unittest.group('obj-schema-SafeHtmlProto', () {
unittest.test('to-json--from-json', () async {
final o = buildSafeHtmlProto();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SafeHtmlProto.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSafeHtmlProto(od);
});
});
unittest.group('obj-schema-Screen', () {
unittest.test('to-json--from-json', () async {
final o = buildScreen();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Screen.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkScreen(od);
});
});
unittest.group('obj-schema-ScreenshotCluster', () {
unittest.test('to-json--from-json', () async {
final o = buildScreenshotCluster();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ScreenshotCluster.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkScreenshotCluster(od);
});
});
unittest.group('obj-schema-ShardSummary', () {
unittest.test('to-json--from-json', () async {
final o = buildShardSummary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ShardSummary.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkShardSummary(od);
});
});
unittest.group('obj-schema-SkippedDetail', () {
unittest.test('to-json--from-json', () async {
final o = buildSkippedDetail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SkippedDetail.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSkippedDetail(od);
});
});
unittest.group('obj-schema-Specification', () {
unittest.test('to-json--from-json', () async {
final o = buildSpecification();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.Specification.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSpecification(od);
});
});
unittest.group('obj-schema-StackTrace', () {
unittest.test('to-json--from-json', () async {
final o = buildStackTrace();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.StackTrace.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStackTrace(od);
});
});
unittest.group('obj-schema-Status', () {
unittest.test('to-json--from-json', () async {
final o = buildStatus();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Status.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStatus(od);
});
});
unittest.group('obj-schema-Step', () {
unittest.test('to-json--from-json', () async {
final o = buildStep();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Step.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkStep(od);
});
});
unittest.group('obj-schema-StepDimensionValueEntry', () {
unittest.test('to-json--from-json', () async {
final o = buildStepDimensionValueEntry();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StepDimensionValueEntry.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStepDimensionValueEntry(od);
});
});
unittest.group('obj-schema-StepLabelsEntry', () {
unittest.test('to-json--from-json', () async {
final o = buildStepLabelsEntry();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StepLabelsEntry.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStepLabelsEntry(od);
});
});
unittest.group('obj-schema-StepSummary', () {
unittest.test('to-json--from-json', () async {
final o = buildStepSummary();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.StepSummary.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkStepSummary(od);
});
});
unittest.group('obj-schema-SuccessDetail', () {
unittest.test('to-json--from-json', () async {
final o = buildSuccessDetail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SuccessDetail.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSuccessDetail(od);
});
});
unittest.group('obj-schema-SuggestionClusterProto', () {
unittest.test('to-json--from-json', () async {
final o = buildSuggestionClusterProto();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SuggestionClusterProto.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSuggestionClusterProto(od);
});
});
unittest.group('obj-schema-SuggestionProto', () {
unittest.test('to-json--from-json', () async {
final o = buildSuggestionProto();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.SuggestionProto.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkSuggestionProto(od);
});
});
unittest.group('obj-schema-TestCase', () {
unittest.test('to-json--from-json', () async {
final o = buildTestCase();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.TestCase.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTestCase(od);
});
});
unittest.group('obj-schema-TestCaseReference', () {
unittest.test('to-json--from-json', () async {
final o = buildTestCaseReference();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TestCaseReference.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTestCaseReference(od);
});
});
unittest.group('obj-schema-TestExecutionStep', () {
unittest.test('to-json--from-json', () async {
final o = buildTestExecutionStep();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TestExecutionStep.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTestExecutionStep(od);
});
});
unittest.group('obj-schema-TestIssue', () {
unittest.test('to-json--from-json', () async {
final o = buildTestIssue();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.TestIssue.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTestIssue(od);
});
});
unittest.group('obj-schema-TestSuiteOverview', () {
unittest.test('to-json--from-json', () async {
final o = buildTestSuiteOverview();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.TestSuiteOverview.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkTestSuiteOverview(od);
});
});
unittest.group('obj-schema-TestTiming', () {
unittest.test('to-json--from-json', () async {
final o = buildTestTiming();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.TestTiming.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTestTiming(od);
});
});
unittest.group('obj-schema-Thumbnail', () {
unittest.test('to-json--from-json', () async {
final o = buildThumbnail();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Thumbnail.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkThumbnail(od);
});
});
unittest.group('obj-schema-Timestamp', () {
unittest.test('to-json--from-json', () async {
final o = buildTimestamp();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od =
api.Timestamp.fromJson(oJson as core.Map<core.String, core.dynamic>);
checkTimestamp(od);
});
});
unittest.group('obj-schema-ToolExecution', () {
unittest.test('to-json--from-json', () async {
final o = buildToolExecution();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ToolExecution.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkToolExecution(od);
});
});
unittest.group('obj-schema-ToolExecutionStep', () {
unittest.test('to-json--from-json', () async {
final o = buildToolExecutionStep();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ToolExecutionStep.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkToolExecutionStep(od);
});
});
unittest.group('obj-schema-ToolExitCode', () {
unittest.test('to-json--from-json', () async {
final o = buildToolExitCode();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ToolExitCode.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkToolExitCode(od);
});
});
unittest.group('obj-schema-ToolOutputReference', () {
unittest.test('to-json--from-json', () async {
final o = buildToolOutputReference();
final oJson = convert.jsonDecode(convert.jsonEncode(o));
final od = api.ToolOutputReference.fromJson(
oJson as core.Map<core.String, core.dynamic>);
checkToolOutputReference(od);
});
});
unittest.group('resource-ProjectsResource', () {
unittest.test('method--getSettings', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects;
final arg_projectId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/settings', 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 + 9),
unittest.equals('/settings'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildProjectSettings());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.getSettings(arg_projectId, $fields: arg_$fields);
checkProjectSettings(response as api.ProjectSettings);
});
unittest.test('method--initializeSettings', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects;
final arg_projectId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf(':initializeSettings', 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 + 19),
unittest.equals(':initializeSettings'),
);
pathOffset += 19;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildProjectSettings());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.initializeSettings(arg_projectId, $fields: arg_$fields);
checkProjectSettings(response as api.ProjectSettings);
});
});
unittest.group('resource-ProjectsHistoriesResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories;
final arg_request = buildHistory();
final arg_projectId = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.History.fromJson(json as core.Map<core.String, core.dynamic>);
checkHistory(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories', 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 + 10),
unittest.equals('/histories'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildHistory());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_projectId,
requestId: arg_requestId, $fields: arg_$fields);
checkHistory(response as api.History);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildHistory());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response =
await res.get(arg_projectId, arg_historyId, $fields: arg_$fields);
checkHistory(response as api.History);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories;
final arg_projectId = 'foo';
final arg_filterByName = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories', 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 + 10),
unittest.equals('/histories'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['filterByName']!.first,
unittest.equals(arg_filterByName),
);
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),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListHistoriesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId,
filterByName: arg_filterByName,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListHistoriesResponse(response as api.ListHistoriesResponse);
});
});
unittest.group('resource-ProjectsHistoriesExecutionsResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions;
final arg_request = buildExecution();
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Execution.fromJson(json as core.Map<core.String, core.dynamic>);
checkExecution(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/executions'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildExecution());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(
arg_request, arg_projectId, arg_historyId,
requestId: arg_requestId, $fields: arg_$fields);
checkExecution(response as api.Execution);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildExecution());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(
arg_projectId, arg_historyId, arg_executionId,
$fields: arg_$fields);
checkExecution(response as api.Execution);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/executions'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListExecutionsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId, arg_historyId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListExecutionsResponse(response as api.ListExecutionsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions;
final arg_request = buildExecution();
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Execution.fromJson(json as core.Map<core.String, core.dynamic>);
checkExecution(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildExecution());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(
arg_request, arg_projectId, arg_historyId, arg_executionId,
requestId: arg_requestId, $fields: arg_$fields);
checkExecution(response as api.Execution);
});
});
unittest.group('resource-ProjectsHistoriesExecutionsClustersResource', () {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.ToolResultsApi(mock).projects.histories.executions.clusters;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_clusterId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/clusters/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/clusters/'),
);
pathOffset += 10;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_clusterId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildScreenshotCluster());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(
arg_projectId, arg_historyId, arg_executionId, arg_clusterId,
$fields: arg_$fields);
checkScreenshotCluster(response as api.ScreenshotCluster);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.ToolResultsApi(mock).projects.histories.executions.clusters;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/clusters', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 9),
unittest.equals('/clusters'),
);
pathOffset += 9;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListScreenshotClustersResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
arg_projectId, arg_historyId, arg_executionId,
$fields: arg_$fields);
checkListScreenshotClustersResponse(
response as api.ListScreenshotClustersResponse);
});
});
unittest.group('resource-ProjectsHistoriesExecutionsEnvironmentsResource',
() {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res =
api.ToolResultsApi(mock).projects.histories.executions.environments;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_environmentId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/environments/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 14),
unittest.equals('/environments/'),
);
pathOffset += 14;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_environmentId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildEnvironment());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(
arg_projectId, arg_historyId, arg_executionId, arg_environmentId,
$fields: arg_$fields);
checkEnvironment(response as api.Environment);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res =
api.ToolResultsApi(mock).projects.histories.executions.environments;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/environments', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 13),
unittest.equals('/environments'),
);
pathOffset += 13;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListEnvironmentsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
arg_projectId, arg_historyId, arg_executionId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListEnvironmentsResponse(response as api.ListEnvironmentsResponse);
});
});
unittest.group('resource-ProjectsHistoriesExecutionsStepsResource', () {
unittest.test('method--accessibilityClusters', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions.steps;
final arg_name = 'foo';
final arg_locale = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 20),
unittest.equals('toolresults/v1beta3/'),
);
pathOffset += 20;
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['locale']!.first,
unittest.equals(arg_locale),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp =
convert.json.encode(buildListStepAccessibilityClustersResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.accessibilityClusters(arg_name,
locale: arg_locale, $fields: arg_$fields);
checkListStepAccessibilityClustersResponse(
response as api.ListStepAccessibilityClustersResponse);
});
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions.steps;
final arg_request = buildStep();
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Step.fromJson(json as core.Map<core.String, core.dynamic>);
checkStep(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('/steps'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildStep());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(
arg_request, arg_projectId, arg_historyId, arg_executionId,
requestId: arg_requestId, $fields: arg_$fields);
checkStep(response as api.Step);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions.steps;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildStep());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(
arg_projectId, arg_historyId, arg_executionId, arg_stepId,
$fields: arg_$fields);
checkStep(response as api.Step);
});
unittest.test('method--getPerfMetricsSummary', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions.steps;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/perfMetricsSummary', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 19),
unittest.equals('/perfMetricsSummary'),
);
pathOffset += 19;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPerfMetricsSummary());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.getPerfMetricsSummary(
arg_projectId, arg_historyId, arg_executionId, arg_stepId,
$fields: arg_$fields);
checkPerfMetricsSummary(response as api.PerfMetricsSummary);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions.steps;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 6),
unittest.equals('/steps'),
);
pathOffset += 6;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListStepsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
arg_projectId, arg_historyId, arg_executionId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListStepsResponse(response as api.ListStepsResponse);
});
unittest.test('method--patch', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions.steps;
final arg_request = buildStep();
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_requestId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj =
api.Step.fromJson(json as core.Map<core.String, core.dynamic>);
checkStep(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['requestId']!.first,
unittest.equals(arg_requestId),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildStep());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.patch(arg_request, arg_projectId,
arg_historyId, arg_executionId, arg_stepId,
requestId: arg_requestId, $fields: arg_$fields);
checkStep(response as api.Step);
});
unittest.test('method--publishXunitXmlFiles', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock).projects.histories.executions.steps;
final arg_request = buildPublishXunitXmlFilesRequest();
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.PublishXunitXmlFilesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkPublishXunitXmlFilesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf(':publishXunitXmlFiles', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 21),
unittest.equals(':publishXunitXmlFiles'),
);
pathOffset += 21;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildStep());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.publishXunitXmlFiles(arg_request,
arg_projectId, arg_historyId, arg_executionId, arg_stepId,
$fields: arg_$fields);
checkStep(response as api.Step);
});
});
unittest.group(
'resource-ProjectsHistoriesExecutionsStepsPerfMetricsSummaryResource',
() {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.perfMetricsSummary;
final arg_request = buildPerfMetricsSummary();
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.PerfMetricsSummary.fromJson(
json as core.Map<core.String, core.dynamic>);
checkPerfMetricsSummary(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/perfMetricsSummary', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 19),
unittest.equals('/perfMetricsSummary'),
);
pathOffset += 19;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPerfMetricsSummary());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_projectId,
arg_historyId, arg_executionId, arg_stepId,
$fields: arg_$fields);
checkPerfMetricsSummary(response as api.PerfMetricsSummary);
});
});
unittest.group(
'resource-ProjectsHistoriesExecutionsStepsPerfSampleSeriesResource', () {
unittest.test('method--create', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.perfSampleSeries;
final arg_request = buildPerfSampleSeries();
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.PerfSampleSeries.fromJson(
json as core.Map<core.String, core.dynamic>);
checkPerfSampleSeries(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/perfSampleSeries', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 17),
unittest.equals('/perfSampleSeries'),
);
pathOffset += 17;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPerfSampleSeries());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.create(arg_request, arg_projectId,
arg_historyId, arg_executionId, arg_stepId,
$fields: arg_$fields);
checkPerfSampleSeries(response as api.PerfSampleSeries);
});
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.perfSampleSeries;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_sampleSeriesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/perfSampleSeries/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 18),
unittest.equals('/perfSampleSeries/'),
);
pathOffset += 18;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_sampleSeriesId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildPerfSampleSeries());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_projectId, arg_historyId,
arg_executionId, arg_stepId, arg_sampleSeriesId,
$fields: arg_$fields);
checkPerfSampleSeries(response as api.PerfSampleSeries);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.perfSampleSeries;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_filter = buildUnnamed35();
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/perfSampleSeries', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 17),
unittest.equals('/perfSampleSeries'),
);
pathOffset += 17;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['filter']!,
unittest.equals(arg_filter),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListPerfSampleSeriesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
arg_projectId, arg_historyId, arg_executionId, arg_stepId,
filter: arg_filter, $fields: arg_$fields);
checkListPerfSampleSeriesResponse(
response as api.ListPerfSampleSeriesResponse);
});
});
unittest.group(
'resource-ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesResource',
() {
unittest.test('method--batchCreate', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.perfSampleSeries
.samples;
final arg_request = buildBatchCreatePerfSamplesRequest();
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_sampleSeriesId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final obj = api.BatchCreatePerfSamplesRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkBatchCreatePerfSamplesRequest(obj);
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/perfSampleSeries/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 18),
unittest.equals('/perfSampleSeries/'),
);
pathOffset += 18;
index = path.indexOf('/samples:batchCreate', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_sampleSeriesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 20),
unittest.equals('/samples:batchCreate'),
);
pathOffset += 20;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildBatchCreatePerfSamplesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.batchCreate(arg_request, arg_projectId,
arg_historyId, arg_executionId, arg_stepId, arg_sampleSeriesId,
$fields: arg_$fields);
checkBatchCreatePerfSamplesResponse(
response as api.BatchCreatePerfSamplesResponse);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.perfSampleSeries
.samples;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_sampleSeriesId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/perfSampleSeries/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 18),
unittest.equals('/perfSampleSeries/'),
);
pathOffset += 18;
index = path.indexOf('/samples', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_sampleSeriesId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 8),
unittest.equals('/samples'),
);
pathOffset += 8;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListPerfSamplesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(arg_projectId, arg_historyId,
arg_executionId, arg_stepId, arg_sampleSeriesId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListPerfSamplesResponse(response as api.ListPerfSamplesResponse);
});
});
unittest.group('resource-ProjectsHistoriesExecutionsStepsTestCasesResource',
() {
unittest.test('method--get', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.testCases;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_testCaseId = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/testCases/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/testCases/'),
);
pathOffset += 11;
subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
pathOffset = path.length;
unittest.expect(
subPart,
unittest.equals('$arg_testCaseId'),
);
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildTestCase());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.get(arg_projectId, arg_historyId,
arg_executionId, arg_stepId, arg_testCaseId,
$fields: arg_$fields);
checkTestCase(response as api.TestCase);
});
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.testCases;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/testCases', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 10),
unittest.equals('/testCases'),
);
pathOffset += 10;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListTestCasesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
arg_projectId, arg_historyId, arg_executionId, arg_stepId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListTestCasesResponse(response as api.ListTestCasesResponse);
});
});
unittest.group('resource-ProjectsHistoriesExecutionsStepsThumbnailsResource',
() {
unittest.test('method--list', () async {
final mock = HttpServerMock();
final res = api.ToolResultsApi(mock)
.projects
.histories
.executions
.steps
.thumbnails;
final arg_projectId = 'foo';
final arg_historyId = 'foo';
final arg_executionId = 'foo';
final arg_stepId = 'foo';
final arg_pageSize = 42;
final arg_pageToken = 'foo';
final arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
final path = req.url.path;
var pathOffset = 0;
core.int index;
core.String subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1),
unittest.equals('/'),
);
pathOffset += 1;
unittest.expect(
path.substring(pathOffset, pathOffset + 29),
unittest.equals('toolresults/v1beta3/projects/'),
);
pathOffset += 29;
index = path.indexOf('/histories/', 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('/histories/'),
);
pathOffset += 11;
index = path.indexOf('/executions/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_historyId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 12),
unittest.equals('/executions/'),
);
pathOffset += 12;
index = path.indexOf('/steps/', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_executionId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 7),
unittest.equals('/steps/'),
);
pathOffset += 7;
index = path.indexOf('/thumbnails', pathOffset);
unittest.expect(index >= 0, unittest.isTrue);
subPart =
core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
pathOffset = index;
unittest.expect(
subPart,
unittest.equals('$arg_stepId'),
);
unittest.expect(
path.substring(pathOffset, pathOffset + 11),
unittest.equals('/thumbnails'),
);
pathOffset += 11;
final query = req.url.query;
var queryOffset = 0;
final queryMap = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
final 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['pageToken']!.first,
unittest.equals(arg_pageToken),
);
unittest.expect(
queryMap['fields']!.first,
unittest.equals(arg_$fields),
);
final h = {
'content-type': 'application/json; charset=utf-8',
};
final resp = convert.json.encode(buildListStepThumbnailsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.list(
arg_projectId, arg_historyId, arg_executionId, arg_stepId,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
$fields: arg_$fields);
checkListStepThumbnailsResponse(
response as api.ListStepThumbnailsResponse);
});
});
}
| googleapis.dart/generated/googleapis_beta/test/toolresults/v1beta3_test.dart/0 | {'file_path': 'googleapis.dart/generated/googleapis_beta/test/toolresults/v1beta3_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 90222} |
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// An OAuth2 access token.
class AccessToken {
/// The token type, usually "Bearer"
final String type;
/// The access token data.
final String data;
/// Time at which the token will be expired (UTC time)
final DateTime expiry;
/// [expiry] must be a UTC `DateTime`.
AccessToken(this.type, this.data, this.expiry) {
if (!expiry.isUtc) {
throw ArgumentError.value(
expiry,
'expiry',
'The expiry date must be a Utc DateTime.',
);
}
}
factory AccessToken.fromJson(Map<String, dynamic> json) => AccessToken(
json['type'] as String,
json['data'] as String,
DateTime.parse(json['expiry'] as String),
);
bool get hasExpired => DateTime.now().toUtc().isAfter(expiry);
@override
String toString() => 'AccessToken(type=$type, data=$data, expiry=$expiry)';
Map<String, dynamic> toJson() => <String, dynamic>{
'type': type,
'data': data,
'expiry': expiry.toIso8601String(),
};
}
| googleapis.dart/googleapis_auth/lib/src/access_token.dart/0 | {'file_path': 'googleapis.dart/googleapis_auth/lib/src/access_token.dart', 'repo_id': 'googleapis.dart', 'token_count': 463} |
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import 'dart:convert';
import 'dart:math';
import 'dart:typed_data';
import 'package:crypto/crypto.dart';
import 'package:http/http.dart' as http;
import '../access_credentials.dart';
import '../client_id.dart';
import '../exceptions.dart';
import '../known_uris.dart';
import '../utils.dart';
Uri createAuthenticationUri({
required String redirectUri,
required String clientId,
required Iterable<String> scopes,
required String codeVerifier,
String? hostedDomain,
String? state,
bool offline = false,
}) {
final queryValues = {
'client_id': clientId,
'response_type': 'code',
'redirect_uri': redirectUri,
'scope': scopes.join(' '),
'code_challenge': _codeVerifierShaEncode(codeVerifier),
'code_challenge_method': 'S256',
if (offline) 'access_type': 'offline',
if (hostedDomain != null) 'hd': hostedDomain,
if (state != null) 'state': state,
};
return googleOauth2AuthorizationEndpoint.replace(
queryParameters: queryValues,
);
}
/// https://developers.google.com/identity/protocols/oauth2/native-app#create-code-challenge
/// https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
String createCodeVerifier() {
final rnd = Random.secure();
return List.generate(128, (index) => _safe[rnd.nextInt(_safe.length)]).join();
}
/// See https://developers.google.com/identity/protocols/oauth2/openid-connect#createxsrftoken
String randomState() {
final rnd = Random.secure();
final list = Uint32List(6);
for (var i = 0; i < list.length; i++) {
list[i] = rnd.nextInt(1 << 32);
}
final value = base64UrlEncode(Uint8List.view(list.buffer));
return _stripBase64Equals(value);
}
// https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
const _safe = '0123456789-._~'
'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
String _codeVerifierShaEncode(String codeVerifier) {
final asciiBytes = ascii.encode(codeVerifier);
final sha26Bytes = sha256.convert(asciiBytes).bytes;
final output = base64UrlEncode(sha26Bytes);
return _stripBase64Equals(output);
}
String _stripBase64Equals(String value) {
while (value.endsWith('=')) {
value = value.substring(0, value.length - 1);
}
return value;
}
/// Obtain oauth2 [AccessCredentials] by exchanging an authorization code.
///
/// Running a hybrid oauth2 flow as described in the
/// `googleapis_auth.auth_browser` library results in a `HybridFlowResult` which
/// contains short-lived [AccessCredentials] for the client and an authorization
/// code. This authorization code needs to be transferred to the server, which
/// can exchange it against long-lived [AccessCredentials].
///
/// {@macro googleapis_auth_client_for_creds}
///
/// {@macro googleapis_auth_clientId_param}
///
/// If the authorization code was obtained using the mentioned hybrid flow, the
/// [redirectUrl] must be `"postmessage"` (default).
///
/// If you obtained the authorization code using a different mechanism, the
/// [redirectUrl] must be the same that was used to obtain the code.
///
/// NOTE: Only the server application will know the `client secret` - which is
/// necessary to exchange an authorization code against access tokens.
///
/// NOTE: It is important to transmit the authorization code in a secure manner
/// to the server. You should use "anti-request forgery state tokens" to guard
/// against "cross site request forgery" attacks.
Future<AccessCredentials> obtainAccessCredentialsViaCodeExchange(
http.Client client,
ClientId clientId,
String code, {
String redirectUrl = 'postmessage',
String? codeVerifier,
}) async {
final jsonMap = await client.oauthTokenRequest(
{
'client_id': clientId.identifier,
'client_secret': clientId.secret ?? '',
'code': code,
if (codeVerifier != null) 'code_verifier': codeVerifier,
'grant_type': 'authorization_code',
'redirect_uri': redirectUrl,
},
);
final accessToken = parseAccessToken(jsonMap);
final idToken = jsonMap['id_token'] as String?;
final refreshToken = jsonMap['refresh_token'] as String?;
final scope = jsonMap['scope'];
if (scope is! String) {
throw ServerRequestFailedException(
'The response did not include a `scope` value of type `String`.',
responseContent: json,
);
}
final scopes = scope.split(' ').toList();
return AccessCredentials(
accessToken,
refreshToken,
scopes,
idToken: idToken,
);
}
List<String> parseScopes(Map<String, dynamic> json) {
final scope = json['scope'];
if (scope is! String) {
throw ServerRequestFailedException(
'The response did not include a `scope` value of type `String`.',
responseContent: json,
);
}
return scope.split(' ').toList();
}
| googleapis.dart/googleapis_auth/lib/src/oauth2_flows/auth_code.dart/0 | {'file_path': 'googleapis.dart/googleapis_auth/lib/src/oauth2_flows/auth_code.dart', 'repo_id': 'googleapis.dart', 'token_count': 1684} |
@TestOn('vm')
library googleapis_auth.adc_test;
import 'dart:convert';
import 'dart:io';
import 'package:googleapis_auth/src/adc_utils.dart'
show fromApplicationsCredentialsFile;
import 'package:googleapis_auth/src/known_uris.dart';
import 'package:http/http.dart';
import 'package:test/test.dart';
import 'test_utils.dart';
void main() {
test('fromApplicationsCredentialsFile', () async {
final tmp = await Directory.systemTemp.createTemp('googleapis_auth-test');
try {
final credsFile = File.fromUri(tmp.uri.resolve('creds.json'));
await credsFile.writeAsString(json.encode({
'client_id': 'id',
'client_secret': 'secret',
'refresh_token': 'refresh',
'type': 'authorized_user'
}));
final c = await fromApplicationsCredentialsFile(
credsFile,
'test-credentials-file',
[],
mockClient((Request request) async {
final url = request.url;
if (url == googleOauth2TokenEndpoint) {
expect(request.method, equals('POST'));
expect(
request.body,
equals('client_id=id&'
'client_secret=secret&'
'refresh_token=refresh&'
'grant_type=refresh_token'));
final body = jsonEncode({
'token_type': 'Bearer',
'access_token': 'atoken',
'expires_in': 3600,
});
return Response(body, 200, headers: jsonContentType);
}
if (url.toString() ==
'https://storage.googleapis.com/b/bucket/o/obj') {
expect(request.method, equals('GET'));
expect(request.headers['Authorization'], equals('Bearer atoken'));
expect(request.headers['X-Goog-User-Project'], isNull);
return Response('hello world', 200);
}
return Response('bad', 404);
}),
);
expect(c.credentials.accessToken.data, equals('atoken'));
final r =
await c.get(Uri.https('storage.googleapis.com', '/b/bucket/o/obj'));
expect(r.statusCode, equals(200));
expect(r.body, equals('hello world'));
c.close();
} finally {
await tmp.delete(recursive: true);
}
});
test('fromApplicationsCredentialsFile w. quota_project_id', () async {
final tmp = await Directory.systemTemp.createTemp('googleapis_auth-test');
try {
final credsFile = File.fromUri(tmp.uri.resolve('creds.json'));
await credsFile.writeAsString(json.encode({
'client_id': 'id',
'client_secret': 'secret',
'refresh_token': 'refresh',
'type': 'authorized_user',
'quota_project_id': 'project'
}));
final c = await fromApplicationsCredentialsFile(
credsFile,
'test-credentials-file',
[],
mockClient((Request request) async {
final url = request.url;
if (url == googleOauth2TokenEndpoint) {
expect(request.method, equals('POST'));
expect(
request.body,
equals(
'client_id=id&'
'client_secret=secret&'
'refresh_token=refresh&'
'grant_type=refresh_token',
),
);
final body = jsonEncode({
'token_type': 'Bearer',
'access_token': 'atoken',
'expires_in': 3600,
});
return Response(body, 200, headers: jsonContentType);
}
if (url.toString() ==
'https://storage.googleapis.com/b/bucket/o/obj') {
expect(request.method, equals('GET'));
expect(request.headers['Authorization'], equals('Bearer atoken'));
expect(request.headers['X-Goog-User-Project'], equals('project'));
return Response('hello world', 200);
}
return Response('bad', 404);
}),
);
expect(c.credentials.accessToken.data, equals('atoken'));
final r =
await c.get(Uri.https('storage.googleapis.com', '/b/bucket/o/obj'));
expect(r.statusCode, equals(200));
expect(r.body, equals('hello world'));
c.close();
} finally {
await tmp.delete(recursive: true);
}
});
}
| googleapis.dart/googleapis_auth/test/adc_test.dart/0 | {'file_path': 'googleapis.dart/googleapis_auth/test/adc_test.dart', 'repo_id': 'googleapis.dart', 'token_count': 2074} |
# Bucket used for storage_test.dart
storage_bucket: TODO
# Project name used for translate_test.dart
project_name: TODO
| googleapis.dart/test_integration/config.template.yaml/0 | {'file_path': 'googleapis.dart/test_integration/config.template.yaml', 'repo_id': 'googleapis.dart', 'token_count': 39} |
name: cicd
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
jobs:
# BEGIN LINTING STAGE
dartdoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- uses: flame-engine/flame-dartdoc-action@v2
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- uses: flame-engine/flame-format-action@v1
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- uses: flame-engine/flame-analyze-action@v2
# END LINTING STAGE
# BEGIN TESTING STAGE
test:
needs: [dartdoc, format, analyze]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- uses: flame-engine/flame-test-action@v1
# END TESTING STAGE
| gravitational_waves/.github/workflows/cicd.yml/0 | {'file_path': 'gravitational_waves/.github/workflows/cicd.yml', 'repo_id': 'gravitational_waves', 'token_count': 523} |
import 'dart:math' as math;
import 'dart:ui';
import 'package:flame/components.dart';
import '../game.dart';
import '../util.dart';
class Coin extends SpriteAnimationComponent with HasGameRef<MyGame> {
static const double SRC_SIZE = 16.0;
static const double SIZE = 12.0;
static Future<Sprite> loadSprite() async => Sprite.load(
'crystal.png',
srcPosition: Vector2(3 * SRC_SIZE, 0),
srcSize: Vector2.all(SRC_SIZE),
);
Coin(double x, double y) : super(size: Vector2.all(SIZE)) {
this.x = x - SIZE / 2;
this.y = y - SIZE / 2;
}
@override
Future<void> onLoad() async {
await super.onLoad();
animation = await SpriteAnimation.load(
'crystal.png',
SpriteAnimationData.sequenced(
amount: 8,
textureSize: Vector2.all(SRC_SIZE),
stepTime: 0.150,
),
);
}
@override
void update(double t) {
if (offscreen) {
removeFromParent();
}
super.update(t);
if (gameRef.player.toRect().overlaps(toRect())) {
gameRef.player.shine();
gameRef.collectCoin();
removeFromParent();
}
}
bool overlaps(double x, double y) {
final r = toRect().inflate(SIZE);
if (r.contains(Offset(x, y))) {
return true;
}
return (x - this.x).abs() < 4 * SIZE;
}
bool get offscreen => x < gameRef.camera.position.x - gameRef.size.x;
@override
int get priority => 4;
static int computeCoinLevel({
required double x,
required bool powerups,
}) {
final distance = (x / CHUNK_SIZE).clamp(1, double.infinity);
final distanceFactor = math.log(math.pow(distance / 20, 2));
final powerupFactor = powerups ? 0.6 : 1;
return (distanceFactor * powerupFactor).clamp(0, 12).floor();
}
}
| gravitational_waves/game/lib/game/components/coin.dart/0 | {'file_path': 'gravitational_waves/game/lib/game/components/coin.dart', 'repo_id': 'gravitational_waves', 'token_count': 720} |
import 'dart:async';
import 'dart:math' as math;
import 'package:json_annotation/json_annotation.dart';
import 'skin.dart';
import 'util.dart';
part 'game_data.g.dart';
@JsonSerializable()
class GameData {
static late GameData instance;
int coins;
Skin selectedSkin;
List<Skin> ownedSkins;
String? playerId;
int? highScore;
GameData()
: coins = 0,
highScore = null,
selectedSkin = Skin.ASTRONAUT,
ownedSkins = [Skin.ASTRONAUT],
playerId = null;
Future<bool> buyAndSetSkin(Skin skin) async {
final price = skinPrice(skin);
if (ownedSkins.contains(skin)) {
selectedSkin = skin;
} else if (coins >= price) {
coins -= price;
ownedSkins.add(skin);
selectedSkin = skin;
} else {
return false;
}
await save();
return true;
}
Future addCoins(int coins) async {
this.coins += coins;
await save();
}
Future changeSkin(Skin skin) async {
selectedSkin = skin;
await save();
}
Future addScore(int score) async {
highScore = math.max(highScore ?? 0, score);
await save();
}
Future setPlayerId(String playerId) async {
this.playerId = playerId;
await save();
}
bool isFirstTime() => highScore == null;
static Future<GameData> init() async {
return instance = await load();
}
Future<bool> save() => writePrefs('gravitational_waves.data', toJson());
static Future<GameData> load() async {
final json = await readPrefs('gravitational_waves.data');
if (json != null) {
return GameData.fromJson(json);
} else {
return GameData();
}
}
factory GameData.fromJson(Map<String, dynamic> json) =>
_$GameDataFromJson(json);
Map<String, dynamic> toJson() => _$GameDataToJson(this);
}
| gravitational_waves/game/lib/game/game_data.dart/0 | {'file_path': 'gravitational_waves/game/lib/game/game_data.dart', 'repo_id': 'gravitational_waves', 'token_count': 689} |
include: package:flame_lint/analysis_options.yaml
| heeve/analysis_options.yaml/0 | {'file_path': 'heeve/analysis_options.yaml', 'repo_id': 'heeve', 'token_count': 16} |
import 'dart:ui';
import 'package:flame/components.dart';
import 'package:flame/input.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'units/insects/butterfly.dart';
class CurrencyComponent extends TextComponent {
late final SpriteAnimationComponent currencyIndicator;
static const double _defaultFontSize = 16;
static const double iconWidth = 20;
final double fontSize;
CurrencyComponent({
int? value,
Vector2? position,
this.fontSize = _defaultFontSize,
}) : super(
text: value?.toString() ?? '0',
position: position,
anchor: Anchor.center,
);
@override
Future<void> onLoad() async {
await super.onLoad();
textRenderer = TextPaint(
style: TextStyle(
color: Colors.white70,
fontSize: fontSize,
shadows: const [
Shadow(color: Colors.red, offset: Offset(1, 1), blurRadius: 2),
Shadow(color: Colors.yellow, offset: Offset(2, 2), blurRadius: 4),
],
),
);
final scale = fontSize / _defaultFontSize;
currencyIndicator = Butterfly(
position: Vector2(-12 * scale, 9 * scale),
size: Vector2.all(iconWidth),
playing: false,
loop: false,
);
currencyIndicator.size.scale(fontSize / _defaultFontSize);
add(currencyIndicator);
currencyIndicator.animation?.onComplete = () {
currencyIndicator.animation?.reset();
currencyIndicator.playing = false;
};
}
}
| heeve/lib/currency_component.dart/0 | {'file_path': 'heeve/lib/currency_component.dart', 'repo_id': 'heeve', 'token_count': 578} |
import 'package:flame/components.dart';
import 'package:flame/input.dart';
import '../heeve_game.dart';
class StoryBox extends NineTileBoxComponent with HasGameRef<HeeveGame> {
@override
bool isHud = true;
@override
int get priority => 6;
StoryBox({Vector2? size})
: super(size: size ?? Vector2(300, 400), anchor: Anchor.center);
@override
void onGameResize(Vector2 gameSize) {
super.onGameResize(gameSize);
final canvasSize = gameRef.size;
position = canvasSize / 2;
}
@override
Future<void> onLoad() async {
await super.onLoad();
final nineTileBoxSprite = await gameRef.loadSprite('nine-box.png');
nineTileBox = NineTileBox(
nineTileBoxSprite,
tileSize: 8,
destTileSize: 32,
);
}
}
| heeve/lib/story_boxes/story_box.dart/0 | {'file_path': 'heeve/lib/story_boxes/story_box.dart', 'repo_id': 'heeve', 'token_count': 291} |
name: deploy_example_dev
on:
push:
branches:
- main
jobs:
deploy-dev:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/tensorflow_models/tensorflow_models/example
name: Deploy Example Development
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
- run: flutter packages get
- run: flutter build web --web-renderer canvaskit
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PHOTOBOOTH_DEV }}"
projectId: io-photobooth-dev
target: example_dev
expires: 30d
channelId: live
entryPoint: packages/tensorflow_models/tensorflow_models/example
| holobooth/.github/workflows/deploy_example_dev.yaml/0 | {'file_path': 'holobooth/.github/workflows/deploy_example_dev.yaml', 'repo_id': 'holobooth', 'token_count': 366} |
export 'animoji_intro_background.dart';
export 'animoji_intro_body.dart';
export 'animoji_next_button.dart';
| holobooth/lib/animoji_intro/widgets/widgets.dart/0 | {'file_path': 'holobooth/lib/animoji_intro/widgets/widgets.dart', 'repo_id': 'holobooth', 'token_count': 41} |
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:holobooth/avatar_detector/avatar_detector.dart';
class CameraStreamListener extends StatefulWidget {
const CameraStreamListener({
required this.cameraController,
super.key,
});
final CameraController cameraController;
@override
State<CameraStreamListener> createState() => _CameraStreamListenerState();
}
class _CameraStreamListenerState extends State<CameraStreamListener> {
@override
void initState() {
super.initState();
widget.cameraController.startImageStream((image) {
context
.read<AvatarDetectorBloc>()
.add(AvatarDetectorEstimateRequested(image));
});
}
@override
Widget build(BuildContext context) {
return const SizedBox();
}
}
| holobooth/lib/avatar_detector/widgets/camera_stream_listener.dart/0 | {'file_path': 'holobooth/lib/avatar_detector/widgets/camera_stream_listener.dart', 'repo_id': 'holobooth', 'token_count': 285} |
export 'convert_page.dart';
| holobooth/lib/convert/view/view.dart/0 | {'file_path': 'holobooth/lib/convert/view/view.dart', 'repo_id': 'holobooth', 'token_count': 11} |
part of 'in_experience_selection_bloc.dart';
class InExperienceSelectionState extends Equatable {
const InExperienceSelectionState({
this.hat = Hats.none,
this.background = Background.bg0,
this.character = Character.dash,
this.glasses = Glasses.none,
this.clothes = Clothes.none,
this.handheldlLeft = HandheldlLeft.none,
});
final Hats hat;
final Background background;
final Character character;
final Glasses glasses;
final Clothes clothes;
final HandheldlLeft handheldlLeft;
@override
List<Object?> get props => [
hat,
background,
character,
glasses,
clothes,
handheldlLeft,
];
InExperienceSelectionState copyWith({
Hats? hat,
Background? background,
Character? character,
Glasses? glasses,
Clothes? clothes,
HandheldlLeft? handheldlLeft,
}) {
return InExperienceSelectionState(
hat: hat ?? this.hat,
background: background ?? this.background,
character: character ?? this.character,
glasses: glasses ?? this.glasses,
clothes: clothes ?? this.clothes,
handheldlLeft: handheldlLeft ?? this.handheldlLeft,
);
}
}
| holobooth/lib/in_experience_selection/bloc/in_experience_selection_state.dart/0 | {'file_path': 'holobooth/lib/in_experience_selection/bloc/in_experience_selection_state.dart', 'repo_id': 'holobooth', 'token_count': 435} |
import 'package:flutter/material.dart';
import 'package:holobooth/assets/assets.dart';
import 'package:holobooth/audio_player/audio_player.dart';
import 'package:holobooth/l10n/l10n.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
class NextButton extends StatefulWidget {
const NextButton({required this.onNextPressed, super.key});
final VoidCallback onNextPressed;
@override
State<NextButton> createState() => _NextButtonState();
}
class _NextButtonState extends State<NextButton> {
final _audioPlayerController = AudioPlayerController();
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return AudioPlayer(
audioAssetPath: Assets.audio.buttonPress,
controller: _audioPlayerController,
child: GradientElevatedButton(
onPressed: () {
_audioPlayerController.playAudio();
widget.onNextPressed();
},
child: Text(l10n.nextButtonText),
),
);
}
}
| holobooth/lib/in_experience_selection/widgets/next_button.dart/0 | {'file_path': 'holobooth/lib/in_experience_selection/widgets/next_button.dart', 'repo_id': 'holobooth', 'token_count': 355} |
import 'package:flutter/material.dart';
import 'package:holobooth/assets/assets.dart';
import 'package:holobooth/footer/footer.dart';
import 'package:holobooth/l10n/l10n.dart';
import 'package:holobooth/landing/landing.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
class LandingBody extends StatelessWidget {
const LandingBody({super.key});
@visibleForTesting
static const landingPageImageKey = Key('landingPage_image');
@override
Widget build(BuildContext context) {
return ResponsiveLayoutBuilder(
small: (context, _) => const _SmallLandingBody(),
large: (context, _) => const _LargeLandingBody(),
);
}
}
class _SmallLandingBody extends StatelessWidget {
const _SmallLandingBody();
@override
Widget build(BuildContext context) {
return CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 32),
child: Column(
children: const [
SizedBox(height: 46),
_LandingBodyContent(smallScreen: true),
SizedBox(height: 34),
],
),
),
),
SliverFillRemaining(
hasScrollBody: false,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Transform.translate(
offset: const Offset(0, 10),
child: Assets.backgrounds.holobooth.image(
key: LandingBody.landingPageImageKey,
),
),
),
FullFooter(
showIconsForSmall: false,
footerDecoration: true,
),
],
),
),
],
);
}
}
class _LargeLandingBody extends StatelessWidget {
const _LargeLandingBody();
@override
Widget build(BuildContext context) {
return Align(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
flex: 7,
child: Row(
children: [
Expanded(
child: Transform.translate(
offset: const Offset(0, 10),
child: Container(
alignment: Alignment.bottomCenter,
child: Assets.backgrounds.holobooth.image(
key: LandingBody.landingPageImageKey,
),
),
),
),
const SizedBox(width: 32),
const Expanded(
child: _LandingBodyContent(smallScreen: false),
),
],
),
),
Expanded(
flex: 3,
child: FullFooter(
showIconsForSmall: false,
footerDecoration: true,
),
),
],
),
);
}
}
class _LandingBodyContent extends StatelessWidget {
const _LandingBodyContent({required this.smallScreen});
final bool smallScreen;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final l10n = context.l10n;
return Column(
mainAxisAlignment:
smallScreen ? MainAxisAlignment.start : MainAxisAlignment.center,
crossAxisAlignment:
smallScreen ? CrossAxisAlignment.center : CrossAxisAlignment.start,
children: [
Assets.images.flutterForwardLogo.image(width: 300),
const SizedBox(height: 32),
GradientText(
text: l10n.landingPageHeading,
style: theme.textTheme.headlineLarge,
textAlign: smallScreen ? TextAlign.center : TextAlign.left,
),
const SizedBox(height: 16),
SelectableText(
l10n.landingPageSubheading,
key: const Key('landingPage_subheading_text'),
style: theme.textTheme.titleSmall?.copyWith(
color: HoloBoothColors.white,
),
textAlign: smallScreen ? TextAlign.center : TextAlign.left,
),
const SizedBox(height: 24),
const LandingTakePhotoButton(),
],
);
}
}
| holobooth/lib/landing/widgets/landing_body.dart/0 | {'file_path': 'holobooth/lib/landing/widgets/landing_body.dart', 'repo_id': 'holobooth', 'token_count': 2153} |
import 'dart:async';
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
class RecordingCountdown extends StatefulWidget {
const RecordingCountdown({
required this.onCountdownCompleted,
super.key,
});
final VoidCallback onCountdownCompleted;
static const shutterCountdownDuration = Duration(seconds: 5);
@override
State<RecordingCountdown> createState() => _RecordingCountdownState();
}
class _RecordingCountdownState extends State<RecordingCountdown>
with TickerProviderStateMixin {
late final AnimationController controller;
@override
void initState() {
super.initState();
_init();
}
Future<void> _onAnimationStatusChanged(AnimationStatus status) async {
if (status == AnimationStatus.dismissed) {
widget.onCountdownCompleted();
}
}
Future<void> _init() async {
controller = AnimationController(
vsync: this,
duration: RecordingCountdown.shutterCountdownDuration,
)..addStatusListener(_onAnimationStatusChanged);
unawaited(controller.reverse(from: 1));
}
@override
void dispose() {
controller
..removeStatusListener(_onAnimationStatusChanged)
..dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AnimatedBuilder(
animation: controller,
builder: (context, child) {
return CountdownTimer(controller: controller);
},
);
}
}
@visibleForTesting
class CountdownTimer extends StatelessWidget {
const CountdownTimer({required this.controller, super.key});
final AnimationController controller;
@override
Widget build(BuildContext context) {
return Container(
height: 100,
width: 100,
margin: const EdgeInsets.only(bottom: 15),
child: Stack(
children: [
Align(
child: ShaderMask(
shaderCallback: (bounds) {
return HoloBoothGradients.secondaryThree
.createShader(Offset.zero & bounds.size);
},
child: const Icon(
Icons.videocam,
color: HoloBoothColors.white,
size: 40,
),
),
),
Positioned.fill(
child: CustomPaint(
painter: TimerPainter(
animation: controller,
controllerValue: controller.value,
),
),
)
],
),
);
}
}
@visibleForTesting
class TimerPainter extends CustomPainter {
const TimerPainter({
required this.animation,
required this.controllerValue,
}) : super(repaint: animation);
final Animation<double> animation;
final double controllerValue;
@override
void paint(Canvas canvas, Size size) {
final progress =
Tween<double>(begin: 0, end: math.pi * 2).evaluate(animation);
final rect = Rect.fromCircle(center: Offset.zero, radius: size.width);
final paint = Paint()
..strokeWidth = 5.0
..strokeCap = StrokeCap.round
..style = PaintingStyle.stroke
..shader = HoloBoothGradients.secondaryFour.createShader(rect);
canvas.drawArc(Offset.zero & size, math.pi * 1.5, progress, false, paint);
}
@override
bool shouldRepaint(TimerPainter oldDelegate) => false;
}
| holobooth/lib/photo_booth/widgets/recording_countdown.dart/0 | {'file_path': 'holobooth/lib/photo_booth/widgets/recording_countdown.dart', 'repo_id': 'holobooth', 'token_count': 1308} |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:holobooth/assets/assets.dart';
import 'package:holobooth/convert/convert.dart';
import 'package:holobooth/share/share.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
class PlayButton extends StatelessWidget {
const PlayButton({super.key});
@override
Widget build(BuildContext context) {
return Material(
color: HoloBoothColors.transparent,
shape: const CircleBorder(),
clipBehavior: Clip.hardEdge,
child: InkWell(
onTap: () {
final videoPath = context.read<ConvertBloc>().state.videoPath;
showDialog<void>(
context: context,
builder: (_) => VideoDialog(videoPath: videoPath),
);
},
child: SizedBox.square(
dimension: 100,
child: Assets.icons.playIcon.image(),
),
),
);
}
}
| holobooth/lib/share/widgets/play_button.dart/0 | {'file_path': 'holobooth/lib/share/widgets/play_button.dart', 'repo_id': 'holobooth', 'token_count': 397} |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:holobooth/convert/convert.dart';
import 'package:holobooth/share/share.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
class VideoDialogLauncher extends StatelessWidget {
const VideoDialogLauncher({
required this.convertBloc,
super.key,
});
final ConvertBloc convertBloc;
@override
Widget build(BuildContext context) {
return BlocBuilder<ConvertBloc, ConvertState>(
bloc: convertBloc,
builder: (_, state) {
if (state.status == ConvertStatus.videoCreated) {
return VideoDialog(videoPath: state.videoPath);
}
return const Center(
child: SizedBox.square(
dimension: 96,
child: CircularProgressIndicator(
color: HoloBoothColors.convertLoading,
),
),
);
},
);
}
}
class VideoDialog extends StatefulWidget {
const VideoDialog({required this.videoPath, super.key});
final String videoPath;
@override
State<VideoDialog> createState() => _VideoDialogState();
}
class _VideoDialogState extends State<VideoDialog> {
bool videoInitialized = false;
@override
Widget build(BuildContext context) {
return AnimatedScale(
scale: videoInitialized ? 1 : 0,
duration: const Duration(milliseconds: 400),
child: VideoPlayerView(
url: widget.videoPath,
onInitialized: () {
setState(() {
videoInitialized = true;
});
},
),
);
}
}
| holobooth/lib/share/widgets/video_dialog.dart/0 | {'file_path': 'holobooth/lib/share/widgets/video_dialog.dart', 'repo_id': 'holobooth', 'token_count': 635} |
import 'package:analytics_repository/analytics_repository.dart';
import 'package:firebase_analytics_client/firebase_analytics_client.dart';
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
class _MockFirebaseAnalyticsClient extends Mock
implements FirebaseAnalyticsClient {}
void main() {
group('AnalyticsRepository', () {
late FirebaseAnalyticsClient firebaseAnalyticsClient;
late AnalyticsRepository analyticsRepository;
setUp(() {
firebaseAnalyticsClient = _MockFirebaseAnalyticsClient();
analyticsRepository = AnalyticsRepository(firebaseAnalyticsClient);
});
group('trackEvent', () {
test('tracks event successfully', () {
when(
() => firebaseAnalyticsClient.trackEvent(
category: any(named: 'category'),
action: any(named: 'action'),
label: any(named: 'label'),
),
);
const event = AnalyticsEvent(
category: 'category',
action: 'action',
label: 'label',
);
analyticsRepository.trackEvent(event);
verify(
() => firebaseAnalyticsClient.trackEvent(
category: event.category,
action: event.action,
label: event.label,
),
).called(1);
});
});
});
}
| holobooth/packages/analytics_repository/test/src/analytics_repository_test.dart/0 | {'file_path': 'holobooth/packages/analytics_repository/test/src/analytics_repository_test.dart', 'repo_id': 'holobooth', 'token_count': 548} |
export 'avatar.dart';
| holobooth/packages/avatar_detector_repository/lib/src/model/model.dart/0 | {'file_path': 'holobooth/packages/avatar_detector_repository/lib/src/model/model.dart', 'repo_id': 'holobooth', 'token_count': 9} |
import 'package:equatable/equatable.dart';
import 'package:face_geometry/face_geometry.dart';
import 'package:tensorflow_models_platform_interface/tensorflow_models_platform_interface.dart'
as tf;
class _MouthKeypoints {
_MouthKeypoints({
required this.topLip,
required this.bottomLip,
}) : distance = topLip.distanceTo(bottomLip);
/// The highest lip keypoint when facing straight to the camera.
final tf.Keypoint topLip;
/// The lowest lip keypoint when facing straight to the camera.
final tf.Keypoint bottomLip;
/// The distance between the top and bottom lip.
///
/// Unlike [MouthGeometry.distance] this value is not a ratio but the actual
/// distance between the [topLip] and [bottomLip].
final double distance;
}
/// {@template mouth_geometry}
/// A class that represents the geometry of the mouth.
/// {@endtemplate}
class MouthGeometry extends Equatable {
/// {@macro mouth_geometry}
factory MouthGeometry({
required List<tf.Keypoint> keypoints,
required tf.BoundingBox boundingBox,
}) {
final hasEnoughKeypoints = keypoints.length > 15;
if (!hasEnoughKeypoints) return const MouthGeometry._empty();
final mouthKeypoints = _MouthKeypoints(
topLip: keypoints[13],
bottomLip: keypoints[14],
);
final canComputeRatio =
boundingBox.height > 0 && boundingBox.height > mouthKeypoints.distance;
if (!canComputeRatio) return const MouthGeometry._empty();
final distance = mouthKeypoints.distance / boundingBox.height;
return MouthGeometry._(
distance: distance,
isOpen: _isOpen(mouthKeypoints: mouthKeypoints, distance: distance),
);
}
/// {@macro mouth_geometry}
const MouthGeometry._({
required this.distance,
required this.isOpen,
});
/// An empty instance of [MouthGeometry].
///
/// This is the default value of [MouthGeometry] whenever there is not enough
/// data to compute the geometry. Like for example, when there are not enough
/// keypoints or the bounding box is too small.
const MouthGeometry._empty()
: isOpen = false,
distance = 0;
/// Eye-balled distance that represents the minimum height of the mouth to be
/// considered open.
///
/// This value considers the distance to be a ratio of the face height.
static const _minMouthOpenedDistance = 0.02;
static bool _isOpen({
required _MouthKeypoints mouthKeypoints,
required num distance,
}) {
if (mouthKeypoints.distance > 1) {
if (distance == 0) {
return false;
} else {
return distance > _minMouthOpenedDistance;
}
}
return false;
}
/// Defines if the mouth is open.
final bool isOpen;
/// The distance between the top and bottom lip.
///
/// To avoid uncorrelated distances due to how close the face is to the camera
/// the distance is given as a ratio of the face height. Therefore the value
/// is between 0 and 1.
final double distance;
@override
List<Object?> get props => [isOpen, distance];
}
| holobooth/packages/face_geometry/lib/src/models/mouth_geometry.dart/0 | {'file_path': 'holobooth/packages/face_geometry/lib/src/models/mouth_geometry.dart', 'repo_id': 'holobooth', 'token_count': 978} |
import 'dart:collection';
import 'package:tensorflow_models_platform_interface/tensorflow_models_platform_interface.dart';
final face4 = Face(
UnmodifiableListView(const [
Keypoint(
213.14165127277374,
500.3723920583725,
-42.23963409662247,
null,
'lips',
),
Keypoint(
207.94655787944794,
480.46118009090424,
-89.09968167543411,
null,
null,
),
Keypoint(
207.59662640094757,
486.16681838035583,
-46.54630959033966,
null,
null,
),
Keypoint(
199.93869602680206,
455.8469030857086,
-69.81946438550949,
null,
null,
),
Keypoint(
207.56958496570587,
473.0364879369736,
-95.20316898822784,
null,
null,
),
Keypoint(
206.6446658372879,
462.9868197441101,
-89.27080929279327,
null,
null,
),
Keypoint(
204.15347361564636,
438.81396746635437,
-46.3751819729805,
null,
null,
),
Keypoint(
154.68722665309906,
436.290048122406,
11.087546981871128,
null,
'rightEye',
),
Keypoint(
202.84942591190338,
420.298291683197,
-35.36606848239899,
null,
null,
),
Keypoint(
202.37745082378387,
410.6552120447159,
-39.18788641691208,
null,
null,
),
Keypoint(
200.68019258975983,
376.83662313222885,
-24.043223038315773,
null,
'faceOval',
),
Keypoint(
213.50801169872284,
502.63551700115204,
-39.47309911251068,
null,
null,
),
Keypoint(
213.60289907455444,
504.8086220026016,
-34.168187230825424,
null,
null,
),
Keypoint(
213.51565217971802,
506.3482264280319,
-26.5815918892622,
null,
'lips',
),
Keypoint(
213.24494445323944,
506.6204663515091,
-26.4104662835598,
null,
'lips',
),
Keypoint(
214.06472086906433,
509.5165014266968,
-29.07718487083912,
null,
null,
),
Keypoint(
214.61432528495789,
512.9564259052277,
-33.59776385128498,
null,
null,
),
Keypoint(
214.7120316028595,
516.487869143486,
-32.62805074453354,
null,
'lips',
),
Keypoint(
210.1262378692627,
528.9938281774521,
-19.38003569841385,
null,
null,
),
Keypoint(
207.86322689056396,
483.90242171287537,
-80.31520307064056,
null,
null,
),
Keypoint(
200.1762524843216,
483.3749738931656,
-58.63922327756882,
null,
null,
),
Keypoint(
128.41168904304504,
410.53630578517914,
81.39899522066116,
null,
'faceOval',
),
Keypoint(
174.68223786354065,
441.95367407798767,
-2.351201791316271,
null,
null,
),
Keypoint(
167.72142803668976,
442.78306567668915,
-2.213944438844919,
null,
null,
),
Keypoint(
161.1202437877655,
442.61556136608124,
1.236208090558648,
null,
null,
),
Keypoint(
152.20546066761017,
438.64959704875946,
13.383491076529026,
null,
null,
),
Keypoint(
180.55556106567383,
439.9493451118469,
0.7602635538205504,
null,
null,
),
Keypoint(
162.25021862983704,
420.51793670654297,
-11.037635765969753,
null,
null,
),
Keypoint(
170.48002433776855,
421.18014192581177,
-9.069685265421867,
null,
null,
),
Keypoint(
154.92940056324005,
422.16304886341095,
-6.7238314636051655,
null,
null,
),
Keypoint(
150.50543451309204,
425.43215346336365,
-0.4351684113498777,
null,
null,
),
Keypoint(
147.01534187793732,
443.09749960899353,
21.405027732253075,
null,
null,
),
Keypoint(
183.6601984500885,
542.4505376815796,
1.4715065527707338,
null,
null,
),
Keypoint(
152.19613647460938,
434.1218937635422,
15.971773155033588,
null,
'rightEye',
),
Keypoint(
127.70538461208344,
440.78296065330505,
90.01234620809555,
null,
null,
),
Keypoint(
139.27288150787354,
437.5896599292755,
36.13613873720169,
null,
null,
),
Keypoint(
170.8554538488388,
471.75399899482727,
-16.45662970840931,
null,
null,
),
Keypoint(
203.82911670207977,
500.8444290161133,
-42.18259155750275,
null,
'lips',
),
Keypoint(
205.37730264663696,
506.18394684791565,
-32.91325941681862,
null,
null,
),
Keypoint(
195.06526815891266,
504.30361104011536,
-33.48368279635906,
null,
'lips',
),
Keypoint(
189.2844215631485,
507.3038367033005,
-20.820345729589462,
null,
'lips',
),
Keypoint(
198.056471824646,
507.8290135860443,
-26.909586489200592,
null,
null,
),
Keypoint(
192.36285936832428,
509.28968024253845,
-15.558217763900757,
null,
null,
),
Keypoint(
176.1890708208084,
515.0280200242996,
4.192590415477753,
null,
null,
),
Keypoint(
201.88810288906097,
480.38310527801514,
-88.52925628423691,
null,
null,
),
Keypoint(
200.7883073091507,
473.23160684108734,
-94.23346191644669,
null,
null,
),
Keypoint(
140.09187984466553,
418.16401970386505,
2.183640841394663,
null,
'rightEyebrow',
),
Keypoint(
183.83984541893005,
454.06907737255096,
-18.039546087384224,
null,
null,
),
Keypoint(
183.43418562412262,
476.617937207222,
-50.56777238845825,
null,
null,
),
Keypoint(
182.70242142677307,
472.5445121526718,
-45.80476060509682,
null,
null,
),
Keypoint(
150.55366265773773,
470.7998421192169,
2.1551198232918978,
null,
null,
),
Keypoint(
200.31698274612427,
463.9054591655731,
-85.27786374092102,
null,
null,
),
Keypoint(
154.36075234413147,
409.48663330078125,
-23.1162878125906,
null,
'rightEyebrow',
),
Keypoint(
145.46034455299377,
412.49330842494965,
-11.90039612352848,
null,
'rightEyebrow',
),
Keypoint(
134.1730453968048,
398.07317662239075,
49.74066361784935,
null,
'faceOval',
),
Keypoint(
186.29203164577484,
415.3972463607788,
-32.42840386927128,
null,
null,
),
Keypoint(
177.90125286579132,
424.3794833421707,
-2.96796896494925,
null,
null,
),
Keypoint(
170.11662316322327,
508.1583902835846,
7.062518019229174,
null,
null,
),
Keypoint(
136.56651854515076,
506.50714659690857,
140.09526908397675,
null,
'faceOval',
),
Keypoint(
188.59644663333893,
480.5916681289673,
-43.23787048459053,
null,
null,
),
Keypoint(
194.84041607379913,
482.93318581581116,
-43.15231069922447,
null,
null,
),
Keypoint(
182.51264667510986,
512.117178440094,
7.126690372824669,
null,
'lips',
),
Keypoint(
184.32071101665497,
511.9323695898056,
3.2817004155367613,
null,
null,
),
Keypoint(
141.51719307899475,
407.747322678566,
-4.976918790489435,
null,
'rightEyebrow',
),
Keypoint(
182.89687740802765,
479.1545737981796,
-41.098795384168625,
null,
null,
),
Keypoint(
167.382364153862,
409.8671969175339,
-30.460452362895012,
null,
'rightEyebrow',
),
Keypoint(
165.65241384506226,
404.0753084421158,
-34.824168384075165,
null,
'rightEyebrow',
),
Keypoint(
161.2650557756424,
381.21937251091003,
-9.312114045023918,
null,
'faceOval',
),
Keypoint(
139.3405361175537,
404.5824086666107,
18.453102484345436,
null,
null,
),
Keypoint(
165.72222411632538,
394.06887888908386,
-23.05924728512764,
null,
null,
),
Keypoint(
136.151904463768,
414.9575021266937,
15.059100575745106,
null,
'rightEyebrow',
),
Keypoint(
133.43887042999268,
414.7820041179657,
46.34666472673416,
null,
null,
),
Keypoint(
204.55847012996674,
503.74064576625824,
-39.18788641691208,
null,
null,
),
Keypoint(
196.51593911647797,
506.20225059986115,
-30.603056699037552,
null,
null,
),
Keypoint(
190.8236404657364,
508.2967357635498,
-19.33725379407406,
null,
null,
),
Keypoint(
190.22645843029022,
481.7655154466629,
-39.01675879955292,
null,
null,
),
Keypoint(
183.4166852235794,
512.0247967243195,
5.180130824446678,
null,
null,
),
Keypoint(
187.12529051303864,
512.6509848833084,
-4.82718313112855,
null,
null,
),
Keypoint(
185.40540421009064,
511.7490141391754,
2.7754521556198597,
null,
'lips',
),
Keypoint(
192.7534295320511,
479.4058756828308,
-66.22581660747528,
null,
null,
),
Keypoint(
193.63008224964142,
509.9209098815918,
-12.677595689892769,
null,
'lips',
),
Keypoint(
199.14358854293823,
508.82286643981934,
-20.10732203722,
null,
'lips',
),
Keypoint(
206.1036458015442,
507.63130581378937,
-25.725961849093437,
null,
'lips',
),
Keypoint(
200.36028730869293,
528.8329095840454,
-19.066303744912148,
null,
null,
),
Keypoint(
205.85253036022186,
517.4116863012314,
-32.25727826356888,
null,
'lips',
),
Keypoint(
205.93587410449982,
513.9704446792603,
-33.1414295732975,
null,
null,
),
Keypoint(
205.92878210544586,
510.5294301509857,
-28.250072076916695,
null,
null,
),
Keypoint(
205.92337381839752,
507.90331864356995,
-25.512054339051247,
null,
'lips',
),
Keypoint(
193.4494148492813,
510.01183819770813,
-12.342472784221172,
null,
'lips',
),
Keypoint(
192.54781258106232,
511.2814736366272,
-15.144663378596306,
null,
null,
),
Keypoint(
191.46666538715363,
513.1853363513947,
-17.854161858558655,
null,
null,
),
Keypoint(
190.47594118118286,
515.0890173912048,
-15.215965546667576,
null,
'lips',
),
Keypoint(
177.23683714866638,
496.91493594646454,
-17.825638577342033,
null,
null,
),
Keypoint(
128.21979689598083,
471.0270720720291,
159.48955535888672,
null,
'faceOval',
),
Keypoint(
207.6849957704544,
485.1705129146576,
-58.239929527044296,
null,
null,
),
Keypoint(
189.38210237026215,
510.8352345228195,
-3.4599565900862217,
null,
'lips',
),
Keypoint(
188.38914597034454,
511.65227222442627,
-5.033960323780775,
null,
null,
),
Keypoint(
197.64928138256073,
485.73456823825836,
-43.58012571930885,
null,
null,
),
Keypoint(
185.25585997104645,
483.04355335235596,
-28.064687848091125,
null,
null,
),
Keypoint(
196.2903344631195,
484.46965634822845,
-43.75124931335449,
null,
null,
),
Keypoint(
176.88537502288818,
457.97726905345917,
-12.955675050616264,
null,
null,
),
Keypoint(
166.22509276866913,
462.6175653934479,
-9.112467169761658,
null,
null,
),
Keypoint(
181.4422905445099,
475.354297041893,
-36.25021979212761,
null,
null,
),
Keypoint(
144.4603726863861,
387.9551078081131,
17.668773606419563,
null,
'faceOval',
),
Keypoint(
149.452782869339,
397.27189922332764,
-4.04642041772604,
null,
null,
),
Keypoint(
151.45568585395813,
403.8782365322113,
-21.262423396110535,
null,
'rightEyebrow',
),
Keypoint(
182.43957102298737,
520.538902759552,
-4.670317657291889,
null,
null,
),
Keypoint(
183.1075837612152,
405.85031819343567,
-39.87238883972168,
null,
'rightEyebrow',
),
Keypoint(
182.6303917169571,
393.67173743247986,
-32.37136334180832,
null,
null,
),
Keypoint(
179.43316292762756,
377.92188119888306,
-23.31593669950962,
null,
'faceOval',
),
Keypoint(
155.4210444688797,
441.35959696769714,
7.394075263291597,
null,
null,
),
Keypoint(
140.2891547679901,
448.091880440712,
29.80447120964527,
null,
null,
),
Keypoint(
184.2587708234787,
437.94951260089874,
3.294178219512105,
null,
null,
),
Keypoint(
144.4987154006958,
428.52339828014374,
12.791678756475449,
null,
null,
),
Keypoint(
188.6230798959732,
449.62203776836395,
-23.686711192131042,
null,
null,
),
Keypoint(
188.31323862075806,
474.79678201675415,
-66.51102527976036,
null,
null,
),
Keypoint(
134.0169448852539,
453.9908663034439,
47.0026458799839,
null,
null,
),
Keypoint(
144.8659176826477,
453.1534810066223,
16.04307532310486,
null,
null,
),
Keypoint(
153.4610378742218,
455.58065843582153,
2.6916716806590557,
null,
null,
),
Keypoint(
166.6596690416336,
454.104549407959,
-2.820016136392951,
null,
null,
),
Keypoint(
176.32829594612122,
450.91515469551086,
-5.344126615673304,
null,
null,
),
Keypoint(
183.4645562171936,
447.4593790769577,
-8.905689977109432,
null,
null,
),
Keypoint(
197.64681959152222,
440.6384836435318,
-40.728022903203964,
null,
null,
),
Keypoint(
135.44832968711853,
468.47662818431854,
43.92237290740013,
null,
null,
),
Keypoint(
139.25142693519592,
427.1759605407715,
19.080564379692078,
null,
null,
),
Keypoint(
204.15573132038116,
483.81948709487915,
-80.08703291416168,
null,
null,
),
Keypoint(
184.48753881454468,
461.22152960300446,
-24.913113713264465,
null,
null,
),
Keypoint(
125.21655213832855,
439.70144963264465,
143.5177892446518,
null,
'faceOval',
),
Keypoint(
188.70119392871857,
443.64524960517883,
-10.802337303757668,
null,
null,
),
Keypoint(
180.62848365306854,
475.3559775352478,
-19.251689985394478,
null,
null,
),
Keypoint(
149.12198448181152,
434.2188173532486,
18.781093060970306,
null,
null,
),
Keypoint(
187.57961213588715,
469.8177981376648,
-60.5216109752655,
null,
null,
),
Keypoint(
131.41999769210815,
488.2258315086365,
154.01351988315582,
null,
'faceOval',
),
Keypoint(
184.2535411119461,
435.4140114784241,
7.098170109093189,
null,
'rightEye',
),
Keypoint(
193.99210584163666,
466.1823914051056,
-76.20817244052887,
null,
null,
),
Keypoint(
151.65945327281952,
524.7680232524872,
58.98147448897362,
null,
null,
),
Keypoint(
151.99345326423645,
533.2794041633606,
87.44545608758926,
null,
'faceOval',
),
Keypoint(
129.62003302574158,
470.39030134677887,
101.19258731603622,
null,
null,
),
Keypoint(
142.9130413532257,
514.7345241308212,
76.72155529260635,
null,
null,
),
Keypoint(
130.38914501667023,
426.7414848804474,
72.55748212337494,
null,
null,
),
Keypoint(
182.23096930980682,
550.9656429290771,
11.187371425330639,
null,
null,
),
Keypoint(
204.61028254032135,
484.995787024498,
-57.555427104234695,
null,
null,
),
Keypoint(
178.43951773643494,
466.214502453804,
-19.094825014472008,
null,
null,
),
Keypoint(
134.16646361351013,
438.7774053812027,
51.451923698186874,
null,
null,
),
Keypoint(
161.38329827785492,
438.6306574344635,
2.575804777443409,
null,
'rightEye',
),
Keypoint(
167.3520828485489,
439.07108294963837,
-0.5681922635994852,
null,
'rightEye',
),
Keypoint(
185.861243724823,
513.5591325759888,
-2.240682877600193,
null,
'lips',
),
Keypoint(
136.74371647834778,
482.7815326452255,
51.166715025901794,
null,
null,
),
Keypoint(
195.72585725784302,
561.6231955289841,
16.28550410270691,
null,
'faceOval',
),
Keypoint(
172.91787350177765,
551.1659849882126,
46.66039064526558,
null,
'faceOval',
),
Keypoint(
163.13699913024902,
543.7607320547104,
64.79976519942284,
null,
'faceOval',
),
Keypoint(
201.52868139743805,
393.67800521850586,
-32.94178269803524,
null,
null,
),
Keypoint(
211.00866878032684,
562.3160583972931,
13.661570437252522,
null,
'faceOval',
),
Keypoint(
173.13761067390442,
438.3347089290619,
-0.2580261288676411,
null,
'rightEye',
),
Keypoint(
178.74096596240997,
436.9647889137268,
2.841406837105751,
null,
'rightEye',
),
Keypoint(
182.44658648967743,
436.14216470718384,
6.670354586094618,
null,
'rightEye',
),
Keypoint(
134.8175754547119,
425.64566695690155,
34.681566059589386,
null,
null,
),
Keypoint(
177.37121522426605,
430.4476994276047,
-0.45678199734538794,
null,
'rightEye',
),
Keypoint(
171.03756260871887,
428.4686232805252,
-4.427888877689838,
null,
'rightEye',
),
Keypoint(
164.70766007900238,
428.30057394504547,
-4.7416203282773495,
null,
'rightEye',
),
Keypoint(
158.92325472831726,
429.5802923440933,
-1.6158942226320505,
null,
'rightEye',
),
Keypoint(
155.4007123708725,
431.48919653892517,
3.36548063904047,
null,
'rightEye',
),
Keypoint(
125.77109289169312,
423.5816123485565,
115.79535663127899,
null,
'faceOval',
),
Keypoint(
157.4025056362152,
437.55218946933746,
7.001911327242851,
null,
'rightEye',
),
Keypoint(
208.0586267709732,
490.96526277065277,
-41.726255267858505,
null,
null,
),
Keypoint(
183.829998254776,
493.188600897789,
-27.850778326392174,
null,
null,
),
Keypoint(
188.68518590927124,
479.7764925956726,
-49.36989113688469,
null,
null,
),
Keypoint(
197.7512607574463,
491.3487331867218,
-41.754776537418365,
null,
null,
),
Keypoint(
203.2300341129303,
429.48877358436584,
-34.738604575395584,
null,
null,
),
Keypoint(
161.67197835445404,
534.8894076347351,
45.034694373607635,
null,
null,
),
Keypoint(
171.3642920255661,
543.2004010677338,
29.16274666786194,
null,
null,
),
Keypoint(
195.53345489501953,
556.0092122554779,
-3.5330418404191732,
null,
null,
),
Keypoint(
143.6959674358368,
521.7055739164352,
115.05380362272263,
null,
'faceOval',
),
Keypoint(
181.9888846874237,
433.4264874458313,
3.992943288758397,
null,
'rightEye',
),
Keypoint(
193.78235614299774,
452.1468654870987,
-45.8903244137764,
null,
null,
),
Keypoint(
210.9974822998047,
556.8827962875366,
-5.422559604048729,
null,
null,
),
Keypoint(
183.5103098154068,
557.4829140901566,
27.865038961172104,
null,
'faceOval',
),
Keypoint(
132.22931468486786,
486.0508189201355,
100.62216997146606,
null,
null,
),
Keypoint(
199.05353546142578,
509.0041780471802,
-19.86489325761795,
null,
'lips',
),
Keypoint(
198.4248731136322,
511.0882169008255,
-22.88812167942524,
null,
null,
),
Keypoint(
197.88774347305298,
513.7154184579849,
-26.36768437922001,
null,
null,
),
Keypoint(
197.53221237659454,
516.7044256925583,
-24.699206203222275,
null,
'lips',
),
Keypoint(
190.4071513414383,
525.5935088396072,
-13.896868899464607,
null,
null,
),
Keypoint(
188.11582338809967,
510.65673887729645,
-5.575859919190407,
null,
null,
),
Keypoint(
186.57791829109192,
510.29770374298096,
-5.989414807409048,
null,
null,
),
Keypoint(
185.22046375274658,
509.75717532634735,
-6.591921094805002,
null,
'lips',
),
Keypoint(
172.18346893787384,
501.90586495399475,
-5.458211190998554,
null,
null,
),
Keypoint(
145.47690105438232,
486.38569128513336,
20.2784476429224,
null,
null,
),
Keypoint(
193.22453725337982,
444.7225821018219,
-30.888267382979393,
null,
null,
),
Keypoint(
188.49032175540924,
429.0664247274399,
-3.971552588045597,
null,
null,
),
Keypoint(
184.5145547389984,
430.43293833732605,
1.6150029329583049,
null,
null,
),
Keypoint(
189.56313967704773,
510.92543613910675,
-3.8824243750423193,
null,
'lips',
),
Keypoint(
145.06097316741943,
503.9541138410568,
46.14701583981514,
null,
null,
),
Keypoint(
194.27565824985504,
428.2394857406616,
-24.727727472782135,
null,
null,
),
Keypoint(
186.62584030628204,
533.5700840950012,
-5.629336796700954,
null,
null,
),
Keypoint(
205.72327995300293,
454.65774965286255,
-74.32578474283218,
null,
null,
),
Keypoint(
198.7482988834381,
448.604975938797,
-56.81387811899185,
null,
null,
),
Keypoint(
204.98424518108368,
447.05269968509674,
-59.78006601333618,
null,
null,
),
Keypoint(
189.19359040260315,
463.20401215553284,
-45.80476060509682,
null,
null,
),
Keypoint(
210.79909765720367,
548.371097445488,
-15.215965546667576,
null,
null,
),
Keypoint(
210.41615521907806,
538.0486897230148,
-16.87018610537052,
null,
null,
),
Keypoint(
198.47970855236053,
537.7111376523972,
-14.688327088952065,
null,
null,
),
Keypoint(
169.77676844596863,
518.7539917230606,
12.627682462334633,
null,
null,
),
Keypoint(
175.57641649246216,
480.9808158874512,
-15.415613427758217,
null,
null,
),
Keypoint(
177.48015904426575,
527.2502027750015,
4.256762769073248,
null,
null,
),
Keypoint(
160.2934136390686,
480.19738805294037,
-10.231916941702366,
null,
null,
),
Keypoint(
169.80377161502838,
487.9654004573822,
-11.821964643895626,
null,
null,
),
Keypoint(
154.71037769317627,
491.4376630783081,
3.8931195996701717,
null,
null,
),
Keypoint(
196.42014610767365,
547.4952878952026,
-12.570641934871674,
null,
null,
),
Keypoint(
184.58953094482422,
466.8356945514679,
-34.225229769945145,
null,
null,
),
Keypoint(
163.82308626174927,
525.6484200954437,
26.909586489200592,
null,
null,
),
Keypoint(
173.51687955856323,
534.683842420578,
16.52793388813734,
null,
null,
),
Keypoint(
163.42838335037231,
509.6211007833481,
12.905762828886509,
null,
null,
),
Keypoint(
138.6681227684021,
495.18352818489075,
58.525138199329376,
null,
null,
),
Keypoint(
154.39047241210938,
511.7225350141525,
27.323140874505043,
null,
null,
),
Keypoint(
136.01242423057556,
500.8939354419708,
95.60247480869293,
null,
null,
),
Keypoint(
164.75804388523102,
496.6690388917923,
-2.9055791907012463,
null,
null,
),
Keypoint(
189.27039062976837,
456.5933600664139,
-34.567480981349945,
null,
null,
),
Keypoint(
190.67130279541016,
478.2329821586609,
-69.81946438550949,
null,
null,
),
Keypoint(
185.6997731924057,
479.05824065208435,
-51.82270020246506,
null,
null,
),
Keypoint(
194.2794210910797,
473.96947968006134,
-81.28491818904877,
null,
null,
),
Keypoint(
181.78408408164978,
421.7906606197357,
-10.239047259092331,
null,
null,
),
Keypoint(
169.38637685775757,
417.0168786048889,
-14.816671796143055,
null,
null,
),
Keypoint(
158.9869168996811,
416.58558225631714,
-15.101881474256516,
null,
null,
),
Keypoint(
151.03396701812744,
418.63946306705475,
-9.846883825957775,
null,
null,
),
Keypoint(
146.06868755817413,
422.49828457832336,
-0.44608661555685103,
null,
null,
),
Keypoint(
144.8753056526184,
435.76700592041016,
24.913113713264465,
null,
null,
),
Keypoint(
127.91644811630249,
455.4523504972458,
96.11584961414337,
null,
null,
),
Keypoint(
150.77419066429138,
446.16857850551605,
13.740002922713757,
null,
null,
),
Keypoint(
157.78599655628204,
448.14629209041595,
5.151609554886818,
null,
null,
),
Keypoint(
167.0086693763733,
447.9461317062378,
-0.21000830631237477,
null,
null,
),
Keypoint(
175.68527102470398,
446.026554107666,
-2.2442480362951756,
null,
null,
),
Keypoint(
182.37110006809235,
443.38668072223663,
-1.5597433503717184,
null,
null,
),
Keypoint(
186.97758305072784,
440.9322066307068,
-2.094512628391385,
null,
null,
),
Keypoint(
126.33332514762878,
455.09340620040894,
156.86563074588776,
null,
'faceOval',
),
Keypoint(
185.61233496665955,
480.50728011131287,
-43.38047683238983,
null,
null,
),
Keypoint(
194.42929697036743,
458.9371032714844,
-58.75330835580826,
null,
null,
),
Keypoint(
196.3701194524765,
479.30786204338074,
-81.62716537714005,
null,
null,
),
Keypoint(
199.99372279644012,
482.56034338474274,
-73.86945247650146,
null,
null,
),
Keypoint(
196.0101239681244,
480.12358260154724,
-73.52719724178314,
null,
null,
),
Keypoint(
187.5151081085205,
482.4050112962723,
-37.10584983229637,
null,
null,
),
Keypoint(
201.62280344963074,
483.28141129016876,
-77.97647505998611,
null,
null,
),
Keypoint(
202.07734191417694,
484.4576658010483,
-58.040280640125275,
null,
null,
),
Keypoint(
186.60470461845398,
435.4996712207794,
5.201521776616573,
null,
null,
),
Keypoint(
190.22437930107117,
436.8505153656006,
-3.889554440975189,
null,
null,
),
Keypoint(
192.39675045013428,
437.93270766735077,
-15.087620839476585,
null,
null,
),
Keypoint(
153.50483989715576,
432.94196033477783,
8.791605904698372,
null,
'rightEye',
),
Keypoint(
148.20749926567078,
429.2401968240738,
8.905689977109432,
null,
null,
),
Keypoint(
211.33094656467438,
455.37059676647186,
-67.30961680412292,
null,
null,
),
Keypoint(
248.4509415626526,
434.1947454214096,
28.406939059495926,
null,
'leftEye',
),
Keypoint(
214.55184936523438,
482.62084114551544,
-56.61423325538635,
null,
null,
),
Keypoint(
266.1161162853241,
406.2222068309784,
108.5510104894638,
null,
'faceOval',
),
Keypoint(
230.2832043170929,
437.67332124710083,
8.599088340997696,
null,
null,
),
Keypoint(
236.52324509620667,
438.11320173740387,
11.066157035529613,
null,
null,
),
Keypoint(
242.58226132392883,
438.462926030159,
16.75610102713108,
null,
null,
),
Keypoint(
250.98796391487122,
436.7250233888626,
31.715376153588295,
null,
null,
),
Keypoint(
225.21788430213928,
436.8688191175461,
9.247942194342613,
null,
null,
),
Keypoint(
240.56081199645996,
422.84646463394165,
2.8485374059528112,
null,
null,
),
Keypoint(
233.32768726348877,
423.17833936214447,
1.909126010723412,
null,
null,
),
Keypoint(
246.9831018447876,
423.96512818336487,
9.540282189846039,
null,
null,
),
Keypoint(
250.96689200401306,
426.4924085140228,
17.198176681995392,
null,
null,
),
Keypoint(
255.69700026512146,
440.15636372566223,
41.013231575489044,
null,
null,
),
Keypoint(
234.65223288536072,
539.4474960565567,
9.504631608724594,
null,
null,
),
Keypoint(
250.80135250091553,
433.91819071769714,
34.111144691705704,
null,
'leftEye',
),
Keypoint(
269.9749035835266,
435.87083315849304,
117.7347868680954,
null,
null,
),
Keypoint(
261.4746835231781,
435.6167153120041,
58.58218476176262,
null,
null,
),
Keypoint(
238.84646153450012,
468.53471875190735,
-5.533078517764807,
null,
null,
),
Keypoint(
220.91105103492737,
497.0058642625809,
-38.95972028374672,
null,
'lips',
),
Keypoint(
220.38006949424744,
502.62130093574524,
-30.17524167895317,
null,
null,
),
Keypoint(
227.96266651153564,
496.3574209213257,
-26.895325854420662,
null,
'lips',
),
Keypoint(
232.57455778121948,
496.52896749973297,
-11.971700303256512,
null,
'lips',
),
Keypoint(
225.98251914978027,
500.7986469268799,
-21.519112810492516,
null,
null,
),
Keypoint(
230.23009085655212,
499.7032377719879,
-8.24970580637455,
null,
null,
),
Keypoint(
239.8376066684723,
510.7310439348221,
14.987798407673836,
null,
null,
),
Keypoint(
213.6418412923813,
479.8155072927475,
-86.81799620389938,
null,
null,
),
Keypoint(
213.98862218856812,
472.5704462528229,
-92.29403167963028,
null,
null,
),
Keypoint(
259.81548738479614,
420.27113127708435,
23.18759098649025,
null,
'leftEyebrow',
),
Keypoint(
223.80303049087524,
452.3565183877945,
-10.559908524155617,
null,
null,
),
Keypoint(
229.18287301063538,
474.16904962062836,
-42.89561927318573,
null,
null,
),
Keypoint(
228.90322375297546,
470.0946707725525,
-38.01852643489838,
null,
null,
),
Keypoint(
256.8350365161896,
465.87145471572876,
19.9647156894207,
null,
null,
),
Keypoint(
212.70350348949432,
463.24597907066345,
-82.88209319114685,
null,
null,
),
Keypoint(
246.23818683624268,
413.50759971141815,
-9.240811876952648,
null,
'leftEyebrow',
),
Keypoint(
254.56194877624512,
415.89013051986694,
5.76481182128191,
null,
'leftEyebrow',
),
Keypoint(
261.3901152610779,
394.5504537820816,
74.04057204723358,
null,
'faceOval',
),
Keypoint(
217.76478004455566,
418.18473064899445,
-28.221552819013596,
null,
null,
),
Keypoint(
227.0026445388794,
425.36470663547516,
6.007240600883961,
null,
null,
),
Keypoint(
244.70491194725037,
503.20493173599243,
19.87915188074112,
null,
null,
),
Keypoint(
267.57719564437866,
500.98440957069397,
166.3346117734909,
null,
'faceOval',
),
Keypoint(
224.67108607292175,
478.7061091661453,
-37.419583797454834,
null,
null,
),
Keypoint(
219.07088136672974,
481.6154065132141,
-40.30020788311958,
null,
null,
),
Keypoint(
238.27336168289185,
497.6038473844528,
18.510143011808395,
null,
null,
),
Keypoint(
236.55666422843933,
498.24129939079285,
13.483313508331776,
null,
null,
),
Keypoint(
257.44584131240845,
411.2205845117569,
14.239121116697788,
null,
'leftEyebrow',
),
Keypoint(
229.54959058761597,
476.61325907707214,
-33.6262871325016,
null,
null,
),
Keypoint(
234.3024799823761,
413.5322620868683,
-20.962952077388763,
null,
'leftEyebrow',
),
Keypoint(
235.46602702140808,
407.7343783378601,
-24.642163664102554,
null,
'leftEyebrow',
),
Keypoint(
237.9395785331726,
379.4310096502304,
4.196155574172735,
null,
'faceOval',
),
Keypoint(
258.51180958747864,
401.93658542633057,
40.2716825902462,
null,
null,
),
Keypoint(
235.2546191215515,
392.8839039802551,
-10.994854867458344,
null,
null,
),
Keypoint(
262.52077889442444,
416.6886827945709,
37.818877547979355,
null,
'leftEyebrow',
),
Keypoint(
263.5948340892792,
411.3437147140503,
71.18847727775574,
null,
null,
),
Keypoint(
221.00743079185486,
499.9033981561661,
-36.10761746764183,
null,
null,
),
Keypoint(
227.0632836818695,
498.71365427970886,
-24.642163664102554,
null,
null,
),
Keypoint(
231.4928493499756,
498.1611807346344,
-11.35849803686142,
null,
null,
),
Keypoint(
223.04609990119934,
479.9771980047226,
-34.396353363990784,
null,
null,
),
Keypoint(
237.3698971271515,
497.967969417572,
15.786386914551258,
null,
null,
),
Keypoint(
234.93354034423828,
500.4179470539093,
4.481365755200386,
null,
null,
),
Keypoint(
235.74360990524292,
498.60519433021545,
12.777418121695518,
null,
'lips',
),
Keypoint(
221.23355841636658,
477.98876559734344,
-60.97795128822327,
null,
null,
),
Keypoint(
229.05723237991333,
500.9734182357788,
-5.607945844531059,
null,
'lips',
),
Keypoint(
224.90081071853638,
502.4308601617813,
-14.845193065702915,
null,
'lips',
),
Keypoint(
219.6604356765747,
504.4338719844818,
-22.7455173432827,
null,
'lips',
),
Keypoint(
219.07539677619934,
527.7076148986816,
-16.57071478664875,
null,
null,
),
Keypoint(
222.12176752090454,
514.1181464195251,
-29.191265925765038,
null,
'lips',
),
Keypoint(
221.66239476203918,
510.5874752998352,
-29.86151173710823,
null,
null,
),
Keypoint(
220.66084122657776,
507.2390241622925,
-24.984416887164116,
null,
null,
),
Keypoint(
219.38971519470215,
504.706111907959,
-22.503086552023888,
null,
'lips',
),
Keypoint(
228.78615474700928,
501.0645282268524,
-5.230042543262243,
null,
'lips',
),
Keypoint(
230.41580939292908,
502.05724561214447,
-7.843281235545874,
null,
null,
),
Keypoint(
231.86553645133972,
503.50315117836,
-10.395913235843182,
null,
null,
),
Keypoint(
233.13497877120972,
505.22102415561676,
-7.255035080015659,
null,
'lips',
),
Keypoint(
237.0887427330017,
493.16916167736053,
-7.536680605262518,
null,
null,
),
Keypoint(
270.0362825393677,
465.6630735397339,
188.0105835199356,
null,
'faceOval',
),
Keypoint(
232.12934350967407,
499.88041627407074,
5.379778202623129,
null,
'lips',
),
Keypoint(
233.5764684677124,
500.05850315093994,
3.8966850098222494,
null,
null,
),
Keypoint(
216.99754309654236,
484.6985213756561,
-40.87062522768974,
null,
null,
),
Keypoint(
227.38767886161804,
480.6021144390106,
-22.246399149298668,
null,
null,
),
Keypoint(
217.98917293548584,
483.24761974811554,
-41.041752845048904,
null,
null,
),
Keypoint(
230.77224612236023,
455.60209608078003,
-3.399349646642804,
null,
null,
),
Keypoint(
241.6303517818451,
459.20184910297394,
3.3405250310897827,
null,
null,
),
Keypoint(
230.0840926170349,
472.71832966804504,
-28.221552819013596,
null,
null,
),
Keypoint(
252.69047737121582,
385.2865751981735,
37.33401998877525,
null,
'faceOval',
),
Keypoint(
249.45637273788452,
395.5259120464325,
13.41914065182209,
null,
null,
),
Keypoint(
248.03488612174988,
407.7989637851715,
-6.142715122550726,
null,
'leftEyebrow',
),
Keypoint(
234.60633897781372,
517.1711940765381,
4.2674582451581955,
null,
null,
),
Keypoint(
219.9155945777893,
408.8078956604004,
-35.137898325920105,
null,
'leftEyebrow',
),
Keypoint(
219.7020947933197,
392.96129751205444,
-26.0396958142519,
null,
null,
),
Keypoint(
221.1157751083374,
376.8849486708641,
-16.4994116127491,
null,
'faceOval',
),
Keypoint(
247.91623544692993,
437.9991098642349,
24.770509377121925,
null,
null,
),
Keypoint(
261.853901386261,
444.1280508041382,
51.879738718271255,
null,
null,
),
Keypoint(
222.05087304115295,
435.78867065906525,
11.001984179019928,
null,
null,
),
Keypoint(
256.5775306224823,
428.6541134119034,
32.9703039675951,
null,
null,
),
Keypoint(
219.00243592262268,
448.3820607662201,
-17.768598049879074,
null,
null,
),
Keypoint(
224.84019708633423,
473.00078880786896,
-60.29344484210014,
null,
null,
),
Keypoint(
267.46959114074707,
448.7346918582916,
72.0441073179245,
null,
null,
),
Keypoint(
258.78870368003845,
448.5715477466583,
36.79211989045143,
null,
null,
),
Keypoint(
251.7408127784729,
451.03106331825256,
19.95045706629753,
null,
null,
),
Keypoint(
239.6229588985443,
450.4222251176834,
10.003748796880245,
null,
null,
),
Keypoint(
230.3046588897705,
448.0870660543442,
4.4778005965054035,
null,
null,
),
Keypoint(
223.60800051689148,
445.47480726242065,
-1.3182059861719608,
null,
null,
),
Keypoint(
210.3051450252533,
440.25010800361633,
-38.389294892549515,
null,
null,
),
Keypoint(
268.40269923210144,
462.768718957901,
68.73566418886185,
null,
null,
),
Keypoint(
260.9150023460388,
427.2868276834488,
41.69773802161217,
null,
null,
),
Keypoint(
211.4789856672287,
483.3516286611557,
-78.66097748279572,
null,
null,
),
Keypoint(
224.63100862503052,
459.2369577884674,
-17.426344826817513,
null,
null,
),
Keypoint(
269.7912769317627,
434.5128582715988,
172.49514162540436,
null,
'faceOval',
),
Keypoint(
218.71850085258484,
442.22496020793915,
-4.976918790489435,
null,
null,
),
Keypoint(
230.35519576072693,
472.6271742582321,
-11.522494331002235,
null,
null,
),
Keypoint(
253.33260941505432,
433.64131808280945,
37.790356278419495,
null,
null,
),
Keypoint(
224.3776354789734,
467.930694937706,
-54.246987998485565,
null,
null,
),
Keypoint(
269.52879643440247,
482.68837881088257,
181.85003757476807,
null,
'faceOval',
),
Keypoint(
222.13720154762268,
433.7963322401047,
15.130402743816376,
null,
'leftEye',
),
Keypoint(
218.49423551559448,
465.04510617256165,
-71.7588946223259,
null,
null,
),
Keypoint(
259.4772653579712,
519.4742420911789,
77.46310025453568,
null,
null,
),
Keypoint(
258.22925209999084,
528.1700685024261,
107.06792861223221,
null,
'faceOval',
),
Keypoint(
271.4811625480652,
464.754562497139,
128.80094289779663,
null,
null,
),
Keypoint(
265.604318857193,
508.9572604894638,
98.6827477812767,
null,
null,
),
Keypoint(
266.69212436676025,
422.4755297899246,
99.19612258672714,
null,
null,
),
Keypoint(
236.388165473938,
548.1371455192566,
20.03601886332035,
null,
null,
),
Keypoint(
210.66798496246338,
484.71160197257996,
-56.69979706406593,
null,
null,
),
Keypoint(
230.6984179019928,
463.6616059541702,
-10.189136043190956,
null,
null,
),
Keypoint(
265.45531034469604,
436.604572892189,
76.32225751876831,
null,
null,
),
Keypoint(
242.03041195869446,
433.93631279468536,
17.654512971639633,
null,
'leftEye',
),
Keypoint(
236.69495820999146,
433.6757000684738,
12.649073414504528,
null,
'leftEye',
),
Keypoint(
236.2005591392517,
500.9586571455002,
7.607982773333788,
null,
'lips',
),
Keypoint(
268.79370307922363,
476.9849660396576,
75.0673297047615,
null,
null,
),
Keypoint(
224.92879605293274,
559.9328917264938,
21.048515886068344,
null,
'faceOval',
),
Keypoint(
243.16832065582275,
547.3986822366714,
59.2096446454525,
null,
'faceOval',
),
Keypoint(
250.47573280334473,
539.2337100505829,
80.65745830535889,
null,
'faceOval',
),
Keypoint(
231.54052901268005,
433.5052435398102,
10.866510160267353,
null,
'leftEye',
),
Keypoint(
226.65756011009216,
433.4247615337372,
12.335343472659588,
null,
'leftEye',
),
Keypoint(
223.67420101165771,
433.7025879621506,
15.244487822055817,
null,
'leftEye',
),
Keypoint(
263.98522567749023,
425.28831231594086,
58.98147448897362,
null,
null,
),
Keypoint(
227.46931338310242,
432.42700266838074,
9.526021555066109,
null,
'leftEye',
),
Keypoint(
232.71394872665405,
432.5067125558853,
7.115994896739721,
null,
'leftEye',
),
Keypoint(
238.1400167942047,
432.85770857334137,
8.827256485819817,
null,
'leftEye',
),
Keypoint(
243.47605729103088,
433.39001619815826,
13.896868899464607,
null,
'leftEye',
),
Keypoint(
247.0036380290985,
433.9260481595993,
19.92193378508091,
null,
'leftEye',
),
Keypoint(
268.67367482185364,
418.71340477466583,
144.20229971408844,
null,
'faceOval',
),
Keypoint(
245.73807334899902,
434.10976696014404,
23.472803682088852,
null,
'leftEye',
),
Keypoint(
230.5723946094513,
490.2848446369171,
-19.7935900837183,
null,
null,
),
Keypoint(
224.6694278717041,
477.8911153078079,
-43.92237290740013,
null,
null,
),
Keypoint(
218.00335693359375,
490.12973964214325,
-38.4178201854229,
null,
null,
),
Keypoint(
252.08467268943787,
530.1749424934387,
60.12231722474098,
null,
null,
),
Keypoint(
244.6887125968933,
539.2456551790237,
41.127316653728485,
null,
null,
),
Keypoint(
225.09808564186096,
554.3181363344193,
0.9376286272890866,
null,
null,
),
Keypoint(
263.6299624443054,
516.205682516098,
138.49807798862457,
null,
'faceOval',
),
Keypoint(
223.94415616989136,
433.0681335926056,
12.877241559326649,
null,
'leftEye',
),
Keypoint(
215.57220435142517,
451.19634211063385,
-41.78330183029175,
null,
null,
),
Keypoint(
235.04525208473206,
554.6598215103149,
36.96324750781059,
null,
'faceOval',
),
Keypoint(
270.97071719169617,
480.3309645652771,
127.31784492731094,
null,
null,
),
Keypoint(
224.53968000411987,
502.70328176021576,
-14.445898309350014,
null,
'lips',
),
Keypoint(
226.17099285125732,
504.5109930038452,
-17.126875519752502,
null,
null,
),
Keypoint(
227.4421443939209,
507.0439052581787,
-20.421053990721703,
null,
null,
),
Keypoint(
228.35287952423096,
510.21140813827515,
-18.581446185708046,
null,
'lips',
),
Keypoint(
227.83700037002563,
523.1617441177368,
-7.451117802411318,
null,
null,
),
Keypoint(
233.57422351837158,
498.9718598127365,
3.5686929244548082,
null,
null,
),
Keypoint(
234.8380789756775,
497.9731925725937,
4.028594372794032,
null,
null,
),
Keypoint(
235.9209098815918,
496.8842782974243,
4.06781111843884,
null,
'lips',
),
Keypoint(
242.25138640403748,
497.3239771127701,
6.973390057682991,
null,
null,
),
Keypoint(
262.65300130844116,
480.891477227211,
39.87238883972168,
null,
null,
),
Keypoint(
214.47223019599915,
443.95423328876495,
-26.88106320798397,
null,
null,
),
Keypoint(
217.51579475402832,
429.006471991539,
1.7424563504755497,
null,
null,
),
Keypoint(
221.3153715133667,
429.904173374176,
9.290723092854023,
null,
null,
),
Keypoint(
232.12934350967407,
499.88041627407074,
4.976918790489435,
null,
'lips',
),
Keypoint(
264.13538217544556,
498.184344291687,
66.39694422483444,
null,
null,
),
Keypoint(
212.1810680627823,
429.10802829265594,
-21.490591540932655,
null,
null,
),
Keypoint(
231.28909468650818,
530.94233751297,
1.2531424686312675,
null,
null,
),
Keypoint(
210.9543435573578,
448.12703454494476,
-54.703320264816284,
null,
null,
),
Keypoint(
221.29042196273804,
461.6888430118561,
-40.18612280488014,
null,
null,
),
Keypoint(
221.26307439804077,
536.2151806354523,
-11.565275229513645,
null,
null,
),
Keypoint(
244.9993064403534,
514.433079957962,
24.827549904584885,
null,
null,
),
Keypoint(
235.79095792770386,
477.687003493309,
-5.843244306743145,
null,
null,
),
Keypoint(
238.9596529006958,
523.5010221004486,
13.911128528416157,
null,
null,
),
Keypoint(
249.8026306629181,
475.84695410728455,
3.426088085398078,
null,
null,
),
Keypoint(
242.13373064994812,
484.1032633781433,
-0.11698075599269941,
null,
null,
),
Keypoint(
255.79248714447021,
486.5200399160385,
19.65098574757576,
null,
null,
),
Keypoint(
223.81502056121826,
545.9897929430008,
-8.499264903366566,
null,
null,
),
Keypoint(
225.63702654838562,
464.758695602417,
-27.16627389192581,
null,
null,
),
Keypoint(
250.25720739364624,
520.9421303272247,
40.956189036369324,
null,
null,
),
Keypoint(
242.77231669425964,
530.737498998642,
27.380181401968002,
null,
null,
),
Keypoint(
250.04276371002197,
504.6427981853485,
27.465745210647583,
null,
null,
),
Keypoint(
268.27652287483215,
489.3014380931854,
81.51308834552765,
null,
null,
),
Keypoint(
257.46094369888306,
506.3479993343353,
44.293149411678314,
null,
null,
),
Keypoint(
269.55435824394226,
495.0942803621292,
121.043221950531,
null,
null,
),
Keypoint(
247.84653997421265,
491.9696981906891,
10.638342015445232,
null,
null,
),
Keypoint(
219.83041405677795,
455.262500166893,
-28.635107204318047,
null,
null,
),
Keypoint(
223.22005796432495,
476.626339673996,
-64.05822023749352,
null,
null,
),
Keypoint(
227.47043585777283,
476.88922333717346,
-45.31990706920624,
null,
null,
),
Keypoint(
219.77599954605103,
472.73958563804626,
-76.8356403708458,
null,
null,
),
Keypoint(
222.83867168426514,
423.15472161769867,
-2.4938071332871914,
null,
null,
),
Keypoint(
233.59123921394348,
419.41980242729187,
-4.285283535718918,
null,
null,
),
Keypoint(
243.08479833602905,
419.0379670858383,
-1.7683033738285303,
null,
null,
),
Keypoint(
250.4121344089508,
420.56226539611816,
6.798699293285608,
null,
null,
),
Keypoint(
255.12073707580566,
423.76719331741333,
18.424581214785576,
null,
null,
),
Keypoint(
256.77051973342896,
434.5397915840149,
45.26286453008652,
null,
null,
),
Keypoint(
271.2701117992401,
450.08517265319824,
124.46574211120605,
null,
null,
),
Keypoint(
252.80871987342834,
442.697860121727,
32.1717144548893,
null,
null,
),
Keypoint(
246.4821720123291,
444.15979850292206,
21.048515886068344,
null,
null,
),
Keypoint(
238.07254076004028,
443.9960639476776,
12.820200026035309,
null,
null,
),
Keypoint(
230.0221779346466,
442.65434896945953,
8.05005893111229,
null,
null,
),
Keypoint(
223.96055960655212,
441.03689682483673,
6.167671736329794,
null,
null,
),
Keypoint(
219.7974030971527,
439.23440873622894,
4.2460672929883,
null,
null,
),
Keypoint(
269.82280826568604,
449.81652081012726,
185.95706820487976,
null,
'faceOval',
),
Keypoint(
227.292396068573,
478.24787950515747,
-37.077332586050034,
null,
null,
),
Keypoint(
216.49041414260864,
457.9860348701477,
-54.418111592531204,
null,
null,
),
Keypoint(
218.43086671829224,
478.1756637096405,
-78.09056013822556,
null,
null,
),
Keypoint(
215.00208926200867,
481.7143739461899,
-71.7588946223259,
null,
null,
),
Keypoint(
218.52313923835754,
479.0809954404831,
-69.81946438550949,
null,
null,
),
Keypoint(
225.4880690574646,
480.24380600452423,
-31.829461231827736,
null,
null,
),
Keypoint(
213.64781081676483,
482.71322286129,
-76.26521497964859,
null,
null,
),
Keypoint(
212.92686319351196,
483.8919299840927,
-56.61423325538635,
null,
null,
),
Keypoint(
219.87702226638794,
433.98209488391876,
12.085783369839191,
null,
null,
),
Keypoint(
216.6253662109375,
435.7093241214752,
1.1845137923955917,
null,
null,
),
Keypoint(
215.0009412765503,
437.25210785865784,
-11.094678305089474,
null,
null,
),
Keypoint(
249.1741213798523,
434.1026816368103,
26.08247771859169,
null,
'leftEye',
),
Keypoint(
253.50488376617432,
429.4754658937454,
27.565567642450333,
null,
null,
),
Keypoint(
167.52135968208313,
433.4563729763031,
3.583037042990327,
null,
null,
),
Keypoint(
174.57316648960114,
432.8984491825104,
3.583037042990327,
null,
'rightIris',
),
Keypoint(
166.87610256671906,
427.4810836315155,
3.583037042990327,
null,
'rightIris',
),
Keypoint(
160.37896406650543,
433.923868060112,
3.583037042990327,
null,
'rightIris',
),
Keypoint(
167.98541367053986,
439.2508957386017,
3.583037042990327,
null,
'rightIris',
),
Keypoint(
233.9808144569397,
432.9568576812744,
16.757437773048878,
null,
null,
),
Keypoint(
240.67203903198242,
432.9430503845215,
16.757437773048878,
null,
'leftIris',
),
Keypoint(
233.78859066963196,
427.43343937397003,
16.757437773048878,
null,
'leftIris',
),
Keypoint(
227.19897556304932,
432.88032710552216,
16.757437773048878,
null,
'leftIris',
),
Keypoint(
234.17245149612427,
438.20862650871277,
16.757437773048878,
null,
'leftIris',
),
]),
const BoundingBox(
125.21655213832855,
376.83662313222885,
271.4811625480652,
562.3160583972931,
146.26461040973663,
185.47943526506424,
),
);
| holobooth/packages/face_geometry/test/fixtures/face4.dart/0 | {'file_path': 'holobooth/packages/face_geometry/test/fixtures/face4.dart', 'repo_id': 'holobooth', 'token_count': 35975} |
import 'package:face_geometry/face_geometry.dart';
import 'package:mocktail/mocktail.dart';
import 'package:tensorflow_models_platform_interface/tensorflow_models_platform_interface.dart';
import 'package:test/test.dart';
import '../../fixtures/fixtures.dart' as fixtures;
class _MockBoundingBox extends Mock implements BoundingBox {}
class _FakeKeypoint extends Fake implements Keypoint {
_FakeKeypoint(this.x, this.y);
@override
final double x;
@override
final double y;
}
void main() {
group('LeftEyeGeometry', () {
late BoundingBox boundingBox;
setUp(() {
boundingBox = _MockBoundingBox();
when(() => boundingBox.height).thenReturn(0);
});
group('factory constructor', () {
test('returns normally when no keypoints are given', () {
expect(
() => LeftEyeGeometry(
keypoints: const [],
boundingBox: boundingBox,
),
returnsNormally,
);
});
test('returns normally when keypoints are given', () {
final keypoints = List.generate(468, (_) => _FakeKeypoint(0, 0));
expect(
() => LeftEyeGeometry(
keypoints: keypoints,
boundingBox: boundingBox,
),
returnsNormally,
);
});
});
group('update', () {
test('return normally when no keypoints are given', () {
final geometry = LeftEyeGeometry(
keypoints: const [],
boundingBox: boundingBox,
);
expect(
() => geometry.update([], boundingBox),
returnsNormally,
);
});
test('return normally when keypoints are given', () {
final keypoints = List.generate(468, (_) => _FakeKeypoint(0, 0));
final geometry = LeftEyeGeometry(
keypoints: keypoints,
boundingBox: boundingBox,
);
expect(
() => geometry.update(keypoints, boundingBox),
returnsNormally,
);
});
});
group('supports value equality', () {
test('when all properties are equal', () {
final geometry1 = LeftEyeGeometry(
keypoints: const [],
boundingBox: boundingBox,
);
final geometry2 = LeftEyeGeometry(
keypoints: const [],
boundingBox: boundingBox,
);
expect(geometry1, equals(geometry2));
});
test('when keypoints are different', () {
final geometry1 = LeftEyeGeometry(
keypoints: const [],
boundingBox: boundingBox,
);
final geometry2 = LeftEyeGeometry(
keypoints: List.generate(468, (_) => _FakeKeypoint(0, 0)),
boundingBox: boundingBox,
);
expect(geometry1, isNot(equals(geometry2)));
});
});
group('isClosed', () {
test('is false when no keypoints are given', () {
final leftEyeGeometry = LeftEyeGeometry(
keypoints: const [],
boundingBox: boundingBox,
);
expect(leftEyeGeometry.isClosed, isFalse);
});
group('trained', () {
late LeftEyeGeometry leftEyeGeometry;
setUp(() {
final dataSet = [
fixtures.face1,
fixtures.face2,
fixtures.face3,
fixtures.face4,
fixtures.face5,
fixtures.face6,
fixtures.face7,
fixtures.face8,
fixtures.face9,
fixtures.face10,
];
var trainedLeftEyeGeometry = LeftEyeGeometry(
keypoints: dataSet.first.keypoints,
boundingBox: dataSet.first.boundingBox,
);
for (final face in dataSet.skip(1)) {
trainedLeftEyeGeometry = trainedLeftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
}
leftEyeGeometry = trainedLeftEyeGeometry;
});
test('is false with face1', () {
final face = fixtures.face1;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isFalse);
});
test('is false with face2', () {
final face = fixtures.face2;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isFalse);
});
test('is false with face3', () {
final face = fixtures.face3;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isFalse);
});
test('is false with face4', () {
final face = fixtures.face4;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isFalse);
});
test('is true with face5', () {
final face = fixtures.face5;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isTrue);
});
test('is false with face6', () {
final face = fixtures.face6;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isFalse);
});
test('is false with face7', () {
final face = fixtures.face7;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isFalse);
});
test('is false with face8', () {
final face = fixtures.face8;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isFalse);
});
test('is false with face9', () {
final face = fixtures.face9;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isFalse);
});
test('is true with face10', () {
final face = fixtures.face10;
final updatedLeftEyeGeometry = leftEyeGeometry.update(
face.keypoints,
face.boundingBox,
);
expect(updatedLeftEyeGeometry.isClosed, isTrue);
});
});
});
});
}
| holobooth/packages/face_geometry/test/src/models/left_eye_geometry_test.dart/0 | {'file_path': 'holobooth/packages/face_geometry/test/src/models/left_eye_geometry_test.dart', 'repo_id': 'holobooth', 'token_count': 3227} |
import 'package:flutter/widgets.dart';
/// Defines the color palette for the Holobooth UI.
abstract class HoloBoothColors {
/// Black
static const Color black = Color(0xFF202124);
/// Black 20% opacity
static const Color black20 = Color(0x40202124);
/// White
static const Color white = Color(0xFFFFFFFF);
/// WhiteBackground
static const Color whiteBackground = Color(0xFFE8EAED);
/// Transparent
static const Color transparent = Color(0x00000000);
/// Blue
static const Color blue = Color(0xFF428EFF);
/// Red
static const Color red = Color(0xFFFB5246);
/// Orange
static const Color orange = Color(0xFFFFBB00);
/// Charcoal
static const Color charcoal = Color(0xBF202124);
/// Purple
static const Color purple = Color(0xFF4100E0);
/// Light purple
static const Color lightPurple = Color(0xFF9455D9);
/// Lighter purple
static const Color lighterPurple = Color(0xFF9E81EF);
/// Dark purple
static const Color darkPurple = Color(0xFF20225A);
/// Dark blue
static const Color darkBlue = Color(0xFF061A4A);
/// Sparky color
static const Color sparkyColor = Color.fromRGBO(238, 87, 66, 1);
/// Dark blue
static const Color gray = Color(0xff7A7C93);
/// Light grey
static const Color lightGrey = Color(0xffC0C0C0);
/// Color for prop tab
static const Color propTabSelection = Color(0xffB7F7CC);
/// Color for convert loading animation.
static const Color convertLoading = Color(0xFFe196d8);
/// Color used as the background of the avatar animation.
static const Color holoboothAvatarBackground = Color(0xFF030524);
/// Color used for modal surfaces.
static const Color modalSurface = Color(0xF2020320);
/// Background color
static const Color background = Color(0xFF12152B);
/// Transparent scrim color
static const Color scrim = Color(0x8513162C);
/// Color used for blurry containers.
static const Color blurrySurface = Color.fromRGBO(19, 22, 44, 0.75);
/// Dusk color.
static const Color dusk = Color(0xff676AB6);
/// Background color for the video player progress bar.
static const Color progressBarBackground = Color(0xFF1E1E1E);
/// Color for the video player progress bar.
static const Color progressBarColor = Color(0xFF27F5DD);
/// Color for the video player close button.
static const Color closeIcon = Color(0xFF040522);
}
/// Defines the gradients for the Holobooth UI.
class HoloBoothGradients {
/// Primary One gradient
static const Gradient primaryOne = LinearGradient(
colors: <Color>[
HoloBoothColors.purple,
_gradientPink,
],
);
/// Primary Two gradient
static const Gradient primaryTwo = LinearGradient(
colors: <Color>[
_gradientLightBlue,
_gradientTeal,
],
);
/// Primary Three gradient
static const Gradient primaryThree = LinearGradient(
colors: <Color>[
_gradientLightBlue,
HoloBoothColors.purple,
],
);
/// Secondary One gradient
static const Gradient secondaryOne = LinearGradient(
colors: <Color>[
_gradientYellow,
_gradientTeal,
],
);
/// Secondary Two gradient
static const Gradient secondaryTwo = LinearGradient(
colors: <Color>[
HoloBoothColors.lighterPurple,
Color(0xFF52B8F7),
],
);
/// Secondary Three gradient
static const Gradient secondaryThree = LinearGradient(
colors: <Color>[
_gradientYellow,
HoloBoothColors.lighterPurple,
],
);
/// Secondary Four gradient
static const Gradient secondaryFour = LinearGradient(
colors: <Color>[
_gradientPink,
HoloBoothColors.lighterPurple,
],
);
/// Secondary Five gradient
static const Gradient secondaryFive = LinearGradient(
colors: <Color>[
_gradientTeal,
HoloBoothColors.lighterPurple,
],
);
/// Secondary Six gradient
static const Gradient secondarySix = LinearGradient(
colors: <Color>[
HoloBoothColors.lighterPurple,
HoloBoothColors.purple,
],
);
/// Props gradient
static const Gradient props = LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
Color.fromRGBO(44, 44, 44, 0.33),
Color.fromRGBO(134, 134, 134, 0.4),
],
);
/// Button gradient
static const Gradient button = LinearGradient(
colors: <Color>[
HoloBoothColors.purple,
_gradientPink,
],
);
/// Button Border gradient
static const Gradient buttonBorder = LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomCenter,
colors: <Color>[
_gradientPink,
HoloBoothColors.purple,
],
);
static const _gradientPink = Color(0xFFF8BBD0);
static const _gradientLightBlue = Color(0xFF027DFD);
static const _gradientTeal = Color(0xFF27F5DD);
static const _gradientYellow = Color(0xffF9F8C4);
}
| holobooth/packages/holobooth_ui/lib/src/colors.dart/0 | {'file_path': 'holobooth/packages/holobooth_ui/lib/src/colors.dart', 'repo_id': 'holobooth', 'token_count': 1631} |
import 'package:flutter/material.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
/// {@template app_circular_progress_indicator}
/// Circular progress indicator
/// {@endtemplate}
class AppCircularProgressIndicator extends StatelessWidget {
/// {@macro app_circular_progress_indicator}
const AppCircularProgressIndicator({
super.key,
this.color = HoloBoothColors.orange,
this.backgroundColor = HoloBoothColors.white,
this.strokeWidth = 4.0,
});
/// [Color] of the progress indicator
final Color color;
/// [Color] for the background
final Color? backgroundColor;
/// Optional stroke width of the progress indicator
final double strokeWidth;
@override
Widget build(BuildContext context) {
return CircularProgressIndicator(
color: color,
backgroundColor: backgroundColor,
strokeWidth: strokeWidth,
);
}
}
| holobooth/packages/holobooth_ui/lib/src/widgets/app_circular_progress_indicator.dart/0 | {'file_path': 'holobooth/packages/holobooth_ui/lib/src/widgets/app_circular_progress_indicator.dart', 'repo_id': 'holobooth', 'token_count': 280} |
export 'constants.dart';
export 'links_helper_test.dart';
export 'set_display_size.dart';
| holobooth/packages/holobooth_ui/test/src/helpers/helpers.dart/0 | {'file_path': 'holobooth/packages/holobooth_ui/test/src/helpers/helpers.dart', 'repo_id': 'holobooth', 'token_count': 34} |
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
void main() {
group('GradientText', () {
testWidgets('renders correctly', (tester) async {
await tester.pumpWidget(
const MaterialApp(
home: GradientText(
text: 'test-text',
),
),
);
expect(find.text('test-text'), findsOneWidget);
});
});
}
| holobooth/packages/holobooth_ui/test/src/widgets/gradient_text_test.dart/0 | {'file_path': 'holobooth/packages/holobooth_ui/test/src/widgets/gradient_text_test.dart', 'repo_id': 'holobooth', 'token_count': 204} |
/// IO Implementation of [PlatformHelper]
class PlatformHelper {
/// Returns whether the current platform is running on a mobile device.
bool get isMobile => true;
}
| holobooth/packages/platform_helper/lib/src/mobile.dart/0 | {'file_path': 'holobooth/packages/platform_helper/lib/src/mobile.dart', 'repo_id': 'holobooth', 'token_count': 40} |
name: example
description: A new Flutter project.
version: 1.0.0+1
publish_to: none
environment:
sdk: ">=2.19.0 <3.0.0"
dependencies:
audio_session: ^0.1.10
camera: ^0.10.0+3
cross_file: ^0.3.3+2
face_geometry:
path: ../../../face_geometry
flutter:
sdk: flutter
image: ^3.2.0
isolated_worker: ^0.1.1
js: ^0.6.4
just_audio: ^0.9.30
rive: ^0.9.1
tensorflow_models:
path: ../
dev_dependencies:
build_runner:
flutter_gen_runner:
very_good_analysis: ^4.0.0
dependency_overrides:
camera:
git:
url: https://github.com/VGVentures/plugins
path: packages/camera/camera
ref: da722ef898b1da47c339a17653067e070bb8e608
camera_web:
git:
url: https://github.com/VGVentures/plugins
path: packages/camera/camera_web
ref: da722ef898b1da47c339a17653067e070bb8e608
flutter_gen:
output: lib/assets/
line_length: 80
integrations:
rive: true
assets:
enabled: true
package_parameter_enabled: true
flutter:
uses-material-design: true
assets:
- assets/
| holobooth/packages/tensorflow_models/tensorflow_models/example/pubspec.yaml/0 | {'file_path': 'holobooth/packages/tensorflow_models/tensorflow_models/example/pubspec.yaml', 'repo_id': 'holobooth', 'token_count': 481} |
import 'dart:typed_data';
import 'package:camera/camera.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:holobooth/avatar_detector/avatar_detector.dart';
class _FakePlane extends Fake implements Plane {
@override
Uint8List get bytes => Uint8List.fromList(List.empty());
}
class _FakeCameraImage extends Fake implements CameraImage {
@override
List<Plane> get planes => [_FakePlane()];
@override
int get width => 0;
@override
int get height => 0;
}
void main() {
group('AvatarDetectorEvent', () {
group('AvatarDetectorInitialized', () {
test('supports value comparison', () {
expect(AvatarDetectorInitialized(), AvatarDetectorInitialized());
});
});
group('AvatarDetectorEstimateRequested', () {
test('supports value comparison', () {
final cameraImage1 = _FakeCameraImage();
final cameraImage2 = _FakeCameraImage();
expect(
AvatarDetectorEstimateRequested(cameraImage1),
equals(AvatarDetectorEstimateRequested(cameraImage1)),
);
expect(
AvatarDetectorEstimateRequested(cameraImage1),
isNot(AvatarDetectorEstimateRequested(cameraImage2)),
);
});
});
});
}
| holobooth/test/avatar_detector/bloc/avatar_detector_event_test.dart/0 | {'file_path': 'holobooth/test/avatar_detector/bloc/avatar_detector_event_test.dart', 'repo_id': 'holobooth', 'token_count': 467} |
import 'dart:async';
import 'dart:io';
import 'package:alchemist/alchemist.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
final enablePlatformTests =
!Platform.environment.containsKey('GITHUB_ACTIONS');
return AlchemistConfig.runWithConfig(
config: AlchemistConfig(
theme: HoloboothTheme.standard,
platformGoldensConfig:
AlchemistConfig.current().platformGoldensConfig.copyWith(
enabled: enablePlatformTests,
renderShadows: enablePlatformTests,
),
),
run: testMain,
);
}
| holobooth/test/flutter_test_config.dart/0 | {'file_path': 'holobooth/test/flutter_test_config.dart', 'repo_id': 'holobooth', 'token_count': 254} |
import 'package:bloc_test/bloc_test.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:holobooth/in_experience_selection/in_experience_selection.dart';
import 'package:mocktail/mocktail.dart';
import '../../helpers/helpers.dart';
class _MockInExperienceSelectionBloc
extends MockBloc<InExperienceSelectionEvent, InExperienceSelectionState>
implements InExperienceSelectionBloc {}
void main() {
group('SelectionLayer', () {
late InExperienceSelectionBloc inExperienceSelectionBloc;
setUp(() {
inExperienceSelectionBloc = _MockInExperienceSelectionBloc();
when(() => inExperienceSelectionBloc.state)
.thenReturn(InExperienceSelectionState());
});
testWidgets(
'renders MobileSelectionLayer on mobile breakpoint',
(tester) async {
tester.setSmallDisplaySize();
await tester.pumpSubject(SelectionLayer(), inExperienceSelectionBloc);
expect(find.byType(MobileSelectionLayer), findsOneWidget);
},
);
testWidgets(
'renders DesktopSelectionLayer on breakpoint different than mobile',
(tester) async {
tester.setLargeDisplaySize();
await tester.pumpSubject(SelectionLayer(), inExperienceSelectionBloc);
expect(find.byType(DesktopSelectionLayer), findsOneWidget);
},
);
testWidgets(
'collapse layout clicking CollapseButton on mobile breakpoint',
(tester) async {
tester.setSmallDisplaySize();
await tester.pumpSubject(SelectionLayer(), inExperienceSelectionBloc);
expect(
find.byKey(PrimarySelectionView.primaryTabBarViewKey),
findsOneWidget,
);
await tester.tap(find.byType(CollapseButton));
await tester.pumpAndSettle();
expect(
find.byKey(PrimarySelectionView.primaryTabBarViewKey),
findsNothing,
);
},
);
});
group('BlurryContainerClipPath', () {
test('verifies should not reclip', () async {
final path = BlurryContainerClipPath();
expect(path.shouldReclip(path), false);
});
});
}
extension on WidgetTester {
Future<void> pumpSubject(
SelectionLayer subject,
InExperienceSelectionBloc inExperienceSelectionBloc,
) =>
pumpApp(
BlocProvider.value(
value: inExperienceSelectionBloc,
child: Scaffold(body: Stack(children: [subject])),
),
);
}
| holobooth/test/in_experience_selection/widgets/selection_layer_test.dart/0 | {'file_path': 'holobooth/test/in_experience_selection/widgets/selection_layer_test.dart', 'repo_id': 'holobooth', 'token_count': 982} |
import 'package:bloc_test/bloc_test.dart';
import 'package:download_repository/download_repository.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:holobooth/share/share.dart';
import 'package:mocktail/mocktail.dart';
class _MockDownloadRepository extends Mock implements DownloadRepository {}
void main() {
late DownloadRepository downloadRepository;
group('DownloadBloc', () {
setUp(() {
downloadRepository = _MockDownloadRepository();
});
group('download', () {
blocTest<DownloadBloc, DownloadState>(
'downloads the current converted file',
setUp: () {
when(
() => downloadRepository.downloadFile(
fileName: any(named: 'fileName'),
fileId: any(named: 'fileId'),
mimeType: any(named: 'mimeType'),
),
).thenAnswer((_) async {});
},
build: () => DownloadBloc(
downloadRepository: downloadRepository,
),
act: (bloc) =>
bloc.add(DownloadRequested('mp4', 'https://storage/1234.mp4')),
verify: (_) {
verify(
() => downloadRepository.downloadFile(
fileName: any(named: 'fileName'),
fileId: any(named: 'fileId'),
mimeType: any(named: 'mimeType'),
),
).called(1);
},
);
blocTest<DownloadBloc, DownloadState>(
'correctly downloads a mp4',
setUp: () {
when(
() => downloadRepository.downloadFile(
fileName: any(named: 'fileName'),
fileId: any(named: 'fileId'),
mimeType: any(named: 'mimeType'),
),
).thenAnswer((_) async {});
},
build: () => DownloadBloc(
downloadRepository: downloadRepository,
),
act: (bloc) =>
bloc.add(DownloadRequested('mp4', 'https://storage/1234.mp4')),
verify: (_) {
verify(
() => downloadRepository.downloadFile(
fileId: '1234.mp4',
fileName: 'flutter_holobooth.mp4',
mimeType: 'video/mp4',
),
).called(1);
},
);
blocTest<DownloadBloc, DownloadState>(
'correctly downloads a gif',
setUp: () {
when(
() => downloadRepository.downloadFile(
fileName: any(named: 'fileName'),
fileId: any(named: 'fileId'),
mimeType: any(named: 'mimeType'),
),
).thenAnswer((_) async {});
},
build: () => DownloadBloc(
downloadRepository: downloadRepository,
),
act: (bloc) =>
bloc.add(DownloadRequested('gif', 'https://storage/1234.gif')),
verify: (_) {
verify(
() => downloadRepository.downloadFile(
fileId: '1234.gif',
fileName: 'flutter_holobooth.gif',
mimeType: 'image/gif',
),
).called(1);
},
);
});
});
}
| holobooth/test/share/bloc/download_bloc_test.dart/0 | {'file_path': 'holobooth/test/share/bloc/download_bloc_test.dart', 'repo_id': 'holobooth', 'token_count': 1541} |
name: http_logger
description: A logging middleware for Dart's http module.
version: 1.0.0
author: Gurleen Sethi <sarusethi@rocketmail.com>
homepage: http://www.github.com/gurleensethi
dependencies:
http_middleware:
git:
url: https://github.com/jogboms/http_middleware.git
environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=0.1.4 <2.0.0"
| http_logger/pubspec.yaml/0 | {'file_path': 'http_logger/pubspec.yaml', 'repo_id': 'http_logger', 'token_count': 156} |
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:hydrated_cubit/hydrated_cubit.dart';
import 'package:mockito/mockito.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:bloc/bloc.dart';
import 'package:uuid/uuid.dart';
class MockStorage extends Mock implements HydratedStorage {}
class MyUuidHydratedBloc extends HydratedBloc<String, String> {
MyUuidHydratedBloc() : super(Uuid().v4());
@override
Stream<String> mapEventToState(String event) async* {}
@override
Map<String, String> toJson(String state) => {'value': state};
@override
String fromJson(dynamic json) {
try {
return json['value'];
} on dynamic catch (_) {
// ignore: avoid_returning_null
return null;
}
}
}
enum CounterEvent { increment }
class MyCallbackHydratedBloc extends HydratedBloc<CounterEvent, int> {
MyCallbackHydratedBloc({this.onFromJsonCalled}) : super(0);
final ValueSetter<dynamic> onFromJsonCalled;
@override
Stream<int> mapEventToState(CounterEvent event) async* {
switch (event) {
case CounterEvent.increment:
yield state + 1;
break;
}
}
@override
Map<String, int> toJson(int state) => {'value': state};
@override
int fromJson(dynamic json) {
onFromJsonCalled?.call(json);
return json['value'] as int;
}
}
class MyHydratedBloc extends HydratedBloc<int, int> {
MyHydratedBloc([this._id]) : super(0);
final String _id;
@override
String get id => _id;
@override
Stream<int> mapEventToState(int event) async* {}
@override
Map<String, int> toJson(int state) {
return {'value': state};
}
@override
int fromJson(dynamic json) {
try {
return json['value'] as int;
} on dynamic catch (_) {
// ignore: avoid_returning_null
return null;
}
}
}
class MyMultiHydratedBloc extends HydratedBloc<int, int> {
final String _id;
MyMultiHydratedBloc(String id)
: _id = id,
super(0);
@override
String get id => _id;
@override
Stream<int> mapEventToState(int event) async* {}
@override
Map<String, int> toJson(int state) {
return {'value': state};
}
@override
int fromJson(dynamic json) {
try {
return json['value'] as int;
} on dynamic catch (_) {
// ignore: avoid_returning_null
return null;
}
}
}
class MyErrorThrowingBloc extends HydratedBloc<Object, int> {
final Function(Object error, StackTrace stackTrace) onErrorCallback;
final bool superOnError;
MyErrorThrowingBloc({this.onErrorCallback, this.superOnError = true})
: super(0);
@override
Stream<int> mapEventToState(Object event) async* {
yield state + 1;
}
@override
void onError(Object error, StackTrace stackTrace) {
onErrorCallback?.call(error, stackTrace);
if (superOnError) {
super.onError(error, stackTrace);
}
}
@override
Map<String, dynamic> toJson(int state) {
return {'key': Object};
}
@override
int fromJson(dynamic json) {
// ignore: avoid_returning_null
return null;
}
}
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
group('HydratedBloc', () {
MockStorage storage;
setUp(() {
storage = MockStorage();
HydratedBloc.storage = storage;
});
test('reads from storage once upon initialization', () {
MyCallbackHydratedBloc();
verify<dynamic>(storage.read('MyCallbackHydratedBloc')).called(1);
});
test(
'does not read from storage on subsequent state changes '
'when cache value exists', () async {
when<dynamic>(storage.read('MyCallbackHydratedBloc')).thenReturn(
{'value': 42},
);
final bloc = MyCallbackHydratedBloc();
expect(bloc.state, 42);
bloc.add(CounterEvent.increment);
await expectLater(bloc, emitsInOrder([42, 43]));
verify<dynamic>(storage.read('MyCallbackHydratedBloc')).called(1);
});
test(
'does not deserialize state on subsequent state changes '
'when cache value exists', () async {
final fromJsonCalls = <dynamic>[];
when<dynamic>(storage.read('MyCallbackHydratedBloc')).thenReturn(
{'value': 42},
);
final bloc = MyCallbackHydratedBloc(
onFromJsonCalled: fromJsonCalls.add,
);
expect(bloc.state, 42);
bloc.add(CounterEvent.increment);
await expectLater(bloc, emitsInOrder([42, 43]));
expect(fromJsonCalls, [
{'value': 42}
]);
});
test(
'does not read from storage on subsequent state changes '
'when cache is empty', () async {
when<dynamic>(storage.read('MyCallbackHydratedBloc')).thenReturn(null);
final bloc = MyCallbackHydratedBloc();
expect(bloc.state, 0);
bloc.add(CounterEvent.increment);
await expectLater(bloc, emitsInOrder([0, 1]));
verify<dynamic>(storage.read('MyCallbackHydratedBloc')).called(1);
});
test('does not deserialize state when cache is empty', () async {
final fromJsonCalls = <dynamic>[];
when<dynamic>(storage.read('MyCallbackHydratedBloc')).thenReturn(null);
final bloc = MyCallbackHydratedBloc(
onFromJsonCalled: fromJsonCalls.add,
);
expect(bloc.state, 0);
bloc.add(CounterEvent.increment);
await expectLater(bloc, emitsInOrder([0, 1]));
expect(fromJsonCalls, isEmpty);
});
test(
'does not read from storage on subsequent state changes '
'when cache is malformed', () async {
runZoned(() async {
when<dynamic>(storage.read('MyCallbackHydratedBloc')).thenReturn('{');
MyCallbackHydratedBloc().add(CounterEvent.increment);
}, onError: (_) {
verify<dynamic>(storage.read('MyCallbackHydratedBloc')).called(1);
});
});
test('does not deserialize state when cache is malformed', () async {
final fromJsonCalls = <dynamic>[];
runZoned(() async {
when<dynamic>(storage.read('MyCallbackHydratedBloc')).thenReturn('{');
MyCallbackHydratedBloc(
onFromJsonCalled: fromJsonCalls.add,
).add(CounterEvent.increment);
expect(fromJsonCalls, isEmpty);
}, onError: (_) {
expect(fromJsonCalls, isEmpty);
});
});
group('SingleHydratedBloc', () {
test('should call storage.write when onTransition is called', () {
final transition = Transition(
currentState: 0,
event: 0,
nextState: 0,
);
final expected = <String, int>{'value': 0};
MyHydratedBloc().onTransition(transition);
verify(
storage.write('MyHydratedBloc', expected),
).called(2);
});
test('should call storage.write when onTransition is called with bloc id',
() {
final bloc = MyHydratedBloc('A');
final transition = Transition(
currentState: 0,
event: 0,
nextState: 0,
);
final expected = <String, int>{'value': 0};
bloc.onTransition(transition);
verify(
storage.write('MyHydratedBlocA', expected),
).called(2);
});
test('should call onError when storage.write throws', () {
runZoned(() {
final expectedError = Exception('oops');
final transition = Transition(
currentState: 0,
event: 0,
nextState: 0,
);
final bloc = MyHydratedBloc();
when(storage.write(any, any)).thenThrow(expectedError);
bloc.onTransition(transition);
// ignore: invalid_use_of_protected_member
verify(bloc.onError(expectedError, any)).called(2);
}, onError: (error) {
expect(
(error as BlocUnhandledErrorException).error.toString(),
'Exception: oops',
);
expect((error as BlocUnhandledErrorException).stackTrace, isNotNull);
});
});
test('stores initial state when instantiated', () {
MyHydratedBloc();
verify<dynamic>(
storage.write('MyHydratedBloc', {"value": 0}),
).called(1);
});
test('initial state should return 0 when fromJson returns null', () {
when<dynamic>(storage.read('MyHydratedBloc')).thenReturn(null);
expect(MyHydratedBloc().state, 0);
verify<dynamic>(storage.read('MyHydratedBloc')).called(1);
});
test('initial state should return 101 when fromJson returns 101', () {
when<dynamic>(storage.read('MyHydratedBloc'))
.thenReturn({'value': 101});
expect(MyHydratedBloc().state, 101);
verify<dynamic>(storage.read('MyHydratedBloc')).called(1);
});
group('clear', () {
test('calls delete on storage', () async {
await MyHydratedBloc().clear();
verify(storage.delete('MyHydratedBloc')).called(1);
});
});
});
group('MultiHydratedBloc', () {
test('initial state should return 0 when fromJson returns null', () {
when<dynamic>(storage.read('MyMultiHydratedBlocA')).thenReturn(null);
expect(MyMultiHydratedBloc('A').state, 0);
verify<dynamic>(storage.read('MyMultiHydratedBlocA')).called(1);
when<dynamic>(storage.read('MyMultiHydratedBlocB')).thenReturn(null);
expect(MyMultiHydratedBloc('B').state, 0);
verify<dynamic>(storage.read('MyMultiHydratedBlocB')).called(1);
});
test('initial state should return 101/102 when fromJson returns 101/102',
() {
when<dynamic>(storage.read('MyMultiHydratedBlocA'))
.thenReturn({'value': 101});
expect(MyMultiHydratedBloc('A').state, 101);
verify<dynamic>(storage.read('MyMultiHydratedBlocA')).called(1);
when<dynamic>(storage.read('MyMultiHydratedBlocB'))
.thenReturn({'value': 102});
expect(MyMultiHydratedBloc('B').state, 102);
verify<dynamic>(storage.read('MyMultiHydratedBlocB')).called(1);
});
group('clear', () {
test('calls delete on storage', () async {
await MyMultiHydratedBloc('A').clear();
verify(storage.delete('MyMultiHydratedBlocA')).called(1);
verifyNever(storage.delete('MyMultiHydratedBlocB'));
await MyMultiHydratedBloc('B').clear();
verify(storage.delete('MyMultiHydratedBlocB')).called(1);
});
});
});
group('MyUuidHydratedBloc', () {
test('stores initialState when instantiated', () {
MyUuidHydratedBloc();
verify<dynamic>(storage.write('MyUuidHydratedBloc', any)).called(1);
});
test('correctly caches computed initialState', () {
dynamic cachedState;
when<dynamic>(storage.write('MyUuidHydratedBloc', any))
.thenReturn(null);
when<dynamic>(storage.read('MyUuidHydratedBloc'))
.thenReturn(cachedState);
MyUuidHydratedBloc();
cachedState = verify(storage.write('MyUuidHydratedBloc', captureAny))
.captured
.last;
when<dynamic>(storage.read('MyUuidHydratedBloc'))
.thenReturn(cachedState);
MyUuidHydratedBloc();
final initialStateB =
verify(storage.write('MyUuidHydratedBloc', captureAny))
.captured
.last;
expect(initialStateB, cachedState);
});
});
group('MyErrorThrowingBloc', () {
test('continues to emit new states when serialization fails', () async {
runZoned(() async {
final bloc = MyErrorThrowingBloc();
final expectedStates = [0, 1, emitsDone];
expectLater(
bloc,
emitsInOrder(expectedStates),
);
bloc.add(Object);
await bloc.close();
}, onError: (_) {});
});
test('calls onError when json decode fails', () async {
Object lastError;
StackTrace lastStackTrace;
runZoned(() async {
when(storage.read(any)).thenReturn('invalid json');
MyErrorThrowingBloc(
onErrorCallback: (error, stackTrace) {
lastError = error;
lastStackTrace = stackTrace;
},
);
}, onError: (_) {
expect(lastStackTrace, isNotNull);
expect(
'$lastError',
"type 'String' is not a subtype of type 'Map<dynamic, dynamic>'",
);
});
});
test('returns super.state when json decode fails', () async {
MyErrorThrowingBloc bloc;
runZoned(() async {
when(storage.read(any)).thenReturn('invalid json');
bloc = MyErrorThrowingBloc(superOnError: false);
}, onError: (_) {
expect(bloc.state, 0);
});
});
test('calls onError when storage.write fails', () async {
Object lastError;
StackTrace lastStackTrace;
final exception = Exception('oops');
runZoned(() async {
when(storage.write(any, any)).thenThrow(exception);
MyErrorThrowingBloc(
onErrorCallback: (error, stackTrace) {
lastError = error;
lastStackTrace = stackTrace;
},
);
}, onError: (_) {
expect(lastError, exception);
expect(lastStackTrace, isNotNull);
});
});
test('calls onError when json encode fails', () async {
runZoned(() async {
Object lastError;
StackTrace lastStackTrace;
final bloc = MyErrorThrowingBloc(
onErrorCallback: (error, stackTrace) {
lastError = error;
lastStackTrace = stackTrace;
},
);
bloc.add(Object);
await bloc.close();
expect(
'$lastError',
'Converting object to an encodable object failed: Object',
);
expect(lastStackTrace, isNotNull);
}, onError: (_) {});
});
});
});
}
| hydrated_bloc/test/hydrated_bloc_test.dart/0 | {'file_path': 'hydrated_bloc/test/hydrated_bloc_test.dart', 'repo_id': 'hydrated_bloc', 'token_count': 6078} |
export 'weather_api_client.dart';
export './weather_repository.dart';
| hydrated_weather/lib/repositories/repositories.dart/0 | {'file_path': 'hydrated_weather/lib/repositories/repositories.dart', 'repo_id': 'hydrated_weather', 'token_count': 25} |
include: package:flame_lint/analysis_options.yaml | ignite-cli/bricks/basics/__brick__/analysis_options.yaml/0 | {'file_path': 'ignite-cli/bricks/basics/__brick__/analysis_options.yaml', 'repo_id': 'ignite-cli', 'token_count': 15} |
import 'dart:convert';
import 'package:http/http.dart' as http;
class FlameVersionManager {
static late FlameVersionManager singleton;
static Future<void> init() async {
singleton = await FlameVersionManager.fetch();
}
final Map<Package, Versions> versions;
const FlameVersionManager._(this.versions);
static Future<FlameVersionManager> fetch() async {
final futures = Package.values.map((package) {
return _fetch(package).then((value) => MapEntry(package, value));
});
final entries = await Future.wait(futures);
return FlameVersionManager._(Map.fromEntries(entries));
}
static Future<Versions> _fetch(Package package) async {
final api = 'https://pub.dev/api/packages/${package.name}';
final response = await http.get(Uri.parse(api));
final definition = jsonDecode(response.body) as Map<String, dynamic>;
final versions = (definition['versions'] as List<dynamic>)
.map((dynamic e) => e as Map<String, dynamic>)
.toList();
return Versions.parse(versions);
}
}
enum Package {
flame('flame'),
flameLint('flame_lint', isDevDependency: true),
flameAudio('flame_audio'),
flameBloc('flame_bloc'),
flameFireAtlas('flame_fire_atlas'),
flameForge2D('flame_forge2d'),
flameOxygen('flame_oxygen'),
flameRive('flame_rive'),
flameSVG('flame_svg'),
flameTest('flame_test', isDevDependency: true),
flameTiled('flame_tiled');
static final includedByDefault = {Package.flame, Package.flameLint};
static final preSelectedByDefault = {Package.flameAudio, Package.flameTest};
final String name;
final bool isDevDependency;
const Package(this.name, {this.isDevDependency = false});
Map<String, String> toMustache(
Map<Package, Versions> versions,
String flameVersion,
) {
final version = this == flame ? flameVersion : versions[this]!.main;
return {'name': name, 'version': version};
}
static Package valueOf(String name) {
return values.firstWhere((e) => e.name == name);
}
}
class Versions {
final List<String> versions;
String get main => versions.first;
List<String> get visible => versions.take(5).toList();
const Versions(this.versions);
factory Versions.parse(List<Map<String, dynamic>> json) {
final versions = json.map((e) => e['version'] as String).toList().reversed;
return Versions(versions.toList());
}
}
| ignite-cli/lib/flame_version_manager.dart/0 | {'file_path': 'ignite-cli/lib/flame_version_manager.dart', 'repo_id': 'ignite-cli', 'token_count': 790} |
import 'package:cloud_firestore/cloud_firestore.dart';
import 'models.dart';
class CloudDb {
const CloudDb(this._instance);
final FirebaseFirestore _instance;
MapCollectionReference collection(String path) => _instance.collection(path);
MapDocumentReference doc(String path) => _instance.doc(path);
}
class CloudDbCollection {
const CloudDbCollection(this.db, this.path);
final CloudDb db;
final String path;
MapCollectionReference fetchAll() => db.collection(path);
MapDocumentReference fetchOne(String uuid) => db.doc('$path/$uuid');
}
| iirc/lib/data/network/firebase/cloud_db.dart/0 | {'file_path': 'iirc/lib/data/network/firebase/cloud_db.dart', 'repo_id': 'iirc', 'token_count': 166} |
import 'dart:async';
import '../analytics/analytics.dart';
import '../analytics/analytics_event.dart';
import '../entities/create_item_data.dart';
import '../repositories/items.dart';
class CreateItemUseCase {
const CreateItemUseCase({
required ItemsRepository items,
required Analytics analytics,
}) : _items = items,
_analytics = analytics;
final ItemsRepository _items;
final Analytics _analytics;
Future<String> call(String userId, CreateItemData item) {
unawaited(_analytics.log(AnalyticsEvent.createItem(userId)));
return _items.create(userId, item);
}
}
| iirc/lib/domain/use_cases/create_item_use_case.dart/0 | {'file_path': 'iirc/lib/domain/use_cases/create_item_use_case.dart', 'repo_id': 'iirc', 'token_count': 204} |
export 'utils/extensions.dart';
export 'utils/show_error_choice_banner.dart';
export 'utils/sliver_separator_builder_delegate.dart';
export 'utils/tag_color_scheme.dart';
| iirc/lib/presentation/utils.dart/0 | {'file_path': 'iirc/lib/presentation/utils.dart', 'repo_id': 'iirc', 'token_count': 62} |
import 'package:flutter/widgets.dart';
import 'package:iirc/domain.dart';
import 'package:sliver_tools/sliver_tools.dart';
import '../models.dart';
import 'item_calendar_list_view.dart';
import 'item_calendar_view.dart';
import 'item_calendar_view_header.dart';
class ItemCalendarViewGroup extends StatelessWidget {
const ItemCalendarViewGroup({
super.key,
this.primary = false,
required this.controller,
required this.items,
required this.analytics,
});
final bool primary;
final ItemViewModelList items;
final ItemCalendarViewController controller;
final Analytics analytics;
@override
Widget build(BuildContext context) => MultiSliver(
pushPinnedChildren: true,
children: <Widget>[
ItemCalendarViewHeader(
controller: controller,
primary: primary,
),
ItemCalendarView(
controller: controller,
items: items,
),
ItemCalendarListView(
controller: controller,
analytics: analytics,
),
],
);
}
| iirc/lib/presentation/widgets/item_calendar_view_group.dart/0 | {'file_path': 'iirc/lib/presentation/widgets/item_calendar_view_group.dart', 'repo_id': 'iirc', 'token_count': 442} |
import 'package:firebase_core/firebase_core.dart' as firebase;
import 'package:firebase_core_platform_interface/firebase_core_platform_interface.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:iirc/data.dart';
import 'package:mocktail/mocktail.dart';
import '../../../mocks.dart';
import 'mocks.dart';
void main() {
group('Firebase', () {
setUpAll(() {
registerFallbackValue(FakeFlutterErrorDetails());
});
setUp(() {
TestWidgetsFlutterBinding.ensureInitialized();
setupFirebaseCoreMocks();
});
tearDown(() {
TestFirebaseCoreHostApi.setup(null);
});
test('should initialize without errors', () async {
final MockFirebaseAnalytics analytics = MockFirebaseAnalytics();
await expectLater(
Firebase.initialize(
options: const firebase.FirebaseOptions(
apiKey: '',
appId: '',
messagingSenderId: '',
projectId: '',
storageBucket: '',
),
isAnalyticsEnabled: true,
name: 'TEST',
analytics: analytics,
googleSignIn: MockGoogleSignIn(),
auth: MockFirebaseAuth(),
firestore: MockFirebaseFirestore(),
),
completes,
);
verify(() => analytics.setAnalyticsCollectionEnabled(true)).called(1);
});
});
}
| iirc/test/data/network/firebase/firebase_test.dart/0 | {'file_path': 'iirc/test/data/network/firebase/firebase_test.dart', 'repo_id': 'iirc', 'token_count': 581} |
import 'package:flutter_test/flutter_test.dart';
import 'package:iirc/domain.dart';
void main() {
group('UpdateTagData', () {
test('should be equal when equal', () {
expect(
UpdateTagData(
id: nonconst('1'),
path: 'path',
title: 'title',
description: 'description',
color: 0xF,
),
UpdateTagData(
id: nonconst('1'),
path: 'path',
title: 'title',
description: 'description',
color: 0xF,
),
);
});
test('should serialize to string', () {
expect(
UpdateTagData(
id: nonconst('1'),
path: 'path',
title: 'title',
description: 'description',
color: 0xF,
).toString(),
'UpdateTagData(1, path, title, description, 15)',
);
});
});
}
| iirc/test/domain/entities/update_tag_data_test.dart/0 | {'file_path': 'iirc/test/domain/entities/update_tag_data_test.dart', 'repo_id': 'iirc', 'token_count': 444} |
import 'package:clock/clock.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:iirc/domain.dart';
import 'package:mocktail/mocktail.dart';
import '../../utils.dart';
void main() {
group('UpdateUserUseCase', () {
final UsersRepository usersRepository = mockRepositories.users;
final UpdateUserUseCase useCase = UpdateUserUseCase(users: usersRepository);
final UpdateUserData dummyUpdateUserData = UpdateUserData(
id: 'id',
lastSeenAt: clock.now(),
);
setUpAll(() {
registerFallbackValue(dummyUpdateUserData);
});
tearDown(() => reset(usersRepository));
test('should update a user', () {
when(() => usersRepository.update(any())).thenAnswer((_) async => true);
expect(useCase(dummyUpdateUserData), completion(true));
});
test('should bubble update errors', () {
when(() => usersRepository.update(any())).thenThrow(Exception('an error'));
expect(() => useCase(dummyUpdateUserData), throwsException);
});
});
}
| iirc/test/domain/use_cases/update_user_use_case_test.dart/0 | {'file_path': 'iirc/test/domain/use_cases/update_user_use_case_test.dart', 'repo_id': 'iirc', 'token_count': 363} |
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:iirc/presentation.dart';
import 'package:mocktail/mocktail.dart';
import '../../../utils.dart';
void main() {
group('LogoutListTile', () {
tearDown(mockUseCases.reset);
testWidgets('should logout', (WidgetTester tester) async {
when(mockUseCases.signOutUseCase.call).thenAnswer((_) async {});
await tester.pumpWidget(
createApp(
registry: createRegistry().withMockedUseCases(),
home: const Material(child: LogoutListTile()),
),
);
await tester.pump();
final Finder logoutListTile = find.byType(LogoutListTile);
expect(logoutListTile, findsOneWidget);
await tester.tap(logoutListTile);
verify(mockUseCases.signOutUseCase).called(1);
expect(find.byType(OnboardingPage), findsNothing);
await tester.pump();
await tester.pump();
expect(find.byType(OnboardingPage), findsOneWidget);
});
});
}
| iirc/test/presentation/screens/more/logout_list_tile_test.dart/0 | {'file_path': 'iirc/test/presentation/screens/more/logout_list_tile_test.dart', 'repo_id': 'iirc', 'token_count': 413} |
import 'package:flutter_test/flutter_test.dart';
import 'package:iirc/core.dart';
import 'package:iirc/data.dart';
import 'package:iirc/domain.dart';
import 'package:iirc/presentation.dart';
import 'package:mocktail/mocktail.dart';
import 'package:riverpod/riverpod.dart';
import '../../utils.dart';
Future<void> main() async {
group('UserProvider', () {
final UserEntity dummyUser = UsersMockImpl.user;
tearDown(mockUseCases.reset);
Future<UserEntity> createProviderFuture() {
final AccountEntity dummyAccount = AuthMockImpl.generateAccount();
final ProviderContainer container = createProviderContainer(
overrides: <Override>[
accountProvider.overrideWith((_) async => dummyAccount),
],
);
addTearDown(container.dispose);
return container.read(userProvider.future);
}
test('should get current user', () async {
when(() => mockUseCases.fetchUserUseCase.call(any())).thenAnswer((_) async => dummyUser);
expect(createProviderFuture(), completion(dummyUser));
});
test('should throw on empty current user', () async {
when(() => mockUseCases.fetchUserUseCase.call(any())).thenAnswer((_) async => null);
expect(createProviderFuture, throwsA(isA<AppException>()));
});
});
}
| iirc/test/presentation/state/user_provider_test.dart/0 | {'file_path': 'iirc/test/presentation/state/user_provider_test.dart', 'repo_id': 'iirc', 'token_count': 461} |
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Date/time formatting symbols for a large subset of locales.
///
/// DO NOT EDIT. This file is autogenerated from ICU data. See
/// 'http://go/generate_datetime_pattern_dart.cc' (Google internal)
/// File generated from CLDR ver. 35.1
// MANUAL EDIT TO SUPPRESS WARNINGS IN GENERATED CODE
// ignore_for_file: unnecessary_const
library date_time_patterns;
/// Returns a Map from locale names to another Map that goes from skeletons
/// to the locale-specific formatting patterns.
/// Internal use only. Call initializeDateFormatting instead.
Map<dynamic, dynamic> dateTimePatternMap() => const {
/// Extended set of localized date/time patterns for locale af.
'af': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd-MM', // NUM_MONTH_DAY
'MEd': 'EEE d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM-y', // YEAR_NUM_MONTH
'yMd': 'y-MM-dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE y-MM-dd', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale am.
'am': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE፣ M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE፣ MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE፣ MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE፣ d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE፣ MMM d y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y MMMM d, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ar.
'ar': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE، d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE، d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE، d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE، d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE، d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE، d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ar_DZ.
'ar_DZ': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE، d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE، d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE، d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE، d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE، d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE، d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ar_EG.
'ar_EG': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE، d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE، d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE، d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE، d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE، d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE، d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale az.
'az': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd.MM', // NUM_MONTH_DAY
'MEd': 'dd.MM, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'd MMM, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'd MMMM, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'dd.MM.y, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'd MMM y, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'd MMMM y, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale be.
'be': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M', // NUM_MONTH_DAY
'MEd': 'EEE, d.M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'LLL y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y', // YEAR_MONTH
'yMMMMd': 'd MMMM y \'г\'.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y \'г\'.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm.ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale bg.
'bg': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.MM', // NUM_MONTH_DAY
'MEd': 'EEE, d.MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'MM', // ABBR_MONTH
'MMMd': 'd.MM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d.MM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y \'г\'.', // YEAR
'yM': 'MM.y \'г\'.', // YEAR_NUM_MONTH
'yMd': 'd.MM.y \'г\'.', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.MM.y \'г\'.', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MM.y \'г\'.', // YEAR_ABBR_MONTH
'yMMMd': 'd.MM.y \'г\'.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d.MM.y \'г\'.', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y \'г\'.', // YEAR_MONTH
'yMMMMd': 'd MMMM y \'г\'.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y \'г\'.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y \'г\'.', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y \'г\'.', // YEAR_QUARTER
'H': 'H \'ч\'.', // HOUR24
'Hm': 'H:mm \'ч\'.', // HOUR24_MINUTE
'Hms': 'H:mm:ss \'ч\'.', // HOUR24_MINUTE_SECOND
'j': 'H \'ч\'.', // HOUR
'jm': 'H:mm \'ч\'.', // HOUR_MINUTE
'jms': 'H:mm:ss \'ч\'.', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm \'ч\'. v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm \'ч\'. z', // HOUR_MINUTETZ
'jz': 'H \'ч\'. z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale bn.
'bn': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d-M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale br.
'br': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'MM', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale bs.
'bs': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y.', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'd.M.y.', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y.', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y.', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y.', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y.', // YEAR_MONTH
'yMMMMd': 'd. MMMM y.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y.', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y.', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm (v)', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm (z)', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ca.
'ca': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'LLL \'de\' y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM \'de\' y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL \'de\' y', // YEAR_MONTH
'yMMMMd': 'd MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'H:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'H:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale chr.
'chr': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE, M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale cs.
'cs': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd. M.', // NUM_MONTH_DAY
'MEd': 'EEE d. M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. M.', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. M.', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd. M. y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d. M. y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'LLLL y', // YEAR_ABBR_MONTH
'yMMMd': 'd. M. y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d. M. y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'H:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'H:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale cy.
'cy': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale da.
'da': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'MMM', // ABBR_STANDALONE_MONTH
'LLLL': 'MMMM', // STANDALONE_MONTH
'M': 'M', // NUM_MONTH
'Md': 'd.M', // NUM_MONTH_DAY
'MEd': 'EEE d.M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'MMM', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'MMMM', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE \'den\' d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH.mm', // HOUR24_MINUTE
'Hms': 'HH.mm.ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH.mm', // HOUR_MINUTE
'jms': 'HH.mm.ss', // HOUR_MINUTE_SECOND
'jmv': 'HH.mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH.mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm.ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale de.
'de': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH \'Uhr\'', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH \'Uhr\'', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH \'Uhr\' z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale de_AT.
'de_AT': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH \'Uhr\'', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH \'Uhr\'', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH \'Uhr\' z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale de_CH.
'de_CH': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH \'Uhr\'', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH \'Uhr\'', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH \'Uhr\' z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale el.
'el': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'MMM', // ABBR_STANDALONE_MONTH
'LLLL': 'MMMM', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'MMM', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'MMMM', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en.
'en': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE, M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_AU.
'en_AU': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_CA.
'en_CA': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'MM-dd', // NUM_MONTH_DAY
'MEd': 'EEE, MM-dd', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'y-MM-dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, y-MM-dd', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_GB.
'en_GB': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_IE.
'en_IE': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_IN.
'en_IN': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_SG.
'en_SG': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_US.
'en_US': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE, M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_ZA.
'en_ZA': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'MM/dd', // NUM_MONTH_DAY
'MEd': 'EEE, MM/dd', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'dd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, dd MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, dd MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'y/MM/dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, y/MM/dd', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'dd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, dd MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale es.
'es': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'H:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'H:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale es_419.
'es_419': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMMM \'de\' y', // YEAR_ABBR_MONTH
'yMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d \'de\' MMM \'de\' y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ \'de\' y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'H:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'H:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale es_ES.
'es_ES': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'H:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'H:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale es_MX.
'es_MX': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d \'de\' MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMMM \'de\' y', // YEAR_ABBR_MONTH
'yMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d \'de\' MMMM \'de\' y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale es_US.
'es_US': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d \'de\' MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMMM \'de\' y', // YEAR_ABBR_MONTH
'yMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d \'de\' MMMM \'de\' y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale et.
'et': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'MMMM', // ABBR_STANDALONE_MONTH
'LLLL': 'MMMM', // STANDALONE_MONTH
'M': 'M', // NUM_MONTH
'Md': 'd.M', // NUM_MONTH_DAY
'MEd': 'EEE, d.M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'MMMM', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'MMMM', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale eu.
'eu': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'M/d, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'MMM d, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'MMMM d, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y/M', // YEAR_NUM_MONTH
'yMd': 'y/M/d', // YEAR_NUM_MONTH_DAY
'yMEd': 'y/M/d, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y MMM d', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y MMM d, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y(\'e\')\'ko\' MMMM', // YEAR_MONTH
'yMMMMd': 'y(\'e\')\'ko\' MMMM\'ren\' d', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y(\'e\')\'ko\' MMMM\'ren\' d(\'a\'), EEEE',
// YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y(\'e\')\'ko\' QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y(\'e\')\'ko\' QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH (z)', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale fa.
'fa': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd LLL', // ABBR_MONTH_DAY
'MMMEd': 'EEE d LLL', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd LLLL', // MONTH_DAY
'MMMMEEEEd': 'EEEE d LLLL', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y/M', // YEAR_NUM_MONTH
'yMd': 'y/M/d', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE y/M/d', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm (z)', // HOUR_MINUTETZ
'jz': 'H (z)', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale fi.
'fi': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'ccc d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'cccc d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'L.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'LLL y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H.mm', // HOUR24_MINUTE
'Hms': 'H.mm.ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H.mm', // HOUR_MINUTE
'jms': 'H.mm.ss', // HOUR_MINUTE_SECOND
'jmv': 'H.mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'H.mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'm.ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale fil.
'fil': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE, M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale fr.
'fr': const {
'd': 'd', // DAY
'E': 'EEE', // ABBR_WEEKDAY
'EEEE': 'EEEE', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH \'h\'', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH \'h\'', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH \'h\' z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale fr_CA.
'fr_CA': const {
'd': 'd', // DAY
'E': 'EEE', // ABBR_WEEKDAY
'EEEE': 'EEEE', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M-d', // NUM_MONTH_DAY
'MEd': 'EEE M-d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'y-MM-dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE y-MM-dd', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH \'h\'', // HOUR24
'Hm': 'HH \'h\' mm', // HOUR24_MINUTE
'Hms': 'HH \'h\' mm \'min\' ss \'s\'', // HOUR24_MINUTE_SECOND
'j': 'HH \'h\'', // HOUR
'jm': 'HH \'h\' mm', // HOUR_MINUTE
'jms': 'HH \'h\' mm \'min\' ss \'s\'', // HOUR_MINUTE_SECOND
'jmv': 'HH \'h\' mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH \'h\' mm z', // HOUR_MINUTETZ
'jz': 'HH \'h\' z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm \'min\' ss \'s\'', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ga.
'ga': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'LL', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale gl.
'gl': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd \'de\' MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d \'de\' MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM \'de\' y', // YEAR_ABBR_MONTH
'yMMMd': 'd/MM/y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d/MM/y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale gsw.
'gsw': const {
'd': 'd', // DAY
'E': 'EEE', // ABBR_WEEKDAY
'EEEE': 'EEEE', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-M', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, y-M-d', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'y MMM d', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale gu.
'gu': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale haw.
'haw': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y MMMM', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale he.
'he': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M', // NUM_MONTH_DAY
'MEd': 'EEE, d.M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd בMMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d בMMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd בMMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d בMMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd בMMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d בMMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd בMMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d בMMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale hi.
'hi': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale hr.
'hr': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L.', // NUM_MONTH
'Md': 'dd. MM.', // NUM_MONTH_DAY
'MEd': 'EEE, dd. MM.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y.', // YEAR
'yM': 'MM. y.', // YEAR_NUM_MONTH
'yMd': 'dd. MM. y.', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd. MM. y.', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'LLL y.', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y.', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y.', // YEAR_MONTH
'yMMMMd': 'd. MMMM y.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y.', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y.', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH (z)', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale hu.
'hu': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M. d.', // NUM_MONTH_DAY
'MEd': 'M. d., EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d.', // ABBR_MONTH_DAY
'MMMEd': 'MMM d., EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d.', // MONTH_DAY
'MMMMEEEEd': 'MMMM d., EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y.', // YEAR
'yM': 'y. M.', // YEAR_NUM_MONTH
'yMd': 'y. MM. dd.', // YEAR_NUM_MONTH_DAY
'yMEd': 'y. MM. dd., EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y. MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y. MMM d.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y. MMM d., EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y. MMMM', // YEAR_MONTH
'yMMMMd': 'y. MMMM d.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y. MMMM d., EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y. QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y. QQQQ', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale hy.
'hy': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd.MM', // NUM_MONTH_DAY
'MEd': 'dd.MM, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'd MMM, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'd MMMM, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'd.MM.y թ., EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y թ. LLL', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM, y թ.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y թ. MMM d, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y թ․ LLLL', // YEAR_MONTH
'yMMMMd': 'd MMMM, y թ.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y թ. MMMM d, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y թ. QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y թ. QQQQ', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale id.
'id': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH.mm', // HOUR24_MINUTE
'Hms': 'HH.mm.ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH.mm', // HOUR_MINUTE
'jms': 'HH.mm.ss', // HOUR_MINUTE_SECOND
'jmv': 'HH.mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH.mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm.ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale in.
'in': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH.mm', // HOUR24_MINUTE
'Hms': 'HH.mm.ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH.mm', // HOUR_MINUTE
'jms': 'HH.mm.ss', // HOUR_MINUTE_SECOND
'jmv': 'HH.mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH.mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm.ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale is.
'is': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M. y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'v – HH:mm', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'z – HH:mm', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale it.
'it': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale iw.
'iw': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M', // NUM_MONTH_DAY
'MEd': 'EEE, d.M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd בMMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d בMMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd בMMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d בMMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd בMMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d בMMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd בMMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d בMMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ja.
'ja': const {
'd': 'd日', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'M月', // ABBR_STANDALONE_MONTH
'LLLL': 'M月', // STANDALONE_MONTH
'M': 'M月', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'M/d(EEE)', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'M月', // ABBR_MONTH
'MMMd': 'M月d日', // ABBR_MONTH_DAY
'MMMEd': 'M月d日(EEE)', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'M月', // MONTH
'MMMMd': 'M月d日', // MONTH_DAY
'MMMMEEEEd': 'M月d日EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y年', // YEAR
'yM': 'y/M', // YEAR_NUM_MONTH
'yMd': 'y/M/d', // YEAR_NUM_MONTH_DAY
'yMEd': 'y/M/d(EEE)', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y年M月', // YEAR_ABBR_MONTH
'yMMMd': 'y年M月d日', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y年M月d日(EEE)', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y年M月', // YEAR_MONTH
'yMMMMd': 'y年M月d日', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y年M月d日EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y/QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y年QQQQ', // YEAR_QUARTER
'H': 'H時', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H時', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'H:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'H:mm z', // HOUR_MINUTETZ
'jz': 'H時 z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ka.
'ka': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M', // NUM_MONTH_DAY
'MEd': 'EEE, d.M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM. y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM. y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM. y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM, y', // YEAR_MONTH
'yMMMMd': 'd MMMM, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ, y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ, y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale kk.
'kk': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd.MM', // NUM_MONTH_DAY
'MEd': 'dd.MM, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'd MMM, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'd MMMM, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'dd.MM.y, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y \'ж\'. MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y \'ж\'. d MMM', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y \'ж\'. d MMM, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y \'ж\'. MMMM', // YEAR_MONTH
'yMMMMd': 'y \'ж\'. d MMMM', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y \'ж\'. d MMMM, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y \'ж\'. QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y \'ж\'. QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale km.
'km': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale kn.
'kn': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'd/M, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d,y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ko.
'ko': const {
'd': 'd일', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'M월', // NUM_MONTH
'Md': 'M. d.', // NUM_MONTH_DAY
'MEd': 'M. d. (EEE)', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d일', // ABBR_MONTH_DAY
'MMMEd': 'MMM d일 (EEE)', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d일', // MONTH_DAY
'MMMMEEEEd': 'MMMM d일 EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y년', // YEAR
'yM': 'y. M.', // YEAR_NUM_MONTH
'yMd': 'y. M. d.', // YEAR_NUM_MONTH_DAY
'yMEd': 'y. M. d. (EEE)', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y년 MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y년 MMM d일', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y년 MMM d일 (EEE)', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y년 MMMM', // YEAR_MONTH
'yMMMMd': 'y년 MMMM d일', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y년 MMMM d일 EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y년 QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y년 QQQQ', // YEAR_QUARTER
'H': 'H시', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'H시 m분 s초', // HOUR24_MINUTE_SECOND
'j': 'a h시', // HOUR
'jm': 'a h:mm', // HOUR_MINUTE
'jms': 'a h:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'a h:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'a h:mm z', // HOUR_MINUTETZ
'jz': 'a h시 z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ky.
'ky': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd-MM', // NUM_MONTH_DAY
'MEd': 'dd-MM, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd-MMM', // ABBR_MONTH_DAY
'MMMEd': 'd-MMM, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd-MMMM', // MONTH_DAY
'MMMMEEEEd': 'd-MMMM, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'y-dd-MM', // YEAR_NUM_MONTH_DAY
'yMEd': 'y-dd-MM, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y-\'ж\'. MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y-\'ж\'. d-MMM', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y-\'ж\'. d-MMM, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y-\'ж\'., MMMM', // YEAR_MONTH
'yMMMMd': 'y-\'ж\'., d-MMMM', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y-\'ж\'., d-MMMM, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y-\'ж\'., QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y-\'ж\'., QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ln.
'ln': const {
'd': 'd', // DAY
'E': 'EEE', // ABBR_WEEKDAY
'EEEE': 'EEEE', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y MMMM', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale lo.
'lo': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale lt.
'lt': const {
'd': 'dd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'MM', // NUM_MONTH
'Md': 'MM-d', // NUM_MONTH_DAY
'MEd': 'MM-dd, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'MM', // ABBR_MONTH
'MMMd': 'MM-dd', // ABBR_MONTH_DAY
'MMMEd': 'MM-dd, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d \'d\'.', // MONTH_DAY
'MMMMEEEEd': 'MMMM d \'d\'., EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'y-MM-dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'y-MM-dd, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y-MM', // YEAR_ABBR_MONTH
'yMMMd': 'y-MM-dd', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y-MM-dd, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y \'m\'. LLLL', // YEAR_MONTH
'yMMMMd': 'y \'m\'. MMMM d \'d\'.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y \'m\'. MMMM d \'d\'., EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm; v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm; z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale lv.
'lv': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd.MM.', // NUM_MONTH_DAY
'MEd': 'EEE, dd.MM.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y. \'g\'.', // YEAR
'yM': 'MM.y.', // YEAR_NUM_MONTH
'yMd': 'y.MM.d.', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y.', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y. \'g\'. MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y. \'g\'. d. MMM', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, y. \'g\'. d. MMM', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y. \'g\'. MMMM', // YEAR_MONTH
'yMMMMd': 'y. \'gada\' d. MMMM', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, y. \'gada\' d. MMMM', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y. \'g\'. QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y. \'g\'. QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale mk.
'mk': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M', // NUM_MONTH_DAY
'MEd': 'EEE, d.M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y \'г\'.', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y \'г\'.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y \'г\'.', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y \'г\'.', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y \'г\'.', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y \'г\'.', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ml.
'ml': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'd/M, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'MMM d, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'MMMM d, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'd-M-y, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y MMM d', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y MMM d, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y MMMM', // YEAR_MONTH
'yMMMMd': 'y, MMMM d', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y, MMMM d, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale mn.
'mn': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'LLLLL', // NUM_MONTH
'Md': 'MMMMM/dd', // NUM_MONTH_DAY
'MEd': 'MMMMM/dd. EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM\'ын\' d', // ABBR_MONTH_DAY
'MMMEd': 'MMM\'ын\' d. EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM\'ын\' d', // MONTH_DAY
'MMMMEEEEd': 'MMMM\'ын\' d. EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y MMMMM', // YEAR_NUM_MONTH
'yMd': 'y.MM.dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'y.MM.dd. EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y \'оны\' MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y \'оны\' MMM\'ын\' d', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y \'оны\' MMM\'ын\' d. EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y \'оны\' MMMM', // YEAR_MONTH
'yMMMMd': 'y \'оны\' MMMM\'ын\' d', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y \'оны\' MMMM\'ын\' d. EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y \'оны\' QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y \'оны\' QQQQ', // YEAR_QUARTER
'H': 'HH \'ц\'', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH \'ц\'', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm (v)', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm (z)', // HOUR_MINUTETZ
'jz': 'HH \'ц\' (z)', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale mo.
'mo': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd.MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd.MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd.MM.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale mr.
'mr': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d, MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ms.
'ms': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd-M', // NUM_MONTH_DAY
'MEd': 'EEE, d-M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M-y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale mt.
'mt': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'MM-dd', // NUM_MONTH_DAY
'MEd': 'EEE, M-d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d \'ta\'’ MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'ta\'’ MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'ta\'’ MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd \'ta\'’ MMM, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d \'ta\'’ MMM, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd \'ta\'’ MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'ta\'’ MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ - y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ - y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale my.
'my': const {
'd': 'd', // DAY
'E': 'cccနေ့', // ABBR_WEEKDAY
'EEEE': 'ccccနေ့', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'd/M၊ EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'MMM d၊ EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'MMMM d ရက် EEEEနေ့', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'dd-MM-y', // YEAR_NUM_MONTH_DAY
'yMEd': 'd/M/y၊ EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'y၊ MMM d', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y၊ MMM d၊ EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y MMMM', // YEAR_MONTH
'yMMMMd': 'y၊ d MMMM', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y၊ MMMM d၊ EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'v HH:mm', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'z HH:mm', // HOUR_MINUTETZ
'jz': 'z HH', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale nb.
'nb': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L.', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d.MM.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ne.
'ne': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'MM-dd', // NUM_MONTH_DAY
'MEd': 'MM-dd, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'MMM d, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'MMMM d, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'y-MM-dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'y-MM-dd, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y MMM d', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y MMM d, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y MMMM', // YEAR_MONTH
'yMMMMd': 'y MMMM d', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y MMMM d, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale nl.
'nl': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd-M', // NUM_MONTH_DAY
'MEd': 'EEE d-M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M-y', // YEAR_NUM_MONTH
'yMd': 'd-M-y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d-M-y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale no.
'no': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L.', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d.MM.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale no_NO.
'no_NO': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L.', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d.MM.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale or.
'or': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE, M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale pa.
'pa': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, dd-MM.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale pl.
'pl': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.MM', // NUM_MONTH_DAY
'MEd': 'EEE, d.MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.MM.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'LLL y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale pt.
'pt': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd \'de\' MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d \'de\' MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM \'de\' y', // YEAR_ABBR_MONTH
'yMMMd': 'd \'de\' MMM \'de\' y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d \'de\' MMM \'de\' y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ \'de\' y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale pt_BR.
'pt_BR': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd \'de\' MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d \'de\' MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM \'de\' y', // YEAR_ABBR_MONTH
'yMMMd': 'd \'de\' MMM \'de\' y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d \'de\' MMM \'de\' y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ \'de\' y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale pt_PT.
'pt_PT': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd/MM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d/MM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd \'de\' MMMM', // MONTH_DAY
'MMMMEEEEd': 'cccc, d \'de\' MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MM/y', // YEAR_ABBR_MONTH
'yMMMd': 'd/MM/y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d/MM/y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'de\' y', // YEAR_MONTH
'yMMMMd': 'd \'de\' MMMM \'de\' y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d \'de\' MMMM \'de\' y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQQ \'de\' y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'de\' y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ro.
'ro': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd.MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd.MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd.MM.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ru.
'ru': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd.MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd.MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'ccc, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'cccc, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'ccc, dd.MM.y \'г\'.', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'LLL y \'г\'.', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y \'г\'.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y \'г\'.', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y \'г\'.', // YEAR_MONTH
'yMMMMd': 'd MMMM y \'г\'.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y \'г\'.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y \'г\'.', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y \'г\'.', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale sh.
'sh': const {
'd': 'd', // DAY
'E': 'EEE', // ABBR_WEEKDAY
'EEEE': 'EEEE', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y.', // YEAR
'yM': 'M.y.', // YEAR_NUM_MONTH
'yMd': 'd.M.y.', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y.', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y.', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y.', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y.', // YEAR_MONTH
'yMMMMd': 'd. MMMM y.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y.', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y.', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale si.
'si': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M-d', // NUM_MONTH_DAY
'MEd': 'M-d, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'MMM d EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'MMMM d EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-M', // YEAR_NUM_MONTH
'yMd': 'y-M-d', // YEAR_NUM_MONTH_DAY
'yMEd': 'y-M-d, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y MMM d', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y MMM d, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y MMMM', // YEAR_MONTH
'yMMMMd': 'y MMMM d', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y MMMM d, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH.mm', // HOUR24_MINUTE
'Hms': 'HH.mm.ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH.mm', // HOUR_MINUTE
'jms': 'HH.mm.ss', // HOUR_MINUTE_SECOND
'jmv': 'HH.mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH.mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm.ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale sk.
'sk': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L.', // NUM_MONTH
'Md': 'd. M.', // NUM_MONTH_DAY
'MEd': 'EEE d. M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. M.', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. M.', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd. M. y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d. M. y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'M/y', // YEAR_ABBR_MONTH
'yMMMd': 'd. M. y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d. M. y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'H', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'H:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'H', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'H:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'H:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'H:mm z', // HOUR_MINUTETZ
'jz': 'H z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale sl.
'sl': const {
'd': 'd.', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd. M.', // NUM_MONTH_DAY
'MEd': 'EEE, d. M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd. M. y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d. M. y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd. MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH\'h\'', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH\'h\'', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH\'h\' z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale sq.
'sq': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M', // NUM_MONTH_DAY
'MEd': 'EEE, d.M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M.y', // YEAR_NUM_MONTH
'yMd': 'd.M.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ, y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ, y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a, v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a, z', // HOUR_MINUTETZ
'jz': 'h a, z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale sr.
'sr': const {
'd': 'd', // DAY
'E': 'EEE', // ABBR_WEEKDAY
'EEEE': 'EEEE', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y.', // YEAR
'yM': 'M.y.', // YEAR_NUM_MONTH
'yMd': 'd.M.y.', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y.', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y.', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y.', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y.', // YEAR_MONTH
'yMMMMd': 'd. MMMM y.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y.', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y.', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale sr_Latn.
'sr_Latn': const {
'd': 'd', // DAY
'E': 'EEE', // ABBR_WEEKDAY
'EEEE': 'EEEE', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd.M.', // NUM_MONTH_DAY
'MEd': 'EEE, d.M.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd. MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d. MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd. MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d. MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y.', // YEAR
'yM': 'M.y.', // YEAR_NUM_MONTH
'yMd': 'd.M.y.', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d.M.y.', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y.', // YEAR_ABBR_MONTH
'yMMMd': 'd. MMM y.', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d. MMM y.', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y.', // YEAR_MONTH
'yMMMMd': 'd. MMMM y.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d. MMMM y.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y.', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y.', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale sv.
'sv': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'y-MM-dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, y-MM-dd', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale sw.
'sw': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE, d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ta.
'ta': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'dd-MM, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'MMM d, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'MMMM d, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'a h', // HOUR
'jm': 'a h:mm', // HOUR_MINUTE
'jms': 'a h:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'a h:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'a h:mm z', // HOUR_MINUTETZ
'jz': 'a h z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale te.
'te': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'd/M, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'd MMM, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'd MMMM, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'd/M/y, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd, MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'd MMM, y, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'd, MMMM y, EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale th.
'th': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEEที่ d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM G y', // YEAR_MONTH
'yMMMMd': 'd MMMM G y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEEที่ d MMMM G y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ G y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm น.', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm น.', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale tl.
'tl': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE, M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale tr.
'tr': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'd/MM EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'd MMMM EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'd MMMM EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'd.M.y EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'd MMM y EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'd MMMM y EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale uk.
'uk': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'LL', // NUM_MONTH
'Md': 'dd.MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd.MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd.MM.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'LLL y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'LLLL y', // YEAR_MONTH
'yMMMMd': 'd MMMM y \'р\'.', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y \'р\'.', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y \'р\'.', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ur.
'ur': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE، d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE، d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE، d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE، d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM، y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE، d MMM، y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM، y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE، d MMMM، y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale uz.
'uz': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'LL', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd-MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d-MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd-MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d-MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM, y', // YEAR_ABBR_MONTH
'yMMMd': 'd-MMM, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d-MMM, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM, y', // YEAR_MONTH
'yMMMMd': 'd-MMMM, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d-MMMM, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y, QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y, QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm (v)', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm (z)', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale vi.
'vi': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd/M', // NUM_MONTH_DAY
'MEd': 'EEE, dd/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM \'năm\' y', // YEAR_MONTH
'yMMMMd': 'd MMMM, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ \'năm\' y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'H:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'H:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale zh.
'zh': const {
'd': 'd日', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'M月', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'M/dEEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'M月d日', // ABBR_MONTH_DAY
'MMMEd': 'M月d日EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'M月d日', // MONTH_DAY
'MMMMEEEEd': 'M月d日EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y年', // YEAR
'yM': 'y年M月', // YEAR_NUM_MONTH
'yMd': 'y/M/d', // YEAR_NUM_MONTH_DAY
'yMEd': 'y/M/dEEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y年M月', // YEAR_ABBR_MONTH
'yMMMd': 'y年M月d日', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y年M月d日EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y年M月', // YEAR_MONTH
'yMMMMd': 'y年M月d日', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y年M月d日EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y年第Q季度', // YEAR_ABBR_QUARTER
'yQQQQ': 'y年第Q季度', // YEAR_QUARTER
'H': 'H时', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'ah时', // HOUR
'jm': 'ah:mm', // HOUR_MINUTE
'jms': 'ah:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'v ah:mm', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'z ah:mm', // HOUR_MINUTETZ
'jz': 'zah时', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale zh_CN.
'zh_CN': const {
'd': 'd日', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'M月', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'M/dEEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'M月d日', // ABBR_MONTH_DAY
'MMMEd': 'M月d日EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'M月d日', // MONTH_DAY
'MMMMEEEEd': 'M月d日EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y年', // YEAR
'yM': 'y年M月', // YEAR_NUM_MONTH
'yMd': 'y/M/d', // YEAR_NUM_MONTH_DAY
'yMEd': 'y/M/dEEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y年M月', // YEAR_ABBR_MONTH
'yMMMd': 'y年M月d日', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y年M月d日EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y年M月', // YEAR_MONTH
'yMMMMd': 'y年M月d日', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y年M月d日EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y年第Q季度', // YEAR_ABBR_QUARTER
'yQQQQ': 'y年第Q季度', // YEAR_QUARTER
'H': 'H时', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'ah时', // HOUR
'jm': 'ah:mm', // HOUR_MINUTE
'jms': 'ah:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'v ah:mm', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'z ah:mm', // HOUR_MINUTETZ
'jz': 'zah时', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale zh_HK.
'zh_HK': const {
'd': 'd日', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'M月', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'd/M(EEE)', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'M月d日', // ABBR_MONTH_DAY
'MMMEd': 'M月d日EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'M月d日', // MONTH_DAY
'MMMMEEEEd': 'M月d日EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y年', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'd/M/y(EEE)', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y年M月', // YEAR_ABBR_MONTH
'yMMMd': 'y年M月d日', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y年M月d日EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y年M月', // YEAR_MONTH
'yMMMMd': 'y年M月d日', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y年M月d日EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y年QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y年QQQQ', // YEAR_QUARTER
'H': 'H時', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'ah時', // HOUR
'jm': 'ah:mm', // HOUR_MINUTE
'jms': 'ah:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'ah:mm [v]', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'ah:mm [z]', // HOUR_MINUTETZ
'jz': 'ah時 z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale zh_TW.
'zh_TW': const {
'd': 'd日', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'M月', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'M/d(EEE)', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'M月d日', // ABBR_MONTH_DAY
'MMMEd': 'M月d日 EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'M月d日', // MONTH_DAY
'MMMMEEEEd': 'M月d日 EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y年', // YEAR
'yM': 'y/M', // YEAR_NUM_MONTH
'yMd': 'y/M/d', // YEAR_NUM_MONTH_DAY
'yMEd': 'y/M/d(EEE)', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y年M月', // YEAR_ABBR_MONTH
'yMMMd': 'y年M月d日', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y年M月d日 EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y年M月', // YEAR_MONTH
'yMMMMd': 'y年M月d日', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'y年M月d日 EEEE', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y年QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y年QQQQ', // YEAR_QUARTER
'H': 'H時', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'ah時', // HOUR
'jm': 'ah:mm', // HOUR_MINUTE
'jms': 'ah:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'ah:mm [v]', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'ah:mm [z]', // HOUR_MINUTETZ
'jz': 'ah時 z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale zu.
'zu': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'MM-dd', // NUM_MONTH_DAY
'MEd': 'MM-dd, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'y-MM-dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'y-MM-dd, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_ISO.
'en_ISO': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'M/d', // NUM_MONTH_DAY
'MEd': 'EEE, M/d', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'EEE, MMM d', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'EEEE, MMMM d', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'M/d/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, M/d/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'MMM d, y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, MMM d, y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'MMMM d, y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, MMMM d, y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale en_MY.
'en_MY': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd/MM', // NUM_MONTH_DAY
'MEd': 'EEE, dd/MM', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE, d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE, d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM/y', // YEAR_NUM_MONTH
'yMd': 'dd/MM/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd/MM/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE, d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'h a', // HOUR
'jm': 'h:mm a', // HOUR_MINUTE
'jms': 'h:mm:ss a', // HOUR_MINUTE_SECOND
'jmv': 'h:mm a v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'h:mm a z', // HOUR_MINUTETZ
'jz': 'h a z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale fr_CH.
'fr_CH': const {
'd': 'd', // DAY
'E': 'EEE', // ABBR_WEEKDAY
'EEEE': 'EEEE', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'dd.MM.', // NUM_MONTH_DAY
'MEd': 'EEE, dd.MM.', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'MM.y', // YEAR_NUM_MONTH
'yMd': 'dd.MM.y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE, dd.MM.y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH \'h\'', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH \'h\'', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH \'h\' z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale it_CH.
'it_CH': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'd/M', // NUM_MONTH_DAY
'MEd': 'EEE d/M', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'd MMM', // ABBR_MONTH_DAY
'MMMEd': 'EEE d MMM', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'd MMMM', // MONTH_DAY
'MMMMEEEEd': 'EEEE d MMMM', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'M/y', // YEAR_NUM_MONTH
'yMd': 'd/M/y', // YEAR_NUM_MONTH_DAY
'yMEd': 'EEE d/M/y', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'MMM y', // YEAR_ABBR_MONTH
'yMMMd': 'd MMM y', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'EEE d MMM y', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'MMMM y', // YEAR_MONTH
'yMMMMd': 'd MMMM y', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE, d MMMM y', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'QQQ y', // YEAR_ABBR_QUARTER
'yQQQQ': 'QQQQ y', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH z', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
},
/// Extended set of localized date/time patterns for locale ps.
'ps': const {
'd': 'd', // DAY
'E': 'ccc', // ABBR_WEEKDAY
'EEEE': 'cccc', // WEEKDAY
'LLL': 'LLL', // ABBR_STANDALONE_MONTH
'LLLL': 'LLLL', // STANDALONE_MONTH
'M': 'L', // NUM_MONTH
'Md': 'MM-dd', // NUM_MONTH_DAY
'MEd': 'MM-dd, EEE', // NUM_MONTH_WEEKDAY_DAY
'MMM': 'LLL', // ABBR_MONTH
'MMMd': 'MMM d', // ABBR_MONTH_DAY
'MMMEd': 'MMM d, EEE', // ABBR_MONTH_WEEKDAY_DAY
'MMMM': 'LLLL', // MONTH
'MMMMd': 'MMMM d', // MONTH_DAY
'MMMMEEEEd': 'MMMM d, EEEE', // MONTH_WEEKDAY_DAY
'QQQ': 'QQQ', // ABBR_QUARTER
'QQQQ': 'QQQQ', // QUARTER
'y': 'y', // YEAR
'yM': 'y-MM', // YEAR_NUM_MONTH
'yMd': 'y-MM-dd', // YEAR_NUM_MONTH_DAY
'yMEd': 'y-MM-dd, EEE', // YEAR_NUM_MONTH_WEEKDAY_DAY
'yMMM': 'y MMM', // YEAR_ABBR_MONTH
'yMMMd': 'y MMM d', // YEAR_ABBR_MONTH_DAY
'yMMMEd': 'y MMM d, EEE', // YEAR_ABBR_MONTH_WEEKDAY_DAY
'yMMMM': 'y MMMM', // YEAR_MONTH
'yMMMMd': 'د y د MMMM d', // YEAR_MONTH_DAY
'yMMMMEEEEd': 'EEEE د y د MMMM d', // YEAR_MONTH_WEEKDAY_DAY
'yQQQ': 'y QQQ', // YEAR_ABBR_QUARTER
'yQQQQ': 'y QQQQ', // YEAR_QUARTER
'H': 'HH', // HOUR24
'Hm': 'HH:mm', // HOUR24_MINUTE
'Hms': 'HH:mm:ss', // HOUR24_MINUTE_SECOND
'j': 'HH', // HOUR
'jm': 'HH:mm', // HOUR_MINUTE
'jms': 'HH:mm:ss', // HOUR_MINUTE_SECOND
'jmv': 'HH:mm v', // HOUR_MINUTE_GENERIC_TZ
'jmz': 'HH:mm z', // HOUR_MINUTETZ
'jz': 'HH (z)', // HOURGENERIC_TZ
'm': 'm', // MINUTE
'ms': 'mm:ss', // MINUTE_SECOND
's': 's', // SECOND
'v': 'v', // ABBR_GENERIC_TZ
'z': 'z', // ABBR_SPECIFIC_TZ
'zzzz': 'zzzz', // SPECIFIC_TZ
'ZZZZ': 'ZZZZ' // ABBR_UTC_TZ
}
};
| intl/lib/date_time_patterns.dart/0 | {'file_path': 'intl/lib/date_time_patterns.dart', 'repo_id': 'intl', 'token_count': 133581} |
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:intl/src/locale.dart' show Locale;
import 'locale_deprecations.dart';
import 'locale_extensions.dart';
/// The primary implementation of the Locale interface.
class LocaleImplementation extends Locale {
/// Simple private constructor with asserts to check invariants.
LocaleImplementation._(this.languageCode, this.scriptCode, this.countryCode,
this.variants, this._extensions) {
// Debug-mode asserts to ensure all parameters are normalized and UTS #35
// compliant.
assert(
languageCode != null && _normalizedLanguageRE.hasMatch(languageCode),
'languageCode must match RegExp/${_normalizedLanguageRE.pattern}/ '
'but is "$languageCode".');
assert(
scriptCode == null || _normalizedScriptRE.hasMatch(scriptCode),
'scriptCode must match RegExp/${_normalizedScriptRE.pattern}/ '
'but is "$scriptCode".');
assert(
countryCode == null || _normalizedRegionRE.hasMatch(countryCode),
'countryCode must match RegExp/${_normalizedRegionRE.pattern}/ '
'but is "$countryCode".');
assert(
variants is List<String> &&
variants.every(_normalizedVariantRE.hasMatch),
'each variant must match RegExp/${_normalizedVariantRE.pattern}/ '
'but variants are "$variants".');
}
/// For debug/assert-use only! Matches subtags considered valid for
/// [languageCode], does not imply subtag is valid as per Unicode LDML spec!
//
// Must be static to get tree-shaken away in production code.
static final _normalizedLanguageRE = RegExp(r'^[a-z]{2,3}$|^[a-z]{5,8}$');
/// For debug/assert-use only! Matches subtags considered valid for
/// [scriptCode], does not imply subtag is valid as per Unicode LDML spec!
//
// Must be static to get tree-shaken away in production code.
static final _normalizedScriptRE = RegExp(r'^[A-Z][a-z]{3}$');
/// For debug/assert-use only! Matches subtags considered valid for
/// [countryCode], does not imply subtags are valid as per Unicode LDML spec!
//
// Must be static to get tree-shaken away in production code.
static final _normalizedRegionRE = RegExp(r'^[A-Z]{2}$|^\d{3}$');
/// For debug/assert-use only! Matches subtags considered valid for
/// [variants], does not imply subtags are valid as per Unicode LDML spec!
//
// Must be static to get tree-shaken away in production code.
static final _normalizedVariantRE = RegExp(r'^[a-z\d]{5,8}$|^\d[a-z\d]{3}$');
/// Simple factory which assumes parameters are syntactically correct.
///
/// In debug mode, incorrect use may result in an assertion failure. (In
/// production code, this class makes no promises regarding the consequence of
/// incorrect use.)
///
/// For public APIs, see [Locale.fromSubtags] and [Locale.parse].
factory LocaleImplementation.unsafe(
String languageCode, {
String scriptCode,
String countryCode,
Iterable<String> variants,
LocaleExtensions extensions,
}) {
variants = (variants != null && variants.isNotEmpty)
? List.unmodifiable(variants.toList()..sort())
: const [];
return LocaleImplementation._(
languageCode, scriptCode, countryCode, variants, extensions);
}
/// Constructs a Locale instance that consists of only language, region and
/// country subtags.
///
/// Throws a [FormatException] if any subtag is syntactically invalid.
static LocaleImplementation fromSubtags(
{String languageCode, String scriptCode, String countryCode}) {
return LocaleImplementation._(
replaceDeprecatedLanguageSubtag(_normalizeLanguageCode(languageCode)),
_normalizeScriptCode(scriptCode),
replaceDeprecatedRegionSubtag(_normalizeCountryCode(countryCode)),
const [],
null);
}
/// Performs case normalization on `languageCode`.
///
/// Throws a [FormatException] if it is syntactically invalid.
static String _normalizeLanguageCode(String languageCode) {
if (!_languageRexExp.hasMatch(languageCode)) {
throw FormatException('Invalid language "$languageCode"');
}
return languageCode.toLowerCase();
}
static final _languageRexExp = RegExp(r'^[a-zA-Z]{2,3}$|^[a-zA-Z]{5,8}$');
/// Performs case normalization on `scriptCode`.
///
/// Throws a [FormatException] if it is syntactically invalid.
static String _normalizeScriptCode(String scriptCode) {
if (scriptCode == null) return null;
if (!_scriptRegExp.hasMatch(scriptCode)) {
throw FormatException('Invalid script "$scriptCode"');
}
return toCapCase(scriptCode);
}
static final _scriptRegExp = RegExp(r'^[a-zA-Z]{4}$');
/// Performs case normalization on `countryCode`.
///
/// Throws a [FormatException] if it is syntactically invalid.
static String _normalizeCountryCode(String countryCode) {
if (countryCode == null) return null;
if (!_regionRegExp.hasMatch(countryCode)) {
throw FormatException('Invalid region "$countryCode"');
}
return countryCode.toUpperCase();
}
static final _regionRegExp = RegExp(r'^[a-zA-Z]{2}$|^\d{3}$');
/// The language subtag of the Locale Identifier.
///
/// It is syntactically valid, normalized (has correct case) and canonical
/// (deprecated tags have been replaced), but not necessarily valid (the
/// language might not exist) because the list of valid languages changes with
/// time.
final String languageCode;
/// The script subtag of the Locale Identifier, null if absent.
///
/// It is syntactically valid, normalized (has correct case) and canonical
/// (deprecated tags have been replaced), but not necessarily valid (the
/// script might not exist) because the list of valid scripts changes with
/// time.
final String scriptCode;
/// The region subtag of the Locale Identifier, null if absent.
///
/// It is syntactically valid, normalized (has correct case) and canonical
/// (deprecated tags have been replaced), but not necessarily valid (the
/// region might not exist) because the list of valid regions changes with
/// time.
final String countryCode;
/// Iterable of variant subtags, zero-length iterable if variants are absent.
///
/// They are syntactically valid, normalized (have correct case) and canonical
/// (sorted alphabetically and deprecated tags have been replaced) but not
/// necessarily valid (variants might not exist) because the list of variants
/// changes with time.
final Iterable<String> variants;
/// Locale extensions, null if the locale has no extensions.
// TODO(hugovdm): Not yet supported: getters for extensions.
final LocaleExtensions _extensions;
/// Cache of the value returned by [toLanguageTag].
String _languageTag;
/// Returns the canonical Unicode BCP47 Locale Identifier for this locale.
String toLanguageTag() {
if (_languageTag == null) {
final out = [languageCode];
if (scriptCode != null) out.add(scriptCode);
if (countryCode != null) out.add(countryCode);
out.addAll(variants);
if (_extensions != null) out.addAll(_extensions.subtags);
_languageTag = out.join('-');
}
return _languageTag;
}
}
/// Returns `input` with first letter capitalized and the rest lowercase.
String toCapCase(String input) =>
'${input[0].toUpperCase()}${input.substring(1).toLowerCase()}';
| intl/lib/src/locale/locale_implementation.dart/0 | {'file_path': 'intl/lib/src/locale/locale_implementation.dart', 'repo_id': 'intl', 'token_count': 2394} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Tests the DateFormat library in dart. This file contains core tests that are
/// run regardless of where the locale data is found, so it doesn't expect to be
/// run on its own, but rather to be imported and run from another test file.
library date_time_format_tests;
import 'package:intl/intl.dart';
import 'package:test/test.dart';
import 'date_time_format_test_data.dart';
var formatsToTest = const [
DateFormat.DAY,
DateFormat.ABBR_WEEKDAY,
DateFormat.WEEKDAY,
DateFormat.ABBR_STANDALONE_MONTH,
DateFormat.STANDALONE_MONTH,
DateFormat.NUM_MONTH,
DateFormat.NUM_MONTH_DAY,
DateFormat.NUM_MONTH_WEEKDAY_DAY,
DateFormat.ABBR_MONTH,
DateFormat.ABBR_MONTH_DAY,
DateFormat.ABBR_MONTH_WEEKDAY_DAY,
DateFormat.MONTH,
DateFormat.MONTH_DAY,
DateFormat.MONTH_WEEKDAY_DAY,
DateFormat.ABBR_QUARTER,
DateFormat.QUARTER,
DateFormat.YEAR,
DateFormat.YEAR_NUM_MONTH,
DateFormat.YEAR_NUM_MONTH_DAY,
DateFormat.YEAR_NUM_MONTH_WEEKDAY_DAY,
DateFormat.YEAR_ABBR_MONTH,
DateFormat.YEAR_ABBR_MONTH_DAY,
DateFormat.YEAR_ABBR_MONTH_WEEKDAY_DAY,
DateFormat.YEAR_MONTH,
DateFormat.YEAR_MONTH_DAY,
DateFormat.YEAR_MONTH_WEEKDAY_DAY,
// TODO(alanknight): CLDR and ICU appear to disagree on these for Japanese
// DateFormat.YEAR_ABBR_QUARTER,
// DateFormat.YEAR_QUARTER,
DateFormat.HOUR24,
DateFormat.HOUR24_MINUTE,
DateFormat.HOUR24_MINUTE_SECOND,
DateFormat.HOUR,
DateFormat.HOUR_MINUTE,
DateFormat.HOUR_MINUTE_SECOND,
// TODO(alanknight): Time zone support
// DateFormat.HOUR_MINUTE_GENERIC_TZ,
// DateFormat.HOUR_MINUTE_TZ,
// DateFormat.HOUR_GENERIC_TZ,
// DateFormat.HOUR_TZ,
DateFormat.MINUTE,
DateFormat.MINUTE_SECOND,
DateFormat.SECOND
// ABBR_GENERIC_TZ,
// GENERIC_TZ,
// ABBR_SPECIFIC_TZ,
// SPECIFIC_TZ,
// ABBR_UTC_TZ
];
var icuFormatNamesToTest = const [
// It would be really nice to not have to duplicate this and just be able
// to use the names to get reflective access.
'DAY',
'ABBR_WEEKDAY',
'WEEKDAY',
'ABBR_STANDALONE_MONTH',
'STANDALONE_MONTH',
'NUM_MONTH',
'NUM_MONTH_DAY',
'NUM_MONTH_WEEKDAY_DAY',
'ABBR_MONTH',
'ABBR_MONTH_DAY',
'ABBR_MONTH_WEEKDAY_DAY',
'MONTH',
'MONTH_DAY',
'MONTH_WEEKDAY_DAY',
'ABBR_QUARTER',
'QUARTER',
'YEAR',
'YEAR_NUM_MONTH',
'YEAR_NUM_MONTH_DAY',
'YEAR_NUM_MONTH_WEEKDAY_DAY',
'YEAR_ABBR_MONTH',
'YEAR_ABBR_MONTH_DAY',
'YEAR_ABBR_MONTH_WEEKDAY_DAY',
'YEAR_MONTH',
'YEAR_MONTH_DAY',
'YEAR_MONTH_WEEKDAY_DAY',
// TODO(alanknight): CLDR and ICU appear to disagree on these for Japanese.
// omit for the time being
// 'YEAR_ABBR_QUARTER',
// 'YEAR_QUARTER',
'HOUR24',
'HOUR24_MINUTE',
'HOUR24_MINUTE_SECOND',
'HOUR',
'HOUR_MINUTE',
'HOUR_MINUTE_SECOND',
// TODO(alanknight): Time zone support
// 'HOUR_MINUTE_GENERIC_TZ',
// 'HOUR_MINUTE_TZ',
// 'HOUR_GENERIC_TZ',
// 'HOUR_TZ',
'MINUTE',
'MINUTE_SECOND',
'SECOND'
// ABBR_GENERIC_TZ,
// GENERIC_TZ,
// ABBR_SPECIFIC_TZ,
// SPECIFIC_TZ,
// ABBR_UTC_TZ
];
/// Exercise all of the formats we have explicitly defined on a particular
/// locale. [expectedResults] is a map from ICU format names to the
/// expected result of formatting [date] according to that format in
/// [localeName].
void testLocale(
String localeName, Map<String, String> expectedResults, DateTime date) {
var intl = Intl(localeName);
for (var i = 0; i < formatsToTest.length; i++) {
var skeleton = formatsToTest[i];
var format = intl.date(skeleton);
var icuName = icuFormatNamesToTest[i];
var actualResult = format.format(date);
expect(expectedResults[icuName], equals(actualResult),
reason: 'Mismatch in $localeName, testing skeleton "$skeleton"');
}
}
void testRoundTripParsing(String localeName, DateTime date,
[bool forceAscii = false]) {
// In order to test parsing, we can't just read back the date, because
// printing in most formats loses information. But we can test that
// what we parsed back prints the same as what we originally printed.
// At least in most cases. In some cases, we can't even do that. e.g.
// the skeleton WEEKDAY can't be reconstructed at all, and YEAR_MONTH
// formats don't give us enough information to construct a valid date.
var badSkeletons = const [
DateFormat.ABBR_WEEKDAY,
DateFormat.WEEKDAY,
DateFormat.QUARTER,
DateFormat.ABBR_QUARTER,
DateFormat.YEAR,
DateFormat.YEAR_NUM_MONTH,
DateFormat.YEAR_ABBR_MONTH,
DateFormat.YEAR_MONTH,
DateFormat.MONTH_WEEKDAY_DAY,
DateFormat.NUM_MONTH_WEEKDAY_DAY,
DateFormat.ABBR_MONTH_WEEKDAY_DAY
];
for (var i = 0; i < formatsToTest.length; i++) {
var skeleton = formatsToTest[i];
if (!badSkeletons.any((x) => x == skeleton)) {
var format = DateFormat(skeleton, localeName);
if (forceAscii) format.useNativeDigits = false;
var actualResult = format.format(date);
var parsed = format.parseStrict(actualResult);
var thenPrintAgain = format.format(parsed);
expect(thenPrintAgain, equals(actualResult));
}
}
}
/// A shortcut for returning all the locales we have available.
List<String> allLocales() => DateFormat.allLocalesWithSymbols();
typedef SubsetFuncType = List<String> Function();
SubsetFuncType _subsetFunc;
List<String> _subsetValue;
List<String> get subset {
return _subsetValue ??= _subsetFunc();
}
// TODO(alanknight): Run specific tests for the en_ISO locale which isn't
// included in CLDR, and check that our patterns for it are correct (they
// very likely aren't).
void runDateTests(SubsetFuncType subsetFunc) {
assert(subsetFunc != null);
_subsetFunc = subsetFunc;
test('Multiple patterns', () {
var date = DateTime.now();
var multiple1 = DateFormat.yMd().add_jms();
var multiple2 = DateFormat('yMd').add_jms();
var separate1 = DateFormat.yMd();
var separate2 = DateFormat.jms();
var separateFormat = '${separate1.format(date)} ${separate2.format(date)}';
expect(multiple1.format(date), equals(multiple2.format(date)));
expect(multiple1.format(date), equals(separateFormat));
var customPunctuation = DateFormat('yMd').addPattern('jms', ':::');
var custom = '${separate1.format(date)}:::${separate2.format(date)}';
expect(customPunctuation.format(date), equals(custom));
});
test('Basic date format parsing', () {
var dateFormat = DateFormat('d');
expect(dateFormat.parsePattern('hh:mm:ss').map((x) => x.pattern).toList(),
orderedEquals(['hh', ':', 'mm', ':', 'ss']));
expect(dateFormat.parsePattern('hh:mm:ss').map((x) => x.pattern).toList(),
orderedEquals(['hh', ':', 'mm', ':', 'ss']));
});
test('Test ALL the supported formats on representative locales', () {
var aDate = DateTime(2012, 1, 27, 20, 58, 59, 0);
testLocale('en_US', english, aDate);
if (subset.length > 1) {
// Don't run if we have just one locale, so some of these won't be there.
testLocale('de_DE', german, aDate);
testLocale('fr_FR', french, aDate);
testLocale('ja_JP', japanese, aDate);
testLocale('el_GR', greek, aDate);
testLocale('de_AT', austrian, aDate);
}
});
test('Test round-trip parsing of dates', () {
var hours = [0, 1, 11, 12, 13, 23];
var months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
// For locales that use non-ascii digits, e.g. 'ar', also test
// forcing ascii digits.
for (var locale in subset) {
var alsoForceAscii = DateFormat.d(locale).usesNativeDigits;
for (var month in months) {
var aDate = DateTime(2012, month, 27, 13, 58, 59, 012);
testRoundTripParsing(locale, aDate);
if (alsoForceAscii) {
testRoundTripParsing(locale, aDate, true);
}
}
for (var hour in hours) {
var aDate = DateTime(2012, 1, 27, hour, 58, 59, 123);
testRoundTripParsing(locale, aDate);
if (alsoForceAscii) {
testRoundTripParsing(locale, aDate, true);
}
}
}
});
// TODO(alanknight): The coverage for patterns and symbols differs
// at the source, in CLDR 25, so we can't guarantee that all patterns
// have symbols or vice versa. Wish we could.
test('Test malformed locales', () {
// Don't run if we have just one locale, which may not include these.
if (subset.length <= 1) return;
var aDate = DateTime(2012, 1, 27, 20, 58, 59, 0);
// Austrian is a useful test locale here because it differs slightly
// from the generic 'de' locale so we can tell the difference between
// correcting to 'de_AT' and falling back to just 'de'.
testLocale('de-AT', austrian, aDate);
testLocale('de_at', austrian, aDate);
testLocale('de-at', austrian, aDate);
});
test('Test format creation via Intl', () {
// Don't run if we have just one locale, which may not include these.
if (subset.length <= 1) return;
var intl = Intl('ja_JP');
var instanceJP = intl.date('jms');
var instanceUS = intl.date('jms', 'en_US');
var blank = intl.date('jms');
var date = DateTime(2012, 1, 27, 20, 58, 59, 0);
expect(instanceJP.format(date), equals('20:58:59'));
expect(instanceUS.format(date), equals('8:58:59 PM'));
expect(blank.format(date), equals('20:58:59'));
});
test('Test explicit format string', () {
// Don't run if we have just one locale, which may not include these.
if (subset.length <= 1) return;
var aDate = DateTime(2012, 1, 27, 20, 58, 59, 0);
// An explicit format that doesn't conform to any skeleton
var us = DateFormat(r'yy //// :W \\\\ dd:ss ^&@ M');
expect(us.format(aDate), equals(r'12 //// :W \\\\ 27:59 ^&@ 1'));
// The result won't change with locale unless we use fields that are words.
var greek = DateFormat(r'yy //// :W \\\\ dd:ss ^&@ M', 'el_GR');
expect(greek.format(aDate), equals(r'12 //// :W \\\\ 27:59 ^&@ 1'));
var usWithWords = DateFormat('yy / :W \\ dd:ss ^&@ MMM', 'en_US');
var greekWithWords = DateFormat('yy / :W \\ dd:ss ^&@ MMM', 'el_GR');
expect(usWithWords.format(aDate), equals(r'12 / :W \ 27:59 ^&@ Jan'));
expect(greekWithWords.format(aDate), equals(r'12 / :W \ 27:59 ^&@ Ιαν'));
var escaped = DateFormat(r"hh 'o''clock'");
expect(escaped.format(aDate), equals(r"08 o'clock"));
var reParsed = escaped.parse(escaped.format(aDate));
expect(escaped.format(reParsed), equals(escaped.format(aDate)));
var noSeparators = DateFormat('HHmmss');
expect(noSeparators.format(aDate), equals('205859'));
});
test('Test fractional seconds padding', () {
var one = DateTime(2012, 1, 27, 20, 58, 59, 1);
var oneHundred = DateTime(2012, 1, 27, 20, 58, 59, 100);
var fractional = DateFormat('hh:mm:ss.SSS', 'en_US');
expect(fractional.format(one), equals('08:58:59.001'));
expect(fractional.format(oneHundred), equals('08:58:59.100'));
var long = DateFormat('ss.SSSSSSSS', 'en_US');
expect(long.format(oneHundred), equals('59.10000000'));
expect(long.format(one), equals('59.00100000'));
});
test('Test parseUTC', () {
var local = DateTime(2012, 1, 27, 20, 58, 59, 1);
var utc = DateTime.utc(2012, 1, 27, 20, 58, 59, 1);
// Getting the offset as a duration via difference() would be simpler,
// but doesn't work on dart2js in checked mode. See issue 4437.
var offset = utc.millisecondsSinceEpoch - local.millisecondsSinceEpoch;
var format = DateFormat('yyyy-MM-dd HH:mm:ss');
var localPrinted = format.format(local);
var parsed = format.parse(localPrinted);
var parsedUTC = format.parseUTC(format.format(utc));
var parsedOffset =
parsedUTC.millisecondsSinceEpoch - parsed.millisecondsSinceEpoch;
expect(parsedOffset, equals(offset));
expect(utc.hour, equals(parsedUTC.hour));
expect(local.hour, equals(parsed.hour));
});
test('Test 0-padding', () {
var someDate = DateTime(123, 1, 2, 3, 4, 5);
var format = DateFormat('yyyy-MM-dd HH:mm:ss');
expect(format.format(someDate), '0123-01-02 03:04:05');
});
test('Test default format', () {
var someDate = DateTime(2012, 1, 27, 20, 58, 59, 1);
var emptyFormat = DateFormat(null, 'en_US');
var knownDefault = DateFormat.yMMMMd('en_US').add_jms();
var result = emptyFormat.format(someDate);
var knownResult = knownDefault.format(someDate);
expect(result, knownResult);
});
test('Get symbols', () {
var emptyFormat = DateFormat(null, 'en_US');
var symbols = emptyFormat.dateSymbols;
expect(symbols.NARROWWEEKDAYS, ['S', 'M', 'T', 'W', 'T', 'F', 'S']);
});
test('Quarter calculation', () {
var quarters = [
'Q1',
'Q1',
'Q1',
'Q2',
'Q2',
'Q2',
'Q3',
'Q3',
'Q3',
'Q4',
'Q4',
'Q4'
];
var quarterFormat = DateFormat.QQQ();
for (var i = 0; i < 12; i++) {
var month = i + 1;
var aDate = DateTime(2012, month, 27, 13, 58, 59, 012);
var formatted = quarterFormat.format(aDate);
expect(formatted, quarters[i]);
}
});
test('Quarter formatting', () {
var date = DateTime(2012, 02, 27);
var formats = {
'Q': '1',
'QQ': '01',
'QQQ': 'Q1',
'QQQQ': '1st quarter',
'QQQQQ': '00001'
};
formats.forEach((pattern, result) {
expect(DateFormat(pattern, 'en_US').format(date), result);
});
if (subset.contains('zh_CN')) {
// Especially test zh_CN formatting for `QQQ` and `yQQQ` because it
// contains a single `Q`.
expect(DateFormat.QQQ('zh_CN').format(date), '1季度');
expect(DateFormat.yQQQ('zh_CN').format(date), '2012年第1季度');
}
});
/// Generate a map from day numbers in the given [year] (where Jan 1 == 1)
/// to a Date object. If [year] is a leap year, then pass 1 for
/// [leapDay], otherwise pass 0.
Map<int, DateTime> generateDates(int year, int leapDay) =>
Iterable.generate(365 + leapDay, (n) => n + 1)
.map((day) {
// Typically a "date" would have a time value of zero, but we
// give them an hour value, because they can get created with an
// offset to the previous day in time zones where the daylight
// savings transition happens at midnight (e.g. Brazil).
var result = DateTime(year, 1, day, 3);
// TODO(alanknight): This is a workaround for dartbug.com/15560.
if (result.toUtc() == result) result = DateTime(year, 1, day);
return result;
})
.toList()
.asMap();
void verifyOrdinals(Map<int, DateTime> dates) {
var f = DateFormat('D');
var withYear = DateFormat('yyyy D');
dates.forEach((number, date) {
var formatted = f.format(date);
expect(formatted, (number + 1).toString());
var formattedWithYear = withYear.format(date);
var parsed = withYear.parse(formattedWithYear);
// Only compare the date portion, because time zone changes (e.g. DST) can
// cause the hour values to be different.
expect(parsed.year, date.year);
expect(parsed.month, date.month);
expect(parsed.day, date.day,
reason: 'Mismatch between parsed ($parsed) and original ($date)');
});
}
test('Ordinal Date', () {
var f = DateFormat('D');
var dates = generateDates(2012, 1);
var nonLeapDates = generateDates(2013, 0);
verifyOrdinals(dates);
verifyOrdinals(nonLeapDates);
// Check one hard-coded just to be on the safe side.
var aDate = DateTime(2012, 4, 27, 13, 58, 59, 012);
expect(f.format(aDate), '118');
});
// There are some very odd off-by-one bugs when parsing dates. Put in
// some very basic tests to try and get more information.
test('Simple Date Creation', () {
var format = DateFormat(DateFormat.NUM_MONTH);
var first = format.parse('7');
var second = format.parse('7');
var basic = DateTime(1970, 7);
var basicAgain = DateTime(1970, 7);
expect(first, second);
expect(first, basic);
expect(basic, basicAgain);
expect(first.month, 7);
});
test('Native digit default', () {
if (!subset.contains('ar')) return;
var nativeFormat = DateFormat.yMd('ar');
var date = DateTime(1974, 12, 30);
var native = nativeFormat.format(date);
expect(DateFormat.shouldUseNativeDigitsByDefaultFor('ar'), true);
DateFormat.useNativeDigitsByDefaultFor('ar', false);
expect(DateFormat.shouldUseNativeDigitsByDefaultFor('ar'), false);
var asciiFormat = DateFormat.yMd('ar');
var ascii = asciiFormat.format(date);
// This prints with RTL markers before the slashes. That doesn't seem good,
// but it's what the data says.
expect(ascii, '30\u200f/12\u200f/1974');
expect(native, '٣٠\u200f/١٢\u200f/١٩٧٤');
// Reset the value.
DateFormat.useNativeDigitsByDefaultFor('ar', true);
});
// This just tests the basic logic, which was in error, not
// formatting in different locales. See #215.
test('hours', () {
var oneToTwentyFour = DateFormat('kk');
var oneToTwelve = DateFormat('hh');
var zeroToTwentyThree = DateFormat('KK');
var zeroToEleven = DateFormat('HH');
var late = DateTime(2019, 1, 2, 0, 4, 6);
expect(oneToTwentyFour.format(late), '24');
expect(zeroToTwentyThree.format(late), '00');
expect(oneToTwelve.format(late), '12');
expect(zeroToEleven.format(late), '00');
});
}
| intl/test/date_time_format_test_core.dart/0 | {'file_path': 'intl/test/date_time_format_test_core.dart', 'repo_id': 'intl', 'token_count': 7013} |
/// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
/// for details. All rights reserved. Use of this source code is governed by a
/// BSD-style license that can be found in the LICENSE file.
/// Tests based on the closure number formatting tests.
library number_closure_test;
import 'dart:async';
import 'package:intl/intl.dart';
import 'package:test/test.dart';
void main() {
test('testVeryBigNumber', testVeryBigNumber);
test('testStandardFormat', testStandardFormat);
test('testNegativePercentage', testNegativePercentage);
test('testCustomPercentage', testCustomPercentage);
test('testBasicFormat', testBasicFormat);
test('testGrouping', testGrouping);
test('testPerMill', testPerMill);
test('testQuotes', testQuotes);
test('testZeros', testZeros);
test('testExponential', testExponential);
test('testPlusSignInExponentPart', testPlusSignInExponentPart);
test('testApis', testApis);
test('testLocaleSwitch', testLocaleSwitch);
test('testLocaleSwitchAsync', testLocaleSwitchAsync);
}
/// Test two large numbers for equality, assuming that there may be some
/// loss of precision in the less significant digits.
bool veryBigNumberCompare(str1, str2) {
return str1.length == str2.length &&
str1.substring(0, 8) == str2.substring(0, 8);
}
void testVeryBigNumber() {
String str;
NumberFormat fmt;
fmt = NumberFormat.decimalPattern();
str = fmt.format(1.3456E20);
expect(veryBigNumberCompare('134,560,000,000,000,000,000', str), isTrue);
fmt = NumberFormat.percentPattern();
str = fmt.format(1.3456E20);
expect(veryBigNumberCompare('13,456,000,000,000,000,000,000%', str), isTrue);
// TODO(alanknight): Note that this disagrees with what ICU would print
// for this. We need significant digit support to do this properly.
fmt = NumberFormat.scientificPattern();
str = fmt.format(1.3456E20);
expect('1E20', str);
fmt = NumberFormat.decimalPattern();
str = fmt.format(-1.234567890123456e306);
expect(1 + 1 + 306 + 306 / 3, str.length);
expect('-1,234,567,890,123,45', str.substring(0, 21));
str = fmt.format(1 / 0);
expect('∞', str);
str = fmt.format(-1 / 0);
expect('-∞', str);
}
void testStandardFormat() {
String str;
NumberFormat fmt;
fmt = NumberFormat.decimalPattern();
str = fmt.format(1234.579);
expect('1,234.579', str);
fmt = NumberFormat.percentPattern();
str = fmt.format(1234.579);
expect('123,458%', str);
fmt = NumberFormat.scientificPattern();
str = fmt.format(1234.579);
expect('1E3', str);
}
void testNegativePercentage() {
String str;
var fmt = NumberFormat('#,##0.00%');
str = fmt.format(-1234.56);
expect('-123,456.00%', str);
fmt = NumberFormat.percentPattern();
str = fmt.format(-1234.579);
expect('-123,458%', str);
}
void testCustomPercentage() {
var fmt = NumberFormat.percentPattern();
fmt.maximumFractionDigits = 1;
fmt.minimumFractionDigits = 1;
var str = fmt.format(0.1291);
expect('12.9%', str);
fmt.maximumFractionDigits = 2;
fmt.minimumFractionDigits = 1;
str = fmt.format(0.129);
expect('12.9%', str);
fmt.maximumFractionDigits = 2;
fmt.minimumFractionDigits = 1;
str = fmt.format(0.12);
expect('12.0%', str);
fmt.maximumFractionDigits = 2;
fmt.minimumFractionDigits = 1;
str = fmt.format(0.12911);
expect('12.91%', str);
}
void testBasicFormat() {
var fmt = NumberFormat('0.0000');
var str = fmt.format(123.45789179565757);
expect('123.4579', str);
}
void testGrouping() {
String str;
var fmt = NumberFormat('#,###');
str = fmt.format(1234567890);
expect('1,234,567,890', str);
fmt = NumberFormat('#,####');
str = fmt.format(1234567890);
expect('12,3456,7890', str);
fmt = NumberFormat('#');
str = fmt.format(1234567890);
expect('1234567890', str);
}
void testPerMill() {
String str;
var fmt = NumberFormat('###.###\u2030');
str = fmt.format(0.4857);
expect('485.7\u2030', str);
}
void testQuotes() {
String str;
var fmt = NumberFormat('a\'fo\'\'o\'b#');
str = fmt.format(123);
expect('afo\'ob123', str);
fmt = NumberFormat('a\'\'b#');
str = fmt.format(123);
expect('a\'b123', str);
fmt = NumberFormat('a\'fo\'\'o\'b#');
str = fmt.format(-123);
expect('-afo\'ob123', str);
fmt = NumberFormat('a\'\'b#');
str = fmt.format(-123);
expect('-a\'b123', str);
}
void testZeros() {
String str;
var fmt = NumberFormat('#.#');
str = fmt.format(0);
expect('0', str);
fmt = NumberFormat('#.');
str = fmt.format(0);
expect('0.', str);
fmt = NumberFormat('.#');
str = fmt.format(0);
expect('.0', str);
fmt = NumberFormat('#');
str = fmt.format(0);
expect('0', str);
fmt = NumberFormat('#0.#');
str = fmt.format(0);
expect('0', str);
fmt = NumberFormat('#0.');
str = fmt.format(0);
expect('0.', str);
fmt = NumberFormat('#.0');
str = fmt.format(0);
expect('.0', str);
fmt = NumberFormat('#');
str = fmt.format(0);
expect('0', str);
fmt = NumberFormat('000');
str = fmt.format(0);
expect('000', str);
}
void testExponential() {
String str;
var fmt = NumberFormat('0.####E0');
str = fmt.format(0.01234);
expect('1.234E-2', str);
fmt = NumberFormat('00.000E00');
str = fmt.format(0.01234);
expect('12.340E-03', str);
fmt = NumberFormat('##0.######E000');
str = fmt.format(0.01234);
expect('12.34E-003', str);
fmt = NumberFormat('0.###E0;[0.###E0]');
str = fmt.format(0.01234);
expect('1.234E-2', str);
fmt = NumberFormat('0.####E0');
str = fmt.format(123456789);
expect('1.2346E8', str);
fmt = NumberFormat('00.000E00');
str = fmt.format(123456789);
expect('12.346E07', str);
fmt = NumberFormat('##0.######E000');
str = fmt.format(123456789);
expect('123.456789E006', str);
fmt = NumberFormat('0.###E0;[0.###E0]');
str = fmt.format(123456789);
expect('1.235E8', str);
fmt = NumberFormat('0.####E0');
str = fmt.format(1.23e300);
expect('1.23E300', str);
fmt = NumberFormat('00.000E00');
str = fmt.format(1.23e300);
expect('12.300E299', str);
fmt = NumberFormat('##0.######E000');
str = fmt.format(1.23e300);
expect('1.23E300', str);
fmt = NumberFormat('0.###E0;[0.###E0]');
str = fmt.format(1.23e300);
expect('1.23E300', str);
fmt = NumberFormat('0.####E0');
str = fmt.format(-3.141592653e-271);
expect('-3.1416E-271', str);
fmt = NumberFormat('00.000E00');
str = fmt.format(-3.141592653e-271);
expect('-31.416E-272', str);
fmt = NumberFormat('##0.######E000');
str = fmt.format(-3.141592653e-271);
expect('-314.159265E-273', str);
fmt = NumberFormat('0.###E0;[0.###E0]');
str = fmt.format(-3.141592653e-271);
expect('[3.142E-271]', str);
fmt = NumberFormat('0.####E0');
str = fmt.format(0);
expect('0E0', str);
fmt = NumberFormat('00.000E00');
str = fmt.format(0);
expect('00.000E00', str);
fmt = NumberFormat('##0.######E000');
str = fmt.format(0);
expect('0E000', str);
fmt = NumberFormat('0.###E0;[0.###E0]');
str = fmt.format(0);
expect('0E0', str);
fmt = NumberFormat('0.####E0');
str = fmt.format(-1);
expect('-1E0', str);
fmt = NumberFormat('00.000E00');
str = fmt.format(-1);
expect('-10.000E-01', str);
fmt = NumberFormat('##0.######E000');
str = fmt.format(-1);
expect('-1E000', str);
fmt = NumberFormat('0.###E0;[0.###E0]');
str = fmt.format(-1);
expect('[1E0]', str);
fmt = NumberFormat('0.####E0');
str = fmt.format(1);
expect('1E0', str);
fmt = NumberFormat('00.000E00');
str = fmt.format(1);
expect('10.000E-01', str);
fmt = NumberFormat('##0.######E000');
str = fmt.format(1);
expect('1E000', str);
fmt = NumberFormat('0.###E0;[0.###E0]');
str = fmt.format(1);
expect('1E0', str);
fmt = NumberFormat('#E0');
str = fmt.format(12345.0);
expect('1E4', str);
fmt = NumberFormat('0E0');
str = fmt.format(12345.0);
expect('1E4', str);
fmt = NumberFormat('##0.###E0');
str = fmt.format(12345.0);
expect('12.345E3', str);
fmt = NumberFormat('##0.###E0');
str = fmt.format(12345.00001);
expect('12.345E3', str);
fmt = NumberFormat('##0.###E0');
str = fmt.format(12345);
expect('12.345E3', str);
fmt = NumberFormat('##0.####E0');
str = fmt.format(789.12345e-9);
fmt = NumberFormat('##0.####E0');
str = fmt.format(780e-9);
expect('780E-9', str);
fmt = NumberFormat('.###E0');
str = fmt.format(45678.0);
expect('.457E5', str);
fmt = NumberFormat('.###E0');
str = fmt.format(0);
expect('.0E0', str);
fmt = NumberFormat('#E0');
str = fmt.format(45678000);
expect('5E7', str);
fmt = NumberFormat('##E0');
str = fmt.format(45678000);
expect('46E6', str);
fmt = NumberFormat('####E0');
str = fmt.format(45678000);
expect('4568E4', str);
fmt = NumberFormat('0E0');
str = fmt.format(45678000);
expect('5E7', str);
fmt = NumberFormat('00E0');
str = fmt.format(45678000);
expect('46E6', str);
fmt = NumberFormat('000E0');
str = fmt.format(45678000);
expect('457E5', str);
fmt = NumberFormat('###E0');
str = fmt.format(0.0000123);
expect('12E-6', str);
fmt = NumberFormat('###E0');
str = fmt.format(0.000123);
expect('123E-6', str);
fmt = NumberFormat('###E0');
str = fmt.format(0.00123);
expect('1E-3', str);
fmt = NumberFormat('###E0');
str = fmt.format(0.0123);
expect('12E-3', str);
fmt = NumberFormat('###E0');
str = fmt.format(0.123);
expect('123E-3', str);
fmt = NumberFormat('###E0');
str = fmt.format(1.23);
expect('1E0', str);
fmt = NumberFormat('###E0');
str = fmt.format(12.3);
expect('12E0', str);
fmt = NumberFormat('###E0');
str = fmt.format(123.0);
expect('123E0', str);
fmt = NumberFormat('###E0');
str = fmt.format(1230.0);
expect('1E3', str);
}
void testPlusSignInExponentPart() {
var fmt = NumberFormat('0E+0');
var str = fmt.format(45678000);
expect('5E+7', str);
}
void testApis() {
var fmt = NumberFormat('#,###');
var str = fmt.format(1234567890);
expect('1,234,567,890', str);
}
void testLocaleSwitch() {
Intl.withLocale('fr', verifyFrenchLocale);
}
void testLocaleSwitchAsync() {
Intl.withLocale('fr', () {
Timer(const Duration(milliseconds: 10), expectAsync0(verifyFrenchLocale));
});
// Verify that things running outside the zone still get en_US.
testStandardFormat();
}
void verifyFrenchLocale() {
var fmt = NumberFormat('#,###');
var str = fmt.format(1234567890);
expect(str, '1\u202f234\u202f567\u202f890');
}
| intl/test/number_closure_test.dart/0 | {'file_path': 'intl/test/number_closure_test.dart', 'repo_id': 'intl', 'token_count': 4057} |
name: api_data_loader
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- "api/tools/data_loader/**"
- ".github/workflows/api_data_loader.yaml"
branches:
- main
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: stable
working_directory: api/tools/data_loader
min_coverage: 0
| io_flip/.github/workflows/api_data_loader.yaml/0 | {'file_path': 'io_flip/.github/workflows/api_data_loader.yaml', 'repo_id': 'io_flip', 'token_count': 196} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.