| // Copyright 2015 Google LLC |
| // |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file or at |
| // https://developers.google.com/open-source/licenses/bsd |
| |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: deprecated_member_use_from_same_package |
| // ignore_for_file: doc_directive_unknown |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_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: unintended_html_in_doc_comment |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_cast |
| // ignore_for_file: unnecessary_lambdas |
| // 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/container/v1.dart' as api; |
| import 'package:http/http.dart' as http; |
| import 'package:test/test.dart' as unittest; |
| |
| import '../test_shared.dart'; |
| |
| core.int buildCounterAcceleratorConfig = 0; |
| api.AcceleratorConfig buildAcceleratorConfig() { |
| final o = api.AcceleratorConfig(); |
| buildCounterAcceleratorConfig++; |
| if (buildCounterAcceleratorConfig < 3) { |
| o.acceleratorCount = 'foo'; |
| o.acceleratorType = 'foo'; |
| o.gpuDriverInstallationConfig = buildGPUDriverInstallationConfig(); |
| o.gpuPartitionSize = 'foo'; |
| o.gpuSharingConfig = buildGPUSharingConfig(); |
| } |
| buildCounterAcceleratorConfig--; |
| return o; |
| } |
| |
| void checkAcceleratorConfig(api.AcceleratorConfig o) { |
| buildCounterAcceleratorConfig++; |
| if (buildCounterAcceleratorConfig < 3) { |
| unittest.expect(o.acceleratorCount!, unittest.equals('foo')); |
| unittest.expect(o.acceleratorType!, unittest.equals('foo')); |
| checkGPUDriverInstallationConfig(o.gpuDriverInstallationConfig!); |
| unittest.expect(o.gpuPartitionSize!, unittest.equals('foo')); |
| checkGPUSharingConfig(o.gpuSharingConfig!); |
| } |
| buildCounterAcceleratorConfig--; |
| } |
| |
| core.int buildCounterAccurateTimeConfig = 0; |
| api.AccurateTimeConfig buildAccurateTimeConfig() { |
| final o = api.AccurateTimeConfig(); |
| buildCounterAccurateTimeConfig++; |
| if (buildCounterAccurateTimeConfig < 3) { |
| o.enablePtpKvmTimeSync = true; |
| } |
| buildCounterAccurateTimeConfig--; |
| return o; |
| } |
| |
| void checkAccurateTimeConfig(api.AccurateTimeConfig o) { |
| buildCounterAccurateTimeConfig++; |
| if (buildCounterAccurateTimeConfig < 3) { |
| unittest.expect(o.enablePtpKvmTimeSync!, unittest.isTrue); |
| } |
| buildCounterAccurateTimeConfig--; |
| } |
| |
| 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 buildCounterAdditionalIPRangesConfig = 0; |
| api.AdditionalIPRangesConfig buildAdditionalIPRangesConfig() { |
| final o = api.AdditionalIPRangesConfig(); |
| buildCounterAdditionalIPRangesConfig++; |
| if (buildCounterAdditionalIPRangesConfig < 3) { |
| o.podIpv4RangeNames = buildUnnamed0(); |
| o.status = 'foo'; |
| o.subnetwork = 'foo'; |
| } |
| buildCounterAdditionalIPRangesConfig--; |
| return o; |
| } |
| |
| void checkAdditionalIPRangesConfig(api.AdditionalIPRangesConfig o) { |
| buildCounterAdditionalIPRangesConfig++; |
| if (buildCounterAdditionalIPRangesConfig < 3) { |
| checkUnnamed0(o.podIpv4RangeNames!); |
| unittest.expect(o.status!, unittest.equals('foo')); |
| unittest.expect(o.subnetwork!, unittest.equals('foo')); |
| } |
| buildCounterAdditionalIPRangesConfig--; |
| } |
| |
| core.int buildCounterAdditionalNodeNetworkConfig = 0; |
| api.AdditionalNodeNetworkConfig buildAdditionalNodeNetworkConfig() { |
| final o = api.AdditionalNodeNetworkConfig(); |
| buildCounterAdditionalNodeNetworkConfig++; |
| if (buildCounterAdditionalNodeNetworkConfig < 3) { |
| o.network = 'foo'; |
| o.subnetwork = 'foo'; |
| } |
| buildCounterAdditionalNodeNetworkConfig--; |
| return o; |
| } |
| |
| void checkAdditionalNodeNetworkConfig(api.AdditionalNodeNetworkConfig o) { |
| buildCounterAdditionalNodeNetworkConfig++; |
| if (buildCounterAdditionalNodeNetworkConfig < 3) { |
| unittest.expect(o.network!, unittest.equals('foo')); |
| unittest.expect(o.subnetwork!, unittest.equals('foo')); |
| } |
| buildCounterAdditionalNodeNetworkConfig--; |
| } |
| |
| core.int buildCounterAdditionalPodNetworkConfig = 0; |
| api.AdditionalPodNetworkConfig buildAdditionalPodNetworkConfig() { |
| final o = api.AdditionalPodNetworkConfig(); |
| buildCounterAdditionalPodNetworkConfig++; |
| if (buildCounterAdditionalPodNetworkConfig < 3) { |
| o.maxPodsPerNode = buildMaxPodsConstraint(); |
| o.networkAttachment = 'foo'; |
| o.secondaryPodRange = 'foo'; |
| o.subnetwork = 'foo'; |
| } |
| buildCounterAdditionalPodNetworkConfig--; |
| return o; |
| } |
| |
| void checkAdditionalPodNetworkConfig(api.AdditionalPodNetworkConfig o) { |
| buildCounterAdditionalPodNetworkConfig++; |
| if (buildCounterAdditionalPodNetworkConfig < 3) { |
| checkMaxPodsConstraint(o.maxPodsPerNode!); |
| unittest.expect(o.networkAttachment!, unittest.equals('foo')); |
| unittest.expect(o.secondaryPodRange!, unittest.equals('foo')); |
| unittest.expect(o.subnetwork!, unittest.equals('foo')); |
| } |
| buildCounterAdditionalPodNetworkConfig--; |
| } |
| |
| core.List<api.RangeInfo> buildUnnamed1() => [ |
| buildRangeInfo(), |
| buildRangeInfo(), |
| ]; |
| |
| void checkUnnamed1(core.List<api.RangeInfo> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRangeInfo(o[0]); |
| checkRangeInfo(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 buildCounterAdditionalPodRangesConfig = 0; |
| api.AdditionalPodRangesConfig buildAdditionalPodRangesConfig() { |
| final o = api.AdditionalPodRangesConfig(); |
| buildCounterAdditionalPodRangesConfig++; |
| if (buildCounterAdditionalPodRangesConfig < 3) { |
| o.podRangeInfo = buildUnnamed1(); |
| o.podRangeNames = buildUnnamed2(); |
| } |
| buildCounterAdditionalPodRangesConfig--; |
| return o; |
| } |
| |
| void checkAdditionalPodRangesConfig(api.AdditionalPodRangesConfig o) { |
| buildCounterAdditionalPodRangesConfig++; |
| if (buildCounterAdditionalPodRangesConfig < 3) { |
| checkUnnamed1(o.podRangeInfo!); |
| checkUnnamed2(o.podRangeNames!); |
| } |
| buildCounterAdditionalPodRangesConfig--; |
| } |
| |
| core.int buildCounterAddonsConfig = 0; |
| api.AddonsConfig buildAddonsConfig() { |
| final o = api.AddonsConfig(); |
| buildCounterAddonsConfig++; |
| if (buildCounterAddonsConfig < 3) { |
| o.cloudRunConfig = buildCloudRunConfig(); |
| o.configConnectorConfig = buildConfigConnectorConfig(); |
| o.dnsCacheConfig = buildDnsCacheConfig(); |
| o.gcePersistentDiskCsiDriverConfig = |
| buildGcePersistentDiskCsiDriverConfig(); |
| o.gcpFilestoreCsiDriverConfig = buildGcpFilestoreCsiDriverConfig(); |
| o.gcsFuseCsiDriverConfig = buildGcsFuseCsiDriverConfig(); |
| o.gkeBackupAgentConfig = buildGkeBackupAgentConfig(); |
| o.highScaleCheckpointingConfig = buildHighScaleCheckpointingConfig(); |
| o.horizontalPodAutoscaling = buildHorizontalPodAutoscaling(); |
| o.httpLoadBalancing = buildHttpLoadBalancing(); |
| o.kubernetesDashboard = buildKubernetesDashboard(); |
| o.lustreCsiDriverConfig = buildLustreCsiDriverConfig(); |
| o.networkPolicyConfig = buildNetworkPolicyConfig(); |
| o.parallelstoreCsiDriverConfig = buildParallelstoreCsiDriverConfig(); |
| o.podSnapshotConfig = buildPodSnapshotConfig(); |
| o.rayOperatorConfig = buildRayOperatorConfig(); |
| o.sliceControllerConfig = buildSliceControllerConfig(); |
| o.slurmOperatorConfig = buildSlurmOperatorConfig(); |
| o.statefulHaConfig = buildStatefulHAConfig(); |
| } |
| buildCounterAddonsConfig--; |
| return o; |
| } |
| |
| void checkAddonsConfig(api.AddonsConfig o) { |
| buildCounterAddonsConfig++; |
| if (buildCounterAddonsConfig < 3) { |
| checkCloudRunConfig(o.cloudRunConfig!); |
| checkConfigConnectorConfig(o.configConnectorConfig!); |
| checkDnsCacheConfig(o.dnsCacheConfig!); |
| checkGcePersistentDiskCsiDriverConfig(o.gcePersistentDiskCsiDriverConfig!); |
| checkGcpFilestoreCsiDriverConfig(o.gcpFilestoreCsiDriverConfig!); |
| checkGcsFuseCsiDriverConfig(o.gcsFuseCsiDriverConfig!); |
| checkGkeBackupAgentConfig(o.gkeBackupAgentConfig!); |
| checkHighScaleCheckpointingConfig(o.highScaleCheckpointingConfig!); |
| checkHorizontalPodAutoscaling(o.horizontalPodAutoscaling!); |
| checkHttpLoadBalancing(o.httpLoadBalancing!); |
| checkKubernetesDashboard(o.kubernetesDashboard!); |
| checkLustreCsiDriverConfig(o.lustreCsiDriverConfig!); |
| checkNetworkPolicyConfig(o.networkPolicyConfig!); |
| checkParallelstoreCsiDriverConfig(o.parallelstoreCsiDriverConfig!); |
| checkPodSnapshotConfig(o.podSnapshotConfig!); |
| checkRayOperatorConfig(o.rayOperatorConfig!); |
| checkSliceControllerConfig(o.sliceControllerConfig!); |
| checkSlurmOperatorConfig(o.slurmOperatorConfig!); |
| checkStatefulHAConfig(o.statefulHaConfig!); |
| } |
| buildCounterAddonsConfig--; |
| } |
| |
| core.int buildCounterAdvancedDatapathObservabilityConfig = 0; |
| api.AdvancedDatapathObservabilityConfig |
| buildAdvancedDatapathObservabilityConfig() { |
| final o = api.AdvancedDatapathObservabilityConfig(); |
| buildCounterAdvancedDatapathObservabilityConfig++; |
| if (buildCounterAdvancedDatapathObservabilityConfig < 3) { |
| o.enableMetrics = true; |
| o.enableRelay = true; |
| o.relayMode = 'foo'; |
| } |
| buildCounterAdvancedDatapathObservabilityConfig--; |
| return o; |
| } |
| |
| void checkAdvancedDatapathObservabilityConfig( |
| api.AdvancedDatapathObservabilityConfig o, |
| ) { |
| buildCounterAdvancedDatapathObservabilityConfig++; |
| if (buildCounterAdvancedDatapathObservabilityConfig < 3) { |
| unittest.expect(o.enableMetrics!, unittest.isTrue); |
| unittest.expect(o.enableRelay!, unittest.isTrue); |
| unittest.expect(o.relayMode!, unittest.equals('foo')); |
| } |
| buildCounterAdvancedDatapathObservabilityConfig--; |
| } |
| |
| core.int buildCounterAdvancedMachineFeatures = 0; |
| api.AdvancedMachineFeatures buildAdvancedMachineFeatures() { |
| final o = api.AdvancedMachineFeatures(); |
| buildCounterAdvancedMachineFeatures++; |
| if (buildCounterAdvancedMachineFeatures < 3) { |
| o.enableNestedVirtualization = true; |
| o.performanceMonitoringUnit = 'foo'; |
| o.threadsPerCore = 'foo'; |
| } |
| buildCounterAdvancedMachineFeatures--; |
| return o; |
| } |
| |
| void checkAdvancedMachineFeatures(api.AdvancedMachineFeatures o) { |
| buildCounterAdvancedMachineFeatures++; |
| if (buildCounterAdvancedMachineFeatures < 3) { |
| unittest.expect(o.enableNestedVirtualization!, unittest.isTrue); |
| unittest.expect(o.performanceMonitoringUnit!, unittest.equals('foo')); |
| unittest.expect(o.threadsPerCore!, unittest.equals('foo')); |
| } |
| buildCounterAdvancedMachineFeatures--; |
| } |
| |
| core.int buildCounterAnonymousAuthenticationConfig = 0; |
| api.AnonymousAuthenticationConfig buildAnonymousAuthenticationConfig() { |
| final o = api.AnonymousAuthenticationConfig(); |
| buildCounterAnonymousAuthenticationConfig++; |
| if (buildCounterAnonymousAuthenticationConfig < 3) { |
| o.mode = 'foo'; |
| } |
| buildCounterAnonymousAuthenticationConfig--; |
| return o; |
| } |
| |
| void checkAnonymousAuthenticationConfig(api.AnonymousAuthenticationConfig o) { |
| buildCounterAnonymousAuthenticationConfig++; |
| if (buildCounterAnonymousAuthenticationConfig < 3) { |
| unittest.expect(o.mode!, unittest.equals('foo')); |
| } |
| buildCounterAnonymousAuthenticationConfig--; |
| } |
| |
| core.int buildCounterAuthenticatorGroupsConfig = 0; |
| api.AuthenticatorGroupsConfig buildAuthenticatorGroupsConfig() { |
| final o = api.AuthenticatorGroupsConfig(); |
| buildCounterAuthenticatorGroupsConfig++; |
| if (buildCounterAuthenticatorGroupsConfig < 3) { |
| o.enabled = true; |
| o.securityGroup = 'foo'; |
| } |
| buildCounterAuthenticatorGroupsConfig--; |
| return o; |
| } |
| |
| void checkAuthenticatorGroupsConfig(api.AuthenticatorGroupsConfig o) { |
| buildCounterAuthenticatorGroupsConfig++; |
| if (buildCounterAuthenticatorGroupsConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.securityGroup!, unittest.equals('foo')); |
| } |
| buildCounterAuthenticatorGroupsConfig--; |
| } |
| |
| core.int buildCounterAutoIpamConfig = 0; |
| api.AutoIpamConfig buildAutoIpamConfig() { |
| final o = api.AutoIpamConfig(); |
| buildCounterAutoIpamConfig++; |
| if (buildCounterAutoIpamConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterAutoIpamConfig--; |
| return o; |
| } |
| |
| void checkAutoIpamConfig(api.AutoIpamConfig o) { |
| buildCounterAutoIpamConfig++; |
| if (buildCounterAutoIpamConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterAutoIpamConfig--; |
| } |
| |
| core.int buildCounterAutoMonitoringConfig = 0; |
| api.AutoMonitoringConfig buildAutoMonitoringConfig() { |
| final o = api.AutoMonitoringConfig(); |
| buildCounterAutoMonitoringConfig++; |
| if (buildCounterAutoMonitoringConfig < 3) { |
| o.scope = 'foo'; |
| } |
| buildCounterAutoMonitoringConfig--; |
| return o; |
| } |
| |
| void checkAutoMonitoringConfig(api.AutoMonitoringConfig o) { |
| buildCounterAutoMonitoringConfig++; |
| if (buildCounterAutoMonitoringConfig < 3) { |
| unittest.expect(o.scope!, unittest.equals('foo')); |
| } |
| buildCounterAutoMonitoringConfig--; |
| } |
| |
| core.int buildCounterAutoUpgradeOptions = 0; |
| api.AutoUpgradeOptions buildAutoUpgradeOptions() { |
| final o = api.AutoUpgradeOptions(); |
| buildCounterAutoUpgradeOptions++; |
| if (buildCounterAutoUpgradeOptions < 3) { |
| o.autoUpgradeStartTime = 'foo'; |
| o.description = 'foo'; |
| } |
| buildCounterAutoUpgradeOptions--; |
| return o; |
| } |
| |
| void checkAutoUpgradeOptions(api.AutoUpgradeOptions o) { |
| buildCounterAutoUpgradeOptions++; |
| if (buildCounterAutoUpgradeOptions < 3) { |
| unittest.expect(o.autoUpgradeStartTime!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| } |
| buildCounterAutoUpgradeOptions--; |
| } |
| |
| core.int buildCounterAutopilot = 0; |
| api.Autopilot buildAutopilot() { |
| final o = api.Autopilot(); |
| buildCounterAutopilot++; |
| if (buildCounterAutopilot < 3) { |
| o.clusterPolicyConfig = buildClusterPolicyConfig(); |
| o.enabled = true; |
| o.privilegedAdmissionConfig = buildPrivilegedAdmissionConfig(); |
| o.workloadPolicyConfig = buildWorkloadPolicyConfig(); |
| } |
| buildCounterAutopilot--; |
| return o; |
| } |
| |
| void checkAutopilot(api.Autopilot o) { |
| buildCounterAutopilot++; |
| if (buildCounterAutopilot < 3) { |
| checkClusterPolicyConfig(o.clusterPolicyConfig!); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| checkPrivilegedAdmissionConfig(o.privilegedAdmissionConfig!); |
| checkWorkloadPolicyConfig(o.workloadPolicyConfig!); |
| } |
| buildCounterAutopilot--; |
| } |
| |
| 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 buildCounterAutopilotCompatibilityIssue = 0; |
| api.AutopilotCompatibilityIssue buildAutopilotCompatibilityIssue() { |
| final o = api.AutopilotCompatibilityIssue(); |
| buildCounterAutopilotCompatibilityIssue++; |
| if (buildCounterAutopilotCompatibilityIssue < 3) { |
| o.constraintType = 'foo'; |
| o.description = 'foo'; |
| o.documentationUrl = 'foo'; |
| o.incompatibilityType = 'foo'; |
| o.lastObservation = 'foo'; |
| o.subjects = buildUnnamed3(); |
| } |
| buildCounterAutopilotCompatibilityIssue--; |
| return o; |
| } |
| |
| void checkAutopilotCompatibilityIssue(api.AutopilotCompatibilityIssue o) { |
| buildCounterAutopilotCompatibilityIssue++; |
| if (buildCounterAutopilotCompatibilityIssue < 3) { |
| unittest.expect(o.constraintType!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.documentationUrl!, unittest.equals('foo')); |
| unittest.expect(o.incompatibilityType!, unittest.equals('foo')); |
| unittest.expect(o.lastObservation!, unittest.equals('foo')); |
| checkUnnamed3(o.subjects!); |
| } |
| buildCounterAutopilotCompatibilityIssue--; |
| } |
| |
| core.int buildCounterAutopilotConfig = 0; |
| api.AutopilotConfig buildAutopilotConfig() { |
| final o = api.AutopilotConfig(); |
| buildCounterAutopilotConfig++; |
| if (buildCounterAutopilotConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterAutopilotConfig--; |
| return o; |
| } |
| |
| void checkAutopilotConfig(api.AutopilotConfig o) { |
| buildCounterAutopilotConfig++; |
| if (buildCounterAutopilotConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterAutopilotConfig--; |
| } |
| |
| 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 buildCounterAutoprovisioningNodePoolDefaults = 0; |
| api.AutoprovisioningNodePoolDefaults buildAutoprovisioningNodePoolDefaults() { |
| final o = api.AutoprovisioningNodePoolDefaults(); |
| buildCounterAutoprovisioningNodePoolDefaults++; |
| if (buildCounterAutoprovisioningNodePoolDefaults < 3) { |
| o.bootDiskKmsKey = 'foo'; |
| o.diskSizeGb = 42; |
| o.diskType = 'foo'; |
| o.imageType = 'foo'; |
| o.insecureKubeletReadonlyPortEnabled = true; |
| o.management = buildNodeManagement(); |
| o.minCpuPlatform = 'foo'; |
| o.oauthScopes = buildUnnamed4(); |
| o.serviceAccount = 'foo'; |
| o.shieldedInstanceConfig = buildShieldedInstanceConfig(); |
| o.upgradeSettings = buildUpgradeSettings(); |
| } |
| buildCounterAutoprovisioningNodePoolDefaults--; |
| return o; |
| } |
| |
| void checkAutoprovisioningNodePoolDefaults( |
| api.AutoprovisioningNodePoolDefaults o, |
| ) { |
| buildCounterAutoprovisioningNodePoolDefaults++; |
| if (buildCounterAutoprovisioningNodePoolDefaults < 3) { |
| unittest.expect(o.bootDiskKmsKey!, unittest.equals('foo')); |
| unittest.expect(o.diskSizeGb!, unittest.equals(42)); |
| unittest.expect(o.diskType!, unittest.equals('foo')); |
| unittest.expect(o.imageType!, unittest.equals('foo')); |
| unittest.expect(o.insecureKubeletReadonlyPortEnabled!, unittest.isTrue); |
| checkNodeManagement(o.management!); |
| unittest.expect(o.minCpuPlatform!, unittest.equals('foo')); |
| checkUnnamed4(o.oauthScopes!); |
| unittest.expect(o.serviceAccount!, unittest.equals('foo')); |
| checkShieldedInstanceConfig(o.shieldedInstanceConfig!); |
| checkUpgradeSettings(o.upgradeSettings!); |
| } |
| buildCounterAutoprovisioningNodePoolDefaults--; |
| } |
| |
| core.int buildCounterAutoscaledRolloutPolicy = 0; |
| api.AutoscaledRolloutPolicy buildAutoscaledRolloutPolicy() { |
| final o = api.AutoscaledRolloutPolicy(); |
| buildCounterAutoscaledRolloutPolicy++; |
| if (buildCounterAutoscaledRolloutPolicy < 3) { |
| o.waitForDrainDuration = 'foo'; |
| } |
| buildCounterAutoscaledRolloutPolicy--; |
| return o; |
| } |
| |
| void checkAutoscaledRolloutPolicy(api.AutoscaledRolloutPolicy o) { |
| buildCounterAutoscaledRolloutPolicy++; |
| if (buildCounterAutoscaledRolloutPolicy < 3) { |
| unittest.expect(o.waitForDrainDuration!, unittest.equals('foo')); |
| } |
| buildCounterAutoscaledRolloutPolicy--; |
| } |
| |
| core.int buildCounterBestEffortProvisioning = 0; |
| api.BestEffortProvisioning buildBestEffortProvisioning() { |
| final o = api.BestEffortProvisioning(); |
| buildCounterBestEffortProvisioning++; |
| if (buildCounterBestEffortProvisioning < 3) { |
| o.enabled = true; |
| o.minProvisionNodes = 42; |
| } |
| buildCounterBestEffortProvisioning--; |
| return o; |
| } |
| |
| void checkBestEffortProvisioning(api.BestEffortProvisioning o) { |
| buildCounterBestEffortProvisioning++; |
| if (buildCounterBestEffortProvisioning < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.minProvisionNodes!, unittest.equals(42)); |
| } |
| buildCounterBestEffortProvisioning--; |
| } |
| |
| core.int buildCounterBigQueryDestination = 0; |
| api.BigQueryDestination buildBigQueryDestination() { |
| final o = api.BigQueryDestination(); |
| buildCounterBigQueryDestination++; |
| if (buildCounterBigQueryDestination < 3) { |
| o.datasetId = 'foo'; |
| } |
| buildCounterBigQueryDestination--; |
| return o; |
| } |
| |
| void checkBigQueryDestination(api.BigQueryDestination o) { |
| buildCounterBigQueryDestination++; |
| if (buildCounterBigQueryDestination < 3) { |
| unittest.expect(o.datasetId!, unittest.equals('foo')); |
| } |
| buildCounterBigQueryDestination--; |
| } |
| |
| core.int buildCounterBinaryAuthorization = 0; |
| api.BinaryAuthorization buildBinaryAuthorization() { |
| final o = api.BinaryAuthorization(); |
| buildCounterBinaryAuthorization++; |
| if (buildCounterBinaryAuthorization < 3) { |
| o.enabled = true; |
| o.evaluationMode = 'foo'; |
| } |
| buildCounterBinaryAuthorization--; |
| return o; |
| } |
| |
| void checkBinaryAuthorization(api.BinaryAuthorization o) { |
| buildCounterBinaryAuthorization++; |
| if (buildCounterBinaryAuthorization < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.evaluationMode!, unittest.equals('foo')); |
| } |
| buildCounterBinaryAuthorization--; |
| } |
| |
| 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 buildCounterBlueGreenInfo = 0; |
| api.BlueGreenInfo buildBlueGreenInfo() { |
| final o = api.BlueGreenInfo(); |
| buildCounterBlueGreenInfo++; |
| if (buildCounterBlueGreenInfo < 3) { |
| o.blueInstanceGroupUrls = buildUnnamed5(); |
| o.bluePoolDeletionStartTime = 'foo'; |
| o.greenInstanceGroupUrls = buildUnnamed6(); |
| o.greenPoolVersion = 'foo'; |
| o.phase = 'foo'; |
| } |
| buildCounterBlueGreenInfo--; |
| return o; |
| } |
| |
| void checkBlueGreenInfo(api.BlueGreenInfo o) { |
| buildCounterBlueGreenInfo++; |
| if (buildCounterBlueGreenInfo < 3) { |
| checkUnnamed5(o.blueInstanceGroupUrls!); |
| unittest.expect(o.bluePoolDeletionStartTime!, unittest.equals('foo')); |
| checkUnnamed6(o.greenInstanceGroupUrls!); |
| unittest.expect(o.greenPoolVersion!, unittest.equals('foo')); |
| unittest.expect(o.phase!, unittest.equals('foo')); |
| } |
| buildCounterBlueGreenInfo--; |
| } |
| |
| core.int buildCounterBlueGreenSettings = 0; |
| api.BlueGreenSettings buildBlueGreenSettings() { |
| final o = api.BlueGreenSettings(); |
| buildCounterBlueGreenSettings++; |
| if (buildCounterBlueGreenSettings < 3) { |
| o.autoscaledRolloutPolicy = buildAutoscaledRolloutPolicy(); |
| o.nodePoolSoakDuration = 'foo'; |
| o.standardRolloutPolicy = buildStandardRolloutPolicy(); |
| } |
| buildCounterBlueGreenSettings--; |
| return o; |
| } |
| |
| void checkBlueGreenSettings(api.BlueGreenSettings o) { |
| buildCounterBlueGreenSettings++; |
| if (buildCounterBlueGreenSettings < 3) { |
| checkAutoscaledRolloutPolicy(o.autoscaledRolloutPolicy!); |
| unittest.expect(o.nodePoolSoakDuration!, unittest.equals('foo')); |
| checkStandardRolloutPolicy(o.standardRolloutPolicy!); |
| } |
| buildCounterBlueGreenSettings--; |
| } |
| |
| core.int buildCounterBootDisk = 0; |
| api.BootDisk buildBootDisk() { |
| final o = api.BootDisk(); |
| buildCounterBootDisk++; |
| if (buildCounterBootDisk < 3) { |
| o.diskType = 'foo'; |
| o.provisionedIops = 'foo'; |
| o.provisionedThroughput = 'foo'; |
| o.sizeGb = 'foo'; |
| } |
| buildCounterBootDisk--; |
| return o; |
| } |
| |
| void checkBootDisk(api.BootDisk o) { |
| buildCounterBootDisk++; |
| if (buildCounterBootDisk < 3) { |
| unittest.expect(o.diskType!, unittest.equals('foo')); |
| unittest.expect(o.provisionedIops!, unittest.equals('foo')); |
| unittest.expect(o.provisionedThroughput!, unittest.equals('foo')); |
| unittest.expect(o.sizeGb!, unittest.equals('foo')); |
| } |
| buildCounterBootDisk--; |
| } |
| |
| core.int buildCounterBootDiskProfile = 0; |
| api.BootDiskProfile buildBootDiskProfile() { |
| final o = api.BootDiskProfile(); |
| buildCounterBootDiskProfile++; |
| if (buildCounterBootDiskProfile < 3) { |
| o.swapSizeGib = 'foo'; |
| o.swapSizePercent = 42; |
| } |
| buildCounterBootDiskProfile--; |
| return o; |
| } |
| |
| void checkBootDiskProfile(api.BootDiskProfile o) { |
| buildCounterBootDiskProfile++; |
| if (buildCounterBootDiskProfile < 3) { |
| unittest.expect(o.swapSizeGib!, unittest.equals('foo')); |
| unittest.expect(o.swapSizePercent!, unittest.equals(42)); |
| } |
| buildCounterBootDiskProfile--; |
| } |
| |
| core.int buildCounterCancelOperationRequest = 0; |
| api.CancelOperationRequest buildCancelOperationRequest() { |
| final o = api.CancelOperationRequest(); |
| buildCounterCancelOperationRequest++; |
| if (buildCounterCancelOperationRequest < 3) { |
| o.name = 'foo'; |
| o.operationId = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterCancelOperationRequest--; |
| return o; |
| } |
| |
| void checkCancelOperationRequest(api.CancelOperationRequest o) { |
| buildCounterCancelOperationRequest++; |
| if (buildCounterCancelOperationRequest < 3) { |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.operationId!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterCancelOperationRequest--; |
| } |
| |
| 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 buildCounterCertificateAuthorityDomainConfig = 0; |
| api.CertificateAuthorityDomainConfig buildCertificateAuthorityDomainConfig() { |
| final o = api.CertificateAuthorityDomainConfig(); |
| buildCounterCertificateAuthorityDomainConfig++; |
| if (buildCounterCertificateAuthorityDomainConfig < 3) { |
| o.fqdns = buildUnnamed7(); |
| o.gcpSecretManagerCertificateConfig = |
| buildGCPSecretManagerCertificateConfig(); |
| } |
| buildCounterCertificateAuthorityDomainConfig--; |
| return o; |
| } |
| |
| void checkCertificateAuthorityDomainConfig( |
| api.CertificateAuthorityDomainConfig o, |
| ) { |
| buildCounterCertificateAuthorityDomainConfig++; |
| if (buildCounterCertificateAuthorityDomainConfig < 3) { |
| checkUnnamed7(o.fqdns!); |
| checkGCPSecretManagerCertificateConfig( |
| o.gcpSecretManagerCertificateConfig!, |
| ); |
| } |
| buildCounterCertificateAuthorityDomainConfig--; |
| } |
| |
| core.int buildCounterCertificateConfig = 0; |
| api.CertificateConfig buildCertificateConfig() { |
| final o = api.CertificateConfig(); |
| buildCounterCertificateConfig++; |
| if (buildCounterCertificateConfig < 3) { |
| o.gcpSecretManagerSecretUri = 'foo'; |
| } |
| buildCounterCertificateConfig--; |
| return o; |
| } |
| |
| void checkCertificateConfig(api.CertificateConfig o) { |
| buildCounterCertificateConfig++; |
| if (buildCounterCertificateConfig < 3) { |
| unittest.expect(o.gcpSecretManagerSecretUri!, unittest.equals('foo')); |
| } |
| buildCounterCertificateConfig--; |
| } |
| |
| core.int buildCounterCertificateConfigPair = 0; |
| api.CertificateConfigPair buildCertificateConfigPair() { |
| final o = api.CertificateConfigPair(); |
| buildCounterCertificateConfigPair++; |
| if (buildCounterCertificateConfigPair < 3) { |
| o.cert = buildCertificateConfig(); |
| o.key = buildCertificateConfig(); |
| } |
| buildCounterCertificateConfigPair--; |
| return o; |
| } |
| |
| void checkCertificateConfigPair(api.CertificateConfigPair o) { |
| buildCounterCertificateConfigPair++; |
| if (buildCounterCertificateConfigPair < 3) { |
| checkCertificateConfig(o.cert!); |
| checkCertificateConfig(o.key!); |
| } |
| buildCounterCertificateConfigPair--; |
| } |
| |
| core.List<api.AutopilotCompatibilityIssue> buildUnnamed8() => [ |
| buildAutopilotCompatibilityIssue(), |
| buildAutopilotCompatibilityIssue(), |
| ]; |
| |
| void checkUnnamed8(core.List<api.AutopilotCompatibilityIssue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAutopilotCompatibilityIssue(o[0]); |
| checkAutopilotCompatibilityIssue(o[1]); |
| } |
| |
| core.int buildCounterCheckAutopilotCompatibilityResponse = 0; |
| api.CheckAutopilotCompatibilityResponse |
| buildCheckAutopilotCompatibilityResponse() { |
| final o = api.CheckAutopilotCompatibilityResponse(); |
| buildCounterCheckAutopilotCompatibilityResponse++; |
| if (buildCounterCheckAutopilotCompatibilityResponse < 3) { |
| o.issues = buildUnnamed8(); |
| o.summary = 'foo'; |
| } |
| buildCounterCheckAutopilotCompatibilityResponse--; |
| return o; |
| } |
| |
| void checkCheckAutopilotCompatibilityResponse( |
| api.CheckAutopilotCompatibilityResponse o, |
| ) { |
| buildCounterCheckAutopilotCompatibilityResponse++; |
| if (buildCounterCheckAutopilotCompatibilityResponse < 3) { |
| checkUnnamed8(o.issues!); |
| unittest.expect(o.summary!, unittest.equals('foo')); |
| } |
| buildCounterCheckAutopilotCompatibilityResponse--; |
| } |
| |
| core.int buildCounterCidrBlock = 0; |
| api.CidrBlock buildCidrBlock() { |
| final o = api.CidrBlock(); |
| buildCounterCidrBlock++; |
| if (buildCounterCidrBlock < 3) { |
| o.cidrBlock = 'foo'; |
| o.displayName = 'foo'; |
| } |
| buildCounterCidrBlock--; |
| return o; |
| } |
| |
| void checkCidrBlock(api.CidrBlock o) { |
| buildCounterCidrBlock++; |
| if (buildCounterCidrBlock < 3) { |
| unittest.expect(o.cidrBlock!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| } |
| buildCounterCidrBlock--; |
| } |
| |
| core.int buildCounterClientCertificateConfig = 0; |
| api.ClientCertificateConfig buildClientCertificateConfig() { |
| final o = api.ClientCertificateConfig(); |
| buildCounterClientCertificateConfig++; |
| if (buildCounterClientCertificateConfig < 3) { |
| o.issueClientCertificate = true; |
| } |
| buildCounterClientCertificateConfig--; |
| return o; |
| } |
| |
| void checkClientCertificateConfig(api.ClientCertificateConfig o) { |
| buildCounterClientCertificateConfig++; |
| if (buildCounterClientCertificateConfig < 3) { |
| unittest.expect(o.issueClientCertificate!, unittest.isTrue); |
| } |
| buildCounterClientCertificateConfig--; |
| } |
| |
| core.int buildCounterCloudRunConfig = 0; |
| api.CloudRunConfig buildCloudRunConfig() { |
| final o = api.CloudRunConfig(); |
| buildCounterCloudRunConfig++; |
| if (buildCounterCloudRunConfig < 3) { |
| o.disabled = true; |
| o.loadBalancerType = 'foo'; |
| } |
| buildCounterCloudRunConfig--; |
| return o; |
| } |
| |
| void checkCloudRunConfig(api.CloudRunConfig o) { |
| buildCounterCloudRunConfig++; |
| if (buildCounterCloudRunConfig < 3) { |
| unittest.expect(o.disabled!, unittest.isTrue); |
| unittest.expect(o.loadBalancerType!, unittest.equals('foo')); |
| } |
| buildCounterCloudRunConfig--; |
| } |
| |
| 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<api.StatusCondition> buildUnnamed10() => [ |
| buildStatusCondition(), |
| buildStatusCondition(), |
| ]; |
| |
| void checkUnnamed10(core.List<api.StatusCondition> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkStatusCondition(o[0]); |
| checkStatusCondition(o[1]); |
| } |
| |
| 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')); |
| } |
| |
| core.List<api.NodePool> buildUnnamed13() => [buildNodePool(), buildNodePool()]; |
| |
| void checkUnnamed13(core.List<api.NodePool> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkNodePool(o[0]); |
| checkNodePool(o[1]); |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed14() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed14(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 buildCounterCluster = 0; |
| api.Cluster buildCluster() { |
| final o = api.Cluster(); |
| buildCounterCluster++; |
| if (buildCounterCluster < 3) { |
| o.addonsConfig = buildAddonsConfig(); |
| o.alphaClusterFeatureGates = buildUnnamed9(); |
| o.anonymousAuthenticationConfig = buildAnonymousAuthenticationConfig(); |
| o.authenticatorGroupsConfig = buildAuthenticatorGroupsConfig(); |
| o.autopilot = buildAutopilot(); |
| o.autoscaling = buildClusterAutoscaling(); |
| o.binaryAuthorization = buildBinaryAuthorization(); |
| o.clusterIpv4Cidr = 'foo'; |
| o.compliancePostureConfig = buildCompliancePostureConfig(); |
| o.conditions = buildUnnamed10(); |
| o.confidentialNodes = buildConfidentialNodes(); |
| o.controlPlaneEgress = buildControlPlaneEgress(); |
| o.controlPlaneEndpointsConfig = buildControlPlaneEndpointsConfig(); |
| o.costManagementConfig = buildCostManagementConfig(); |
| o.createTime = 'foo'; |
| o.currentMasterVersion = 'foo'; |
| o.currentNodeCount = 42; |
| o.currentNodeVersion = 'foo'; |
| o.databaseEncryption = buildDatabaseEncryption(); |
| o.defaultMaxPodsConstraint = buildMaxPodsConstraint(); |
| o.description = 'foo'; |
| o.enableK8sBetaApis = buildK8sBetaAPIConfig(); |
| o.enableKubernetesAlpha = true; |
| o.enableTpu = true; |
| o.endpoint = 'foo'; |
| o.enterpriseConfig = buildEnterpriseConfig(); |
| o.etag = 'foo'; |
| o.expireTime = 'foo'; |
| o.fleet = buildFleet(); |
| o.gkeAutoUpgradeConfig = buildGkeAutoUpgradeConfig(); |
| o.id = 'foo'; |
| o.identityServiceConfig = buildIdentityServiceConfig(); |
| o.initialClusterVersion = 'foo'; |
| o.initialNodeCount = 42; |
| o.instanceGroupUrls = buildUnnamed11(); |
| o.ipAllocationPolicy = buildIPAllocationPolicy(); |
| o.labelFingerprint = 'foo'; |
| o.legacyAbac = buildLegacyAbac(); |
| o.location = 'foo'; |
| o.locations = buildUnnamed12(); |
| o.loggingConfig = buildLoggingConfig(); |
| o.loggingService = 'foo'; |
| o.maintenancePolicy = buildMaintenancePolicy(); |
| o.managedMachineLearningDiagnosticsConfig = |
| buildManagedMachineLearningDiagnosticsConfig(); |
| o.managedOpentelemetryConfig = buildManagedOpenTelemetryConfig(); |
| o.masterAuth = buildMasterAuth(); |
| o.masterAuthorizedNetworksConfig = buildMasterAuthorizedNetworksConfig(); |
| o.meshCertificates = buildMeshCertificates(); |
| o.monitoringConfig = buildMonitoringConfig(); |
| o.monitoringService = 'foo'; |
| o.name = 'foo'; |
| o.network = 'foo'; |
| o.networkConfig = buildNetworkConfig(); |
| o.networkPolicy = buildNetworkPolicy(); |
| o.nodeConfig = buildNodeConfig(); |
| o.nodeIpv4CidrSize = 42; |
| o.nodePoolAutoConfig = buildNodePoolAutoConfig(); |
| o.nodePoolDefaults = buildNodePoolDefaults(); |
| o.nodePools = buildUnnamed13(); |
| o.notificationConfig = buildNotificationConfig(); |
| o.parentProductConfig = buildParentProductConfig(); |
| o.podAutoscaling = buildPodAutoscaling(); |
| o.privateClusterConfig = buildPrivateClusterConfig(); |
| o.rbacBindingConfig = buildRBACBindingConfig(); |
| o.releaseChannel = buildReleaseChannel(); |
| o.resourceLabels = buildUnnamed14(); |
| o.resourceUsageExportConfig = buildResourceUsageExportConfig(); |
| o.satisfiesPzi = true; |
| o.satisfiesPzs = true; |
| o.scheduleUpgradeConfig = buildScheduleUpgradeConfig(); |
| o.secretManagerConfig = buildSecretManagerConfig(); |
| o.secretSyncConfig = buildSecretSyncConfig(); |
| o.securityPostureConfig = buildSecurityPostureConfig(); |
| o.selfLink = 'foo'; |
| o.servicesIpv4Cidr = 'foo'; |
| o.shieldedNodes = buildShieldedNodes(); |
| o.status = 'foo'; |
| o.statusMessage = 'foo'; |
| o.subnetwork = 'foo'; |
| o.tpuIpv4CidrBlock = 'foo'; |
| o.userManagedKeysConfig = buildUserManagedKeysConfig(); |
| o.verticalPodAutoscaling = buildVerticalPodAutoscaling(); |
| o.workloadIdentityConfig = buildWorkloadIdentityConfig(); |
| o.zone = 'foo'; |
| } |
| buildCounterCluster--; |
| return o; |
| } |
| |
| void checkCluster(api.Cluster o) { |
| buildCounterCluster++; |
| if (buildCounterCluster < 3) { |
| checkAddonsConfig(o.addonsConfig!); |
| checkUnnamed9(o.alphaClusterFeatureGates!); |
| checkAnonymousAuthenticationConfig(o.anonymousAuthenticationConfig!); |
| checkAuthenticatorGroupsConfig(o.authenticatorGroupsConfig!); |
| checkAutopilot(o.autopilot!); |
| checkClusterAutoscaling(o.autoscaling!); |
| checkBinaryAuthorization(o.binaryAuthorization!); |
| unittest.expect(o.clusterIpv4Cidr!, unittest.equals('foo')); |
| checkCompliancePostureConfig(o.compliancePostureConfig!); |
| checkUnnamed10(o.conditions!); |
| checkConfidentialNodes(o.confidentialNodes!); |
| checkControlPlaneEgress(o.controlPlaneEgress!); |
| checkControlPlaneEndpointsConfig(o.controlPlaneEndpointsConfig!); |
| checkCostManagementConfig(o.costManagementConfig!); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.currentMasterVersion!, unittest.equals('foo')); |
| unittest.expect(o.currentNodeCount!, unittest.equals(42)); |
| unittest.expect(o.currentNodeVersion!, unittest.equals('foo')); |
| checkDatabaseEncryption(o.databaseEncryption!); |
| checkMaxPodsConstraint(o.defaultMaxPodsConstraint!); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| checkK8sBetaAPIConfig(o.enableK8sBetaApis!); |
| unittest.expect(o.enableKubernetesAlpha!, unittest.isTrue); |
| unittest.expect(o.enableTpu!, unittest.isTrue); |
| unittest.expect(o.endpoint!, unittest.equals('foo')); |
| checkEnterpriseConfig(o.enterpriseConfig!); |
| unittest.expect(o.etag!, unittest.equals('foo')); |
| unittest.expect(o.expireTime!, unittest.equals('foo')); |
| checkFleet(o.fleet!); |
| checkGkeAutoUpgradeConfig(o.gkeAutoUpgradeConfig!); |
| unittest.expect(o.id!, unittest.equals('foo')); |
| checkIdentityServiceConfig(o.identityServiceConfig!); |
| unittest.expect(o.initialClusterVersion!, unittest.equals('foo')); |
| unittest.expect(o.initialNodeCount!, unittest.equals(42)); |
| checkUnnamed11(o.instanceGroupUrls!); |
| checkIPAllocationPolicy(o.ipAllocationPolicy!); |
| unittest.expect(o.labelFingerprint!, unittest.equals('foo')); |
| checkLegacyAbac(o.legacyAbac!); |
| unittest.expect(o.location!, unittest.equals('foo')); |
| checkUnnamed12(o.locations!); |
| checkLoggingConfig(o.loggingConfig!); |
| unittest.expect(o.loggingService!, unittest.equals('foo')); |
| checkMaintenancePolicy(o.maintenancePolicy!); |
| checkManagedMachineLearningDiagnosticsConfig( |
| o.managedMachineLearningDiagnosticsConfig!, |
| ); |
| checkManagedOpenTelemetryConfig(o.managedOpentelemetryConfig!); |
| checkMasterAuth(o.masterAuth!); |
| checkMasterAuthorizedNetworksConfig(o.masterAuthorizedNetworksConfig!); |
| checkMeshCertificates(o.meshCertificates!); |
| checkMonitoringConfig(o.monitoringConfig!); |
| unittest.expect(o.monitoringService!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.network!, unittest.equals('foo')); |
| checkNetworkConfig(o.networkConfig!); |
| checkNetworkPolicy(o.networkPolicy!); |
| checkNodeConfig(o.nodeConfig!); |
| unittest.expect(o.nodeIpv4CidrSize!, unittest.equals(42)); |
| checkNodePoolAutoConfig(o.nodePoolAutoConfig!); |
| checkNodePoolDefaults(o.nodePoolDefaults!); |
| checkUnnamed13(o.nodePools!); |
| checkNotificationConfig(o.notificationConfig!); |
| checkParentProductConfig(o.parentProductConfig!); |
| checkPodAutoscaling(o.podAutoscaling!); |
| checkPrivateClusterConfig(o.privateClusterConfig!); |
| checkRBACBindingConfig(o.rbacBindingConfig!); |
| checkReleaseChannel(o.releaseChannel!); |
| checkUnnamed14(o.resourceLabels!); |
| checkResourceUsageExportConfig(o.resourceUsageExportConfig!); |
| unittest.expect(o.satisfiesPzi!, unittest.isTrue); |
| unittest.expect(o.satisfiesPzs!, unittest.isTrue); |
| checkScheduleUpgradeConfig(o.scheduleUpgradeConfig!); |
| checkSecretManagerConfig(o.secretManagerConfig!); |
| checkSecretSyncConfig(o.secretSyncConfig!); |
| checkSecurityPostureConfig(o.securityPostureConfig!); |
| unittest.expect(o.selfLink!, unittest.equals('foo')); |
| unittest.expect(o.servicesIpv4Cidr!, unittest.equals('foo')); |
| checkShieldedNodes(o.shieldedNodes!); |
| unittest.expect(o.status!, unittest.equals('foo')); |
| unittest.expect(o.statusMessage!, unittest.equals('foo')); |
| unittest.expect(o.subnetwork!, unittest.equals('foo')); |
| unittest.expect(o.tpuIpv4CidrBlock!, unittest.equals('foo')); |
| checkUserManagedKeysConfig(o.userManagedKeysConfig!); |
| checkVerticalPodAutoscaling(o.verticalPodAutoscaling!); |
| checkWorkloadIdentityConfig(o.workloadIdentityConfig!); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterCluster--; |
| } |
| |
| 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<api.ResourceLimit> buildUnnamed16() => [ |
| buildResourceLimit(), |
| buildResourceLimit(), |
| ]; |
| |
| void checkUnnamed16(core.List<api.ResourceLimit> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkResourceLimit(o[0]); |
| checkResourceLimit(o[1]); |
| } |
| |
| core.int buildCounterClusterAutoscaling = 0; |
| api.ClusterAutoscaling buildClusterAutoscaling() { |
| final o = api.ClusterAutoscaling(); |
| buildCounterClusterAutoscaling++; |
| if (buildCounterClusterAutoscaling < 3) { |
| o.autopilotGeneralProfile = 'foo'; |
| o.autoprovisioningLocations = buildUnnamed15(); |
| o.autoprovisioningNodePoolDefaults = |
| buildAutoprovisioningNodePoolDefaults(); |
| o.autoscalingProfile = 'foo'; |
| o.defaultComputeClassConfig = buildDefaultComputeClassConfig(); |
| o.enableNodeAutoprovisioning = true; |
| o.resourceLimits = buildUnnamed16(); |
| } |
| buildCounterClusterAutoscaling--; |
| return o; |
| } |
| |
| void checkClusterAutoscaling(api.ClusterAutoscaling o) { |
| buildCounterClusterAutoscaling++; |
| if (buildCounterClusterAutoscaling < 3) { |
| unittest.expect(o.autopilotGeneralProfile!, unittest.equals('foo')); |
| checkUnnamed15(o.autoprovisioningLocations!); |
| checkAutoprovisioningNodePoolDefaults(o.autoprovisioningNodePoolDefaults!); |
| unittest.expect(o.autoscalingProfile!, unittest.equals('foo')); |
| checkDefaultComputeClassConfig(o.defaultComputeClassConfig!); |
| unittest.expect(o.enableNodeAutoprovisioning!, unittest.isTrue); |
| checkUnnamed16(o.resourceLimits!); |
| } |
| buildCounterClusterAutoscaling--; |
| } |
| |
| core.int buildCounterClusterNetworkPerformanceConfig = 0; |
| api.ClusterNetworkPerformanceConfig buildClusterNetworkPerformanceConfig() { |
| final o = api.ClusterNetworkPerformanceConfig(); |
| buildCounterClusterNetworkPerformanceConfig++; |
| if (buildCounterClusterNetworkPerformanceConfig < 3) { |
| o.totalEgressBandwidthTier = 'foo'; |
| } |
| buildCounterClusterNetworkPerformanceConfig--; |
| return o; |
| } |
| |
| void checkClusterNetworkPerformanceConfig( |
| api.ClusterNetworkPerformanceConfig o, |
| ) { |
| buildCounterClusterNetworkPerformanceConfig++; |
| if (buildCounterClusterNetworkPerformanceConfig < 3) { |
| unittest.expect(o.totalEgressBandwidthTier!, unittest.equals('foo')); |
| } |
| buildCounterClusterNetworkPerformanceConfig--; |
| } |
| |
| core.int buildCounterClusterPolicyConfig = 0; |
| api.ClusterPolicyConfig buildClusterPolicyConfig() { |
| final o = api.ClusterPolicyConfig(); |
| buildCounterClusterPolicyConfig++; |
| if (buildCounterClusterPolicyConfig < 3) { |
| o.noStandardNodePools = true; |
| o.noSystemImpersonation = true; |
| o.noSystemMutation = true; |
| o.noUnsafeWebhooks = true; |
| } |
| buildCounterClusterPolicyConfig--; |
| return o; |
| } |
| |
| void checkClusterPolicyConfig(api.ClusterPolicyConfig o) { |
| buildCounterClusterPolicyConfig++; |
| if (buildCounterClusterPolicyConfig < 3) { |
| unittest.expect(o.noStandardNodePools!, unittest.isTrue); |
| unittest.expect(o.noSystemImpersonation!, unittest.isTrue); |
| unittest.expect(o.noSystemMutation!, unittest.isTrue); |
| unittest.expect(o.noUnsafeWebhooks!, unittest.isTrue); |
| } |
| buildCounterClusterPolicyConfig--; |
| } |
| |
| 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 buildCounterClusterUpdate = 0; |
| api.ClusterUpdate buildClusterUpdate() { |
| final o = api.ClusterUpdate(); |
| buildCounterClusterUpdate++; |
| if (buildCounterClusterUpdate < 3) { |
| o.additionalPodRangesConfig = buildAdditionalPodRangesConfig(); |
| o.desiredAdditionalIpRangesConfig = buildDesiredAdditionalIPRangesConfig(); |
| o.desiredAddonsConfig = buildAddonsConfig(); |
| o.desiredAnonymousAuthenticationConfig = |
| buildAnonymousAuthenticationConfig(); |
| o.desiredAuthenticatorGroupsConfig = buildAuthenticatorGroupsConfig(); |
| o.desiredAutoIpamConfig = buildAutoIpamConfig(); |
| o.desiredAutopilotClusterPolicyConfig = buildClusterPolicyConfig(); |
| o.desiredAutopilotWorkloadPolicyConfig = buildWorkloadPolicyConfig(); |
| o.desiredBinaryAuthorization = buildBinaryAuthorization(); |
| o.desiredClusterAutoscaling = buildClusterAutoscaling(); |
| o.desiredCompliancePostureConfig = buildCompliancePostureConfig(); |
| o.desiredContainerdConfig = buildContainerdConfig(); |
| o.desiredControlPlaneEgress = buildControlPlaneEgress(); |
| o.desiredControlPlaneEndpointsConfig = buildControlPlaneEndpointsConfig(); |
| o.desiredCostManagementConfig = buildCostManagementConfig(); |
| o.desiredDatabaseEncryption = buildDatabaseEncryption(); |
| o.desiredDatapathProvider = 'foo'; |
| o.desiredDefaultEnablePrivateNodes = true; |
| o.desiredDefaultSnatStatus = buildDefaultSnatStatus(); |
| o.desiredDisableL4LbFirewallReconciliation = true; |
| o.desiredDnsConfig = buildDNSConfig(); |
| o.desiredEnableCiliumClusterwideNetworkPolicy = true; |
| o.desiredEnableFqdnNetworkPolicy = true; |
| o.desiredEnableMultiNetworking = true; |
| o.desiredEnablePrivateEndpoint = true; |
| o.desiredEnterpriseConfig = buildDesiredEnterpriseConfig(); |
| o.desiredFleet = buildFleet(); |
| o.desiredGatewayApiConfig = buildGatewayAPIConfig(); |
| o.desiredGcfsConfig = buildGcfsConfig(); |
| o.desiredIdentityServiceConfig = buildIdentityServiceConfig(); |
| o.desiredImageType = 'foo'; |
| o.desiredInTransitEncryptionConfig = 'foo'; |
| o.desiredIntraNodeVisibilityConfig = buildIntraNodeVisibilityConfig(); |
| o.desiredK8sBetaApis = buildK8sBetaAPIConfig(); |
| o.desiredL4ilbSubsettingConfig = buildILBSubsettingConfig(); |
| o.desiredLocations = buildUnnamed17(); |
| o.desiredLoggingConfig = buildLoggingConfig(); |
| o.desiredLoggingService = 'foo'; |
| o.desiredManagedMachineLearningDiagnosticsConfig = |
| buildManagedMachineLearningDiagnosticsConfig(); |
| o.desiredManagedOpentelemetryConfig = buildManagedOpenTelemetryConfig(); |
| o.desiredMasterAuthorizedNetworksConfig = |
| buildMasterAuthorizedNetworksConfig(); |
| o.desiredMasterVersion = 'foo'; |
| o.desiredMeshCertificates = buildMeshCertificates(); |
| o.desiredMonitoringConfig = buildMonitoringConfig(); |
| o.desiredMonitoringService = 'foo'; |
| o.desiredNetworkPerformanceConfig = buildClusterNetworkPerformanceConfig(); |
| o.desiredNetworkTierConfig = buildNetworkTierConfig(); |
| o.desiredNodeKubeletConfig = buildNodeKubeletConfig(); |
| o.desiredNodePoolAutoConfigKubeletConfig = buildNodeKubeletConfig(); |
| o.desiredNodePoolAutoConfigLinuxNodeConfig = buildLinuxNodeConfig(); |
| o.desiredNodePoolAutoConfigNetworkTags = buildNetworkTags(); |
| o.desiredNodePoolAutoConfigResourceManagerTags = buildResourceManagerTags(); |
| o.desiredNodePoolAutoscaling = buildNodePoolAutoscaling(); |
| o.desiredNodePoolId = 'foo'; |
| o.desiredNodePoolLoggingConfig = buildNodePoolLoggingConfig(); |
| o.desiredNodeVersion = 'foo'; |
| o.desiredNotificationConfig = buildNotificationConfig(); |
| o.desiredParentProductConfig = buildParentProductConfig(); |
| o.desiredPodAutoscaling = buildPodAutoscaling(); |
| o.desiredPrivateClusterConfig = buildPrivateClusterConfig(); |
| o.desiredPrivateIpv6GoogleAccess = 'foo'; |
| o.desiredPrivilegedAdmissionConfig = buildPrivilegedAdmissionConfig(); |
| o.desiredRbacBindingConfig = buildRBACBindingConfig(); |
| o.desiredReleaseChannel = buildReleaseChannel(); |
| o.desiredResourceUsageExportConfig = buildResourceUsageExportConfig(); |
| o.desiredSecretManagerConfig = buildSecretManagerConfig(); |
| o.desiredSecretSyncConfig = buildSecretSyncConfig(); |
| o.desiredSecurityPostureConfig = buildSecurityPostureConfig(); |
| o.desiredServiceExternalIpsConfig = buildServiceExternalIPsConfig(); |
| o.desiredShieldedNodes = buildShieldedNodes(); |
| o.desiredStackType = 'foo'; |
| o.desiredUserManagedKeysConfig = buildUserManagedKeysConfig(); |
| o.desiredVerticalPodAutoscaling = buildVerticalPodAutoscaling(); |
| o.desiredWorkloadIdentityConfig = buildWorkloadIdentityConfig(); |
| o.enableK8sBetaApis = buildK8sBetaAPIConfig(); |
| o.etag = 'foo'; |
| o.gkeAutoUpgradeConfig = buildGkeAutoUpgradeConfig(); |
| o.removedAdditionalPodRangesConfig = buildAdditionalPodRangesConfig(); |
| o.userManagedKeysConfig = buildUserManagedKeysConfig(); |
| } |
| buildCounterClusterUpdate--; |
| return o; |
| } |
| |
| void checkClusterUpdate(api.ClusterUpdate o) { |
| buildCounterClusterUpdate++; |
| if (buildCounterClusterUpdate < 3) { |
| checkAdditionalPodRangesConfig(o.additionalPodRangesConfig!); |
| checkDesiredAdditionalIPRangesConfig(o.desiredAdditionalIpRangesConfig!); |
| checkAddonsConfig(o.desiredAddonsConfig!); |
| checkAnonymousAuthenticationConfig(o.desiredAnonymousAuthenticationConfig!); |
| checkAuthenticatorGroupsConfig(o.desiredAuthenticatorGroupsConfig!); |
| checkAutoIpamConfig(o.desiredAutoIpamConfig!); |
| checkClusterPolicyConfig(o.desiredAutopilotClusterPolicyConfig!); |
| checkWorkloadPolicyConfig(o.desiredAutopilotWorkloadPolicyConfig!); |
| checkBinaryAuthorization(o.desiredBinaryAuthorization!); |
| checkClusterAutoscaling(o.desiredClusterAutoscaling!); |
| checkCompliancePostureConfig(o.desiredCompliancePostureConfig!); |
| checkContainerdConfig(o.desiredContainerdConfig!); |
| checkControlPlaneEgress(o.desiredControlPlaneEgress!); |
| checkControlPlaneEndpointsConfig(o.desiredControlPlaneEndpointsConfig!); |
| checkCostManagementConfig(o.desiredCostManagementConfig!); |
| checkDatabaseEncryption(o.desiredDatabaseEncryption!); |
| unittest.expect(o.desiredDatapathProvider!, unittest.equals('foo')); |
| unittest.expect(o.desiredDefaultEnablePrivateNodes!, unittest.isTrue); |
| checkDefaultSnatStatus(o.desiredDefaultSnatStatus!); |
| unittest.expect( |
| o.desiredDisableL4LbFirewallReconciliation!, |
| unittest.isTrue, |
| ); |
| checkDNSConfig(o.desiredDnsConfig!); |
| unittest.expect( |
| o.desiredEnableCiliumClusterwideNetworkPolicy!, |
| unittest.isTrue, |
| ); |
| unittest.expect(o.desiredEnableFqdnNetworkPolicy!, unittest.isTrue); |
| unittest.expect(o.desiredEnableMultiNetworking!, unittest.isTrue); |
| unittest.expect(o.desiredEnablePrivateEndpoint!, unittest.isTrue); |
| checkDesiredEnterpriseConfig(o.desiredEnterpriseConfig!); |
| checkFleet(o.desiredFleet!); |
| checkGatewayAPIConfig(o.desiredGatewayApiConfig!); |
| checkGcfsConfig(o.desiredGcfsConfig!); |
| checkIdentityServiceConfig(o.desiredIdentityServiceConfig!); |
| unittest.expect(o.desiredImageType!, unittest.equals('foo')); |
| unittest.expect( |
| o.desiredInTransitEncryptionConfig!, |
| unittest.equals('foo'), |
| ); |
| checkIntraNodeVisibilityConfig(o.desiredIntraNodeVisibilityConfig!); |
| checkK8sBetaAPIConfig(o.desiredK8sBetaApis!); |
| checkILBSubsettingConfig(o.desiredL4ilbSubsettingConfig!); |
| checkUnnamed17(o.desiredLocations!); |
| checkLoggingConfig(o.desiredLoggingConfig!); |
| unittest.expect(o.desiredLoggingService!, unittest.equals('foo')); |
| checkManagedMachineLearningDiagnosticsConfig( |
| o.desiredManagedMachineLearningDiagnosticsConfig!, |
| ); |
| checkManagedOpenTelemetryConfig(o.desiredManagedOpentelemetryConfig!); |
| checkMasterAuthorizedNetworksConfig( |
| o.desiredMasterAuthorizedNetworksConfig!, |
| ); |
| unittest.expect(o.desiredMasterVersion!, unittest.equals('foo')); |
| checkMeshCertificates(o.desiredMeshCertificates!); |
| checkMonitoringConfig(o.desiredMonitoringConfig!); |
| unittest.expect(o.desiredMonitoringService!, unittest.equals('foo')); |
| checkClusterNetworkPerformanceConfig(o.desiredNetworkPerformanceConfig!); |
| checkNetworkTierConfig(o.desiredNetworkTierConfig!); |
| checkNodeKubeletConfig(o.desiredNodeKubeletConfig!); |
| checkNodeKubeletConfig(o.desiredNodePoolAutoConfigKubeletConfig!); |
| checkLinuxNodeConfig(o.desiredNodePoolAutoConfigLinuxNodeConfig!); |
| checkNetworkTags(o.desiredNodePoolAutoConfigNetworkTags!); |
| checkResourceManagerTags(o.desiredNodePoolAutoConfigResourceManagerTags!); |
| checkNodePoolAutoscaling(o.desiredNodePoolAutoscaling!); |
| unittest.expect(o.desiredNodePoolId!, unittest.equals('foo')); |
| checkNodePoolLoggingConfig(o.desiredNodePoolLoggingConfig!); |
| unittest.expect(o.desiredNodeVersion!, unittest.equals('foo')); |
| checkNotificationConfig(o.desiredNotificationConfig!); |
| checkParentProductConfig(o.desiredParentProductConfig!); |
| checkPodAutoscaling(o.desiredPodAutoscaling!); |
| checkPrivateClusterConfig(o.desiredPrivateClusterConfig!); |
| unittest.expect(o.desiredPrivateIpv6GoogleAccess!, unittest.equals('foo')); |
| checkPrivilegedAdmissionConfig(o.desiredPrivilegedAdmissionConfig!); |
| checkRBACBindingConfig(o.desiredRbacBindingConfig!); |
| checkReleaseChannel(o.desiredReleaseChannel!); |
| checkResourceUsageExportConfig(o.desiredResourceUsageExportConfig!); |
| checkSecretManagerConfig(o.desiredSecretManagerConfig!); |
| checkSecretSyncConfig(o.desiredSecretSyncConfig!); |
| checkSecurityPostureConfig(o.desiredSecurityPostureConfig!); |
| checkServiceExternalIPsConfig(o.desiredServiceExternalIpsConfig!); |
| checkShieldedNodes(o.desiredShieldedNodes!); |
| unittest.expect(o.desiredStackType!, unittest.equals('foo')); |
| checkUserManagedKeysConfig(o.desiredUserManagedKeysConfig!); |
| checkVerticalPodAutoscaling(o.desiredVerticalPodAutoscaling!); |
| checkWorkloadIdentityConfig(o.desiredWorkloadIdentityConfig!); |
| checkK8sBetaAPIConfig(o.enableK8sBetaApis!); |
| unittest.expect(o.etag!, unittest.equals('foo')); |
| checkGkeAutoUpgradeConfig(o.gkeAutoUpgradeConfig!); |
| checkAdditionalPodRangesConfig(o.removedAdditionalPodRangesConfig!); |
| checkUserManagedKeysConfig(o.userManagedKeysConfig!); |
| } |
| buildCounterClusterUpdate--; |
| } |
| |
| 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<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.List<api.UpgradeDetails> buildUnnamed20() => [ |
| buildUpgradeDetails(), |
| buildUpgradeDetails(), |
| ]; |
| |
| void checkUnnamed20(core.List<api.UpgradeDetails> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUpgradeDetails(o[0]); |
| checkUpgradeDetails(o[1]); |
| } |
| |
| core.int buildCounterClusterUpgradeInfo = 0; |
| api.ClusterUpgradeInfo buildClusterUpgradeInfo() { |
| final o = api.ClusterUpgradeInfo(); |
| buildCounterClusterUpgradeInfo++; |
| if (buildCounterClusterUpgradeInfo < 3) { |
| o.autoUpgradeStatus = buildUnnamed18(); |
| o.endOfExtendedSupportTimestamp = 'foo'; |
| o.endOfStandardSupportTimestamp = 'foo'; |
| o.minorTargetVersion = 'foo'; |
| o.patchTargetVersion = 'foo'; |
| o.pausedReason = buildUnnamed19(); |
| o.upgradeDetails = buildUnnamed20(); |
| } |
| buildCounterClusterUpgradeInfo--; |
| return o; |
| } |
| |
| void checkClusterUpgradeInfo(api.ClusterUpgradeInfo o) { |
| buildCounterClusterUpgradeInfo++; |
| if (buildCounterClusterUpgradeInfo < 3) { |
| checkUnnamed18(o.autoUpgradeStatus!); |
| unittest.expect(o.endOfExtendedSupportTimestamp!, unittest.equals('foo')); |
| unittest.expect(o.endOfStandardSupportTimestamp!, unittest.equals('foo')); |
| unittest.expect(o.minorTargetVersion!, unittest.equals('foo')); |
| unittest.expect(o.patchTargetVersion!, unittest.equals('foo')); |
| checkUnnamed19(o.pausedReason!); |
| checkUnnamed20(o.upgradeDetails!); |
| } |
| buildCounterClusterUpgradeInfo--; |
| } |
| |
| core.int buildCounterCompleteIPRotationRequest = 0; |
| api.CompleteIPRotationRequest buildCompleteIPRotationRequest() { |
| final o = api.CompleteIPRotationRequest(); |
| buildCounterCompleteIPRotationRequest++; |
| if (buildCounterCompleteIPRotationRequest < 3) { |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterCompleteIPRotationRequest--; |
| return o; |
| } |
| |
| void checkCompleteIPRotationRequest(api.CompleteIPRotationRequest o) { |
| buildCounterCompleteIPRotationRequest++; |
| if (buildCounterCompleteIPRotationRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterCompleteIPRotationRequest--; |
| } |
| |
| core.int buildCounterCompleteNodePoolUpgradeRequest = 0; |
| api.CompleteNodePoolUpgradeRequest buildCompleteNodePoolUpgradeRequest() { |
| final o = api.CompleteNodePoolUpgradeRequest(); |
| buildCounterCompleteNodePoolUpgradeRequest++; |
| if (buildCounterCompleteNodePoolUpgradeRequest < 3) {} |
| buildCounterCompleteNodePoolUpgradeRequest--; |
| return o; |
| } |
| |
| void checkCompleteNodePoolUpgradeRequest(api.CompleteNodePoolUpgradeRequest o) { |
| buildCounterCompleteNodePoolUpgradeRequest++; |
| if (buildCounterCompleteNodePoolUpgradeRequest < 3) {} |
| buildCounterCompleteNodePoolUpgradeRequest--; |
| } |
| |
| core.List<api.ComplianceStandard> buildUnnamed21() => [ |
| buildComplianceStandard(), |
| buildComplianceStandard(), |
| ]; |
| |
| void checkUnnamed21(core.List<api.ComplianceStandard> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkComplianceStandard(o[0]); |
| checkComplianceStandard(o[1]); |
| } |
| |
| core.int buildCounterCompliancePostureConfig = 0; |
| api.CompliancePostureConfig buildCompliancePostureConfig() { |
| final o = api.CompliancePostureConfig(); |
| buildCounterCompliancePostureConfig++; |
| if (buildCounterCompliancePostureConfig < 3) { |
| o.complianceStandards = buildUnnamed21(); |
| o.mode = 'foo'; |
| } |
| buildCounterCompliancePostureConfig--; |
| return o; |
| } |
| |
| void checkCompliancePostureConfig(api.CompliancePostureConfig o) { |
| buildCounterCompliancePostureConfig++; |
| if (buildCounterCompliancePostureConfig < 3) { |
| checkUnnamed21(o.complianceStandards!); |
| unittest.expect(o.mode!, unittest.equals('foo')); |
| } |
| buildCounterCompliancePostureConfig--; |
| } |
| |
| core.int buildCounterComplianceStandard = 0; |
| api.ComplianceStandard buildComplianceStandard() { |
| final o = api.ComplianceStandard(); |
| buildCounterComplianceStandard++; |
| if (buildCounterComplianceStandard < 3) { |
| o.standard = 'foo'; |
| } |
| buildCounterComplianceStandard--; |
| return o; |
| } |
| |
| void checkComplianceStandard(api.ComplianceStandard o) { |
| buildCounterComplianceStandard++; |
| if (buildCounterComplianceStandard < 3) { |
| unittest.expect(o.standard!, unittest.equals('foo')); |
| } |
| buildCounterComplianceStandard--; |
| } |
| |
| core.int buildCounterConfidentialNodes = 0; |
| api.ConfidentialNodes buildConfidentialNodes() { |
| final o = api.ConfidentialNodes(); |
| buildCounterConfidentialNodes++; |
| if (buildCounterConfidentialNodes < 3) { |
| o.confidentialInstanceType = 'foo'; |
| o.enabled = true; |
| } |
| buildCounterConfidentialNodes--; |
| return o; |
| } |
| |
| void checkConfidentialNodes(api.ConfidentialNodes o) { |
| buildCounterConfidentialNodes++; |
| if (buildCounterConfidentialNodes < 3) { |
| unittest.expect(o.confidentialInstanceType!, unittest.equals('foo')); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterConfidentialNodes--; |
| } |
| |
| core.int buildCounterConfigConnectorConfig = 0; |
| api.ConfigConnectorConfig buildConfigConnectorConfig() { |
| final o = api.ConfigConnectorConfig(); |
| buildCounterConfigConnectorConfig++; |
| if (buildCounterConfigConnectorConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterConfigConnectorConfig--; |
| return o; |
| } |
| |
| void checkConfigConnectorConfig(api.ConfigConnectorConfig o) { |
| buildCounterConfigConnectorConfig++; |
| if (buildCounterConfigConnectorConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterConfigConnectorConfig--; |
| } |
| |
| core.int buildCounterConsumptionMeteringConfig = 0; |
| api.ConsumptionMeteringConfig buildConsumptionMeteringConfig() { |
| final o = api.ConsumptionMeteringConfig(); |
| buildCounterConsumptionMeteringConfig++; |
| if (buildCounterConsumptionMeteringConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterConsumptionMeteringConfig--; |
| return o; |
| } |
| |
| void checkConsumptionMeteringConfig(api.ConsumptionMeteringConfig o) { |
| buildCounterConsumptionMeteringConfig++; |
| if (buildCounterConsumptionMeteringConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterConsumptionMeteringConfig--; |
| } |
| |
| core.List<api.RegistryHostConfig> buildUnnamed22() => [ |
| buildRegistryHostConfig(), |
| buildRegistryHostConfig(), |
| ]; |
| |
| void checkUnnamed22(core.List<api.RegistryHostConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRegistryHostConfig(o[0]); |
| checkRegistryHostConfig(o[1]); |
| } |
| |
| core.int buildCounterContainerdConfig = 0; |
| api.ContainerdConfig buildContainerdConfig() { |
| final o = api.ContainerdConfig(); |
| buildCounterContainerdConfig++; |
| if (buildCounterContainerdConfig < 3) { |
| o.privateRegistryAccessConfig = buildPrivateRegistryAccessConfig(); |
| o.registryHosts = buildUnnamed22(); |
| o.writableCgroups = buildWritableCgroups(); |
| } |
| buildCounterContainerdConfig--; |
| return o; |
| } |
| |
| void checkContainerdConfig(api.ContainerdConfig o) { |
| buildCounterContainerdConfig++; |
| if (buildCounterContainerdConfig < 3) { |
| checkPrivateRegistryAccessConfig(o.privateRegistryAccessConfig!); |
| checkUnnamed22(o.registryHosts!); |
| checkWritableCgroups(o.writableCgroups!); |
| } |
| buildCounterContainerdConfig--; |
| } |
| |
| core.int buildCounterControlPlaneEgress = 0; |
| api.ControlPlaneEgress buildControlPlaneEgress() { |
| final o = api.ControlPlaneEgress(); |
| buildCounterControlPlaneEgress++; |
| if (buildCounterControlPlaneEgress < 3) { |
| o.mode = 'foo'; |
| } |
| buildCounterControlPlaneEgress--; |
| return o; |
| } |
| |
| void checkControlPlaneEgress(api.ControlPlaneEgress o) { |
| buildCounterControlPlaneEgress++; |
| if (buildCounterControlPlaneEgress < 3) { |
| unittest.expect(o.mode!, unittest.equals('foo')); |
| } |
| buildCounterControlPlaneEgress--; |
| } |
| |
| core.int buildCounterControlPlaneEndpointsConfig = 0; |
| api.ControlPlaneEndpointsConfig buildControlPlaneEndpointsConfig() { |
| final o = api.ControlPlaneEndpointsConfig(); |
| buildCounterControlPlaneEndpointsConfig++; |
| if (buildCounterControlPlaneEndpointsConfig < 3) { |
| o.dnsEndpointConfig = buildDNSEndpointConfig(); |
| o.ipEndpointsConfig = buildIPEndpointsConfig(); |
| } |
| buildCounterControlPlaneEndpointsConfig--; |
| return o; |
| } |
| |
| void checkControlPlaneEndpointsConfig(api.ControlPlaneEndpointsConfig o) { |
| buildCounterControlPlaneEndpointsConfig++; |
| if (buildCounterControlPlaneEndpointsConfig < 3) { |
| checkDNSEndpointConfig(o.dnsEndpointConfig!); |
| checkIPEndpointsConfig(o.ipEndpointsConfig!); |
| } |
| buildCounterControlPlaneEndpointsConfig--; |
| } |
| |
| core.int buildCounterCostManagementConfig = 0; |
| api.CostManagementConfig buildCostManagementConfig() { |
| final o = api.CostManagementConfig(); |
| buildCounterCostManagementConfig++; |
| if (buildCounterCostManagementConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterCostManagementConfig--; |
| return o; |
| } |
| |
| void checkCostManagementConfig(api.CostManagementConfig o) { |
| buildCounterCostManagementConfig++; |
| if (buildCounterCostManagementConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterCostManagementConfig--; |
| } |
| |
| core.int buildCounterCrashLoopBackOffConfig = 0; |
| api.CrashLoopBackOffConfig buildCrashLoopBackOffConfig() { |
| final o = api.CrashLoopBackOffConfig(); |
| buildCounterCrashLoopBackOffConfig++; |
| if (buildCounterCrashLoopBackOffConfig < 3) { |
| o.maxContainerRestartPeriod = 'foo'; |
| } |
| buildCounterCrashLoopBackOffConfig--; |
| return o; |
| } |
| |
| void checkCrashLoopBackOffConfig(api.CrashLoopBackOffConfig o) { |
| buildCounterCrashLoopBackOffConfig++; |
| if (buildCounterCrashLoopBackOffConfig < 3) { |
| unittest.expect(o.maxContainerRestartPeriod!, unittest.equals('foo')); |
| } |
| buildCounterCrashLoopBackOffConfig--; |
| } |
| |
| core.int buildCounterCreateClusterRequest = 0; |
| api.CreateClusterRequest buildCreateClusterRequest() { |
| final o = api.CreateClusterRequest(); |
| buildCounterCreateClusterRequest++; |
| if (buildCounterCreateClusterRequest < 3) { |
| o.cluster = buildCluster(); |
| o.parent = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterCreateClusterRequest--; |
| return o; |
| } |
| |
| void checkCreateClusterRequest(api.CreateClusterRequest o) { |
| buildCounterCreateClusterRequest++; |
| if (buildCounterCreateClusterRequest < 3) { |
| checkCluster(o.cluster!); |
| unittest.expect(o.parent!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterCreateClusterRequest--; |
| } |
| |
| core.int buildCounterCreateNodePoolRequest = 0; |
| api.CreateNodePoolRequest buildCreateNodePoolRequest() { |
| final o = api.CreateNodePoolRequest(); |
| buildCounterCreateNodePoolRequest++; |
| if (buildCounterCreateNodePoolRequest < 3) { |
| o.clusterId = 'foo'; |
| o.nodePool = buildNodePool(); |
| o.parent = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterCreateNodePoolRequest--; |
| return o; |
| } |
| |
| void checkCreateNodePoolRequest(api.CreateNodePoolRequest o) { |
| buildCounterCreateNodePoolRequest++; |
| if (buildCounterCreateNodePoolRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| checkNodePool(o.nodePool!); |
| unittest.expect(o.parent!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterCreateNodePoolRequest--; |
| } |
| |
| core.int buildCounterDNSConfig = 0; |
| api.DNSConfig buildDNSConfig() { |
| final o = api.DNSConfig(); |
| buildCounterDNSConfig++; |
| if (buildCounterDNSConfig < 3) { |
| o.additiveVpcScopeDnsDomain = 'foo'; |
| o.clusterDns = 'foo'; |
| o.clusterDnsDomain = 'foo'; |
| o.clusterDnsScope = 'foo'; |
| } |
| buildCounterDNSConfig--; |
| return o; |
| } |
| |
| void checkDNSConfig(api.DNSConfig o) { |
| buildCounterDNSConfig++; |
| if (buildCounterDNSConfig < 3) { |
| unittest.expect(o.additiveVpcScopeDnsDomain!, unittest.equals('foo')); |
| unittest.expect(o.clusterDns!, unittest.equals('foo')); |
| unittest.expect(o.clusterDnsDomain!, unittest.equals('foo')); |
| unittest.expect(o.clusterDnsScope!, unittest.equals('foo')); |
| } |
| buildCounterDNSConfig--; |
| } |
| |
| core.int buildCounterDNSEndpointConfig = 0; |
| api.DNSEndpointConfig buildDNSEndpointConfig() { |
| final o = api.DNSEndpointConfig(); |
| buildCounterDNSEndpointConfig++; |
| if (buildCounterDNSEndpointConfig < 3) { |
| o.allowExternalTraffic = true; |
| o.enableK8sCertsViaDns = true; |
| o.enableK8sTokensViaDns = true; |
| o.endpoint = 'foo'; |
| } |
| buildCounterDNSEndpointConfig--; |
| return o; |
| } |
| |
| void checkDNSEndpointConfig(api.DNSEndpointConfig o) { |
| buildCounterDNSEndpointConfig++; |
| if (buildCounterDNSEndpointConfig < 3) { |
| unittest.expect(o.allowExternalTraffic!, unittest.isTrue); |
| unittest.expect(o.enableK8sCertsViaDns!, unittest.isTrue); |
| unittest.expect(o.enableK8sTokensViaDns!, unittest.isTrue); |
| unittest.expect(o.endpoint!, unittest.equals('foo')); |
| } |
| buildCounterDNSEndpointConfig--; |
| } |
| |
| core.int buildCounterDailyMaintenanceWindow = 0; |
| api.DailyMaintenanceWindow buildDailyMaintenanceWindow() { |
| final o = api.DailyMaintenanceWindow(); |
| buildCounterDailyMaintenanceWindow++; |
| if (buildCounterDailyMaintenanceWindow < 3) { |
| o.duration = 'foo'; |
| o.startTime = 'foo'; |
| } |
| buildCounterDailyMaintenanceWindow--; |
| return o; |
| } |
| |
| void checkDailyMaintenanceWindow(api.DailyMaintenanceWindow o) { |
| buildCounterDailyMaintenanceWindow++; |
| if (buildCounterDailyMaintenanceWindow < 3) { |
| unittest.expect(o.duration!, unittest.equals('foo')); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| } |
| buildCounterDailyMaintenanceWindow--; |
| } |
| |
| 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.List<api.OperationError> buildUnnamed24() => [ |
| buildOperationError(), |
| buildOperationError(), |
| ]; |
| |
| void checkUnnamed24(core.List<api.OperationError> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOperationError(o[0]); |
| checkOperationError(o[1]); |
| } |
| |
| core.int buildCounterDatabaseEncryption = 0; |
| api.DatabaseEncryption buildDatabaseEncryption() { |
| final o = api.DatabaseEncryption(); |
| buildCounterDatabaseEncryption++; |
| if (buildCounterDatabaseEncryption < 3) { |
| o.currentState = 'foo'; |
| o.decryptionKeys = buildUnnamed23(); |
| o.keyName = 'foo'; |
| o.lastOperationErrors = buildUnnamed24(); |
| o.state = 'foo'; |
| } |
| buildCounterDatabaseEncryption--; |
| return o; |
| } |
| |
| void checkDatabaseEncryption(api.DatabaseEncryption o) { |
| buildCounterDatabaseEncryption++; |
| if (buildCounterDatabaseEncryption < 3) { |
| unittest.expect(o.currentState!, unittest.equals('foo')); |
| checkUnnamed23(o.decryptionKeys!); |
| unittest.expect(o.keyName!, unittest.equals('foo')); |
| checkUnnamed24(o.lastOperationErrors!); |
| unittest.expect(o.state!, unittest.equals('foo')); |
| } |
| buildCounterDatabaseEncryption--; |
| } |
| |
| core.int buildCounterDedicatedLocalSsdProfile = 0; |
| api.DedicatedLocalSsdProfile buildDedicatedLocalSsdProfile() { |
| final o = api.DedicatedLocalSsdProfile(); |
| buildCounterDedicatedLocalSsdProfile++; |
| if (buildCounterDedicatedLocalSsdProfile < 3) { |
| o.diskCount = 'foo'; |
| } |
| buildCounterDedicatedLocalSsdProfile--; |
| return o; |
| } |
| |
| void checkDedicatedLocalSsdProfile(api.DedicatedLocalSsdProfile o) { |
| buildCounterDedicatedLocalSsdProfile++; |
| if (buildCounterDedicatedLocalSsdProfile < 3) { |
| unittest.expect(o.diskCount!, unittest.equals('foo')); |
| } |
| buildCounterDedicatedLocalSsdProfile--; |
| } |
| |
| core.int buildCounterDefaultComputeClassConfig = 0; |
| api.DefaultComputeClassConfig buildDefaultComputeClassConfig() { |
| final o = api.DefaultComputeClassConfig(); |
| buildCounterDefaultComputeClassConfig++; |
| if (buildCounterDefaultComputeClassConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterDefaultComputeClassConfig--; |
| return o; |
| } |
| |
| void checkDefaultComputeClassConfig(api.DefaultComputeClassConfig o) { |
| buildCounterDefaultComputeClassConfig++; |
| if (buildCounterDefaultComputeClassConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterDefaultComputeClassConfig--; |
| } |
| |
| core.int buildCounterDefaultSnatStatus = 0; |
| api.DefaultSnatStatus buildDefaultSnatStatus() { |
| final o = api.DefaultSnatStatus(); |
| buildCounterDefaultSnatStatus++; |
| if (buildCounterDefaultSnatStatus < 3) { |
| o.disabled = true; |
| } |
| buildCounterDefaultSnatStatus--; |
| return o; |
| } |
| |
| void checkDefaultSnatStatus(api.DefaultSnatStatus o) { |
| buildCounterDefaultSnatStatus++; |
| if (buildCounterDefaultSnatStatus < 3) { |
| unittest.expect(o.disabled!, unittest.isTrue); |
| } |
| buildCounterDefaultSnatStatus--; |
| } |
| |
| core.List<api.AdditionalIPRangesConfig> buildUnnamed25() => [ |
| buildAdditionalIPRangesConfig(), |
| buildAdditionalIPRangesConfig(), |
| ]; |
| |
| void checkUnnamed25(core.List<api.AdditionalIPRangesConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAdditionalIPRangesConfig(o[0]); |
| checkAdditionalIPRangesConfig(o[1]); |
| } |
| |
| core.int buildCounterDesiredAdditionalIPRangesConfig = 0; |
| api.DesiredAdditionalIPRangesConfig buildDesiredAdditionalIPRangesConfig() { |
| final o = api.DesiredAdditionalIPRangesConfig(); |
| buildCounterDesiredAdditionalIPRangesConfig++; |
| if (buildCounterDesiredAdditionalIPRangesConfig < 3) { |
| o.additionalIpRangesConfigs = buildUnnamed25(); |
| } |
| buildCounterDesiredAdditionalIPRangesConfig--; |
| return o; |
| } |
| |
| void checkDesiredAdditionalIPRangesConfig( |
| api.DesiredAdditionalIPRangesConfig o, |
| ) { |
| buildCounterDesiredAdditionalIPRangesConfig++; |
| if (buildCounterDesiredAdditionalIPRangesConfig < 3) { |
| checkUnnamed25(o.additionalIpRangesConfigs!); |
| } |
| buildCounterDesiredAdditionalIPRangesConfig--; |
| } |
| |
| core.int buildCounterDesiredEnterpriseConfig = 0; |
| api.DesiredEnterpriseConfig buildDesiredEnterpriseConfig() { |
| final o = api.DesiredEnterpriseConfig(); |
| buildCounterDesiredEnterpriseConfig++; |
| if (buildCounterDesiredEnterpriseConfig < 3) { |
| o.desiredTier = 'foo'; |
| } |
| buildCounterDesiredEnterpriseConfig--; |
| return o; |
| } |
| |
| void checkDesiredEnterpriseConfig(api.DesiredEnterpriseConfig o) { |
| buildCounterDesiredEnterpriseConfig++; |
| if (buildCounterDesiredEnterpriseConfig < 3) { |
| unittest.expect(o.desiredTier!, unittest.equals('foo')); |
| } |
| buildCounterDesiredEnterpriseConfig--; |
| } |
| |
| core.int buildCounterDisruptionBudget = 0; |
| api.DisruptionBudget buildDisruptionBudget() { |
| final o = api.DisruptionBudget(); |
| buildCounterDisruptionBudget++; |
| if (buildCounterDisruptionBudget < 3) { |
| o.lastDisruptionTime = 'foo'; |
| o.lastMinorVersionDisruptionTime = 'foo'; |
| o.minorVersionDisruptionInterval = 'foo'; |
| o.patchVersionDisruptionInterval = 'foo'; |
| } |
| buildCounterDisruptionBudget--; |
| return o; |
| } |
| |
| void checkDisruptionBudget(api.DisruptionBudget o) { |
| buildCounterDisruptionBudget++; |
| if (buildCounterDisruptionBudget < 3) { |
| unittest.expect(o.lastDisruptionTime!, unittest.equals('foo')); |
| unittest.expect(o.lastMinorVersionDisruptionTime!, unittest.equals('foo')); |
| unittest.expect(o.minorVersionDisruptionInterval!, unittest.equals('foo')); |
| unittest.expect(o.patchVersionDisruptionInterval!, unittest.equals('foo')); |
| } |
| buildCounterDisruptionBudget--; |
| } |
| |
| core.int buildCounterDnsCacheConfig = 0; |
| api.DnsCacheConfig buildDnsCacheConfig() { |
| final o = api.DnsCacheConfig(); |
| buildCounterDnsCacheConfig++; |
| if (buildCounterDnsCacheConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterDnsCacheConfig--; |
| return o; |
| } |
| |
| void checkDnsCacheConfig(api.DnsCacheConfig o) { |
| buildCounterDnsCacheConfig++; |
| if (buildCounterDnsCacheConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterDnsCacheConfig--; |
| } |
| |
| 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 buildCounterEncryptionConfig = 0; |
| api.EncryptionConfig buildEncryptionConfig() { |
| final o = api.EncryptionConfig(); |
| buildCounterEncryptionConfig++; |
| if (buildCounterEncryptionConfig < 3) { |
| o.disabled = true; |
| } |
| buildCounterEncryptionConfig--; |
| return o; |
| } |
| |
| void checkEncryptionConfig(api.EncryptionConfig o) { |
| buildCounterEncryptionConfig++; |
| if (buildCounterEncryptionConfig < 3) { |
| unittest.expect(o.disabled!, unittest.isTrue); |
| } |
| buildCounterEncryptionConfig--; |
| } |
| |
| core.int buildCounterEnterpriseConfig = 0; |
| api.EnterpriseConfig buildEnterpriseConfig() { |
| final o = api.EnterpriseConfig(); |
| buildCounterEnterpriseConfig++; |
| if (buildCounterEnterpriseConfig < 3) { |
| o.clusterTier = 'foo'; |
| o.desiredTier = 'foo'; |
| } |
| buildCounterEnterpriseConfig--; |
| return o; |
| } |
| |
| void checkEnterpriseConfig(api.EnterpriseConfig o) { |
| buildCounterEnterpriseConfig++; |
| if (buildCounterEnterpriseConfig < 3) { |
| unittest.expect(o.clusterTier!, unittest.equals('foo')); |
| unittest.expect(o.desiredTier!, unittest.equals('foo')); |
| } |
| buildCounterEnterpriseConfig--; |
| } |
| |
| core.int buildCounterEphemeralLocalSsdProfile = 0; |
| api.EphemeralLocalSsdProfile buildEphemeralLocalSsdProfile() { |
| final o = api.EphemeralLocalSsdProfile(); |
| buildCounterEphemeralLocalSsdProfile++; |
| if (buildCounterEphemeralLocalSsdProfile < 3) { |
| o.swapSizeGib = 'foo'; |
| o.swapSizePercent = 42; |
| } |
| buildCounterEphemeralLocalSsdProfile--; |
| return o; |
| } |
| |
| void checkEphemeralLocalSsdProfile(api.EphemeralLocalSsdProfile o) { |
| buildCounterEphemeralLocalSsdProfile++; |
| if (buildCounterEphemeralLocalSsdProfile < 3) { |
| unittest.expect(o.swapSizeGib!, unittest.equals('foo')); |
| unittest.expect(o.swapSizePercent!, unittest.equals(42)); |
| } |
| buildCounterEphemeralLocalSsdProfile--; |
| } |
| |
| core.int buildCounterEphemeralStorageLocalSsdConfig = 0; |
| api.EphemeralStorageLocalSsdConfig buildEphemeralStorageLocalSsdConfig() { |
| final o = api.EphemeralStorageLocalSsdConfig(); |
| buildCounterEphemeralStorageLocalSsdConfig++; |
| if (buildCounterEphemeralStorageLocalSsdConfig < 3) { |
| o.dataCacheCount = 42; |
| o.localSsdCount = 42; |
| } |
| buildCounterEphemeralStorageLocalSsdConfig--; |
| return o; |
| } |
| |
| void checkEphemeralStorageLocalSsdConfig(api.EphemeralStorageLocalSsdConfig o) { |
| buildCounterEphemeralStorageLocalSsdConfig++; |
| if (buildCounterEphemeralStorageLocalSsdConfig < 3) { |
| unittest.expect(o.dataCacheCount!, unittest.equals(42)); |
| unittest.expect(o.localSsdCount!, unittest.equals(42)); |
| } |
| buildCounterEphemeralStorageLocalSsdConfig--; |
| } |
| |
| core.int buildCounterEvictionGracePeriod = 0; |
| api.EvictionGracePeriod buildEvictionGracePeriod() { |
| final o = api.EvictionGracePeriod(); |
| buildCounterEvictionGracePeriod++; |
| if (buildCounterEvictionGracePeriod < 3) { |
| o.imagefsAvailable = 'foo'; |
| o.imagefsInodesFree = 'foo'; |
| o.memoryAvailable = 'foo'; |
| o.nodefsAvailable = 'foo'; |
| o.nodefsInodesFree = 'foo'; |
| o.pidAvailable = 'foo'; |
| } |
| buildCounterEvictionGracePeriod--; |
| return o; |
| } |
| |
| void checkEvictionGracePeriod(api.EvictionGracePeriod o) { |
| buildCounterEvictionGracePeriod++; |
| if (buildCounterEvictionGracePeriod < 3) { |
| unittest.expect(o.imagefsAvailable!, unittest.equals('foo')); |
| unittest.expect(o.imagefsInodesFree!, unittest.equals('foo')); |
| unittest.expect(o.memoryAvailable!, unittest.equals('foo')); |
| unittest.expect(o.nodefsAvailable!, unittest.equals('foo')); |
| unittest.expect(o.nodefsInodesFree!, unittest.equals('foo')); |
| unittest.expect(o.pidAvailable!, unittest.equals('foo')); |
| } |
| buildCounterEvictionGracePeriod--; |
| } |
| |
| core.int buildCounterEvictionMinimumReclaim = 0; |
| api.EvictionMinimumReclaim buildEvictionMinimumReclaim() { |
| final o = api.EvictionMinimumReclaim(); |
| buildCounterEvictionMinimumReclaim++; |
| if (buildCounterEvictionMinimumReclaim < 3) { |
| o.imagefsAvailable = 'foo'; |
| o.imagefsInodesFree = 'foo'; |
| o.memoryAvailable = 'foo'; |
| o.nodefsAvailable = 'foo'; |
| o.nodefsInodesFree = 'foo'; |
| o.pidAvailable = 'foo'; |
| } |
| buildCounterEvictionMinimumReclaim--; |
| return o; |
| } |
| |
| void checkEvictionMinimumReclaim(api.EvictionMinimumReclaim o) { |
| buildCounterEvictionMinimumReclaim++; |
| if (buildCounterEvictionMinimumReclaim < 3) { |
| unittest.expect(o.imagefsAvailable!, unittest.equals('foo')); |
| unittest.expect(o.imagefsInodesFree!, unittest.equals('foo')); |
| unittest.expect(o.memoryAvailable!, unittest.equals('foo')); |
| unittest.expect(o.nodefsAvailable!, unittest.equals('foo')); |
| unittest.expect(o.nodefsInodesFree!, unittest.equals('foo')); |
| unittest.expect(o.pidAvailable!, unittest.equals('foo')); |
| } |
| buildCounterEvictionMinimumReclaim--; |
| } |
| |
| core.int buildCounterEvictionSignals = 0; |
| api.EvictionSignals buildEvictionSignals() { |
| final o = api.EvictionSignals(); |
| buildCounterEvictionSignals++; |
| if (buildCounterEvictionSignals < 3) { |
| o.imagefsAvailable = 'foo'; |
| o.imagefsInodesFree = 'foo'; |
| o.memoryAvailable = 'foo'; |
| o.nodefsAvailable = 'foo'; |
| o.nodefsInodesFree = 'foo'; |
| o.pidAvailable = 'foo'; |
| } |
| buildCounterEvictionSignals--; |
| return o; |
| } |
| |
| void checkEvictionSignals(api.EvictionSignals o) { |
| buildCounterEvictionSignals++; |
| if (buildCounterEvictionSignals < 3) { |
| unittest.expect(o.imagefsAvailable!, unittest.equals('foo')); |
| unittest.expect(o.imagefsInodesFree!, unittest.equals('foo')); |
| unittest.expect(o.memoryAvailable!, unittest.equals('foo')); |
| unittest.expect(o.nodefsAvailable!, unittest.equals('foo')); |
| unittest.expect(o.nodefsInodesFree!, unittest.equals('foo')); |
| unittest.expect(o.pidAvailable!, unittest.equals('foo')); |
| } |
| buildCounterEvictionSignals--; |
| } |
| |
| core.int buildCounterFastSocket = 0; |
| api.FastSocket buildFastSocket() { |
| final o = api.FastSocket(); |
| buildCounterFastSocket++; |
| if (buildCounterFastSocket < 3) { |
| o.enabled = true; |
| } |
| buildCounterFastSocket--; |
| return o; |
| } |
| |
| void checkFastSocket(api.FastSocket o) { |
| buildCounterFastSocket++; |
| if (buildCounterFastSocket < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterFastSocket--; |
| } |
| |
| 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 buildCounterFilter = 0; |
| api.Filter buildFilter() { |
| final o = api.Filter(); |
| buildCounterFilter++; |
| if (buildCounterFilter < 3) { |
| o.eventType = buildUnnamed26(); |
| } |
| buildCounterFilter--; |
| return o; |
| } |
| |
| void checkFilter(api.Filter o) { |
| buildCounterFilter++; |
| if (buildCounterFilter < 3) { |
| checkUnnamed26(o.eventType!); |
| } |
| buildCounterFilter--; |
| } |
| |
| core.int buildCounterFleet = 0; |
| api.Fleet buildFleet() { |
| final o = api.Fleet(); |
| buildCounterFleet++; |
| if (buildCounterFleet < 3) { |
| o.membership = 'foo'; |
| o.membershipType = 'foo'; |
| o.preRegistered = true; |
| o.project = 'foo'; |
| } |
| buildCounterFleet--; |
| return o; |
| } |
| |
| void checkFleet(api.Fleet o) { |
| buildCounterFleet++; |
| if (buildCounterFleet < 3) { |
| unittest.expect(o.membership!, unittest.equals('foo')); |
| unittest.expect(o.membershipType!, unittest.equals('foo')); |
| unittest.expect(o.preRegistered!, unittest.isTrue); |
| unittest.expect(o.project!, unittest.equals('foo')); |
| } |
| buildCounterFleet--; |
| } |
| |
| core.int buildCounterGCPSecretManagerCertificateConfig = 0; |
| api.GCPSecretManagerCertificateConfig buildGCPSecretManagerCertificateConfig() { |
| final o = api.GCPSecretManagerCertificateConfig(); |
| buildCounterGCPSecretManagerCertificateConfig++; |
| if (buildCounterGCPSecretManagerCertificateConfig < 3) { |
| o.secretUri = 'foo'; |
| } |
| buildCounterGCPSecretManagerCertificateConfig--; |
| return o; |
| } |
| |
| void checkGCPSecretManagerCertificateConfig( |
| api.GCPSecretManagerCertificateConfig o, |
| ) { |
| buildCounterGCPSecretManagerCertificateConfig++; |
| if (buildCounterGCPSecretManagerCertificateConfig < 3) { |
| unittest.expect(o.secretUri!, unittest.equals('foo')); |
| } |
| buildCounterGCPSecretManagerCertificateConfig--; |
| } |
| |
| core.int buildCounterGPUDirectConfig = 0; |
| api.GPUDirectConfig buildGPUDirectConfig() { |
| final o = api.GPUDirectConfig(); |
| buildCounterGPUDirectConfig++; |
| if (buildCounterGPUDirectConfig < 3) { |
| o.gpuDirectStrategy = 'foo'; |
| } |
| buildCounterGPUDirectConfig--; |
| return o; |
| } |
| |
| void checkGPUDirectConfig(api.GPUDirectConfig o) { |
| buildCounterGPUDirectConfig++; |
| if (buildCounterGPUDirectConfig < 3) { |
| unittest.expect(o.gpuDirectStrategy!, unittest.equals('foo')); |
| } |
| buildCounterGPUDirectConfig--; |
| } |
| |
| core.int buildCounterGPUDriverInstallationConfig = 0; |
| api.GPUDriverInstallationConfig buildGPUDriverInstallationConfig() { |
| final o = api.GPUDriverInstallationConfig(); |
| buildCounterGPUDriverInstallationConfig++; |
| if (buildCounterGPUDriverInstallationConfig < 3) { |
| o.gpuDriverVersion = 'foo'; |
| } |
| buildCounterGPUDriverInstallationConfig--; |
| return o; |
| } |
| |
| void checkGPUDriverInstallationConfig(api.GPUDriverInstallationConfig o) { |
| buildCounterGPUDriverInstallationConfig++; |
| if (buildCounterGPUDriverInstallationConfig < 3) { |
| unittest.expect(o.gpuDriverVersion!, unittest.equals('foo')); |
| } |
| buildCounterGPUDriverInstallationConfig--; |
| } |
| |
| core.int buildCounterGPUSharingConfig = 0; |
| api.GPUSharingConfig buildGPUSharingConfig() { |
| final o = api.GPUSharingConfig(); |
| buildCounterGPUSharingConfig++; |
| if (buildCounterGPUSharingConfig < 3) { |
| o.gpuSharingStrategy = 'foo'; |
| o.maxSharedClientsPerGpu = 'foo'; |
| } |
| buildCounterGPUSharingConfig--; |
| return o; |
| } |
| |
| void checkGPUSharingConfig(api.GPUSharingConfig o) { |
| buildCounterGPUSharingConfig++; |
| if (buildCounterGPUSharingConfig < 3) { |
| unittest.expect(o.gpuSharingStrategy!, unittest.equals('foo')); |
| unittest.expect(o.maxSharedClientsPerGpu!, unittest.equals('foo')); |
| } |
| buildCounterGPUSharingConfig--; |
| } |
| |
| core.int buildCounterGatewayAPIConfig = 0; |
| api.GatewayAPIConfig buildGatewayAPIConfig() { |
| final o = api.GatewayAPIConfig(); |
| buildCounterGatewayAPIConfig++; |
| if (buildCounterGatewayAPIConfig < 3) { |
| o.channel = 'foo'; |
| } |
| buildCounterGatewayAPIConfig--; |
| return o; |
| } |
| |
| void checkGatewayAPIConfig(api.GatewayAPIConfig o) { |
| buildCounterGatewayAPIConfig++; |
| if (buildCounterGatewayAPIConfig < 3) { |
| unittest.expect(o.channel!, unittest.equals('foo')); |
| } |
| buildCounterGatewayAPIConfig--; |
| } |
| |
| core.int buildCounterGcePersistentDiskCsiDriverConfig = 0; |
| api.GcePersistentDiskCsiDriverConfig buildGcePersistentDiskCsiDriverConfig() { |
| final o = api.GcePersistentDiskCsiDriverConfig(); |
| buildCounterGcePersistentDiskCsiDriverConfig++; |
| if (buildCounterGcePersistentDiskCsiDriverConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterGcePersistentDiskCsiDriverConfig--; |
| return o; |
| } |
| |
| void checkGcePersistentDiskCsiDriverConfig( |
| api.GcePersistentDiskCsiDriverConfig o, |
| ) { |
| buildCounterGcePersistentDiskCsiDriverConfig++; |
| if (buildCounterGcePersistentDiskCsiDriverConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterGcePersistentDiskCsiDriverConfig--; |
| } |
| |
| core.int buildCounterGcfsConfig = 0; |
| api.GcfsConfig buildGcfsConfig() { |
| final o = api.GcfsConfig(); |
| buildCounterGcfsConfig++; |
| if (buildCounterGcfsConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterGcfsConfig--; |
| return o; |
| } |
| |
| void checkGcfsConfig(api.GcfsConfig o) { |
| buildCounterGcfsConfig++; |
| if (buildCounterGcfsConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterGcfsConfig--; |
| } |
| |
| core.int buildCounterGcpFilestoreCsiDriverConfig = 0; |
| api.GcpFilestoreCsiDriverConfig buildGcpFilestoreCsiDriverConfig() { |
| final o = api.GcpFilestoreCsiDriverConfig(); |
| buildCounterGcpFilestoreCsiDriverConfig++; |
| if (buildCounterGcpFilestoreCsiDriverConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterGcpFilestoreCsiDriverConfig--; |
| return o; |
| } |
| |
| void checkGcpFilestoreCsiDriverConfig(api.GcpFilestoreCsiDriverConfig o) { |
| buildCounterGcpFilestoreCsiDriverConfig++; |
| if (buildCounterGcpFilestoreCsiDriverConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterGcpFilestoreCsiDriverConfig--; |
| } |
| |
| core.int buildCounterGcsFuseCsiDriverConfig = 0; |
| api.GcsFuseCsiDriverConfig buildGcsFuseCsiDriverConfig() { |
| final o = api.GcsFuseCsiDriverConfig(); |
| buildCounterGcsFuseCsiDriverConfig++; |
| if (buildCounterGcsFuseCsiDriverConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterGcsFuseCsiDriverConfig--; |
| return o; |
| } |
| |
| void checkGcsFuseCsiDriverConfig(api.GcsFuseCsiDriverConfig o) { |
| buildCounterGcsFuseCsiDriverConfig++; |
| if (buildCounterGcsFuseCsiDriverConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterGcsFuseCsiDriverConfig--; |
| } |
| |
| core.List<api.Jwk> buildUnnamed27() => [buildJwk(), buildJwk()]; |
| |
| void checkUnnamed27(core.List<api.Jwk> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkJwk(o[0]); |
| checkJwk(o[1]); |
| } |
| |
| core.int buildCounterGetJSONWebKeysResponse = 0; |
| api.GetJSONWebKeysResponse buildGetJSONWebKeysResponse() { |
| final o = api.GetJSONWebKeysResponse(); |
| buildCounterGetJSONWebKeysResponse++; |
| if (buildCounterGetJSONWebKeysResponse < 3) { |
| o.cacheHeader = buildHttpCacheControlResponseHeader(); |
| o.keys = buildUnnamed27(); |
| } |
| buildCounterGetJSONWebKeysResponse--; |
| return o; |
| } |
| |
| void checkGetJSONWebKeysResponse(api.GetJSONWebKeysResponse o) { |
| buildCounterGetJSONWebKeysResponse++; |
| if (buildCounterGetJSONWebKeysResponse < 3) { |
| checkHttpCacheControlResponseHeader(o.cacheHeader!); |
| checkUnnamed27(o.keys!); |
| } |
| buildCounterGetJSONWebKeysResponse--; |
| } |
| |
| 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.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.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.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<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.int buildCounterGetOpenIDConfigResponse = 0; |
| api.GetOpenIDConfigResponse buildGetOpenIDConfigResponse() { |
| final o = api.GetOpenIDConfigResponse(); |
| buildCounterGetOpenIDConfigResponse++; |
| if (buildCounterGetOpenIDConfigResponse < 3) { |
| o.cacheHeader = buildHttpCacheControlResponseHeader(); |
| o.claimsSupported = buildUnnamed28(); |
| o.grantTypes = buildUnnamed29(); |
| o.idTokenSigningAlgValuesSupported = buildUnnamed30(); |
| o.issuer = 'foo'; |
| o.jwksUri = 'foo'; |
| o.responseTypesSupported = buildUnnamed31(); |
| o.subjectTypesSupported = buildUnnamed32(); |
| } |
| buildCounterGetOpenIDConfigResponse--; |
| return o; |
| } |
| |
| void checkGetOpenIDConfigResponse(api.GetOpenIDConfigResponse o) { |
| buildCounterGetOpenIDConfigResponse++; |
| if (buildCounterGetOpenIDConfigResponse < 3) { |
| checkHttpCacheControlResponseHeader(o.cacheHeader!); |
| checkUnnamed28(o.claimsSupported!); |
| checkUnnamed29(o.grantTypes!); |
| checkUnnamed30(o.idTokenSigningAlgValuesSupported!); |
| unittest.expect(o.issuer!, unittest.equals('foo')); |
| unittest.expect(o.jwksUri!, unittest.equals('foo')); |
| checkUnnamed31(o.responseTypesSupported!); |
| checkUnnamed32(o.subjectTypesSupported!); |
| } |
| buildCounterGetOpenIDConfigResponse--; |
| } |
| |
| core.int buildCounterGkeAutoUpgradeConfig = 0; |
| api.GkeAutoUpgradeConfig buildGkeAutoUpgradeConfig() { |
| final o = api.GkeAutoUpgradeConfig(); |
| buildCounterGkeAutoUpgradeConfig++; |
| if (buildCounterGkeAutoUpgradeConfig < 3) { |
| o.patchMode = 'foo'; |
| } |
| buildCounterGkeAutoUpgradeConfig--; |
| return o; |
| } |
| |
| void checkGkeAutoUpgradeConfig(api.GkeAutoUpgradeConfig o) { |
| buildCounterGkeAutoUpgradeConfig++; |
| if (buildCounterGkeAutoUpgradeConfig < 3) { |
| unittest.expect(o.patchMode!, unittest.equals('foo')); |
| } |
| buildCounterGkeAutoUpgradeConfig--; |
| } |
| |
| core.int buildCounterGkeBackupAgentConfig = 0; |
| api.GkeBackupAgentConfig buildGkeBackupAgentConfig() { |
| final o = api.GkeBackupAgentConfig(); |
| buildCounterGkeBackupAgentConfig++; |
| if (buildCounterGkeBackupAgentConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterGkeBackupAgentConfig--; |
| return o; |
| } |
| |
| void checkGkeBackupAgentConfig(api.GkeBackupAgentConfig o) { |
| buildCounterGkeBackupAgentConfig++; |
| if (buildCounterGkeBackupAgentConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterGkeBackupAgentConfig--; |
| } |
| |
| core.int buildCounterHighScaleCheckpointingConfig = 0; |
| api.HighScaleCheckpointingConfig buildHighScaleCheckpointingConfig() { |
| final o = api.HighScaleCheckpointingConfig(); |
| buildCounterHighScaleCheckpointingConfig++; |
| if (buildCounterHighScaleCheckpointingConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterHighScaleCheckpointingConfig--; |
| return o; |
| } |
| |
| void checkHighScaleCheckpointingConfig(api.HighScaleCheckpointingConfig o) { |
| buildCounterHighScaleCheckpointingConfig++; |
| if (buildCounterHighScaleCheckpointingConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterHighScaleCheckpointingConfig--; |
| } |
| |
| core.int buildCounterHorizontalPodAutoscaling = 0; |
| api.HorizontalPodAutoscaling buildHorizontalPodAutoscaling() { |
| final o = api.HorizontalPodAutoscaling(); |
| buildCounterHorizontalPodAutoscaling++; |
| if (buildCounterHorizontalPodAutoscaling < 3) { |
| o.disabled = true; |
| } |
| buildCounterHorizontalPodAutoscaling--; |
| return o; |
| } |
| |
| void checkHorizontalPodAutoscaling(api.HorizontalPodAutoscaling o) { |
| buildCounterHorizontalPodAutoscaling++; |
| if (buildCounterHorizontalPodAutoscaling < 3) { |
| unittest.expect(o.disabled!, unittest.isTrue); |
| } |
| buildCounterHorizontalPodAutoscaling--; |
| } |
| |
| core.List<api.CertificateConfig> buildUnnamed33() => [ |
| buildCertificateConfig(), |
| buildCertificateConfig(), |
| ]; |
| |
| void checkUnnamed33(core.List<api.CertificateConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCertificateConfig(o[0]); |
| checkCertificateConfig(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.CertificateConfigPair> buildUnnamed35() => [ |
| buildCertificateConfigPair(), |
| buildCertificateConfigPair(), |
| ]; |
| |
| void checkUnnamed35(core.List<api.CertificateConfigPair> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCertificateConfigPair(o[0]); |
| checkCertificateConfigPair(o[1]); |
| } |
| |
| core.List<api.RegistryHeader> buildUnnamed36() => [ |
| buildRegistryHeader(), |
| buildRegistryHeader(), |
| ]; |
| |
| void checkUnnamed36(core.List<api.RegistryHeader> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRegistryHeader(o[0]); |
| checkRegistryHeader(o[1]); |
| } |
| |
| core.int buildCounterHostConfig = 0; |
| api.HostConfig buildHostConfig() { |
| final o = api.HostConfig(); |
| buildCounterHostConfig++; |
| if (buildCounterHostConfig < 3) { |
| o.ca = buildUnnamed33(); |
| o.capabilities = buildUnnamed34(); |
| o.client = buildUnnamed35(); |
| o.dialTimeout = 'foo'; |
| o.header = buildUnnamed36(); |
| o.host = 'foo'; |
| o.overridePath = true; |
| } |
| buildCounterHostConfig--; |
| return o; |
| } |
| |
| void checkHostConfig(api.HostConfig o) { |
| buildCounterHostConfig++; |
| if (buildCounterHostConfig < 3) { |
| checkUnnamed33(o.ca!); |
| checkUnnamed34(o.capabilities!); |
| checkUnnamed35(o.client!); |
| unittest.expect(o.dialTimeout!, unittest.equals('foo')); |
| checkUnnamed36(o.header!); |
| unittest.expect(o.host!, unittest.equals('foo')); |
| unittest.expect(o.overridePath!, unittest.isTrue); |
| } |
| buildCounterHostConfig--; |
| } |
| |
| core.int buildCounterHttpCacheControlResponseHeader = 0; |
| api.HttpCacheControlResponseHeader buildHttpCacheControlResponseHeader() { |
| final o = api.HttpCacheControlResponseHeader(); |
| buildCounterHttpCacheControlResponseHeader++; |
| if (buildCounterHttpCacheControlResponseHeader < 3) { |
| o.age = 'foo'; |
| o.directive = 'foo'; |
| o.expires = 'foo'; |
| } |
| buildCounterHttpCacheControlResponseHeader--; |
| return o; |
| } |
| |
| void checkHttpCacheControlResponseHeader(api.HttpCacheControlResponseHeader o) { |
| buildCounterHttpCacheControlResponseHeader++; |
| if (buildCounterHttpCacheControlResponseHeader < 3) { |
| unittest.expect(o.age!, unittest.equals('foo')); |
| unittest.expect(o.directive!, unittest.equals('foo')); |
| unittest.expect(o.expires!, unittest.equals('foo')); |
| } |
| buildCounterHttpCacheControlResponseHeader--; |
| } |
| |
| core.int buildCounterHttpLoadBalancing = 0; |
| api.HttpLoadBalancing buildHttpLoadBalancing() { |
| final o = api.HttpLoadBalancing(); |
| buildCounterHttpLoadBalancing++; |
| if (buildCounterHttpLoadBalancing < 3) { |
| o.disabled = true; |
| } |
| buildCounterHttpLoadBalancing--; |
| return o; |
| } |
| |
| void checkHttpLoadBalancing(api.HttpLoadBalancing o) { |
| buildCounterHttpLoadBalancing++; |
| if (buildCounterHttpLoadBalancing < 3) { |
| unittest.expect(o.disabled!, unittest.isTrue); |
| } |
| buildCounterHttpLoadBalancing--; |
| } |
| |
| core.int buildCounterHugepagesConfig = 0; |
| api.HugepagesConfig buildHugepagesConfig() { |
| final o = api.HugepagesConfig(); |
| buildCounterHugepagesConfig++; |
| if (buildCounterHugepagesConfig < 3) { |
| o.hugepageSize1g = 42; |
| o.hugepageSize2m = 42; |
| } |
| buildCounterHugepagesConfig--; |
| return o; |
| } |
| |
| void checkHugepagesConfig(api.HugepagesConfig o) { |
| buildCounterHugepagesConfig++; |
| if (buildCounterHugepagesConfig < 3) { |
| unittest.expect(o.hugepageSize1g!, unittest.equals(42)); |
| unittest.expect(o.hugepageSize2m!, unittest.equals(42)); |
| } |
| buildCounterHugepagesConfig--; |
| } |
| |
| core.int buildCounterILBSubsettingConfig = 0; |
| api.ILBSubsettingConfig buildILBSubsettingConfig() { |
| final o = api.ILBSubsettingConfig(); |
| buildCounterILBSubsettingConfig++; |
| if (buildCounterILBSubsettingConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterILBSubsettingConfig--; |
| return o; |
| } |
| |
| void checkILBSubsettingConfig(api.ILBSubsettingConfig o) { |
| buildCounterILBSubsettingConfig++; |
| if (buildCounterILBSubsettingConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterILBSubsettingConfig--; |
| } |
| |
| core.List<api.AdditionalIPRangesConfig> buildUnnamed37() => [ |
| buildAdditionalIPRangesConfig(), |
| buildAdditionalIPRangesConfig(), |
| ]; |
| |
| void checkUnnamed37(core.List<api.AdditionalIPRangesConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAdditionalIPRangesConfig(o[0]); |
| checkAdditionalIPRangesConfig(o[1]); |
| } |
| |
| core.int buildCounterIPAllocationPolicy = 0; |
| api.IPAllocationPolicy buildIPAllocationPolicy() { |
| final o = api.IPAllocationPolicy(); |
| buildCounterIPAllocationPolicy++; |
| if (buildCounterIPAllocationPolicy < 3) { |
| o.additionalIpRangesConfigs = buildUnnamed37(); |
| o.additionalPodRangesConfig = buildAdditionalPodRangesConfig(); |
| o.autoIpamConfig = buildAutoIpamConfig(); |
| o.clusterIpv4Cidr = 'foo'; |
| o.clusterIpv4CidrBlock = 'foo'; |
| o.clusterSecondaryRangeName = 'foo'; |
| o.createSubnetwork = true; |
| o.defaultPodIpv4RangeUtilization = 42.0; |
| o.ipv6AccessType = 'foo'; |
| o.networkTierConfig = buildNetworkTierConfig(); |
| o.nodeIpv4Cidr = 'foo'; |
| o.nodeIpv4CidrBlock = 'foo'; |
| o.podCidrOverprovisionConfig = buildPodCIDROverprovisionConfig(); |
| o.servicesIpv4Cidr = 'foo'; |
| o.servicesIpv4CidrBlock = 'foo'; |
| o.servicesIpv6CidrBlock = 'foo'; |
| o.servicesSecondaryRangeName = 'foo'; |
| o.stackType = 'foo'; |
| o.subnetIpv6CidrBlock = 'foo'; |
| o.subnetworkName = 'foo'; |
| o.tpuIpv4CidrBlock = 'foo'; |
| o.useIpAliases = true; |
| o.useRoutes = true; |
| } |
| buildCounterIPAllocationPolicy--; |
| return o; |
| } |
| |
| void checkIPAllocationPolicy(api.IPAllocationPolicy o) { |
| buildCounterIPAllocationPolicy++; |
| if (buildCounterIPAllocationPolicy < 3) { |
| checkUnnamed37(o.additionalIpRangesConfigs!); |
| checkAdditionalPodRangesConfig(o.additionalPodRangesConfig!); |
| checkAutoIpamConfig(o.autoIpamConfig!); |
| unittest.expect(o.clusterIpv4Cidr!, unittest.equals('foo')); |
| unittest.expect(o.clusterIpv4CidrBlock!, unittest.equals('foo')); |
| unittest.expect(o.clusterSecondaryRangeName!, unittest.equals('foo')); |
| unittest.expect(o.createSubnetwork!, unittest.isTrue); |
| unittest.expect(o.defaultPodIpv4RangeUtilization!, unittest.equals(42.0)); |
| unittest.expect(o.ipv6AccessType!, unittest.equals('foo')); |
| checkNetworkTierConfig(o.networkTierConfig!); |
| unittest.expect(o.nodeIpv4Cidr!, unittest.equals('foo')); |
| unittest.expect(o.nodeIpv4CidrBlock!, unittest.equals('foo')); |
| checkPodCIDROverprovisionConfig(o.podCidrOverprovisionConfig!); |
| unittest.expect(o.servicesIpv4Cidr!, unittest.equals('foo')); |
| unittest.expect(o.servicesIpv4CidrBlock!, unittest.equals('foo')); |
| unittest.expect(o.servicesIpv6CidrBlock!, unittest.equals('foo')); |
| unittest.expect(o.servicesSecondaryRangeName!, unittest.equals('foo')); |
| unittest.expect(o.stackType!, unittest.equals('foo')); |
| unittest.expect(o.subnetIpv6CidrBlock!, unittest.equals('foo')); |
| unittest.expect(o.subnetworkName!, unittest.equals('foo')); |
| unittest.expect(o.tpuIpv4CidrBlock!, unittest.equals('foo')); |
| unittest.expect(o.useIpAliases!, unittest.isTrue); |
| unittest.expect(o.useRoutes!, unittest.isTrue); |
| } |
| buildCounterIPAllocationPolicy--; |
| } |
| |
| core.int buildCounterIPEndpointsConfig = 0; |
| api.IPEndpointsConfig buildIPEndpointsConfig() { |
| final o = api.IPEndpointsConfig(); |
| buildCounterIPEndpointsConfig++; |
| if (buildCounterIPEndpointsConfig < 3) { |
| o.authorizedNetworksConfig = buildMasterAuthorizedNetworksConfig(); |
| o.enablePublicEndpoint = true; |
| o.enabled = true; |
| o.globalAccess = true; |
| o.privateEndpoint = 'foo'; |
| o.privateEndpointSubnetwork = 'foo'; |
| o.publicEndpoint = 'foo'; |
| } |
| buildCounterIPEndpointsConfig--; |
| return o; |
| } |
| |
| void checkIPEndpointsConfig(api.IPEndpointsConfig o) { |
| buildCounterIPEndpointsConfig++; |
| if (buildCounterIPEndpointsConfig < 3) { |
| checkMasterAuthorizedNetworksConfig(o.authorizedNetworksConfig!); |
| unittest.expect(o.enablePublicEndpoint!, unittest.isTrue); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.globalAccess!, unittest.isTrue); |
| unittest.expect(o.privateEndpoint!, unittest.equals('foo')); |
| unittest.expect(o.privateEndpointSubnetwork!, unittest.equals('foo')); |
| unittest.expect(o.publicEndpoint!, unittest.equals('foo')); |
| } |
| buildCounterIPEndpointsConfig--; |
| } |
| |
| core.int buildCounterIdentityServiceConfig = 0; |
| api.IdentityServiceConfig buildIdentityServiceConfig() { |
| final o = api.IdentityServiceConfig(); |
| buildCounterIdentityServiceConfig++; |
| if (buildCounterIdentityServiceConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterIdentityServiceConfig--; |
| return o; |
| } |
| |
| void checkIdentityServiceConfig(api.IdentityServiceConfig o) { |
| buildCounterIdentityServiceConfig++; |
| if (buildCounterIdentityServiceConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterIdentityServiceConfig--; |
| } |
| |
| core.int buildCounterIntraNodeVisibilityConfig = 0; |
| api.IntraNodeVisibilityConfig buildIntraNodeVisibilityConfig() { |
| final o = api.IntraNodeVisibilityConfig(); |
| buildCounterIntraNodeVisibilityConfig++; |
| if (buildCounterIntraNodeVisibilityConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterIntraNodeVisibilityConfig--; |
| return o; |
| } |
| |
| void checkIntraNodeVisibilityConfig(api.IntraNodeVisibilityConfig o) { |
| buildCounterIntraNodeVisibilityConfig++; |
| if (buildCounterIntraNodeVisibilityConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterIntraNodeVisibilityConfig--; |
| } |
| |
| core.int buildCounterJwk = 0; |
| api.Jwk buildJwk() { |
| final o = api.Jwk(); |
| buildCounterJwk++; |
| if (buildCounterJwk < 3) { |
| o.alg = 'foo'; |
| o.crv = 'foo'; |
| o.e = 'foo'; |
| o.kid = 'foo'; |
| o.kty = 'foo'; |
| o.n = 'foo'; |
| o.use = 'foo'; |
| o.x = 'foo'; |
| o.y = 'foo'; |
| } |
| buildCounterJwk--; |
| return o; |
| } |
| |
| void checkJwk(api.Jwk o) { |
| buildCounterJwk++; |
| if (buildCounterJwk < 3) { |
| unittest.expect(o.alg!, unittest.equals('foo')); |
| unittest.expect(o.crv!, unittest.equals('foo')); |
| unittest.expect(o.e!, unittest.equals('foo')); |
| unittest.expect(o.kid!, unittest.equals('foo')); |
| unittest.expect(o.kty!, unittest.equals('foo')); |
| unittest.expect(o.n!, unittest.equals('foo')); |
| unittest.expect(o.use!, unittest.equals('foo')); |
| unittest.expect(o.x!, unittest.equals('foo')); |
| unittest.expect(o.y!, unittest.equals('foo')); |
| } |
| buildCounterJwk--; |
| } |
| |
| 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.int buildCounterK8sBetaAPIConfig = 0; |
| api.K8sBetaAPIConfig buildK8sBetaAPIConfig() { |
| final o = api.K8sBetaAPIConfig(); |
| buildCounterK8sBetaAPIConfig++; |
| if (buildCounterK8sBetaAPIConfig < 3) { |
| o.enabledApis = buildUnnamed38(); |
| } |
| buildCounterK8sBetaAPIConfig--; |
| return o; |
| } |
| |
| void checkK8sBetaAPIConfig(api.K8sBetaAPIConfig o) { |
| buildCounterK8sBetaAPIConfig++; |
| if (buildCounterK8sBetaAPIConfig < 3) { |
| checkUnnamed38(o.enabledApis!); |
| } |
| buildCounterK8sBetaAPIConfig--; |
| } |
| |
| core.int buildCounterKubernetesDashboard = 0; |
| api.KubernetesDashboard buildKubernetesDashboard() { |
| final o = api.KubernetesDashboard(); |
| buildCounterKubernetesDashboard++; |
| if (buildCounterKubernetesDashboard < 3) { |
| o.disabled = true; |
| } |
| buildCounterKubernetesDashboard--; |
| return o; |
| } |
| |
| void checkKubernetesDashboard(api.KubernetesDashboard o) { |
| buildCounterKubernetesDashboard++; |
| if (buildCounterKubernetesDashboard < 3) { |
| unittest.expect(o.disabled!, unittest.isTrue); |
| } |
| buildCounterKubernetesDashboard--; |
| } |
| |
| core.int buildCounterLegacyAbac = 0; |
| api.LegacyAbac buildLegacyAbac() { |
| final o = api.LegacyAbac(); |
| buildCounterLegacyAbac++; |
| if (buildCounterLegacyAbac < 3) { |
| o.enabled = true; |
| } |
| buildCounterLegacyAbac--; |
| return o; |
| } |
| |
| void checkLegacyAbac(api.LegacyAbac o) { |
| buildCounterLegacyAbac++; |
| if (buildCounterLegacyAbac < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterLegacyAbac--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed39() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed39(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 buildCounterLinuxNodeConfig = 0; |
| api.LinuxNodeConfig buildLinuxNodeConfig() { |
| final o = api.LinuxNodeConfig(); |
| buildCounterLinuxNodeConfig++; |
| if (buildCounterLinuxNodeConfig < 3) { |
| o.accurateTimeConfig = buildAccurateTimeConfig(); |
| o.cgroupMode = 'foo'; |
| o.hugepages = buildHugepagesConfig(); |
| o.nodeKernelModuleLoading = buildNodeKernelModuleLoading(); |
| o.swapConfig = buildSwapConfig(); |
| o.sysctls = buildUnnamed39(); |
| o.transparentHugepageDefrag = 'foo'; |
| o.transparentHugepageEnabled = 'foo'; |
| } |
| buildCounterLinuxNodeConfig--; |
| return o; |
| } |
| |
| void checkLinuxNodeConfig(api.LinuxNodeConfig o) { |
| buildCounterLinuxNodeConfig++; |
| if (buildCounterLinuxNodeConfig < 3) { |
| checkAccurateTimeConfig(o.accurateTimeConfig!); |
| unittest.expect(o.cgroupMode!, unittest.equals('foo')); |
| checkHugepagesConfig(o.hugepages!); |
| checkNodeKernelModuleLoading(o.nodeKernelModuleLoading!); |
| checkSwapConfig(o.swapConfig!); |
| checkUnnamed39(o.sysctls!); |
| unittest.expect(o.transparentHugepageDefrag!, unittest.equals('foo')); |
| unittest.expect(o.transparentHugepageEnabled!, unittest.equals('foo')); |
| } |
| buildCounterLinuxNodeConfig--; |
| } |
| |
| core.List<api.Cluster> buildUnnamed40() => [buildCluster(), buildCluster()]; |
| |
| void checkUnnamed40(core.List<api.Cluster> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCluster(o[0]); |
| checkCluster(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 buildCounterListClustersResponse = 0; |
| api.ListClustersResponse buildListClustersResponse() { |
| final o = api.ListClustersResponse(); |
| buildCounterListClustersResponse++; |
| if (buildCounterListClustersResponse < 3) { |
| o.clusters = buildUnnamed40(); |
| o.missingZones = buildUnnamed41(); |
| } |
| buildCounterListClustersResponse--; |
| return o; |
| } |
| |
| void checkListClustersResponse(api.ListClustersResponse o) { |
| buildCounterListClustersResponse++; |
| if (buildCounterListClustersResponse < 3) { |
| checkUnnamed40(o.clusters!); |
| checkUnnamed41(o.missingZones!); |
| } |
| buildCounterListClustersResponse--; |
| } |
| |
| core.List<api.NodePool> buildUnnamed42() => [buildNodePool(), buildNodePool()]; |
| |
| void checkUnnamed42(core.List<api.NodePool> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkNodePool(o[0]); |
| checkNodePool(o[1]); |
| } |
| |
| core.int buildCounterListNodePoolsResponse = 0; |
| api.ListNodePoolsResponse buildListNodePoolsResponse() { |
| final o = api.ListNodePoolsResponse(); |
| buildCounterListNodePoolsResponse++; |
| if (buildCounterListNodePoolsResponse < 3) { |
| o.nodePools = buildUnnamed42(); |
| } |
| buildCounterListNodePoolsResponse--; |
| return o; |
| } |
| |
| void checkListNodePoolsResponse(api.ListNodePoolsResponse o) { |
| buildCounterListNodePoolsResponse++; |
| if (buildCounterListNodePoolsResponse < 3) { |
| checkUnnamed42(o.nodePools!); |
| } |
| buildCounterListNodePoolsResponse--; |
| } |
| |
| 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<api.Operation> buildUnnamed44() => [ |
| buildOperation(), |
| buildOperation(), |
| ]; |
| |
| void checkUnnamed44(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.missingZones = buildUnnamed43(); |
| o.operations = buildUnnamed44(); |
| } |
| buildCounterListOperationsResponse--; |
| return o; |
| } |
| |
| void checkListOperationsResponse(api.ListOperationsResponse o) { |
| buildCounterListOperationsResponse++; |
| if (buildCounterListOperationsResponse < 3) { |
| checkUnnamed43(o.missingZones!); |
| checkUnnamed44(o.operations!); |
| } |
| buildCounterListOperationsResponse--; |
| } |
| |
| core.List<api.UsableSubnetwork> buildUnnamed45() => [ |
| buildUsableSubnetwork(), |
| buildUsableSubnetwork(), |
| ]; |
| |
| void checkUnnamed45(core.List<api.UsableSubnetwork> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUsableSubnetwork(o[0]); |
| checkUsableSubnetwork(o[1]); |
| } |
| |
| core.int buildCounterListUsableSubnetworksResponse = 0; |
| api.ListUsableSubnetworksResponse buildListUsableSubnetworksResponse() { |
| final o = api.ListUsableSubnetworksResponse(); |
| buildCounterListUsableSubnetworksResponse++; |
| if (buildCounterListUsableSubnetworksResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.subnetworks = buildUnnamed45(); |
| } |
| buildCounterListUsableSubnetworksResponse--; |
| return o; |
| } |
| |
| void checkListUsableSubnetworksResponse(api.ListUsableSubnetworksResponse o) { |
| buildCounterListUsableSubnetworksResponse++; |
| if (buildCounterListUsableSubnetworksResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed45(o.subnetworks!); |
| } |
| buildCounterListUsableSubnetworksResponse--; |
| } |
| |
| core.int buildCounterLocalNvmeSsdBlockConfig = 0; |
| api.LocalNvmeSsdBlockConfig buildLocalNvmeSsdBlockConfig() { |
| final o = api.LocalNvmeSsdBlockConfig(); |
| buildCounterLocalNvmeSsdBlockConfig++; |
| if (buildCounterLocalNvmeSsdBlockConfig < 3) { |
| o.localSsdCount = 42; |
| } |
| buildCounterLocalNvmeSsdBlockConfig--; |
| return o; |
| } |
| |
| void checkLocalNvmeSsdBlockConfig(api.LocalNvmeSsdBlockConfig o) { |
| buildCounterLocalNvmeSsdBlockConfig++; |
| if (buildCounterLocalNvmeSsdBlockConfig < 3) { |
| unittest.expect(o.localSsdCount!, unittest.equals(42)); |
| } |
| buildCounterLocalNvmeSsdBlockConfig--; |
| } |
| |
| 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.int buildCounterLoggingComponentConfig = 0; |
| api.LoggingComponentConfig buildLoggingComponentConfig() { |
| final o = api.LoggingComponentConfig(); |
| buildCounterLoggingComponentConfig++; |
| if (buildCounterLoggingComponentConfig < 3) { |
| o.enableComponents = buildUnnamed46(); |
| } |
| buildCounterLoggingComponentConfig--; |
| return o; |
| } |
| |
| void checkLoggingComponentConfig(api.LoggingComponentConfig o) { |
| buildCounterLoggingComponentConfig++; |
| if (buildCounterLoggingComponentConfig < 3) { |
| checkUnnamed46(o.enableComponents!); |
| } |
| buildCounterLoggingComponentConfig--; |
| } |
| |
| core.int buildCounterLoggingConfig = 0; |
| api.LoggingConfig buildLoggingConfig() { |
| final o = api.LoggingConfig(); |
| buildCounterLoggingConfig++; |
| if (buildCounterLoggingConfig < 3) { |
| o.componentConfig = buildLoggingComponentConfig(); |
| } |
| buildCounterLoggingConfig--; |
| return o; |
| } |
| |
| void checkLoggingConfig(api.LoggingConfig o) { |
| buildCounterLoggingConfig++; |
| if (buildCounterLoggingConfig < 3) { |
| checkLoggingComponentConfig(o.componentConfig!); |
| } |
| buildCounterLoggingConfig--; |
| } |
| |
| core.int buildCounterLoggingVariantConfig = 0; |
| api.LoggingVariantConfig buildLoggingVariantConfig() { |
| final o = api.LoggingVariantConfig(); |
| buildCounterLoggingVariantConfig++; |
| if (buildCounterLoggingVariantConfig < 3) { |
| o.variant = 'foo'; |
| } |
| buildCounterLoggingVariantConfig--; |
| return o; |
| } |
| |
| void checkLoggingVariantConfig(api.LoggingVariantConfig o) { |
| buildCounterLoggingVariantConfig++; |
| if (buildCounterLoggingVariantConfig < 3) { |
| unittest.expect(o.variant!, unittest.equals('foo')); |
| } |
| buildCounterLoggingVariantConfig--; |
| } |
| |
| core.int buildCounterLustreCsiDriverConfig = 0; |
| api.LustreCsiDriverConfig buildLustreCsiDriverConfig() { |
| final o = api.LustreCsiDriverConfig(); |
| buildCounterLustreCsiDriverConfig++; |
| if (buildCounterLustreCsiDriverConfig < 3) { |
| o.disableMultiNic = true; |
| o.enableLegacyLustrePort = true; |
| o.enabled = true; |
| } |
| buildCounterLustreCsiDriverConfig--; |
| return o; |
| } |
| |
| void checkLustreCsiDriverConfig(api.LustreCsiDriverConfig o) { |
| buildCounterLustreCsiDriverConfig++; |
| if (buildCounterLustreCsiDriverConfig < 3) { |
| unittest.expect(o.disableMultiNic!, unittest.isTrue); |
| unittest.expect(o.enableLegacyLustrePort!, unittest.isTrue); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterLustreCsiDriverConfig--; |
| } |
| |
| core.int buildCounterMaintenanceExclusionOptions = 0; |
| api.MaintenanceExclusionOptions buildMaintenanceExclusionOptions() { |
| final o = api.MaintenanceExclusionOptions(); |
| buildCounterMaintenanceExclusionOptions++; |
| if (buildCounterMaintenanceExclusionOptions < 3) { |
| o.endTimeBehavior = 'foo'; |
| o.scope = 'foo'; |
| } |
| buildCounterMaintenanceExclusionOptions--; |
| return o; |
| } |
| |
| void checkMaintenanceExclusionOptions(api.MaintenanceExclusionOptions o) { |
| buildCounterMaintenanceExclusionOptions++; |
| if (buildCounterMaintenanceExclusionOptions < 3) { |
| unittest.expect(o.endTimeBehavior!, unittest.equals('foo')); |
| unittest.expect(o.scope!, unittest.equals('foo')); |
| } |
| buildCounterMaintenanceExclusionOptions--; |
| } |
| |
| core.int buildCounterMaintenancePolicy = 0; |
| api.MaintenancePolicy buildMaintenancePolicy() { |
| final o = api.MaintenancePolicy(); |
| buildCounterMaintenancePolicy++; |
| if (buildCounterMaintenancePolicy < 3) { |
| o.disruptionBudget = buildDisruptionBudget(); |
| o.resourceVersion = 'foo'; |
| o.window = buildMaintenanceWindow(); |
| } |
| buildCounterMaintenancePolicy--; |
| return o; |
| } |
| |
| void checkMaintenancePolicy(api.MaintenancePolicy o) { |
| buildCounterMaintenancePolicy++; |
| if (buildCounterMaintenancePolicy < 3) { |
| checkDisruptionBudget(o.disruptionBudget!); |
| unittest.expect(o.resourceVersion!, unittest.equals('foo')); |
| checkMaintenanceWindow(o.window!); |
| } |
| buildCounterMaintenancePolicy--; |
| } |
| |
| core.Map<core.String, api.TimeWindow> buildUnnamed47() => { |
| 'x': buildTimeWindow(), |
| 'y': buildTimeWindow(), |
| }; |
| |
| void checkUnnamed47(core.Map<core.String, api.TimeWindow> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkTimeWindow(o['x']!); |
| checkTimeWindow(o['y']!); |
| } |
| |
| core.int buildCounterMaintenanceWindow = 0; |
| api.MaintenanceWindow buildMaintenanceWindow() { |
| final o = api.MaintenanceWindow(); |
| buildCounterMaintenanceWindow++; |
| if (buildCounterMaintenanceWindow < 3) { |
| o.dailyMaintenanceWindow = buildDailyMaintenanceWindow(); |
| o.maintenanceExclusions = buildUnnamed47(); |
| o.recurringWindow = buildRecurringTimeWindow(); |
| } |
| buildCounterMaintenanceWindow--; |
| return o; |
| } |
| |
| void checkMaintenanceWindow(api.MaintenanceWindow o) { |
| buildCounterMaintenanceWindow++; |
| if (buildCounterMaintenanceWindow < 3) { |
| checkDailyMaintenanceWindow(o.dailyMaintenanceWindow!); |
| checkUnnamed47(o.maintenanceExclusions!); |
| checkRecurringTimeWindow(o.recurringWindow!); |
| } |
| buildCounterMaintenanceWindow--; |
| } |
| |
| core.int buildCounterManagedMachineLearningDiagnosticsConfig = 0; |
| api.ManagedMachineLearningDiagnosticsConfig |
| buildManagedMachineLearningDiagnosticsConfig() { |
| final o = api.ManagedMachineLearningDiagnosticsConfig(); |
| buildCounterManagedMachineLearningDiagnosticsConfig++; |
| if (buildCounterManagedMachineLearningDiagnosticsConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterManagedMachineLearningDiagnosticsConfig--; |
| return o; |
| } |
| |
| void checkManagedMachineLearningDiagnosticsConfig( |
| api.ManagedMachineLearningDiagnosticsConfig o, |
| ) { |
| buildCounterManagedMachineLearningDiagnosticsConfig++; |
| if (buildCounterManagedMachineLearningDiagnosticsConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterManagedMachineLearningDiagnosticsConfig--; |
| } |
| |
| core.int buildCounterManagedOpenTelemetryConfig = 0; |
| api.ManagedOpenTelemetryConfig buildManagedOpenTelemetryConfig() { |
| final o = api.ManagedOpenTelemetryConfig(); |
| buildCounterManagedOpenTelemetryConfig++; |
| if (buildCounterManagedOpenTelemetryConfig < 3) { |
| o.scope = 'foo'; |
| } |
| buildCounterManagedOpenTelemetryConfig--; |
| return o; |
| } |
| |
| void checkManagedOpenTelemetryConfig(api.ManagedOpenTelemetryConfig o) { |
| buildCounterManagedOpenTelemetryConfig++; |
| if (buildCounterManagedOpenTelemetryConfig < 3) { |
| unittest.expect(o.scope!, unittest.equals('foo')); |
| } |
| buildCounterManagedOpenTelemetryConfig--; |
| } |
| |
| core.int buildCounterManagedPrometheusConfig = 0; |
| api.ManagedPrometheusConfig buildManagedPrometheusConfig() { |
| final o = api.ManagedPrometheusConfig(); |
| buildCounterManagedPrometheusConfig++; |
| if (buildCounterManagedPrometheusConfig < 3) { |
| o.autoMonitoringConfig = buildAutoMonitoringConfig(); |
| o.enabled = true; |
| } |
| buildCounterManagedPrometheusConfig--; |
| return o; |
| } |
| |
| void checkManagedPrometheusConfig(api.ManagedPrometheusConfig o) { |
| buildCounterManagedPrometheusConfig++; |
| if (buildCounterManagedPrometheusConfig < 3) { |
| checkAutoMonitoringConfig(o.autoMonitoringConfig!); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterManagedPrometheusConfig--; |
| } |
| |
| core.int buildCounterMasterAuth = 0; |
| api.MasterAuth buildMasterAuth() { |
| final o = api.MasterAuth(); |
| buildCounterMasterAuth++; |
| if (buildCounterMasterAuth < 3) { |
| o.clientCertificate = 'foo'; |
| o.clientCertificateConfig = buildClientCertificateConfig(); |
| o.clientKey = 'foo'; |
| o.clusterCaCertificate = 'foo'; |
| o.password = 'foo'; |
| o.username = 'foo'; |
| } |
| buildCounterMasterAuth--; |
| return o; |
| } |
| |
| void checkMasterAuth(api.MasterAuth o) { |
| buildCounterMasterAuth++; |
| if (buildCounterMasterAuth < 3) { |
| unittest.expect(o.clientCertificate!, unittest.equals('foo')); |
| checkClientCertificateConfig(o.clientCertificateConfig!); |
| unittest.expect(o.clientKey!, unittest.equals('foo')); |
| unittest.expect(o.clusterCaCertificate!, unittest.equals('foo')); |
| unittest.expect(o.password!, unittest.equals('foo')); |
| unittest.expect(o.username!, unittest.equals('foo')); |
| } |
| buildCounterMasterAuth--; |
| } |
| |
| core.List<api.CidrBlock> buildUnnamed48() => [ |
| buildCidrBlock(), |
| buildCidrBlock(), |
| ]; |
| |
| void checkUnnamed48(core.List<api.CidrBlock> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCidrBlock(o[0]); |
| checkCidrBlock(o[1]); |
| } |
| |
| core.int buildCounterMasterAuthorizedNetworksConfig = 0; |
| api.MasterAuthorizedNetworksConfig buildMasterAuthorizedNetworksConfig() { |
| final o = api.MasterAuthorizedNetworksConfig(); |
| buildCounterMasterAuthorizedNetworksConfig++; |
| if (buildCounterMasterAuthorizedNetworksConfig < 3) { |
| o.cidrBlocks = buildUnnamed48(); |
| o.enabled = true; |
| o.gcpPublicCidrsAccessEnabled = true; |
| o.privateEndpointEnforcementEnabled = true; |
| } |
| buildCounterMasterAuthorizedNetworksConfig--; |
| return o; |
| } |
| |
| void checkMasterAuthorizedNetworksConfig(api.MasterAuthorizedNetworksConfig o) { |
| buildCounterMasterAuthorizedNetworksConfig++; |
| if (buildCounterMasterAuthorizedNetworksConfig < 3) { |
| checkUnnamed48(o.cidrBlocks!); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.gcpPublicCidrsAccessEnabled!, unittest.isTrue); |
| unittest.expect(o.privateEndpointEnforcementEnabled!, unittest.isTrue); |
| } |
| buildCounterMasterAuthorizedNetworksConfig--; |
| } |
| |
| core.int buildCounterMaxPodsConstraint = 0; |
| api.MaxPodsConstraint buildMaxPodsConstraint() { |
| final o = api.MaxPodsConstraint(); |
| buildCounterMaxPodsConstraint++; |
| if (buildCounterMaxPodsConstraint < 3) { |
| o.maxPodsPerNode = 'foo'; |
| } |
| buildCounterMaxPodsConstraint--; |
| return o; |
| } |
| |
| void checkMaxPodsConstraint(api.MaxPodsConstraint o) { |
| buildCounterMaxPodsConstraint++; |
| if (buildCounterMaxPodsConstraint < 3) { |
| unittest.expect(o.maxPodsPerNode!, unittest.equals('foo')); |
| } |
| buildCounterMaxPodsConstraint--; |
| } |
| |
| core.int buildCounterMemoryManager = 0; |
| api.MemoryManager buildMemoryManager() { |
| final o = api.MemoryManager(); |
| buildCounterMemoryManager++; |
| if (buildCounterMemoryManager < 3) { |
| o.policy = 'foo'; |
| } |
| buildCounterMemoryManager--; |
| return o; |
| } |
| |
| void checkMemoryManager(api.MemoryManager o) { |
| buildCounterMemoryManager++; |
| if (buildCounterMemoryManager < 3) { |
| unittest.expect(o.policy!, unittest.equals('foo')); |
| } |
| buildCounterMemoryManager--; |
| } |
| |
| core.int buildCounterMeshCertificates = 0; |
| api.MeshCertificates buildMeshCertificates() { |
| final o = api.MeshCertificates(); |
| buildCounterMeshCertificates++; |
| if (buildCounterMeshCertificates < 3) { |
| o.enableCertificates = true; |
| } |
| buildCounterMeshCertificates--; |
| return o; |
| } |
| |
| void checkMeshCertificates(api.MeshCertificates o) { |
| buildCounterMeshCertificates++; |
| if (buildCounterMeshCertificates < 3) { |
| unittest.expect(o.enableCertificates!, unittest.isTrue); |
| } |
| buildCounterMeshCertificates--; |
| } |
| |
| core.int buildCounterMetric = 0; |
| api.Metric buildMetric() { |
| final o = api.Metric(); |
| buildCounterMetric++; |
| if (buildCounterMetric < 3) { |
| o.doubleValue = 42.0; |
| o.intValue = 'foo'; |
| o.name = 'foo'; |
| o.stringValue = 'foo'; |
| } |
| buildCounterMetric--; |
| return o; |
| } |
| |
| void checkMetric(api.Metric o) { |
| buildCounterMetric++; |
| if (buildCounterMetric < 3) { |
| unittest.expect(o.doubleValue!, unittest.equals(42.0)); |
| unittest.expect(o.intValue!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.stringValue!, unittest.equals('foo')); |
| } |
| buildCounterMetric--; |
| } |
| |
| 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.int buildCounterMonitoringComponentConfig = 0; |
| api.MonitoringComponentConfig buildMonitoringComponentConfig() { |
| final o = api.MonitoringComponentConfig(); |
| buildCounterMonitoringComponentConfig++; |
| if (buildCounterMonitoringComponentConfig < 3) { |
| o.enableComponents = buildUnnamed49(); |
| } |
| buildCounterMonitoringComponentConfig--; |
| return o; |
| } |
| |
| void checkMonitoringComponentConfig(api.MonitoringComponentConfig o) { |
| buildCounterMonitoringComponentConfig++; |
| if (buildCounterMonitoringComponentConfig < 3) { |
| checkUnnamed49(o.enableComponents!); |
| } |
| buildCounterMonitoringComponentConfig--; |
| } |
| |
| core.int buildCounterMonitoringConfig = 0; |
| api.MonitoringConfig buildMonitoringConfig() { |
| final o = api.MonitoringConfig(); |
| buildCounterMonitoringConfig++; |
| if (buildCounterMonitoringConfig < 3) { |
| o.advancedDatapathObservabilityConfig = |
| buildAdvancedDatapathObservabilityConfig(); |
| o.componentConfig = buildMonitoringComponentConfig(); |
| o.managedPrometheusConfig = buildManagedPrometheusConfig(); |
| } |
| buildCounterMonitoringConfig--; |
| return o; |
| } |
| |
| void checkMonitoringConfig(api.MonitoringConfig o) { |
| buildCounterMonitoringConfig++; |
| if (buildCounterMonitoringConfig < 3) { |
| checkAdvancedDatapathObservabilityConfig( |
| o.advancedDatapathObservabilityConfig!, |
| ); |
| checkMonitoringComponentConfig(o.componentConfig!); |
| checkManagedPrometheusConfig(o.managedPrometheusConfig!); |
| } |
| buildCounterMonitoringConfig--; |
| } |
| |
| core.int buildCounterNetworkConfig = 0; |
| api.NetworkConfig buildNetworkConfig() { |
| final o = api.NetworkConfig(); |
| buildCounterNetworkConfig++; |
| if (buildCounterNetworkConfig < 3) { |
| o.datapathProvider = 'foo'; |
| o.defaultEnablePrivateNodes = true; |
| o.defaultSnatStatus = buildDefaultSnatStatus(); |
| o.disableL4LbFirewallReconciliation = true; |
| o.dnsConfig = buildDNSConfig(); |
| o.enableCiliumClusterwideNetworkPolicy = true; |
| o.enableFqdnNetworkPolicy = true; |
| o.enableIntraNodeVisibility = true; |
| o.enableL4ilbSubsetting = true; |
| o.enableMultiNetworking = true; |
| o.gatewayApiConfig = buildGatewayAPIConfig(); |
| o.inTransitEncryptionConfig = 'foo'; |
| o.network = 'foo'; |
| o.networkPerformanceConfig = buildClusterNetworkPerformanceConfig(); |
| o.privateIpv6GoogleAccess = 'foo'; |
| o.serviceExternalIpsConfig = buildServiceExternalIPsConfig(); |
| o.subnetwork = 'foo'; |
| } |
| buildCounterNetworkConfig--; |
| return o; |
| } |
| |
| void checkNetworkConfig(api.NetworkConfig o) { |
| buildCounterNetworkConfig++; |
| if (buildCounterNetworkConfig < 3) { |
| unittest.expect(o.datapathProvider!, unittest.equals('foo')); |
| unittest.expect(o.defaultEnablePrivateNodes!, unittest.isTrue); |
| checkDefaultSnatStatus(o.defaultSnatStatus!); |
| unittest.expect(o.disableL4LbFirewallReconciliation!, unittest.isTrue); |
| checkDNSConfig(o.dnsConfig!); |
| unittest.expect(o.enableCiliumClusterwideNetworkPolicy!, unittest.isTrue); |
| unittest.expect(o.enableFqdnNetworkPolicy!, unittest.isTrue); |
| unittest.expect(o.enableIntraNodeVisibility!, unittest.isTrue); |
| unittest.expect(o.enableL4ilbSubsetting!, unittest.isTrue); |
| unittest.expect(o.enableMultiNetworking!, unittest.isTrue); |
| checkGatewayAPIConfig(o.gatewayApiConfig!); |
| unittest.expect(o.inTransitEncryptionConfig!, unittest.equals('foo')); |
| unittest.expect(o.network!, unittest.equals('foo')); |
| checkClusterNetworkPerformanceConfig(o.networkPerformanceConfig!); |
| unittest.expect(o.privateIpv6GoogleAccess!, unittest.equals('foo')); |
| checkServiceExternalIPsConfig(o.serviceExternalIpsConfig!); |
| unittest.expect(o.subnetwork!, unittest.equals('foo')); |
| } |
| buildCounterNetworkConfig--; |
| } |
| |
| core.int buildCounterNetworkPerformanceConfig = 0; |
| api.NetworkPerformanceConfig buildNetworkPerformanceConfig() { |
| final o = api.NetworkPerformanceConfig(); |
| buildCounterNetworkPerformanceConfig++; |
| if (buildCounterNetworkPerformanceConfig < 3) { |
| o.totalEgressBandwidthTier = 'foo'; |
| } |
| buildCounterNetworkPerformanceConfig--; |
| return o; |
| } |
| |
| void checkNetworkPerformanceConfig(api.NetworkPerformanceConfig o) { |
| buildCounterNetworkPerformanceConfig++; |
| if (buildCounterNetworkPerformanceConfig < 3) { |
| unittest.expect(o.totalEgressBandwidthTier!, unittest.equals('foo')); |
| } |
| buildCounterNetworkPerformanceConfig--; |
| } |
| |
| core.int buildCounterNetworkPolicy = 0; |
| api.NetworkPolicy buildNetworkPolicy() { |
| final o = api.NetworkPolicy(); |
| buildCounterNetworkPolicy++; |
| if (buildCounterNetworkPolicy < 3) { |
| o.enabled = true; |
| o.provider = 'foo'; |
| } |
| buildCounterNetworkPolicy--; |
| return o; |
| } |
| |
| void checkNetworkPolicy(api.NetworkPolicy o) { |
| buildCounterNetworkPolicy++; |
| if (buildCounterNetworkPolicy < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.provider!, unittest.equals('foo')); |
| } |
| buildCounterNetworkPolicy--; |
| } |
| |
| core.int buildCounterNetworkPolicyConfig = 0; |
| api.NetworkPolicyConfig buildNetworkPolicyConfig() { |
| final o = api.NetworkPolicyConfig(); |
| buildCounterNetworkPolicyConfig++; |
| if (buildCounterNetworkPolicyConfig < 3) { |
| o.disabled = true; |
| } |
| buildCounterNetworkPolicyConfig--; |
| return o; |
| } |
| |
| void checkNetworkPolicyConfig(api.NetworkPolicyConfig o) { |
| buildCounterNetworkPolicyConfig++; |
| if (buildCounterNetworkPolicyConfig < 3) { |
| unittest.expect(o.disabled!, unittest.isTrue); |
| } |
| buildCounterNetworkPolicyConfig--; |
| } |
| |
| 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 buildCounterNetworkTags = 0; |
| api.NetworkTags buildNetworkTags() { |
| final o = api.NetworkTags(); |
| buildCounterNetworkTags++; |
| if (buildCounterNetworkTags < 3) { |
| o.tags = buildUnnamed50(); |
| } |
| buildCounterNetworkTags--; |
| return o; |
| } |
| |
| void checkNetworkTags(api.NetworkTags o) { |
| buildCounterNetworkTags++; |
| if (buildCounterNetworkTags < 3) { |
| checkUnnamed50(o.tags!); |
| } |
| buildCounterNetworkTags--; |
| } |
| |
| core.int buildCounterNetworkTierConfig = 0; |
| api.NetworkTierConfig buildNetworkTierConfig() { |
| final o = api.NetworkTierConfig(); |
| buildCounterNetworkTierConfig++; |
| if (buildCounterNetworkTierConfig < 3) { |
| o.networkTier = 'foo'; |
| } |
| buildCounterNetworkTierConfig--; |
| return o; |
| } |
| |
| void checkNetworkTierConfig(api.NetworkTierConfig o) { |
| buildCounterNetworkTierConfig++; |
| if (buildCounterNetworkTierConfig < 3) { |
| unittest.expect(o.networkTier!, unittest.equals('foo')); |
| } |
| buildCounterNetworkTierConfig--; |
| } |
| |
| 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 buildCounterNodeAffinity = 0; |
| api.NodeAffinity buildNodeAffinity() { |
| final o = api.NodeAffinity(); |
| buildCounterNodeAffinity++; |
| if (buildCounterNodeAffinity < 3) { |
| o.key = 'foo'; |
| o.operator = 'foo'; |
| o.values = buildUnnamed51(); |
| } |
| buildCounterNodeAffinity--; |
| return o; |
| } |
| |
| void checkNodeAffinity(api.NodeAffinity o) { |
| buildCounterNodeAffinity++; |
| if (buildCounterNodeAffinity < 3) { |
| unittest.expect(o.key!, unittest.equals('foo')); |
| unittest.expect(o.operator!, unittest.equals('foo')); |
| checkUnnamed51(o.values!); |
| } |
| buildCounterNodeAffinity--; |
| } |
| |
| core.List<api.AcceleratorConfig> buildUnnamed52() => [ |
| buildAcceleratorConfig(), |
| buildAcceleratorConfig(), |
| ]; |
| |
| void checkUnnamed52(core.List<api.AcceleratorConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAcceleratorConfig(o[0]); |
| checkAcceleratorConfig(o[1]); |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed53() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed53(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> 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<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.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.SecondaryBootDisk> buildUnnamed57() => [ |
| buildSecondaryBootDisk(), |
| buildSecondaryBootDisk(), |
| ]; |
| |
| void checkUnnamed57(core.List<api.SecondaryBootDisk> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSecondaryBootDisk(o[0]); |
| checkSecondaryBootDisk(o[1]); |
| } |
| |
| 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.List<api.NodeTaint> buildUnnamed60() => [ |
| buildNodeTaint(), |
| buildNodeTaint(), |
| ]; |
| |
| void checkUnnamed60(core.List<api.NodeTaint> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkNodeTaint(o[0]); |
| checkNodeTaint(o[1]); |
| } |
| |
| core.int buildCounterNodeConfig = 0; |
| api.NodeConfig buildNodeConfig() { |
| final o = api.NodeConfig(); |
| buildCounterNodeConfig++; |
| if (buildCounterNodeConfig < 3) { |
| o.accelerators = buildUnnamed52(); |
| o.advancedMachineFeatures = buildAdvancedMachineFeatures(); |
| o.bootDisk = buildBootDisk(); |
| o.bootDiskKmsKey = 'foo'; |
| o.confidentialNodes = buildConfidentialNodes(); |
| o.consolidationDelay = 'foo'; |
| o.containerdConfig = buildContainerdConfig(); |
| o.diskSizeGb = 42; |
| o.diskType = 'foo'; |
| o.effectiveCgroupMode = 'foo'; |
| o.enableConfidentialStorage = true; |
| o.ephemeralStorageLocalSsdConfig = buildEphemeralStorageLocalSsdConfig(); |
| o.fastSocket = buildFastSocket(); |
| o.flexStart = true; |
| o.gcfsConfig = buildGcfsConfig(); |
| o.gpuDirectConfig = buildGPUDirectConfig(); |
| o.gvnic = buildVirtualNIC(); |
| o.imageType = 'foo'; |
| o.kubeletConfig = buildNodeKubeletConfig(); |
| o.labels = buildUnnamed53(); |
| o.linuxNodeConfig = buildLinuxNodeConfig(); |
| o.localNvmeSsdBlockConfig = buildLocalNvmeSsdBlockConfig(); |
| o.localSsdCount = 42; |
| o.localSsdEncryptionMode = 'foo'; |
| o.loggingConfig = buildNodePoolLoggingConfig(); |
| o.machineType = 'foo'; |
| o.maxRunDuration = 'foo'; |
| o.metadata = buildUnnamed54(); |
| o.minCpuPlatform = 'foo'; |
| o.nodeGroup = 'foo'; |
| o.oauthScopes = buildUnnamed55(); |
| o.preemptible = true; |
| o.reservationAffinity = buildReservationAffinity(); |
| o.resourceLabels = buildUnnamed56(); |
| o.resourceManagerTags = buildResourceManagerTags(); |
| o.sandboxConfig = buildSandboxConfig(); |
| o.secondaryBootDiskUpdateStrategy = buildSecondaryBootDiskUpdateStrategy(); |
| o.secondaryBootDisks = buildUnnamed57(); |
| o.serviceAccount = 'foo'; |
| o.shieldedInstanceConfig = buildShieldedInstanceConfig(); |
| o.soleTenantConfig = buildSoleTenantConfig(); |
| o.spot = true; |
| o.storagePools = buildUnnamed58(); |
| o.tags = buildUnnamed59(); |
| o.taintConfig = buildTaintConfig(); |
| o.taints = buildUnnamed60(); |
| o.windowsNodeConfig = buildWindowsNodeConfig(); |
| o.workloadMetadataConfig = buildWorkloadMetadataConfig(); |
| } |
| buildCounterNodeConfig--; |
| return o; |
| } |
| |
| void checkNodeConfig(api.NodeConfig o) { |
| buildCounterNodeConfig++; |
| if (buildCounterNodeConfig < 3) { |
| checkUnnamed52(o.accelerators!); |
| checkAdvancedMachineFeatures(o.advancedMachineFeatures!); |
| checkBootDisk(o.bootDisk!); |
| unittest.expect(o.bootDiskKmsKey!, unittest.equals('foo')); |
| checkConfidentialNodes(o.confidentialNodes!); |
| unittest.expect(o.consolidationDelay!, unittest.equals('foo')); |
| checkContainerdConfig(o.containerdConfig!); |
| unittest.expect(o.diskSizeGb!, unittest.equals(42)); |
| unittest.expect(o.diskType!, unittest.equals('foo')); |
| unittest.expect(o.effectiveCgroupMode!, unittest.equals('foo')); |
| unittest.expect(o.enableConfidentialStorage!, unittest.isTrue); |
| checkEphemeralStorageLocalSsdConfig(o.ephemeralStorageLocalSsdConfig!); |
| checkFastSocket(o.fastSocket!); |
| unittest.expect(o.flexStart!, unittest.isTrue); |
| checkGcfsConfig(o.gcfsConfig!); |
| checkGPUDirectConfig(o.gpuDirectConfig!); |
| checkVirtualNIC(o.gvnic!); |
| unittest.expect(o.imageType!, unittest.equals('foo')); |
| checkNodeKubeletConfig(o.kubeletConfig!); |
| checkUnnamed53(o.labels!); |
| checkLinuxNodeConfig(o.linuxNodeConfig!); |
| checkLocalNvmeSsdBlockConfig(o.localNvmeSsdBlockConfig!); |
| unittest.expect(o.localSsdCount!, unittest.equals(42)); |
| unittest.expect(o.localSsdEncryptionMode!, unittest.equals('foo')); |
| checkNodePoolLoggingConfig(o.loggingConfig!); |
| unittest.expect(o.machineType!, unittest.equals('foo')); |
| unittest.expect(o.maxRunDuration!, unittest.equals('foo')); |
| checkUnnamed54(o.metadata!); |
| unittest.expect(o.minCpuPlatform!, unittest.equals('foo')); |
| unittest.expect(o.nodeGroup!, unittest.equals('foo')); |
| checkUnnamed55(o.oauthScopes!); |
| unittest.expect(o.preemptible!, unittest.isTrue); |
| checkReservationAffinity(o.reservationAffinity!); |
| checkUnnamed56(o.resourceLabels!); |
| checkResourceManagerTags(o.resourceManagerTags!); |
| checkSandboxConfig(o.sandboxConfig!); |
| checkSecondaryBootDiskUpdateStrategy(o.secondaryBootDiskUpdateStrategy!); |
| checkUnnamed57(o.secondaryBootDisks!); |
| unittest.expect(o.serviceAccount!, unittest.equals('foo')); |
| checkShieldedInstanceConfig(o.shieldedInstanceConfig!); |
| checkSoleTenantConfig(o.soleTenantConfig!); |
| unittest.expect(o.spot!, unittest.isTrue); |
| checkUnnamed58(o.storagePools!); |
| checkUnnamed59(o.tags!); |
| checkTaintConfig(o.taintConfig!); |
| checkUnnamed60(o.taints!); |
| checkWindowsNodeConfig(o.windowsNodeConfig!); |
| checkWorkloadMetadataConfig(o.workloadMetadataConfig!); |
| } |
| buildCounterNodeConfig--; |
| } |
| |
| core.int buildCounterNodeConfigDefaults = 0; |
| api.NodeConfigDefaults buildNodeConfigDefaults() { |
| final o = api.NodeConfigDefaults(); |
| buildCounterNodeConfigDefaults++; |
| if (buildCounterNodeConfigDefaults < 3) { |
| o.containerdConfig = buildContainerdConfig(); |
| o.gcfsConfig = buildGcfsConfig(); |
| o.loggingConfig = buildNodePoolLoggingConfig(); |
| o.nodeKubeletConfig = buildNodeKubeletConfig(); |
| } |
| buildCounterNodeConfigDefaults--; |
| return o; |
| } |
| |
| void checkNodeConfigDefaults(api.NodeConfigDefaults o) { |
| buildCounterNodeConfigDefaults++; |
| if (buildCounterNodeConfigDefaults < 3) { |
| checkContainerdConfig(o.containerdConfig!); |
| checkGcfsConfig(o.gcfsConfig!); |
| checkNodePoolLoggingConfig(o.loggingConfig!); |
| checkNodeKubeletConfig(o.nodeKubeletConfig!); |
| } |
| buildCounterNodeConfigDefaults--; |
| } |
| |
| core.int buildCounterNodeDrainConfig = 0; |
| api.NodeDrainConfig buildNodeDrainConfig() { |
| final o = api.NodeDrainConfig(); |
| buildCounterNodeDrainConfig++; |
| if (buildCounterNodeDrainConfig < 3) { |
| o.respectPdbDuringNodePoolDeletion = true; |
| } |
| buildCounterNodeDrainConfig--; |
| return o; |
| } |
| |
| void checkNodeDrainConfig(api.NodeDrainConfig o) { |
| buildCounterNodeDrainConfig++; |
| if (buildCounterNodeDrainConfig < 3) { |
| unittest.expect(o.respectPdbDuringNodePoolDeletion!, unittest.isTrue); |
| } |
| buildCounterNodeDrainConfig--; |
| } |
| |
| core.int buildCounterNodeKernelModuleLoading = 0; |
| api.NodeKernelModuleLoading buildNodeKernelModuleLoading() { |
| final o = api.NodeKernelModuleLoading(); |
| buildCounterNodeKernelModuleLoading++; |
| if (buildCounterNodeKernelModuleLoading < 3) { |
| o.policy = 'foo'; |
| } |
| buildCounterNodeKernelModuleLoading--; |
| return o; |
| } |
| |
| void checkNodeKernelModuleLoading(api.NodeKernelModuleLoading o) { |
| buildCounterNodeKernelModuleLoading++; |
| if (buildCounterNodeKernelModuleLoading < 3) { |
| unittest.expect(o.policy!, unittest.equals('foo')); |
| } |
| buildCounterNodeKernelModuleLoading--; |
| } |
| |
| 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 buildCounterNodeKubeletConfig = 0; |
| api.NodeKubeletConfig buildNodeKubeletConfig() { |
| final o = api.NodeKubeletConfig(); |
| buildCounterNodeKubeletConfig++; |
| if (buildCounterNodeKubeletConfig < 3) { |
| o.allowedUnsafeSysctls = buildUnnamed61(); |
| o.containerLogMaxFiles = 42; |
| o.containerLogMaxSize = 'foo'; |
| o.cpuCfsQuota = true; |
| o.cpuCfsQuotaPeriod = 'foo'; |
| o.cpuManagerPolicy = 'foo'; |
| o.crashLoopBackOff = buildCrashLoopBackOffConfig(); |
| o.evictionMaxPodGracePeriodSeconds = 42; |
| o.evictionMinimumReclaim = buildEvictionMinimumReclaim(); |
| o.evictionSoft = buildEvictionSignals(); |
| o.evictionSoftGracePeriod = buildEvictionGracePeriod(); |
| o.imageGcHighThresholdPercent = 42; |
| o.imageGcLowThresholdPercent = 42; |
| o.imageMaximumGcAge = 'foo'; |
| o.imageMinimumGcAge = 'foo'; |
| o.insecureKubeletReadonlyPortEnabled = true; |
| o.maxParallelImagePulls = 42; |
| o.memoryManager = buildMemoryManager(); |
| o.podPidsLimit = 'foo'; |
| o.shutdownGracePeriodCriticalPodsSeconds = 42; |
| o.shutdownGracePeriodSeconds = 42; |
| o.singleProcessOomKill = true; |
| o.topologyManager = buildTopologyManager(); |
| } |
| buildCounterNodeKubeletConfig--; |
| return o; |
| } |
| |
| void checkNodeKubeletConfig(api.NodeKubeletConfig o) { |
| buildCounterNodeKubeletConfig++; |
| if (buildCounterNodeKubeletConfig < 3) { |
| checkUnnamed61(o.allowedUnsafeSysctls!); |
| unittest.expect(o.containerLogMaxFiles!, unittest.equals(42)); |
| unittest.expect(o.containerLogMaxSize!, unittest.equals('foo')); |
| unittest.expect(o.cpuCfsQuota!, unittest.isTrue); |
| unittest.expect(o.cpuCfsQuotaPeriod!, unittest.equals('foo')); |
| unittest.expect(o.cpuManagerPolicy!, unittest.equals('foo')); |
| checkCrashLoopBackOffConfig(o.crashLoopBackOff!); |
| unittest.expect(o.evictionMaxPodGracePeriodSeconds!, unittest.equals(42)); |
| checkEvictionMinimumReclaim(o.evictionMinimumReclaim!); |
| checkEvictionSignals(o.evictionSoft!); |
| checkEvictionGracePeriod(o.evictionSoftGracePeriod!); |
| unittest.expect(o.imageGcHighThresholdPercent!, unittest.equals(42)); |
| unittest.expect(o.imageGcLowThresholdPercent!, unittest.equals(42)); |
| unittest.expect(o.imageMaximumGcAge!, unittest.equals('foo')); |
| unittest.expect(o.imageMinimumGcAge!, unittest.equals('foo')); |
| unittest.expect(o.insecureKubeletReadonlyPortEnabled!, unittest.isTrue); |
| unittest.expect(o.maxParallelImagePulls!, unittest.equals(42)); |
| checkMemoryManager(o.memoryManager!); |
| unittest.expect(o.podPidsLimit!, unittest.equals('foo')); |
| unittest.expect( |
| o.shutdownGracePeriodCriticalPodsSeconds!, |
| unittest.equals(42), |
| ); |
| unittest.expect(o.shutdownGracePeriodSeconds!, unittest.equals(42)); |
| unittest.expect(o.singleProcessOomKill!, unittest.isTrue); |
| checkTopologyManager(o.topologyManager!); |
| } |
| buildCounterNodeKubeletConfig--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed62() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed62(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 buildCounterNodeLabels = 0; |
| api.NodeLabels buildNodeLabels() { |
| final o = api.NodeLabels(); |
| buildCounterNodeLabels++; |
| if (buildCounterNodeLabels < 3) { |
| o.labels = buildUnnamed62(); |
| } |
| buildCounterNodeLabels--; |
| return o; |
| } |
| |
| void checkNodeLabels(api.NodeLabels o) { |
| buildCounterNodeLabels++; |
| if (buildCounterNodeLabels < 3) { |
| checkUnnamed62(o.labels!); |
| } |
| buildCounterNodeLabels--; |
| } |
| |
| core.int buildCounterNodeManagement = 0; |
| api.NodeManagement buildNodeManagement() { |
| final o = api.NodeManagement(); |
| buildCounterNodeManagement++; |
| if (buildCounterNodeManagement < 3) { |
| o.autoRepair = true; |
| o.autoUpgrade = true; |
| o.upgradeOptions = buildAutoUpgradeOptions(); |
| } |
| buildCounterNodeManagement--; |
| return o; |
| } |
| |
| void checkNodeManagement(api.NodeManagement o) { |
| buildCounterNodeManagement++; |
| if (buildCounterNodeManagement < 3) { |
| unittest.expect(o.autoRepair!, unittest.isTrue); |
| unittest.expect(o.autoUpgrade!, unittest.isTrue); |
| checkAutoUpgradeOptions(o.upgradeOptions!); |
| } |
| buildCounterNodeManagement--; |
| } |
| |
| core.List<api.AdditionalNodeNetworkConfig> buildUnnamed63() => [ |
| buildAdditionalNodeNetworkConfig(), |
| buildAdditionalNodeNetworkConfig(), |
| ]; |
| |
| void checkUnnamed63(core.List<api.AdditionalNodeNetworkConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAdditionalNodeNetworkConfig(o[0]); |
| checkAdditionalNodeNetworkConfig(o[1]); |
| } |
| |
| core.List<api.AdditionalPodNetworkConfig> buildUnnamed64() => [ |
| buildAdditionalPodNetworkConfig(), |
| buildAdditionalPodNetworkConfig(), |
| ]; |
| |
| void checkUnnamed64(core.List<api.AdditionalPodNetworkConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAdditionalPodNetworkConfig(o[0]); |
| checkAdditionalPodNetworkConfig(o[1]); |
| } |
| |
| core.int buildCounterNodeNetworkConfig = 0; |
| api.NodeNetworkConfig buildNodeNetworkConfig() { |
| final o = api.NodeNetworkConfig(); |
| buildCounterNodeNetworkConfig++; |
| if (buildCounterNodeNetworkConfig < 3) { |
| o.acceleratorNetworkProfile = 'foo'; |
| o.additionalNodeNetworkConfigs = buildUnnamed63(); |
| o.additionalPodNetworkConfigs = buildUnnamed64(); |
| o.createPodRange = true; |
| o.enablePrivateNodes = true; |
| o.networkPerformanceConfig = buildNetworkPerformanceConfig(); |
| o.networkTierConfig = buildNetworkTierConfig(); |
| o.podCidrOverprovisionConfig = buildPodCIDROverprovisionConfig(); |
| o.podIpv4CidrBlock = 'foo'; |
| o.podIpv4RangeUtilization = 42.0; |
| o.podRange = 'foo'; |
| o.subnetwork = 'foo'; |
| } |
| buildCounterNodeNetworkConfig--; |
| return o; |
| } |
| |
| void checkNodeNetworkConfig(api.NodeNetworkConfig o) { |
| buildCounterNodeNetworkConfig++; |
| if (buildCounterNodeNetworkConfig < 3) { |
| unittest.expect(o.acceleratorNetworkProfile!, unittest.equals('foo')); |
| checkUnnamed63(o.additionalNodeNetworkConfigs!); |
| checkUnnamed64(o.additionalPodNetworkConfigs!); |
| unittest.expect(o.createPodRange!, unittest.isTrue); |
| unittest.expect(o.enablePrivateNodes!, unittest.isTrue); |
| checkNetworkPerformanceConfig(o.networkPerformanceConfig!); |
| checkNetworkTierConfig(o.networkTierConfig!); |
| checkPodCIDROverprovisionConfig(o.podCidrOverprovisionConfig!); |
| unittest.expect(o.podIpv4CidrBlock!, unittest.equals('foo')); |
| unittest.expect(o.podIpv4RangeUtilization!, unittest.equals(42.0)); |
| unittest.expect(o.podRange!, unittest.equals('foo')); |
| unittest.expect(o.subnetwork!, unittest.equals('foo')); |
| } |
| buildCounterNodeNetworkConfig--; |
| } |
| |
| core.List<api.StatusCondition> buildUnnamed65() => [ |
| buildStatusCondition(), |
| buildStatusCondition(), |
| ]; |
| |
| void checkUnnamed65(core.List<api.StatusCondition> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkStatusCondition(o[0]); |
| checkStatusCondition(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 buildCounterNodePool = 0; |
| api.NodePool buildNodePool() { |
| final o = api.NodePool(); |
| buildCounterNodePool++; |
| if (buildCounterNodePool < 3) { |
| o.autopilotConfig = buildAutopilotConfig(); |
| o.autoscaling = buildNodePoolAutoscaling(); |
| o.bestEffortProvisioning = buildBestEffortProvisioning(); |
| o.conditions = buildUnnamed65(); |
| o.config = buildNodeConfig(); |
| o.etag = 'foo'; |
| o.initialNodeCount = 42; |
| o.instanceGroupUrls = buildUnnamed66(); |
| o.locations = buildUnnamed67(); |
| o.management = buildNodeManagement(); |
| o.maxPodsConstraint = buildMaxPodsConstraint(); |
| o.name = 'foo'; |
| o.networkConfig = buildNodeNetworkConfig(); |
| o.nodeDrainConfig = buildNodeDrainConfig(); |
| o.placementPolicy = buildPlacementPolicy(); |
| o.podIpv4CidrSize = 42; |
| o.queuedProvisioning = buildQueuedProvisioning(); |
| o.selfLink = 'foo'; |
| o.status = 'foo'; |
| o.statusMessage = 'foo'; |
| o.updateInfo = buildUpdateInfo(); |
| o.upgradeSettings = buildUpgradeSettings(); |
| o.version = 'foo'; |
| } |
| buildCounterNodePool--; |
| return o; |
| } |
| |
| void checkNodePool(api.NodePool o) { |
| buildCounterNodePool++; |
| if (buildCounterNodePool < 3) { |
| checkAutopilotConfig(o.autopilotConfig!); |
| checkNodePoolAutoscaling(o.autoscaling!); |
| checkBestEffortProvisioning(o.bestEffortProvisioning!); |
| checkUnnamed65(o.conditions!); |
| checkNodeConfig(o.config!); |
| unittest.expect(o.etag!, unittest.equals('foo')); |
| unittest.expect(o.initialNodeCount!, unittest.equals(42)); |
| checkUnnamed66(o.instanceGroupUrls!); |
| checkUnnamed67(o.locations!); |
| checkNodeManagement(o.management!); |
| checkMaxPodsConstraint(o.maxPodsConstraint!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkNodeNetworkConfig(o.networkConfig!); |
| checkNodeDrainConfig(o.nodeDrainConfig!); |
| checkPlacementPolicy(o.placementPolicy!); |
| unittest.expect(o.podIpv4CidrSize!, unittest.equals(42)); |
| checkQueuedProvisioning(o.queuedProvisioning!); |
| unittest.expect(o.selfLink!, unittest.equals('foo')); |
| unittest.expect(o.status!, unittest.equals('foo')); |
| unittest.expect(o.statusMessage!, unittest.equals('foo')); |
| checkUpdateInfo(o.updateInfo!); |
| checkUpgradeSettings(o.upgradeSettings!); |
| unittest.expect(o.version!, unittest.equals('foo')); |
| } |
| buildCounterNodePool--; |
| } |
| |
| core.int buildCounterNodePoolAutoConfig = 0; |
| api.NodePoolAutoConfig buildNodePoolAutoConfig() { |
| final o = api.NodePoolAutoConfig(); |
| buildCounterNodePoolAutoConfig++; |
| if (buildCounterNodePoolAutoConfig < 3) { |
| o.linuxNodeConfig = buildLinuxNodeConfig(); |
| o.networkTags = buildNetworkTags(); |
| o.nodeKubeletConfig = buildNodeKubeletConfig(); |
| o.resourceManagerTags = buildResourceManagerTags(); |
| } |
| buildCounterNodePoolAutoConfig--; |
| return o; |
| } |
| |
| void checkNodePoolAutoConfig(api.NodePoolAutoConfig o) { |
| buildCounterNodePoolAutoConfig++; |
| if (buildCounterNodePoolAutoConfig < 3) { |
| checkLinuxNodeConfig(o.linuxNodeConfig!); |
| checkNetworkTags(o.networkTags!); |
| checkNodeKubeletConfig(o.nodeKubeletConfig!); |
| checkResourceManagerTags(o.resourceManagerTags!); |
| } |
| buildCounterNodePoolAutoConfig--; |
| } |
| |
| core.int buildCounterNodePoolAutoscaling = 0; |
| api.NodePoolAutoscaling buildNodePoolAutoscaling() { |
| final o = api.NodePoolAutoscaling(); |
| buildCounterNodePoolAutoscaling++; |
| if (buildCounterNodePoolAutoscaling < 3) { |
| o.autoprovisioned = true; |
| o.enabled = true; |
| o.locationPolicy = 'foo'; |
| o.maxNodeCount = 42; |
| o.minNodeCount = 42; |
| o.totalMaxNodeCount = 42; |
| o.totalMinNodeCount = 42; |
| } |
| buildCounterNodePoolAutoscaling--; |
| return o; |
| } |
| |
| void checkNodePoolAutoscaling(api.NodePoolAutoscaling o) { |
| buildCounterNodePoolAutoscaling++; |
| if (buildCounterNodePoolAutoscaling < 3) { |
| unittest.expect(o.autoprovisioned!, unittest.isTrue); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.locationPolicy!, unittest.equals('foo')); |
| unittest.expect(o.maxNodeCount!, unittest.equals(42)); |
| unittest.expect(o.minNodeCount!, unittest.equals(42)); |
| unittest.expect(o.totalMaxNodeCount!, unittest.equals(42)); |
| unittest.expect(o.totalMinNodeCount!, unittest.equals(42)); |
| } |
| buildCounterNodePoolAutoscaling--; |
| } |
| |
| core.int buildCounterNodePoolDefaults = 0; |
| api.NodePoolDefaults buildNodePoolDefaults() { |
| final o = api.NodePoolDefaults(); |
| buildCounterNodePoolDefaults++; |
| if (buildCounterNodePoolDefaults < 3) { |
| o.nodeConfigDefaults = buildNodeConfigDefaults(); |
| } |
| buildCounterNodePoolDefaults--; |
| return o; |
| } |
| |
| void checkNodePoolDefaults(api.NodePoolDefaults o) { |
| buildCounterNodePoolDefaults++; |
| if (buildCounterNodePoolDefaults < 3) { |
| checkNodeConfigDefaults(o.nodeConfigDefaults!); |
| } |
| buildCounterNodePoolDefaults--; |
| } |
| |
| core.int buildCounterNodePoolLoggingConfig = 0; |
| api.NodePoolLoggingConfig buildNodePoolLoggingConfig() { |
| final o = api.NodePoolLoggingConfig(); |
| buildCounterNodePoolLoggingConfig++; |
| if (buildCounterNodePoolLoggingConfig < 3) { |
| o.variantConfig = buildLoggingVariantConfig(); |
| } |
| buildCounterNodePoolLoggingConfig--; |
| return o; |
| } |
| |
| void checkNodePoolLoggingConfig(api.NodePoolLoggingConfig o) { |
| buildCounterNodePoolLoggingConfig++; |
| if (buildCounterNodePoolLoggingConfig < 3) { |
| checkLoggingVariantConfig(o.variantConfig!); |
| } |
| buildCounterNodePoolLoggingConfig--; |
| } |
| |
| 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<core.String> buildUnnamed69() => ['foo', 'foo']; |
| |
| void checkUnnamed69(core.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.UpgradeDetails> buildUnnamed70() => [ |
| buildUpgradeDetails(), |
| buildUpgradeDetails(), |
| ]; |
| |
| void checkUnnamed70(core.List<api.UpgradeDetails> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUpgradeDetails(o[0]); |
| checkUpgradeDetails(o[1]); |
| } |
| |
| core.int buildCounterNodePoolUpgradeInfo = 0; |
| api.NodePoolUpgradeInfo buildNodePoolUpgradeInfo() { |
| final o = api.NodePoolUpgradeInfo(); |
| buildCounterNodePoolUpgradeInfo++; |
| if (buildCounterNodePoolUpgradeInfo < 3) { |
| o.autoUpgradeStatus = buildUnnamed68(); |
| o.endOfExtendedSupportTimestamp = 'foo'; |
| o.endOfStandardSupportTimestamp = 'foo'; |
| o.minorTargetVersion = 'foo'; |
| o.patchTargetVersion = 'foo'; |
| o.pausedReason = buildUnnamed69(); |
| o.upgradeDetails = buildUnnamed70(); |
| } |
| buildCounterNodePoolUpgradeInfo--; |
| return o; |
| } |
| |
| void checkNodePoolUpgradeInfo(api.NodePoolUpgradeInfo o) { |
| buildCounterNodePoolUpgradeInfo++; |
| if (buildCounterNodePoolUpgradeInfo < 3) { |
| checkUnnamed68(o.autoUpgradeStatus!); |
| unittest.expect(o.endOfExtendedSupportTimestamp!, unittest.equals('foo')); |
| unittest.expect(o.endOfStandardSupportTimestamp!, unittest.equals('foo')); |
| unittest.expect(o.minorTargetVersion!, unittest.equals('foo')); |
| unittest.expect(o.patchTargetVersion!, unittest.equals('foo')); |
| checkUnnamed69(o.pausedReason!); |
| checkUnnamed70(o.upgradeDetails!); |
| } |
| buildCounterNodePoolUpgradeInfo--; |
| } |
| |
| core.int buildCounterNodeTaint = 0; |
| api.NodeTaint buildNodeTaint() { |
| final o = api.NodeTaint(); |
| buildCounterNodeTaint++; |
| if (buildCounterNodeTaint < 3) { |
| o.effect = 'foo'; |
| o.key = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterNodeTaint--; |
| return o; |
| } |
| |
| void checkNodeTaint(api.NodeTaint o) { |
| buildCounterNodeTaint++; |
| if (buildCounterNodeTaint < 3) { |
| unittest.expect(o.effect!, unittest.equals('foo')); |
| unittest.expect(o.key!, unittest.equals('foo')); |
| unittest.expect(o.value!, unittest.equals('foo')); |
| } |
| buildCounterNodeTaint--; |
| } |
| |
| core.List<api.NodeTaint> buildUnnamed71() => [ |
| buildNodeTaint(), |
| buildNodeTaint(), |
| ]; |
| |
| void checkUnnamed71(core.List<api.NodeTaint> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkNodeTaint(o[0]); |
| checkNodeTaint(o[1]); |
| } |
| |
| core.int buildCounterNodeTaints = 0; |
| api.NodeTaints buildNodeTaints() { |
| final o = api.NodeTaints(); |
| buildCounterNodeTaints++; |
| if (buildCounterNodeTaints < 3) { |
| o.taints = buildUnnamed71(); |
| } |
| buildCounterNodeTaints--; |
| return o; |
| } |
| |
| void checkNodeTaints(api.NodeTaints o) { |
| buildCounterNodeTaints++; |
| if (buildCounterNodeTaints < 3) { |
| checkUnnamed71(o.taints!); |
| } |
| buildCounterNodeTaints--; |
| } |
| |
| core.int buildCounterNotificationConfig = 0; |
| api.NotificationConfig buildNotificationConfig() { |
| final o = api.NotificationConfig(); |
| buildCounterNotificationConfig++; |
| if (buildCounterNotificationConfig < 3) { |
| o.pubsub = buildPubSub(); |
| } |
| buildCounterNotificationConfig--; |
| return o; |
| } |
| |
| void checkNotificationConfig(api.NotificationConfig o) { |
| buildCounterNotificationConfig++; |
| if (buildCounterNotificationConfig < 3) { |
| checkPubSub(o.pubsub!); |
| } |
| buildCounterNotificationConfig--; |
| } |
| |
| core.List<api.StatusCondition> buildUnnamed72() => [ |
| buildStatusCondition(), |
| buildStatusCondition(), |
| ]; |
| |
| void checkUnnamed72(core.List<api.StatusCondition> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkStatusCondition(o[0]); |
| checkStatusCondition(o[1]); |
| } |
| |
| core.List<api.StatusCondition> buildUnnamed73() => [ |
| buildStatusCondition(), |
| buildStatusCondition(), |
| ]; |
| |
| void checkUnnamed73(core.List<api.StatusCondition> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkStatusCondition(o[0]); |
| checkStatusCondition(o[1]); |
| } |
| |
| core.int buildCounterOperation = 0; |
| api.Operation buildOperation() { |
| final o = api.Operation(); |
| buildCounterOperation++; |
| if (buildCounterOperation < 3) { |
| o.clusterConditions = buildUnnamed72(); |
| o.detail = 'foo'; |
| o.endTime = 'foo'; |
| o.error = buildStatus(); |
| o.location = 'foo'; |
| o.name = 'foo'; |
| o.nodepoolConditions = buildUnnamed73(); |
| o.operationType = 'foo'; |
| o.progress = buildOperationProgress(); |
| o.selfLink = 'foo'; |
| o.startTime = 'foo'; |
| o.status = 'foo'; |
| o.statusMessage = 'foo'; |
| o.targetLink = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterOperation--; |
| return o; |
| } |
| |
| void checkOperation(api.Operation o) { |
| buildCounterOperation++; |
| if (buildCounterOperation < 3) { |
| checkUnnamed72(o.clusterConditions!); |
| unittest.expect(o.detail!, unittest.equals('foo')); |
| unittest.expect(o.endTime!, unittest.equals('foo')); |
| checkStatus(o.error!); |
| unittest.expect(o.location!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkUnnamed73(o.nodepoolConditions!); |
| unittest.expect(o.operationType!, unittest.equals('foo')); |
| checkOperationProgress(o.progress!); |
| unittest.expect(o.selfLink!, unittest.equals('foo')); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| unittest.expect(o.status!, unittest.equals('foo')); |
| unittest.expect(o.statusMessage!, unittest.equals('foo')); |
| unittest.expect(o.targetLink!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterOperation--; |
| } |
| |
| core.int buildCounterOperationError = 0; |
| api.OperationError buildOperationError() { |
| final o = api.OperationError(); |
| buildCounterOperationError++; |
| if (buildCounterOperationError < 3) { |
| o.errorMessage = 'foo'; |
| o.keyName = 'foo'; |
| o.timestamp = 'foo'; |
| } |
| buildCounterOperationError--; |
| return o; |
| } |
| |
| void checkOperationError(api.OperationError o) { |
| buildCounterOperationError++; |
| if (buildCounterOperationError < 3) { |
| unittest.expect(o.errorMessage!, unittest.equals('foo')); |
| unittest.expect(o.keyName!, unittest.equals('foo')); |
| unittest.expect(o.timestamp!, unittest.equals('foo')); |
| } |
| buildCounterOperationError--; |
| } |
| |
| core.List<api.Metric> buildUnnamed74() => [buildMetric(), buildMetric()]; |
| |
| void checkUnnamed74(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0]); |
| checkMetric(o[1]); |
| } |
| |
| core.List<api.OperationProgress> buildUnnamed75() => [ |
| buildOperationProgress(), |
| buildOperationProgress(), |
| ]; |
| |
| void checkUnnamed75(core.List<api.OperationProgress> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOperationProgress(o[0]); |
| checkOperationProgress(o[1]); |
| } |
| |
| core.int buildCounterOperationProgress = 0; |
| api.OperationProgress buildOperationProgress() { |
| final o = api.OperationProgress(); |
| buildCounterOperationProgress++; |
| if (buildCounterOperationProgress < 3) { |
| o.metrics = buildUnnamed74(); |
| o.name = 'foo'; |
| o.stages = buildUnnamed75(); |
| o.status = 'foo'; |
| } |
| buildCounterOperationProgress--; |
| return o; |
| } |
| |
| void checkOperationProgress(api.OperationProgress o) { |
| buildCounterOperationProgress++; |
| if (buildCounterOperationProgress < 3) { |
| checkUnnamed74(o.metrics!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkUnnamed75(o.stages!); |
| unittest.expect(o.status!, unittest.equals('foo')); |
| } |
| buildCounterOperationProgress--; |
| } |
| |
| core.int buildCounterParallelstoreCsiDriverConfig = 0; |
| api.ParallelstoreCsiDriverConfig buildParallelstoreCsiDriverConfig() { |
| final o = api.ParallelstoreCsiDriverConfig(); |
| buildCounterParallelstoreCsiDriverConfig++; |
| if (buildCounterParallelstoreCsiDriverConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterParallelstoreCsiDriverConfig--; |
| return o; |
| } |
| |
| void checkParallelstoreCsiDriverConfig(api.ParallelstoreCsiDriverConfig o) { |
| buildCounterParallelstoreCsiDriverConfig++; |
| if (buildCounterParallelstoreCsiDriverConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterParallelstoreCsiDriverConfig--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed76() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed76(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 buildCounterParentProductConfig = 0; |
| api.ParentProductConfig buildParentProductConfig() { |
| final o = api.ParentProductConfig(); |
| buildCounterParentProductConfig++; |
| if (buildCounterParentProductConfig < 3) { |
| o.labels = buildUnnamed76(); |
| o.productName = 'foo'; |
| } |
| buildCounterParentProductConfig--; |
| return o; |
| } |
| |
| void checkParentProductConfig(api.ParentProductConfig o) { |
| buildCounterParentProductConfig++; |
| if (buildCounterParentProductConfig < 3) { |
| checkUnnamed76(o.labels!); |
| unittest.expect(o.productName!, unittest.equals('foo')); |
| } |
| buildCounterParentProductConfig--; |
| } |
| |
| core.int buildCounterPlacementPolicy = 0; |
| api.PlacementPolicy buildPlacementPolicy() { |
| final o = api.PlacementPolicy(); |
| buildCounterPlacementPolicy++; |
| if (buildCounterPlacementPolicy < 3) { |
| o.policyName = 'foo'; |
| o.tpuTopology = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterPlacementPolicy--; |
| return o; |
| } |
| |
| void checkPlacementPolicy(api.PlacementPolicy o) { |
| buildCounterPlacementPolicy++; |
| if (buildCounterPlacementPolicy < 3) { |
| unittest.expect(o.policyName!, unittest.equals('foo')); |
| unittest.expect(o.tpuTopology!, unittest.equals('foo')); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterPlacementPolicy--; |
| } |
| |
| core.int buildCounterPodAutoscaling = 0; |
| api.PodAutoscaling buildPodAutoscaling() { |
| final o = api.PodAutoscaling(); |
| buildCounterPodAutoscaling++; |
| if (buildCounterPodAutoscaling < 3) { |
| o.hpaProfile = 'foo'; |
| } |
| buildCounterPodAutoscaling--; |
| return o; |
| } |
| |
| void checkPodAutoscaling(api.PodAutoscaling o) { |
| buildCounterPodAutoscaling++; |
| if (buildCounterPodAutoscaling < 3) { |
| unittest.expect(o.hpaProfile!, unittest.equals('foo')); |
| } |
| buildCounterPodAutoscaling--; |
| } |
| |
| core.int buildCounterPodCIDROverprovisionConfig = 0; |
| api.PodCIDROverprovisionConfig buildPodCIDROverprovisionConfig() { |
| final o = api.PodCIDROverprovisionConfig(); |
| buildCounterPodCIDROverprovisionConfig++; |
| if (buildCounterPodCIDROverprovisionConfig < 3) { |
| o.disable = true; |
| } |
| buildCounterPodCIDROverprovisionConfig--; |
| return o; |
| } |
| |
| void checkPodCIDROverprovisionConfig(api.PodCIDROverprovisionConfig o) { |
| buildCounterPodCIDROverprovisionConfig++; |
| if (buildCounterPodCIDROverprovisionConfig < 3) { |
| unittest.expect(o.disable!, unittest.isTrue); |
| } |
| buildCounterPodCIDROverprovisionConfig--; |
| } |
| |
| core.int buildCounterPodSnapshotConfig = 0; |
| api.PodSnapshotConfig buildPodSnapshotConfig() { |
| final o = api.PodSnapshotConfig(); |
| buildCounterPodSnapshotConfig++; |
| if (buildCounterPodSnapshotConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterPodSnapshotConfig--; |
| return o; |
| } |
| |
| void checkPodSnapshotConfig(api.PodSnapshotConfig o) { |
| buildCounterPodSnapshotConfig++; |
| if (buildCounterPodSnapshotConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterPodSnapshotConfig--; |
| } |
| |
| core.int buildCounterPrivateClusterConfig = 0; |
| api.PrivateClusterConfig buildPrivateClusterConfig() { |
| final o = api.PrivateClusterConfig(); |
| buildCounterPrivateClusterConfig++; |
| if (buildCounterPrivateClusterConfig < 3) { |
| o.enablePrivateEndpoint = true; |
| o.enablePrivateNodes = true; |
| o.masterGlobalAccessConfig = buildPrivateClusterMasterGlobalAccessConfig(); |
| o.masterIpv4CidrBlock = 'foo'; |
| o.peeringName = 'foo'; |
| o.privateEndpoint = 'foo'; |
| o.privateEndpointSubnetwork = 'foo'; |
| o.publicEndpoint = 'foo'; |
| } |
| buildCounterPrivateClusterConfig--; |
| return o; |
| } |
| |
| void checkPrivateClusterConfig(api.PrivateClusterConfig o) { |
| buildCounterPrivateClusterConfig++; |
| if (buildCounterPrivateClusterConfig < 3) { |
| unittest.expect(o.enablePrivateEndpoint!, unittest.isTrue); |
| unittest.expect(o.enablePrivateNodes!, unittest.isTrue); |
| checkPrivateClusterMasterGlobalAccessConfig(o.masterGlobalAccessConfig!); |
| unittest.expect(o.masterIpv4CidrBlock!, unittest.equals('foo')); |
| unittest.expect(o.peeringName!, unittest.equals('foo')); |
| unittest.expect(o.privateEndpoint!, unittest.equals('foo')); |
| unittest.expect(o.privateEndpointSubnetwork!, unittest.equals('foo')); |
| unittest.expect(o.publicEndpoint!, unittest.equals('foo')); |
| } |
| buildCounterPrivateClusterConfig--; |
| } |
| |
| core.int buildCounterPrivateClusterMasterGlobalAccessConfig = 0; |
| api.PrivateClusterMasterGlobalAccessConfig |
| buildPrivateClusterMasterGlobalAccessConfig() { |
| final o = api.PrivateClusterMasterGlobalAccessConfig(); |
| buildCounterPrivateClusterMasterGlobalAccessConfig++; |
| if (buildCounterPrivateClusterMasterGlobalAccessConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterPrivateClusterMasterGlobalAccessConfig--; |
| return o; |
| } |
| |
| void checkPrivateClusterMasterGlobalAccessConfig( |
| api.PrivateClusterMasterGlobalAccessConfig o, |
| ) { |
| buildCounterPrivateClusterMasterGlobalAccessConfig++; |
| if (buildCounterPrivateClusterMasterGlobalAccessConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterPrivateClusterMasterGlobalAccessConfig--; |
| } |
| |
| core.List<api.CertificateAuthorityDomainConfig> buildUnnamed77() => [ |
| buildCertificateAuthorityDomainConfig(), |
| buildCertificateAuthorityDomainConfig(), |
| ]; |
| |
| void checkUnnamed77(core.List<api.CertificateAuthorityDomainConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCertificateAuthorityDomainConfig(o[0]); |
| checkCertificateAuthorityDomainConfig(o[1]); |
| } |
| |
| core.int buildCounterPrivateRegistryAccessConfig = 0; |
| api.PrivateRegistryAccessConfig buildPrivateRegistryAccessConfig() { |
| final o = api.PrivateRegistryAccessConfig(); |
| buildCounterPrivateRegistryAccessConfig++; |
| if (buildCounterPrivateRegistryAccessConfig < 3) { |
| o.certificateAuthorityDomainConfig = buildUnnamed77(); |
| o.enabled = true; |
| } |
| buildCounterPrivateRegistryAccessConfig--; |
| return o; |
| } |
| |
| void checkPrivateRegistryAccessConfig(api.PrivateRegistryAccessConfig o) { |
| buildCounterPrivateRegistryAccessConfig++; |
| if (buildCounterPrivateRegistryAccessConfig < 3) { |
| checkUnnamed77(o.certificateAuthorityDomainConfig!); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterPrivateRegistryAccessConfig--; |
| } |
| |
| core.List<core.String> buildUnnamed78() => ['foo', 'foo']; |
| |
| void checkUnnamed78(core.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 buildCounterPrivilegedAdmissionConfig = 0; |
| api.PrivilegedAdmissionConfig buildPrivilegedAdmissionConfig() { |
| final o = api.PrivilegedAdmissionConfig(); |
| buildCounterPrivilegedAdmissionConfig++; |
| if (buildCounterPrivilegedAdmissionConfig < 3) { |
| o.allowlistPaths = buildUnnamed78(); |
| } |
| buildCounterPrivilegedAdmissionConfig--; |
| return o; |
| } |
| |
| void checkPrivilegedAdmissionConfig(api.PrivilegedAdmissionConfig o) { |
| buildCounterPrivilegedAdmissionConfig++; |
| if (buildCounterPrivilegedAdmissionConfig < 3) { |
| checkUnnamed78(o.allowlistPaths!); |
| } |
| buildCounterPrivilegedAdmissionConfig--; |
| } |
| |
| core.int buildCounterPubSub = 0; |
| api.PubSub buildPubSub() { |
| final o = api.PubSub(); |
| buildCounterPubSub++; |
| if (buildCounterPubSub < 3) { |
| o.enabled = true; |
| o.filter = buildFilter(); |
| o.topic = 'foo'; |
| } |
| buildCounterPubSub--; |
| return o; |
| } |
| |
| void checkPubSub(api.PubSub o) { |
| buildCounterPubSub++; |
| if (buildCounterPubSub < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| checkFilter(o.filter!); |
| unittest.expect(o.topic!, unittest.equals('foo')); |
| } |
| buildCounterPubSub--; |
| } |
| |
| core.int buildCounterQueuedProvisioning = 0; |
| api.QueuedProvisioning buildQueuedProvisioning() { |
| final o = api.QueuedProvisioning(); |
| buildCounterQueuedProvisioning++; |
| if (buildCounterQueuedProvisioning < 3) { |
| o.enabled = true; |
| } |
| buildCounterQueuedProvisioning--; |
| return o; |
| } |
| |
| void checkQueuedProvisioning(api.QueuedProvisioning o) { |
| buildCounterQueuedProvisioning++; |
| if (buildCounterQueuedProvisioning < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterQueuedProvisioning--; |
| } |
| |
| core.int buildCounterRBACBindingConfig = 0; |
| api.RBACBindingConfig buildRBACBindingConfig() { |
| final o = api.RBACBindingConfig(); |
| buildCounterRBACBindingConfig++; |
| if (buildCounterRBACBindingConfig < 3) { |
| o.enableInsecureBindingSystemAuthenticated = true; |
| o.enableInsecureBindingSystemUnauthenticated = true; |
| } |
| buildCounterRBACBindingConfig--; |
| return o; |
| } |
| |
| void checkRBACBindingConfig(api.RBACBindingConfig o) { |
| buildCounterRBACBindingConfig++; |
| if (buildCounterRBACBindingConfig < 3) { |
| unittest.expect( |
| o.enableInsecureBindingSystemAuthenticated!, |
| unittest.isTrue, |
| ); |
| unittest.expect( |
| o.enableInsecureBindingSystemUnauthenticated!, |
| unittest.isTrue, |
| ); |
| } |
| buildCounterRBACBindingConfig--; |
| } |
| |
| core.int buildCounterRangeInfo = 0; |
| api.RangeInfo buildRangeInfo() { |
| final o = api.RangeInfo(); |
| buildCounterRangeInfo++; |
| if (buildCounterRangeInfo < 3) { |
| o.rangeName = 'foo'; |
| o.utilization = 42.0; |
| } |
| buildCounterRangeInfo--; |
| return o; |
| } |
| |
| void checkRangeInfo(api.RangeInfo o) { |
| buildCounterRangeInfo++; |
| if (buildCounterRangeInfo < 3) { |
| unittest.expect(o.rangeName!, unittest.equals('foo')); |
| unittest.expect(o.utilization!, unittest.equals(42.0)); |
| } |
| buildCounterRangeInfo--; |
| } |
| |
| core.int buildCounterRayClusterLoggingConfig = 0; |
| api.RayClusterLoggingConfig buildRayClusterLoggingConfig() { |
| final o = api.RayClusterLoggingConfig(); |
| buildCounterRayClusterLoggingConfig++; |
| if (buildCounterRayClusterLoggingConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterRayClusterLoggingConfig--; |
| return o; |
| } |
| |
| void checkRayClusterLoggingConfig(api.RayClusterLoggingConfig o) { |
| buildCounterRayClusterLoggingConfig++; |
| if (buildCounterRayClusterLoggingConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterRayClusterLoggingConfig--; |
| } |
| |
| core.int buildCounterRayClusterMonitoringConfig = 0; |
| api.RayClusterMonitoringConfig buildRayClusterMonitoringConfig() { |
| final o = api.RayClusterMonitoringConfig(); |
| buildCounterRayClusterMonitoringConfig++; |
| if (buildCounterRayClusterMonitoringConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterRayClusterMonitoringConfig--; |
| return o; |
| } |
| |
| void checkRayClusterMonitoringConfig(api.RayClusterMonitoringConfig o) { |
| buildCounterRayClusterMonitoringConfig++; |
| if (buildCounterRayClusterMonitoringConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterRayClusterMonitoringConfig--; |
| } |
| |
| core.int buildCounterRayOperatorConfig = 0; |
| api.RayOperatorConfig buildRayOperatorConfig() { |
| final o = api.RayOperatorConfig(); |
| buildCounterRayOperatorConfig++; |
| if (buildCounterRayOperatorConfig < 3) { |
| o.enabled = true; |
| o.rayClusterLoggingConfig = buildRayClusterLoggingConfig(); |
| o.rayClusterMonitoringConfig = buildRayClusterMonitoringConfig(); |
| } |
| buildCounterRayOperatorConfig--; |
| return o; |
| } |
| |
| void checkRayOperatorConfig(api.RayOperatorConfig o) { |
| buildCounterRayOperatorConfig++; |
| if (buildCounterRayOperatorConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| checkRayClusterLoggingConfig(o.rayClusterLoggingConfig!); |
| checkRayClusterMonitoringConfig(o.rayClusterMonitoringConfig!); |
| } |
| buildCounterRayOperatorConfig--; |
| } |
| |
| core.int buildCounterRecurringTimeWindow = 0; |
| api.RecurringTimeWindow buildRecurringTimeWindow() { |
| final o = api.RecurringTimeWindow(); |
| buildCounterRecurringTimeWindow++; |
| if (buildCounterRecurringTimeWindow < 3) { |
| o.recurrence = 'foo'; |
| o.window = buildTimeWindow(); |
| } |
| buildCounterRecurringTimeWindow--; |
| return o; |
| } |
| |
| void checkRecurringTimeWindow(api.RecurringTimeWindow o) { |
| buildCounterRecurringTimeWindow++; |
| if (buildCounterRecurringTimeWindow < 3) { |
| unittest.expect(o.recurrence!, unittest.equals('foo')); |
| checkTimeWindow(o.window!); |
| } |
| buildCounterRecurringTimeWindow--; |
| } |
| |
| 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.int buildCounterRegistryHeader = 0; |
| api.RegistryHeader buildRegistryHeader() { |
| final o = api.RegistryHeader(); |
| buildCounterRegistryHeader++; |
| if (buildCounterRegistryHeader < 3) { |
| o.key = 'foo'; |
| o.value = buildUnnamed79(); |
| } |
| buildCounterRegistryHeader--; |
| return o; |
| } |
| |
| void checkRegistryHeader(api.RegistryHeader o) { |
| buildCounterRegistryHeader++; |
| if (buildCounterRegistryHeader < 3) { |
| unittest.expect(o.key!, unittest.equals('foo')); |
| checkUnnamed79(o.value!); |
| } |
| buildCounterRegistryHeader--; |
| } |
| |
| core.List<api.HostConfig> buildUnnamed80() => [ |
| buildHostConfig(), |
| buildHostConfig(), |
| ]; |
| |
| void checkUnnamed80(core.List<api.HostConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkHostConfig(o[0]); |
| checkHostConfig(o[1]); |
| } |
| |
| core.int buildCounterRegistryHostConfig = 0; |
| api.RegistryHostConfig buildRegistryHostConfig() { |
| final o = api.RegistryHostConfig(); |
| buildCounterRegistryHostConfig++; |
| if (buildCounterRegistryHostConfig < 3) { |
| o.hosts = buildUnnamed80(); |
| o.server = 'foo'; |
| } |
| buildCounterRegistryHostConfig--; |
| return o; |
| } |
| |
| void checkRegistryHostConfig(api.RegistryHostConfig o) { |
| buildCounterRegistryHostConfig++; |
| if (buildCounterRegistryHostConfig < 3) { |
| checkUnnamed80(o.hosts!); |
| unittest.expect(o.server!, unittest.equals('foo')); |
| } |
| buildCounterRegistryHostConfig--; |
| } |
| |
| core.int buildCounterReleaseChannel = 0; |
| api.ReleaseChannel buildReleaseChannel() { |
| final o = api.ReleaseChannel(); |
| buildCounterReleaseChannel++; |
| if (buildCounterReleaseChannel < 3) { |
| o.channel = 'foo'; |
| } |
| buildCounterReleaseChannel--; |
| return o; |
| } |
| |
| void checkReleaseChannel(api.ReleaseChannel o) { |
| buildCounterReleaseChannel++; |
| if (buildCounterReleaseChannel < 3) { |
| unittest.expect(o.channel!, unittest.equals('foo')); |
| } |
| buildCounterReleaseChannel--; |
| } |
| |
| 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.int buildCounterReleaseChannelConfig = 0; |
| api.ReleaseChannelConfig buildReleaseChannelConfig() { |
| final o = api.ReleaseChannelConfig(); |
| buildCounterReleaseChannelConfig++; |
| if (buildCounterReleaseChannelConfig < 3) { |
| o.channel = 'foo'; |
| o.defaultVersion = 'foo'; |
| o.upgradeTargetVersion = 'foo'; |
| o.validVersions = buildUnnamed81(); |
| } |
| buildCounterReleaseChannelConfig--; |
| return o; |
| } |
| |
| void checkReleaseChannelConfig(api.ReleaseChannelConfig o) { |
| buildCounterReleaseChannelConfig++; |
| if (buildCounterReleaseChannelConfig < 3) { |
| unittest.expect(o.channel!, unittest.equals('foo')); |
| unittest.expect(o.defaultVersion!, unittest.equals('foo')); |
| unittest.expect(o.upgradeTargetVersion!, unittest.equals('foo')); |
| checkUnnamed81(o.validVersions!); |
| } |
| buildCounterReleaseChannelConfig--; |
| } |
| |
| 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.int buildCounterReservationAffinity = 0; |
| api.ReservationAffinity buildReservationAffinity() { |
| final o = api.ReservationAffinity(); |
| buildCounterReservationAffinity++; |
| if (buildCounterReservationAffinity < 3) { |
| o.consumeReservationType = 'foo'; |
| o.key = 'foo'; |
| o.values = buildUnnamed82(); |
| } |
| buildCounterReservationAffinity--; |
| return o; |
| } |
| |
| void checkReservationAffinity(api.ReservationAffinity o) { |
| buildCounterReservationAffinity++; |
| if (buildCounterReservationAffinity < 3) { |
| unittest.expect(o.consumeReservationType!, unittest.equals('foo')); |
| unittest.expect(o.key!, unittest.equals('foo')); |
| checkUnnamed82(o.values!); |
| } |
| buildCounterReservationAffinity--; |
| } |
| |
| 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 buildCounterResourceLabels = 0; |
| api.ResourceLabels buildResourceLabels() { |
| final o = api.ResourceLabels(); |
| buildCounterResourceLabels++; |
| if (buildCounterResourceLabels < 3) { |
| o.labels = buildUnnamed83(); |
| } |
| buildCounterResourceLabels--; |
| return o; |
| } |
| |
| void checkResourceLabels(api.ResourceLabels o) { |
| buildCounterResourceLabels++; |
| if (buildCounterResourceLabels < 3) { |
| checkUnnamed83(o.labels!); |
| } |
| buildCounterResourceLabels--; |
| } |
| |
| core.int buildCounterResourceLimit = 0; |
| api.ResourceLimit buildResourceLimit() { |
| final o = api.ResourceLimit(); |
| buildCounterResourceLimit++; |
| if (buildCounterResourceLimit < 3) { |
| o.maximum = 'foo'; |
| o.minimum = 'foo'; |
| o.resourceType = 'foo'; |
| } |
| buildCounterResourceLimit--; |
| return o; |
| } |
| |
| void checkResourceLimit(api.ResourceLimit o) { |
| buildCounterResourceLimit++; |
| if (buildCounterResourceLimit < 3) { |
| unittest.expect(o.maximum!, unittest.equals('foo')); |
| unittest.expect(o.minimum!, unittest.equals('foo')); |
| unittest.expect(o.resourceType!, unittest.equals('foo')); |
| } |
| buildCounterResourceLimit--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed84() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed84(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 buildCounterResourceManagerTags = 0; |
| api.ResourceManagerTags buildResourceManagerTags() { |
| final o = api.ResourceManagerTags(); |
| buildCounterResourceManagerTags++; |
| if (buildCounterResourceManagerTags < 3) { |
| o.tags = buildUnnamed84(); |
| } |
| buildCounterResourceManagerTags--; |
| return o; |
| } |
| |
| void checkResourceManagerTags(api.ResourceManagerTags o) { |
| buildCounterResourceManagerTags++; |
| if (buildCounterResourceManagerTags < 3) { |
| checkUnnamed84(o.tags!); |
| } |
| buildCounterResourceManagerTags--; |
| } |
| |
| core.int buildCounterResourceUsageExportConfig = 0; |
| api.ResourceUsageExportConfig buildResourceUsageExportConfig() { |
| final o = api.ResourceUsageExportConfig(); |
| buildCounterResourceUsageExportConfig++; |
| if (buildCounterResourceUsageExportConfig < 3) { |
| o.bigqueryDestination = buildBigQueryDestination(); |
| o.consumptionMeteringConfig = buildConsumptionMeteringConfig(); |
| o.enableNetworkEgressMetering = true; |
| } |
| buildCounterResourceUsageExportConfig--; |
| return o; |
| } |
| |
| void checkResourceUsageExportConfig(api.ResourceUsageExportConfig o) { |
| buildCounterResourceUsageExportConfig++; |
| if (buildCounterResourceUsageExportConfig < 3) { |
| checkBigQueryDestination(o.bigqueryDestination!); |
| checkConsumptionMeteringConfig(o.consumptionMeteringConfig!); |
| unittest.expect(o.enableNetworkEgressMetering!, unittest.isTrue); |
| } |
| buildCounterResourceUsageExportConfig--; |
| } |
| |
| core.int buildCounterRollbackNodePoolUpgradeRequest = 0; |
| api.RollbackNodePoolUpgradeRequest buildRollbackNodePoolUpgradeRequest() { |
| final o = api.RollbackNodePoolUpgradeRequest(); |
| buildCounterRollbackNodePoolUpgradeRequest++; |
| if (buildCounterRollbackNodePoolUpgradeRequest < 3) { |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.nodePoolId = 'foo'; |
| o.projectId = 'foo'; |
| o.respectPdb = true; |
| o.zone = 'foo'; |
| } |
| buildCounterRollbackNodePoolUpgradeRequest--; |
| return o; |
| } |
| |
| void checkRollbackNodePoolUpgradeRequest(api.RollbackNodePoolUpgradeRequest o) { |
| buildCounterRollbackNodePoolUpgradeRequest++; |
| if (buildCounterRollbackNodePoolUpgradeRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.nodePoolId!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.respectPdb!, unittest.isTrue); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterRollbackNodePoolUpgradeRequest--; |
| } |
| |
| core.int buildCounterRotationConfig = 0; |
| api.RotationConfig buildRotationConfig() { |
| final o = api.RotationConfig(); |
| buildCounterRotationConfig++; |
| if (buildCounterRotationConfig < 3) { |
| o.enabled = true; |
| o.rotationInterval = 'foo'; |
| } |
| buildCounterRotationConfig--; |
| return o; |
| } |
| |
| void checkRotationConfig(api.RotationConfig o) { |
| buildCounterRotationConfig++; |
| if (buildCounterRotationConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.rotationInterval!, unittest.equals('foo')); |
| } |
| buildCounterRotationConfig--; |
| } |
| |
| core.int buildCounterSandboxConfig = 0; |
| api.SandboxConfig buildSandboxConfig() { |
| final o = api.SandboxConfig(); |
| buildCounterSandboxConfig++; |
| if (buildCounterSandboxConfig < 3) { |
| o.type = 'foo'; |
| } |
| buildCounterSandboxConfig--; |
| return o; |
| } |
| |
| void checkSandboxConfig(api.SandboxConfig o) { |
| buildCounterSandboxConfig++; |
| if (buildCounterSandboxConfig < 3) { |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterSandboxConfig--; |
| } |
| |
| core.int buildCounterScheduleUpgradeConfig = 0; |
| api.ScheduleUpgradeConfig buildScheduleUpgradeConfig() { |
| final o = api.ScheduleUpgradeConfig(); |
| buildCounterScheduleUpgradeConfig++; |
| if (buildCounterScheduleUpgradeConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterScheduleUpgradeConfig--; |
| return o; |
| } |
| |
| void checkScheduleUpgradeConfig(api.ScheduleUpgradeConfig o) { |
| buildCounterScheduleUpgradeConfig++; |
| if (buildCounterScheduleUpgradeConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterScheduleUpgradeConfig--; |
| } |
| |
| core.int buildCounterSecondaryBootDisk = 0; |
| api.SecondaryBootDisk buildSecondaryBootDisk() { |
| final o = api.SecondaryBootDisk(); |
| buildCounterSecondaryBootDisk++; |
| if (buildCounterSecondaryBootDisk < 3) { |
| o.diskImage = 'foo'; |
| o.mode = 'foo'; |
| } |
| buildCounterSecondaryBootDisk--; |
| return o; |
| } |
| |
| void checkSecondaryBootDisk(api.SecondaryBootDisk o) { |
| buildCounterSecondaryBootDisk++; |
| if (buildCounterSecondaryBootDisk < 3) { |
| unittest.expect(o.diskImage!, unittest.equals('foo')); |
| unittest.expect(o.mode!, unittest.equals('foo')); |
| } |
| buildCounterSecondaryBootDisk--; |
| } |
| |
| core.int buildCounterSecondaryBootDiskUpdateStrategy = 0; |
| api.SecondaryBootDiskUpdateStrategy buildSecondaryBootDiskUpdateStrategy() { |
| final o = api.SecondaryBootDiskUpdateStrategy(); |
| buildCounterSecondaryBootDiskUpdateStrategy++; |
| if (buildCounterSecondaryBootDiskUpdateStrategy < 3) {} |
| buildCounterSecondaryBootDiskUpdateStrategy--; |
| return o; |
| } |
| |
| void checkSecondaryBootDiskUpdateStrategy( |
| api.SecondaryBootDiskUpdateStrategy o, |
| ) { |
| buildCounterSecondaryBootDiskUpdateStrategy++; |
| if (buildCounterSecondaryBootDiskUpdateStrategy < 3) {} |
| buildCounterSecondaryBootDiskUpdateStrategy--; |
| } |
| |
| core.int buildCounterSecretManagerConfig = 0; |
| api.SecretManagerConfig buildSecretManagerConfig() { |
| final o = api.SecretManagerConfig(); |
| buildCounterSecretManagerConfig++; |
| if (buildCounterSecretManagerConfig < 3) { |
| o.enabled = true; |
| o.rotationConfig = buildRotationConfig(); |
| } |
| buildCounterSecretManagerConfig--; |
| return o; |
| } |
| |
| void checkSecretManagerConfig(api.SecretManagerConfig o) { |
| buildCounterSecretManagerConfig++; |
| if (buildCounterSecretManagerConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| checkRotationConfig(o.rotationConfig!); |
| } |
| buildCounterSecretManagerConfig--; |
| } |
| |
| core.int buildCounterSecretSyncConfig = 0; |
| api.SecretSyncConfig buildSecretSyncConfig() { |
| final o = api.SecretSyncConfig(); |
| buildCounterSecretSyncConfig++; |
| if (buildCounterSecretSyncConfig < 3) { |
| o.enabled = true; |
| o.rotationConfig = buildSyncRotationConfig(); |
| } |
| buildCounterSecretSyncConfig--; |
| return o; |
| } |
| |
| void checkSecretSyncConfig(api.SecretSyncConfig o) { |
| buildCounterSecretSyncConfig++; |
| if (buildCounterSecretSyncConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| checkSyncRotationConfig(o.rotationConfig!); |
| } |
| buildCounterSecretSyncConfig--; |
| } |
| |
| core.int buildCounterSecurityPostureConfig = 0; |
| api.SecurityPostureConfig buildSecurityPostureConfig() { |
| final o = api.SecurityPostureConfig(); |
| buildCounterSecurityPostureConfig++; |
| if (buildCounterSecurityPostureConfig < 3) { |
| o.mode = 'foo'; |
| o.vulnerabilityMode = 'foo'; |
| } |
| buildCounterSecurityPostureConfig--; |
| return o; |
| } |
| |
| void checkSecurityPostureConfig(api.SecurityPostureConfig o) { |
| buildCounterSecurityPostureConfig++; |
| if (buildCounterSecurityPostureConfig < 3) { |
| unittest.expect(o.mode!, unittest.equals('foo')); |
| unittest.expect(o.vulnerabilityMode!, unittest.equals('foo')); |
| } |
| buildCounterSecurityPostureConfig--; |
| } |
| |
| core.List<api.ReleaseChannelConfig> buildUnnamed85() => [ |
| buildReleaseChannelConfig(), |
| buildReleaseChannelConfig(), |
| ]; |
| |
| void checkUnnamed85(core.List<api.ReleaseChannelConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkReleaseChannelConfig(o[0]); |
| checkReleaseChannelConfig(o[1]); |
| } |
| |
| 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.int buildCounterServerConfig = 0; |
| api.ServerConfig buildServerConfig() { |
| final o = api.ServerConfig(); |
| buildCounterServerConfig++; |
| if (buildCounterServerConfig < 3) { |
| o.channels = buildUnnamed85(); |
| o.defaultClusterVersion = 'foo'; |
| o.defaultImageType = 'foo'; |
| o.validImageTypes = buildUnnamed86(); |
| o.validMasterVersions = buildUnnamed87(); |
| o.validNodeVersions = buildUnnamed88(); |
| } |
| buildCounterServerConfig--; |
| return o; |
| } |
| |
| void checkServerConfig(api.ServerConfig o) { |
| buildCounterServerConfig++; |
| if (buildCounterServerConfig < 3) { |
| checkUnnamed85(o.channels!); |
| unittest.expect(o.defaultClusterVersion!, unittest.equals('foo')); |
| unittest.expect(o.defaultImageType!, unittest.equals('foo')); |
| checkUnnamed86(o.validImageTypes!); |
| checkUnnamed87(o.validMasterVersions!); |
| checkUnnamed88(o.validNodeVersions!); |
| } |
| buildCounterServerConfig--; |
| } |
| |
| core.int buildCounterServiceExternalIPsConfig = 0; |
| api.ServiceExternalIPsConfig buildServiceExternalIPsConfig() { |
| final o = api.ServiceExternalIPsConfig(); |
| buildCounterServiceExternalIPsConfig++; |
| if (buildCounterServiceExternalIPsConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterServiceExternalIPsConfig--; |
| return o; |
| } |
| |
| void checkServiceExternalIPsConfig(api.ServiceExternalIPsConfig o) { |
| buildCounterServiceExternalIPsConfig++; |
| if (buildCounterServiceExternalIPsConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterServiceExternalIPsConfig--; |
| } |
| |
| core.int buildCounterSetAddonsConfigRequest = 0; |
| api.SetAddonsConfigRequest buildSetAddonsConfigRequest() { |
| final o = api.SetAddonsConfigRequest(); |
| buildCounterSetAddonsConfigRequest++; |
| if (buildCounterSetAddonsConfigRequest < 3) { |
| o.addonsConfig = buildAddonsConfig(); |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetAddonsConfigRequest--; |
| return o; |
| } |
| |
| void checkSetAddonsConfigRequest(api.SetAddonsConfigRequest o) { |
| buildCounterSetAddonsConfigRequest++; |
| if (buildCounterSetAddonsConfigRequest < 3) { |
| checkAddonsConfig(o.addonsConfig!); |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetAddonsConfigRequest--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed89() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed89(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 buildCounterSetLabelsRequest = 0; |
| api.SetLabelsRequest buildSetLabelsRequest() { |
| final o = api.SetLabelsRequest(); |
| buildCounterSetLabelsRequest++; |
| if (buildCounterSetLabelsRequest < 3) { |
| o.clusterId = 'foo'; |
| o.labelFingerprint = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.resourceLabels = buildUnnamed89(); |
| o.zone = 'foo'; |
| } |
| buildCounterSetLabelsRequest--; |
| return o; |
| } |
| |
| void checkSetLabelsRequest(api.SetLabelsRequest o) { |
| buildCounterSetLabelsRequest++; |
| if (buildCounterSetLabelsRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.labelFingerprint!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| checkUnnamed89(o.resourceLabels!); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetLabelsRequest--; |
| } |
| |
| core.int buildCounterSetLegacyAbacRequest = 0; |
| api.SetLegacyAbacRequest buildSetLegacyAbacRequest() { |
| final o = api.SetLegacyAbacRequest(); |
| buildCounterSetLegacyAbacRequest++; |
| if (buildCounterSetLegacyAbacRequest < 3) { |
| o.clusterId = 'foo'; |
| o.enabled = true; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetLegacyAbacRequest--; |
| return o; |
| } |
| |
| void checkSetLegacyAbacRequest(api.SetLegacyAbacRequest o) { |
| buildCounterSetLegacyAbacRequest++; |
| if (buildCounterSetLegacyAbacRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetLegacyAbacRequest--; |
| } |
| |
| 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 buildCounterSetLocationsRequest = 0; |
| api.SetLocationsRequest buildSetLocationsRequest() { |
| final o = api.SetLocationsRequest(); |
| buildCounterSetLocationsRequest++; |
| if (buildCounterSetLocationsRequest < 3) { |
| o.clusterId = 'foo'; |
| o.locations = buildUnnamed90(); |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetLocationsRequest--; |
| return o; |
| } |
| |
| void checkSetLocationsRequest(api.SetLocationsRequest o) { |
| buildCounterSetLocationsRequest++; |
| if (buildCounterSetLocationsRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| checkUnnamed90(o.locations!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetLocationsRequest--; |
| } |
| |
| core.int buildCounterSetLoggingServiceRequest = 0; |
| api.SetLoggingServiceRequest buildSetLoggingServiceRequest() { |
| final o = api.SetLoggingServiceRequest(); |
| buildCounterSetLoggingServiceRequest++; |
| if (buildCounterSetLoggingServiceRequest < 3) { |
| o.clusterId = 'foo'; |
| o.loggingService = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetLoggingServiceRequest--; |
| return o; |
| } |
| |
| void checkSetLoggingServiceRequest(api.SetLoggingServiceRequest o) { |
| buildCounterSetLoggingServiceRequest++; |
| if (buildCounterSetLoggingServiceRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.loggingService!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetLoggingServiceRequest--; |
| } |
| |
| core.int buildCounterSetMaintenancePolicyRequest = 0; |
| api.SetMaintenancePolicyRequest buildSetMaintenancePolicyRequest() { |
| final o = api.SetMaintenancePolicyRequest(); |
| buildCounterSetMaintenancePolicyRequest++; |
| if (buildCounterSetMaintenancePolicyRequest < 3) { |
| o.clusterId = 'foo'; |
| o.maintenancePolicy = buildMaintenancePolicy(); |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetMaintenancePolicyRequest--; |
| return o; |
| } |
| |
| void checkSetMaintenancePolicyRequest(api.SetMaintenancePolicyRequest o) { |
| buildCounterSetMaintenancePolicyRequest++; |
| if (buildCounterSetMaintenancePolicyRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| checkMaintenancePolicy(o.maintenancePolicy!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetMaintenancePolicyRequest--; |
| } |
| |
| core.int buildCounterSetMasterAuthRequest = 0; |
| api.SetMasterAuthRequest buildSetMasterAuthRequest() { |
| final o = api.SetMasterAuthRequest(); |
| buildCounterSetMasterAuthRequest++; |
| if (buildCounterSetMasterAuthRequest < 3) { |
| o.action = 'foo'; |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.update = buildMasterAuth(); |
| o.zone = 'foo'; |
| } |
| buildCounterSetMasterAuthRequest--; |
| return o; |
| } |
| |
| void checkSetMasterAuthRequest(api.SetMasterAuthRequest o) { |
| buildCounterSetMasterAuthRequest++; |
| if (buildCounterSetMasterAuthRequest < 3) { |
| unittest.expect(o.action!, unittest.equals('foo')); |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| checkMasterAuth(o.update!); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetMasterAuthRequest--; |
| } |
| |
| core.int buildCounterSetMonitoringServiceRequest = 0; |
| api.SetMonitoringServiceRequest buildSetMonitoringServiceRequest() { |
| final o = api.SetMonitoringServiceRequest(); |
| buildCounterSetMonitoringServiceRequest++; |
| if (buildCounterSetMonitoringServiceRequest < 3) { |
| o.clusterId = 'foo'; |
| o.monitoringService = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetMonitoringServiceRequest--; |
| return o; |
| } |
| |
| void checkSetMonitoringServiceRequest(api.SetMonitoringServiceRequest o) { |
| buildCounterSetMonitoringServiceRequest++; |
| if (buildCounterSetMonitoringServiceRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.monitoringService!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetMonitoringServiceRequest--; |
| } |
| |
| core.int buildCounterSetNetworkPolicyRequest = 0; |
| api.SetNetworkPolicyRequest buildSetNetworkPolicyRequest() { |
| final o = api.SetNetworkPolicyRequest(); |
| buildCounterSetNetworkPolicyRequest++; |
| if (buildCounterSetNetworkPolicyRequest < 3) { |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.networkPolicy = buildNetworkPolicy(); |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetNetworkPolicyRequest--; |
| return o; |
| } |
| |
| void checkSetNetworkPolicyRequest(api.SetNetworkPolicyRequest o) { |
| buildCounterSetNetworkPolicyRequest++; |
| if (buildCounterSetNetworkPolicyRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkNetworkPolicy(o.networkPolicy!); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetNetworkPolicyRequest--; |
| } |
| |
| core.int buildCounterSetNodePoolAutoscalingRequest = 0; |
| api.SetNodePoolAutoscalingRequest buildSetNodePoolAutoscalingRequest() { |
| final o = api.SetNodePoolAutoscalingRequest(); |
| buildCounterSetNodePoolAutoscalingRequest++; |
| if (buildCounterSetNodePoolAutoscalingRequest < 3) { |
| o.autoscaling = buildNodePoolAutoscaling(); |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.nodePoolId = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetNodePoolAutoscalingRequest--; |
| return o; |
| } |
| |
| void checkSetNodePoolAutoscalingRequest(api.SetNodePoolAutoscalingRequest o) { |
| buildCounterSetNodePoolAutoscalingRequest++; |
| if (buildCounterSetNodePoolAutoscalingRequest < 3) { |
| checkNodePoolAutoscaling(o.autoscaling!); |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.nodePoolId!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetNodePoolAutoscalingRequest--; |
| } |
| |
| core.int buildCounterSetNodePoolManagementRequest = 0; |
| api.SetNodePoolManagementRequest buildSetNodePoolManagementRequest() { |
| final o = api.SetNodePoolManagementRequest(); |
| buildCounterSetNodePoolManagementRequest++; |
| if (buildCounterSetNodePoolManagementRequest < 3) { |
| o.clusterId = 'foo'; |
| o.management = buildNodeManagement(); |
| o.name = 'foo'; |
| o.nodePoolId = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetNodePoolManagementRequest--; |
| return o; |
| } |
| |
| void checkSetNodePoolManagementRequest(api.SetNodePoolManagementRequest o) { |
| buildCounterSetNodePoolManagementRequest++; |
| if (buildCounterSetNodePoolManagementRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| checkNodeManagement(o.management!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.nodePoolId!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetNodePoolManagementRequest--; |
| } |
| |
| core.int buildCounterSetNodePoolSizeRequest = 0; |
| api.SetNodePoolSizeRequest buildSetNodePoolSizeRequest() { |
| final o = api.SetNodePoolSizeRequest(); |
| buildCounterSetNodePoolSizeRequest++; |
| if (buildCounterSetNodePoolSizeRequest < 3) { |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.nodeCount = 42; |
| o.nodePoolId = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterSetNodePoolSizeRequest--; |
| return o; |
| } |
| |
| void checkSetNodePoolSizeRequest(api.SetNodePoolSizeRequest o) { |
| buildCounterSetNodePoolSizeRequest++; |
| if (buildCounterSetNodePoolSizeRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.nodeCount!, unittest.equals(42)); |
| unittest.expect(o.nodePoolId!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterSetNodePoolSizeRequest--; |
| } |
| |
| core.int buildCounterShieldedInstanceConfig = 0; |
| api.ShieldedInstanceConfig buildShieldedInstanceConfig() { |
| final o = api.ShieldedInstanceConfig(); |
| buildCounterShieldedInstanceConfig++; |
| if (buildCounterShieldedInstanceConfig < 3) { |
| o.enableIntegrityMonitoring = true; |
| o.enableSecureBoot = true; |
| } |
| buildCounterShieldedInstanceConfig--; |
| return o; |
| } |
| |
| void checkShieldedInstanceConfig(api.ShieldedInstanceConfig o) { |
| buildCounterShieldedInstanceConfig++; |
| if (buildCounterShieldedInstanceConfig < 3) { |
| unittest.expect(o.enableIntegrityMonitoring!, unittest.isTrue); |
| unittest.expect(o.enableSecureBoot!, unittest.isTrue); |
| } |
| buildCounterShieldedInstanceConfig--; |
| } |
| |
| core.int buildCounterShieldedNodes = 0; |
| api.ShieldedNodes buildShieldedNodes() { |
| final o = api.ShieldedNodes(); |
| buildCounterShieldedNodes++; |
| if (buildCounterShieldedNodes < 3) { |
| o.enabled = true; |
| } |
| buildCounterShieldedNodes--; |
| return o; |
| } |
| |
| void checkShieldedNodes(api.ShieldedNodes o) { |
| buildCounterShieldedNodes++; |
| if (buildCounterShieldedNodes < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterShieldedNodes--; |
| } |
| |
| core.int buildCounterSliceControllerConfig = 0; |
| api.SliceControllerConfig buildSliceControllerConfig() { |
| final o = api.SliceControllerConfig(); |
| buildCounterSliceControllerConfig++; |
| if (buildCounterSliceControllerConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterSliceControllerConfig--; |
| return o; |
| } |
| |
| void checkSliceControllerConfig(api.SliceControllerConfig o) { |
| buildCounterSliceControllerConfig++; |
| if (buildCounterSliceControllerConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterSliceControllerConfig--; |
| } |
| |
| core.int buildCounterSlurmOperatorConfig = 0; |
| api.SlurmOperatorConfig buildSlurmOperatorConfig() { |
| final o = api.SlurmOperatorConfig(); |
| buildCounterSlurmOperatorConfig++; |
| if (buildCounterSlurmOperatorConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterSlurmOperatorConfig--; |
| return o; |
| } |
| |
| void checkSlurmOperatorConfig(api.SlurmOperatorConfig o) { |
| buildCounterSlurmOperatorConfig++; |
| if (buildCounterSlurmOperatorConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterSlurmOperatorConfig--; |
| } |
| |
| core.List<api.NodeAffinity> buildUnnamed91() => [ |
| buildNodeAffinity(), |
| buildNodeAffinity(), |
| ]; |
| |
| void checkUnnamed91(core.List<api.NodeAffinity> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkNodeAffinity(o[0]); |
| checkNodeAffinity(o[1]); |
| } |
| |
| core.int buildCounterSoleTenantConfig = 0; |
| api.SoleTenantConfig buildSoleTenantConfig() { |
| final o = api.SoleTenantConfig(); |
| buildCounterSoleTenantConfig++; |
| if (buildCounterSoleTenantConfig < 3) { |
| o.minNodeCpus = 42; |
| o.nodeAffinities = buildUnnamed91(); |
| } |
| buildCounterSoleTenantConfig--; |
| return o; |
| } |
| |
| void checkSoleTenantConfig(api.SoleTenantConfig o) { |
| buildCounterSoleTenantConfig++; |
| if (buildCounterSoleTenantConfig < 3) { |
| unittest.expect(o.minNodeCpus!, unittest.equals(42)); |
| checkUnnamed91(o.nodeAffinities!); |
| } |
| buildCounterSoleTenantConfig--; |
| } |
| |
| core.int buildCounterStandardRolloutPolicy = 0; |
| api.StandardRolloutPolicy buildStandardRolloutPolicy() { |
| final o = api.StandardRolloutPolicy(); |
| buildCounterStandardRolloutPolicy++; |
| if (buildCounterStandardRolloutPolicy < 3) { |
| o.batchNodeCount = 42; |
| o.batchPercentage = 42.0; |
| o.batchSoakDuration = 'foo'; |
| } |
| buildCounterStandardRolloutPolicy--; |
| return o; |
| } |
| |
| void checkStandardRolloutPolicy(api.StandardRolloutPolicy o) { |
| buildCounterStandardRolloutPolicy++; |
| if (buildCounterStandardRolloutPolicy < 3) { |
| unittest.expect(o.batchNodeCount!, unittest.equals(42)); |
| unittest.expect(o.batchPercentage!, unittest.equals(42.0)); |
| unittest.expect(o.batchSoakDuration!, unittest.equals('foo')); |
| } |
| buildCounterStandardRolloutPolicy--; |
| } |
| |
| core.int buildCounterStartIPRotationRequest = 0; |
| api.StartIPRotationRequest buildStartIPRotationRequest() { |
| final o = api.StartIPRotationRequest(); |
| buildCounterStartIPRotationRequest++; |
| if (buildCounterStartIPRotationRequest < 3) { |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.rotateCredentials = true; |
| o.zone = 'foo'; |
| } |
| buildCounterStartIPRotationRequest--; |
| return o; |
| } |
| |
| void checkStartIPRotationRequest(api.StartIPRotationRequest o) { |
| buildCounterStartIPRotationRequest++; |
| if (buildCounterStartIPRotationRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.rotateCredentials!, unittest.isTrue); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterStartIPRotationRequest--; |
| } |
| |
| core.int buildCounterStatefulHAConfig = 0; |
| api.StatefulHAConfig buildStatefulHAConfig() { |
| final o = api.StatefulHAConfig(); |
| buildCounterStatefulHAConfig++; |
| if (buildCounterStatefulHAConfig < 3) { |
| o.enabled = true; |
| } |
| buildCounterStatefulHAConfig--; |
| return o; |
| } |
| |
| void checkStatefulHAConfig(api.StatefulHAConfig o) { |
| buildCounterStatefulHAConfig++; |
| if (buildCounterStatefulHAConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterStatefulHAConfig--; |
| } |
| |
| 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 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?>> buildUnnamed93() => [ |
| buildUnnamed92(), |
| buildUnnamed92(), |
| ]; |
| |
| void checkUnnamed93(core.List<core.Map<core.String, core.Object?>> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUnnamed92(o[0]); |
| checkUnnamed92(o[1]); |
| } |
| |
| core.int buildCounterStatus = 0; |
| api.Status buildStatus() { |
| final o = api.Status(); |
| buildCounterStatus++; |
| if (buildCounterStatus < 3) { |
| o.code = 42; |
| o.details = buildUnnamed93(); |
| o.message = 'foo'; |
| } |
| buildCounterStatus--; |
| return o; |
| } |
| |
| void checkStatus(api.Status o) { |
| buildCounterStatus++; |
| if (buildCounterStatus < 3) { |
| unittest.expect(o.code!, unittest.equals(42)); |
| checkUnnamed93(o.details!); |
| unittest.expect(o.message!, unittest.equals('foo')); |
| } |
| buildCounterStatus--; |
| } |
| |
| core.int buildCounterStatusCondition = 0; |
| api.StatusCondition buildStatusCondition() { |
| final o = api.StatusCondition(); |
| buildCounterStatusCondition++; |
| if (buildCounterStatusCondition < 3) { |
| o.canonicalCode = 'foo'; |
| o.code = 'foo'; |
| o.message = 'foo'; |
| } |
| buildCounterStatusCondition--; |
| return o; |
| } |
| |
| void checkStatusCondition(api.StatusCondition o) { |
| buildCounterStatusCondition++; |
| if (buildCounterStatusCondition < 3) { |
| unittest.expect(o.canonicalCode!, unittest.equals('foo')); |
| unittest.expect(o.code!, unittest.equals('foo')); |
| unittest.expect(o.message!, unittest.equals('foo')); |
| } |
| buildCounterStatusCondition--; |
| } |
| |
| core.int buildCounterSwapConfig = 0; |
| api.SwapConfig buildSwapConfig() { |
| final o = api.SwapConfig(); |
| buildCounterSwapConfig++; |
| if (buildCounterSwapConfig < 3) { |
| o.bootDiskProfile = buildBootDiskProfile(); |
| o.dedicatedLocalSsdProfile = buildDedicatedLocalSsdProfile(); |
| o.enabled = true; |
| o.encryptionConfig = buildEncryptionConfig(); |
| o.ephemeralLocalSsdProfile = buildEphemeralLocalSsdProfile(); |
| } |
| buildCounterSwapConfig--; |
| return o; |
| } |
| |
| void checkSwapConfig(api.SwapConfig o) { |
| buildCounterSwapConfig++; |
| if (buildCounterSwapConfig < 3) { |
| checkBootDiskProfile(o.bootDiskProfile!); |
| checkDedicatedLocalSsdProfile(o.dedicatedLocalSsdProfile!); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| checkEncryptionConfig(o.encryptionConfig!); |
| checkEphemeralLocalSsdProfile(o.ephemeralLocalSsdProfile!); |
| } |
| buildCounterSwapConfig--; |
| } |
| |
| core.int buildCounterSyncRotationConfig = 0; |
| api.SyncRotationConfig buildSyncRotationConfig() { |
| final o = api.SyncRotationConfig(); |
| buildCounterSyncRotationConfig++; |
| if (buildCounterSyncRotationConfig < 3) { |
| o.enabled = true; |
| o.rotationInterval = 'foo'; |
| } |
| buildCounterSyncRotationConfig--; |
| return o; |
| } |
| |
| void checkSyncRotationConfig(api.SyncRotationConfig o) { |
| buildCounterSyncRotationConfig++; |
| if (buildCounterSyncRotationConfig < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.rotationInterval!, unittest.equals('foo')); |
| } |
| buildCounterSyncRotationConfig--; |
| } |
| |
| core.int buildCounterTaintConfig = 0; |
| api.TaintConfig buildTaintConfig() { |
| final o = api.TaintConfig(); |
| buildCounterTaintConfig++; |
| if (buildCounterTaintConfig < 3) { |
| o.architectureTaintBehavior = 'foo'; |
| } |
| buildCounterTaintConfig--; |
| return o; |
| } |
| |
| void checkTaintConfig(api.TaintConfig o) { |
| buildCounterTaintConfig++; |
| if (buildCounterTaintConfig < 3) { |
| unittest.expect(o.architectureTaintBehavior!, unittest.equals('foo')); |
| } |
| buildCounterTaintConfig--; |
| } |
| |
| core.int buildCounterTimeWindow = 0; |
| api.TimeWindow buildTimeWindow() { |
| final o = api.TimeWindow(); |
| buildCounterTimeWindow++; |
| if (buildCounterTimeWindow < 3) { |
| o.endTime = 'foo'; |
| o.maintenanceExclusionOptions = buildMaintenanceExclusionOptions(); |
| o.startTime = 'foo'; |
| } |
| buildCounterTimeWindow--; |
| return o; |
| } |
| |
| void checkTimeWindow(api.TimeWindow o) { |
| buildCounterTimeWindow++; |
| if (buildCounterTimeWindow < 3) { |
| unittest.expect(o.endTime!, unittest.equals('foo')); |
| checkMaintenanceExclusionOptions(o.maintenanceExclusionOptions!); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| } |
| buildCounterTimeWindow--; |
| } |
| |
| core.int buildCounterTopologyManager = 0; |
| api.TopologyManager buildTopologyManager() { |
| final o = api.TopologyManager(); |
| buildCounterTopologyManager++; |
| if (buildCounterTopologyManager < 3) { |
| o.policy = 'foo'; |
| o.scope = 'foo'; |
| } |
| buildCounterTopologyManager--; |
| return o; |
| } |
| |
| void checkTopologyManager(api.TopologyManager o) { |
| buildCounterTopologyManager++; |
| if (buildCounterTopologyManager < 3) { |
| unittest.expect(o.policy!, unittest.equals('foo')); |
| unittest.expect(o.scope!, unittest.equals('foo')); |
| } |
| buildCounterTopologyManager--; |
| } |
| |
| core.int buildCounterUpdateClusterRequest = 0; |
| api.UpdateClusterRequest buildUpdateClusterRequest() { |
| final o = api.UpdateClusterRequest(); |
| buildCounterUpdateClusterRequest++; |
| if (buildCounterUpdateClusterRequest < 3) { |
| o.clusterId = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.update = buildClusterUpdate(); |
| o.zone = 'foo'; |
| } |
| buildCounterUpdateClusterRequest--; |
| return o; |
| } |
| |
| void checkUpdateClusterRequest(api.UpdateClusterRequest o) { |
| buildCounterUpdateClusterRequest++; |
| if (buildCounterUpdateClusterRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| checkClusterUpdate(o.update!); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterUpdateClusterRequest--; |
| } |
| |
| core.int buildCounterUpdateInfo = 0; |
| api.UpdateInfo buildUpdateInfo() { |
| final o = api.UpdateInfo(); |
| buildCounterUpdateInfo++; |
| if (buildCounterUpdateInfo < 3) { |
| o.blueGreenInfo = buildBlueGreenInfo(); |
| } |
| buildCounterUpdateInfo--; |
| return o; |
| } |
| |
| void checkUpdateInfo(api.UpdateInfo o) { |
| buildCounterUpdateInfo++; |
| if (buildCounterUpdateInfo < 3) { |
| checkBlueGreenInfo(o.blueGreenInfo!); |
| } |
| buildCounterUpdateInfo--; |
| } |
| |
| core.int buildCounterUpdateMasterRequest = 0; |
| api.UpdateMasterRequest buildUpdateMasterRequest() { |
| final o = api.UpdateMasterRequest(); |
| buildCounterUpdateMasterRequest++; |
| if (buildCounterUpdateMasterRequest < 3) { |
| o.clusterId = 'foo'; |
| o.masterVersion = 'foo'; |
| o.name = 'foo'; |
| o.projectId = 'foo'; |
| o.zone = 'foo'; |
| } |
| buildCounterUpdateMasterRequest--; |
| return o; |
| } |
| |
| void checkUpdateMasterRequest(api.UpdateMasterRequest o) { |
| buildCounterUpdateMasterRequest++; |
| if (buildCounterUpdateMasterRequest < 3) { |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| unittest.expect(o.masterVersion!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterUpdateMasterRequest--; |
| } |
| |
| core.List<api.AcceleratorConfig> buildUnnamed94() => [ |
| buildAcceleratorConfig(), |
| buildAcceleratorConfig(), |
| ]; |
| |
| void checkUnnamed94(core.List<api.AcceleratorConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAcceleratorConfig(o[0]); |
| checkAcceleratorConfig(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed95() => ['foo', 'foo']; |
| |
| void checkUnnamed95(core.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> buildUnnamed96() => ['foo', 'foo']; |
| |
| void checkUnnamed96(core.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 buildCounterUpdateNodePoolRequest = 0; |
| api.UpdateNodePoolRequest buildUpdateNodePoolRequest() { |
| final o = api.UpdateNodePoolRequest(); |
| buildCounterUpdateNodePoolRequest++; |
| if (buildCounterUpdateNodePoolRequest < 3) { |
| o.accelerators = buildUnnamed94(); |
| o.bootDisk = buildBootDisk(); |
| o.clusterId = 'foo'; |
| o.confidentialNodes = buildConfidentialNodes(); |
| o.consolidationDelay = 'foo'; |
| o.containerdConfig = buildContainerdConfig(); |
| o.diskSizeGb = 'foo'; |
| o.diskType = 'foo'; |
| o.etag = 'foo'; |
| o.fastSocket = buildFastSocket(); |
| o.flexStart = true; |
| o.gcfsConfig = buildGcfsConfig(); |
| o.gvnic = buildVirtualNIC(); |
| o.imageType = 'foo'; |
| o.kubeletConfig = buildNodeKubeletConfig(); |
| o.labels = buildNodeLabels(); |
| o.linuxNodeConfig = buildLinuxNodeConfig(); |
| o.locations = buildUnnamed95(); |
| o.loggingConfig = buildNodePoolLoggingConfig(); |
| o.machineType = 'foo'; |
| o.maxRunDuration = 'foo'; |
| o.name = 'foo'; |
| o.nodeDrainConfig = buildNodeDrainConfig(); |
| o.nodeNetworkConfig = buildNodeNetworkConfig(); |
| o.nodePoolId = 'foo'; |
| o.nodeVersion = 'foo'; |
| o.projectId = 'foo'; |
| o.queuedProvisioning = buildQueuedProvisioning(); |
| o.resourceLabels = buildResourceLabels(); |
| o.resourceManagerTags = buildResourceManagerTags(); |
| o.storagePools = buildUnnamed96(); |
| o.tags = buildNetworkTags(); |
| o.taints = buildNodeTaints(); |
| o.upgradeSettings = buildUpgradeSettings(); |
| o.windowsNodeConfig = buildWindowsNodeConfig(); |
| o.workloadMetadataConfig = buildWorkloadMetadataConfig(); |
| o.zone = 'foo'; |
| } |
| buildCounterUpdateNodePoolRequest--; |
| return o; |
| } |
| |
| void checkUpdateNodePoolRequest(api.UpdateNodePoolRequest o) { |
| buildCounterUpdateNodePoolRequest++; |
| if (buildCounterUpdateNodePoolRequest < 3) { |
| checkUnnamed94(o.accelerators!); |
| checkBootDisk(o.bootDisk!); |
| unittest.expect(o.clusterId!, unittest.equals('foo')); |
| checkConfidentialNodes(o.confidentialNodes!); |
| unittest.expect(o.consolidationDelay!, unittest.equals('foo')); |
| checkContainerdConfig(o.containerdConfig!); |
| unittest.expect(o.diskSizeGb!, unittest.equals('foo')); |
| unittest.expect(o.diskType!, unittest.equals('foo')); |
| unittest.expect(o.etag!, unittest.equals('foo')); |
| checkFastSocket(o.fastSocket!); |
| unittest.expect(o.flexStart!, unittest.isTrue); |
| checkGcfsConfig(o.gcfsConfig!); |
| checkVirtualNIC(o.gvnic!); |
| unittest.expect(o.imageType!, unittest.equals('foo')); |
| checkNodeKubeletConfig(o.kubeletConfig!); |
| checkNodeLabels(o.labels!); |
| checkLinuxNodeConfig(o.linuxNodeConfig!); |
| checkUnnamed95(o.locations!); |
| checkNodePoolLoggingConfig(o.loggingConfig!); |
| unittest.expect(o.machineType!, unittest.equals('foo')); |
| unittest.expect(o.maxRunDuration!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkNodeDrainConfig(o.nodeDrainConfig!); |
| checkNodeNetworkConfig(o.nodeNetworkConfig!); |
| unittest.expect(o.nodePoolId!, unittest.equals('foo')); |
| unittest.expect(o.nodeVersion!, unittest.equals('foo')); |
| unittest.expect(o.projectId!, unittest.equals('foo')); |
| checkQueuedProvisioning(o.queuedProvisioning!); |
| checkResourceLabels(o.resourceLabels!); |
| checkResourceManagerTags(o.resourceManagerTags!); |
| checkUnnamed96(o.storagePools!); |
| checkNetworkTags(o.tags!); |
| checkNodeTaints(o.taints!); |
| checkUpgradeSettings(o.upgradeSettings!); |
| checkWindowsNodeConfig(o.windowsNodeConfig!); |
| checkWorkloadMetadataConfig(o.workloadMetadataConfig!); |
| unittest.expect(o.zone!, unittest.equals('foo')); |
| } |
| buildCounterUpdateNodePoolRequest--; |
| } |
| |
| core.int buildCounterUpgradeDetails = 0; |
| api.UpgradeDetails buildUpgradeDetails() { |
| final o = api.UpgradeDetails(); |
| buildCounterUpgradeDetails++; |
| if (buildCounterUpgradeDetails < 3) { |
| o.endTime = 'foo'; |
| o.initialVersion = 'foo'; |
| o.startTime = 'foo'; |
| o.startType = 'foo'; |
| o.state = 'foo'; |
| o.targetVersion = 'foo'; |
| } |
| buildCounterUpgradeDetails--; |
| return o; |
| } |
| |
| void checkUpgradeDetails(api.UpgradeDetails o) { |
| buildCounterUpgradeDetails++; |
| if (buildCounterUpgradeDetails < 3) { |
| unittest.expect(o.endTime!, unittest.equals('foo')); |
| unittest.expect(o.initialVersion!, unittest.equals('foo')); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| unittest.expect(o.startType!, unittest.equals('foo')); |
| unittest.expect(o.state!, unittest.equals('foo')); |
| unittest.expect(o.targetVersion!, unittest.equals('foo')); |
| } |
| buildCounterUpgradeDetails--; |
| } |
| |
| core.int buildCounterUpgradeSettings = 0; |
| api.UpgradeSettings buildUpgradeSettings() { |
| final o = api.UpgradeSettings(); |
| buildCounterUpgradeSettings++; |
| if (buildCounterUpgradeSettings < 3) { |
| o.blueGreenSettings = buildBlueGreenSettings(); |
| o.maxSurge = 42; |
| o.maxUnavailable = 42; |
| o.strategy = 'foo'; |
| } |
| buildCounterUpgradeSettings--; |
| return o; |
| } |
| |
| void checkUpgradeSettings(api.UpgradeSettings o) { |
| buildCounterUpgradeSettings++; |
| if (buildCounterUpgradeSettings < 3) { |
| checkBlueGreenSettings(o.blueGreenSettings!); |
| unittest.expect(o.maxSurge!, unittest.equals(42)); |
| unittest.expect(o.maxUnavailable!, unittest.equals(42)); |
| unittest.expect(o.strategy!, unittest.equals('foo')); |
| } |
| buildCounterUpgradeSettings--; |
| } |
| |
| core.List<api.UsableSubnetworkSecondaryRange> buildUnnamed97() => [ |
| buildUsableSubnetworkSecondaryRange(), |
| buildUsableSubnetworkSecondaryRange(), |
| ]; |
| |
| void checkUnnamed97(core.List<api.UsableSubnetworkSecondaryRange> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUsableSubnetworkSecondaryRange(o[0]); |
| checkUsableSubnetworkSecondaryRange(o[1]); |
| } |
| |
| core.int buildCounterUsableSubnetwork = 0; |
| api.UsableSubnetwork buildUsableSubnetwork() { |
| final o = api.UsableSubnetwork(); |
| buildCounterUsableSubnetwork++; |
| if (buildCounterUsableSubnetwork < 3) { |
| o.ipCidrRange = 'foo'; |
| o.network = 'foo'; |
| o.secondaryIpRanges = buildUnnamed97(); |
| o.statusMessage = 'foo'; |
| o.subnetwork = 'foo'; |
| } |
| buildCounterUsableSubnetwork--; |
| return o; |
| } |
| |
| void checkUsableSubnetwork(api.UsableSubnetwork o) { |
| buildCounterUsableSubnetwork++; |
| if (buildCounterUsableSubnetwork < 3) { |
| unittest.expect(o.ipCidrRange!, unittest.equals('foo')); |
| unittest.expect(o.network!, unittest.equals('foo')); |
| checkUnnamed97(o.secondaryIpRanges!); |
| unittest.expect(o.statusMessage!, unittest.equals('foo')); |
| unittest.expect(o.subnetwork!, unittest.equals('foo')); |
| } |
| buildCounterUsableSubnetwork--; |
| } |
| |
| core.int buildCounterUsableSubnetworkSecondaryRange = 0; |
| api.UsableSubnetworkSecondaryRange buildUsableSubnetworkSecondaryRange() { |
| final o = api.UsableSubnetworkSecondaryRange(); |
| buildCounterUsableSubnetworkSecondaryRange++; |
| if (buildCounterUsableSubnetworkSecondaryRange < 3) { |
| o.ipCidrRange = 'foo'; |
| o.rangeName = 'foo'; |
| o.status = 'foo'; |
| } |
| buildCounterUsableSubnetworkSecondaryRange--; |
| return o; |
| } |
| |
| void checkUsableSubnetworkSecondaryRange(api.UsableSubnetworkSecondaryRange o) { |
| buildCounterUsableSubnetworkSecondaryRange++; |
| if (buildCounterUsableSubnetworkSecondaryRange < 3) { |
| unittest.expect(o.ipCidrRange!, unittest.equals('foo')); |
| unittest.expect(o.rangeName!, unittest.equals('foo')); |
| unittest.expect(o.status!, unittest.equals('foo')); |
| } |
| buildCounterUsableSubnetworkSecondaryRange--; |
| } |
| |
| core.List<core.String> buildUnnamed98() => ['foo', 'foo']; |
| |
| void checkUnnamed98(core.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> 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')); |
| } |
| |
| core.int buildCounterUserManagedKeysConfig = 0; |
| api.UserManagedKeysConfig buildUserManagedKeysConfig() { |
| final o = api.UserManagedKeysConfig(); |
| buildCounterUserManagedKeysConfig++; |
| if (buildCounterUserManagedKeysConfig < 3) { |
| o.aggregationCa = 'foo'; |
| o.clusterCa = 'foo'; |
| o.controlPlaneDiskEncryptionKey = 'foo'; |
| o.controlPlaneDiskEncryptionKeyVersions = buildUnnamed98(); |
| o.etcdApiCa = 'foo'; |
| o.etcdPeerCa = 'foo'; |
| o.gkeopsEtcdBackupEncryptionKey = 'foo'; |
| o.serviceAccountSigningKeys = buildUnnamed99(); |
| o.serviceAccountVerificationKeys = buildUnnamed100(); |
| } |
| buildCounterUserManagedKeysConfig--; |
| return o; |
| } |
| |
| void checkUserManagedKeysConfig(api.UserManagedKeysConfig o) { |
| buildCounterUserManagedKeysConfig++; |
| if (buildCounterUserManagedKeysConfig < 3) { |
| unittest.expect(o.aggregationCa!, unittest.equals('foo')); |
| unittest.expect(o.clusterCa!, unittest.equals('foo')); |
| unittest.expect(o.controlPlaneDiskEncryptionKey!, unittest.equals('foo')); |
| checkUnnamed98(o.controlPlaneDiskEncryptionKeyVersions!); |
| unittest.expect(o.etcdApiCa!, unittest.equals('foo')); |
| unittest.expect(o.etcdPeerCa!, unittest.equals('foo')); |
| unittest.expect(o.gkeopsEtcdBackupEncryptionKey!, unittest.equals('foo')); |
| checkUnnamed99(o.serviceAccountSigningKeys!); |
| checkUnnamed100(o.serviceAccountVerificationKeys!); |
| } |
| buildCounterUserManagedKeysConfig--; |
| } |
| |
| core.int buildCounterVerticalPodAutoscaling = 0; |
| api.VerticalPodAutoscaling buildVerticalPodAutoscaling() { |
| final o = api.VerticalPodAutoscaling(); |
| buildCounterVerticalPodAutoscaling++; |
| if (buildCounterVerticalPodAutoscaling < 3) { |
| o.enabled = true; |
| } |
| buildCounterVerticalPodAutoscaling--; |
| return o; |
| } |
| |
| void checkVerticalPodAutoscaling(api.VerticalPodAutoscaling o) { |
| buildCounterVerticalPodAutoscaling++; |
| if (buildCounterVerticalPodAutoscaling < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterVerticalPodAutoscaling--; |
| } |
| |
| core.int buildCounterVirtualNIC = 0; |
| api.VirtualNIC buildVirtualNIC() { |
| final o = api.VirtualNIC(); |
| buildCounterVirtualNIC++; |
| if (buildCounterVirtualNIC < 3) { |
| o.enabled = true; |
| } |
| buildCounterVirtualNIC--; |
| return o; |
| } |
| |
| void checkVirtualNIC(api.VirtualNIC o) { |
| buildCounterVirtualNIC++; |
| if (buildCounterVirtualNIC < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterVirtualNIC--; |
| } |
| |
| core.int buildCounterWindowsNodeConfig = 0; |
| api.WindowsNodeConfig buildWindowsNodeConfig() { |
| final o = api.WindowsNodeConfig(); |
| buildCounterWindowsNodeConfig++; |
| if (buildCounterWindowsNodeConfig < 3) { |
| o.osVersion = 'foo'; |
| } |
| buildCounterWindowsNodeConfig--; |
| return o; |
| } |
| |
| void checkWindowsNodeConfig(api.WindowsNodeConfig o) { |
| buildCounterWindowsNodeConfig++; |
| if (buildCounterWindowsNodeConfig < 3) { |
| unittest.expect(o.osVersion!, unittest.equals('foo')); |
| } |
| buildCounterWindowsNodeConfig--; |
| } |
| |
| core.int buildCounterWorkloadIdentityConfig = 0; |
| api.WorkloadIdentityConfig buildWorkloadIdentityConfig() { |
| final o = api.WorkloadIdentityConfig(); |
| buildCounterWorkloadIdentityConfig++; |
| if (buildCounterWorkloadIdentityConfig < 3) { |
| o.workloadPool = 'foo'; |
| } |
| buildCounterWorkloadIdentityConfig--; |
| return o; |
| } |
| |
| void checkWorkloadIdentityConfig(api.WorkloadIdentityConfig o) { |
| buildCounterWorkloadIdentityConfig++; |
| if (buildCounterWorkloadIdentityConfig < 3) { |
| unittest.expect(o.workloadPool!, unittest.equals('foo')); |
| } |
| buildCounterWorkloadIdentityConfig--; |
| } |
| |
| core.int buildCounterWorkloadMetadataConfig = 0; |
| api.WorkloadMetadataConfig buildWorkloadMetadataConfig() { |
| final o = api.WorkloadMetadataConfig(); |
| buildCounterWorkloadMetadataConfig++; |
| if (buildCounterWorkloadMetadataConfig < 3) { |
| o.mode = 'foo'; |
| } |
| buildCounterWorkloadMetadataConfig--; |
| return o; |
| } |
| |
| void checkWorkloadMetadataConfig(api.WorkloadMetadataConfig o) { |
| buildCounterWorkloadMetadataConfig++; |
| if (buildCounterWorkloadMetadataConfig < 3) { |
| unittest.expect(o.mode!, unittest.equals('foo')); |
| } |
| buildCounterWorkloadMetadataConfig--; |
| } |
| |
| core.int buildCounterWorkloadPolicyConfig = 0; |
| api.WorkloadPolicyConfig buildWorkloadPolicyConfig() { |
| final o = api.WorkloadPolicyConfig(); |
| buildCounterWorkloadPolicyConfig++; |
| if (buildCounterWorkloadPolicyConfig < 3) { |
| o.allowNetAdmin = true; |
| o.autopilotCompatibilityAuditingEnabled = true; |
| } |
| buildCounterWorkloadPolicyConfig--; |
| return o; |
| } |
| |
| void checkWorkloadPolicyConfig(api.WorkloadPolicyConfig o) { |
| buildCounterWorkloadPolicyConfig++; |
| if (buildCounterWorkloadPolicyConfig < 3) { |
| unittest.expect(o.allowNetAdmin!, unittest.isTrue); |
| unittest.expect(o.autopilotCompatibilityAuditingEnabled!, unittest.isTrue); |
| } |
| buildCounterWorkloadPolicyConfig--; |
| } |
| |
| core.int buildCounterWritableCgroups = 0; |
| api.WritableCgroups buildWritableCgroups() { |
| final o = api.WritableCgroups(); |
| buildCounterWritableCgroups++; |
| if (buildCounterWritableCgroups < 3) { |
| o.enabled = true; |
| } |
| buildCounterWritableCgroups--; |
| return o; |
| } |
| |
| void checkWritableCgroups(api.WritableCgroups o) { |
| buildCounterWritableCgroups++; |
| if (buildCounterWritableCgroups < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| } |
| buildCounterWritableCgroups--; |
| } |
| |
| void main() { |
| unittest.group('obj-schema-AcceleratorConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAcceleratorConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AcceleratorConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAcceleratorConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccurateTimeConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAccurateTimeConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AccurateTimeConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAccurateTimeConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdditionalIPRangesConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAdditionalIPRangesConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AdditionalIPRangesConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAdditionalIPRangesConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdditionalNodeNetworkConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAdditionalNodeNetworkConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AdditionalNodeNetworkConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAdditionalNodeNetworkConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdditionalPodNetworkConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAdditionalPodNetworkConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AdditionalPodNetworkConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAdditionalPodNetworkConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdditionalPodRangesConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAdditionalPodRangesConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AdditionalPodRangesConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAdditionalPodRangesConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AddonsConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAddonsConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AddonsConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAddonsConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdvancedDatapathObservabilityConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAdvancedDatapathObservabilityConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AdvancedDatapathObservabilityConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAdvancedDatapathObservabilityConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdvancedMachineFeatures', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAdvancedMachineFeatures(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AdvancedMachineFeatures.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAdvancedMachineFeatures(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AnonymousAuthenticationConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAnonymousAuthenticationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AnonymousAuthenticationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAnonymousAuthenticationConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AuthenticatorGroupsConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAuthenticatorGroupsConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AuthenticatorGroupsConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAuthenticatorGroupsConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AutoIpamConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAutoIpamConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AutoIpamConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAutoIpamConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AutoMonitoringConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAutoMonitoringConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AutoMonitoringConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAutoMonitoringConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AutoUpgradeOptions', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAutoUpgradeOptions(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AutoUpgradeOptions.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAutoUpgradeOptions(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Autopilot', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAutopilot(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Autopilot.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAutopilot(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AutopilotCompatibilityIssue', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAutopilotCompatibilityIssue(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AutopilotCompatibilityIssue.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAutopilotCompatibilityIssue(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AutopilotConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAutopilotConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AutopilotConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAutopilotConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AutoprovisioningNodePoolDefaults', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAutoprovisioningNodePoolDefaults(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AutoprovisioningNodePoolDefaults.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAutoprovisioningNodePoolDefaults(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AutoscaledRolloutPolicy', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAutoscaledRolloutPolicy(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AutoscaledRolloutPolicy.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAutoscaledRolloutPolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BestEffortProvisioning', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBestEffortProvisioning(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BestEffortProvisioning.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBestEffortProvisioning(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BigQueryDestination', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBigQueryDestination(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BigQueryDestination.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBigQueryDestination(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BinaryAuthorization', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBinaryAuthorization(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BinaryAuthorization.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBinaryAuthorization(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BlueGreenInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBlueGreenInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BlueGreenInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBlueGreenInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BlueGreenSettings', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBlueGreenSettings(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BlueGreenSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBlueGreenSettings(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BootDisk', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBootDisk(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BootDisk.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBootDisk(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BootDiskProfile', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBootDiskProfile(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BootDiskProfile.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBootDiskProfile(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-CertificateAuthorityDomainConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCertificateAuthorityDomainConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CertificateAuthorityDomainConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCertificateAuthorityDomainConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CertificateConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCertificateConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CertificateConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCertificateConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CertificateConfigPair', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCertificateConfigPair(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CertificateConfigPair.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCertificateConfigPair(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CheckAutopilotCompatibilityResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCheckAutopilotCompatibilityResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CheckAutopilotCompatibilityResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCheckAutopilotCompatibilityResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CidrBlock', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCidrBlock(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CidrBlock.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCidrBlock(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClientCertificateConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildClientCertificateConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ClientCertificateConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkClientCertificateConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CloudRunConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCloudRunConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CloudRunConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCloudRunConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Cluster', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCluster(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Cluster.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCluster(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClusterAutoscaling', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildClusterAutoscaling(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ClusterAutoscaling.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkClusterAutoscaling(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClusterNetworkPerformanceConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildClusterNetworkPerformanceConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ClusterNetworkPerformanceConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkClusterNetworkPerformanceConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClusterPolicyConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildClusterPolicyConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ClusterPolicyConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkClusterPolicyConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClusterUpdate', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildClusterUpdate(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ClusterUpdate.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkClusterUpdate(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClusterUpgradeInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildClusterUpgradeInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ClusterUpgradeInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkClusterUpgradeInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompleteIPRotationRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompleteIPRotationRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompleteIPRotationRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompleteIPRotationRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompleteNodePoolUpgradeRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompleteNodePoolUpgradeRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompleteNodePoolUpgradeRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompleteNodePoolUpgradeRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompliancePostureConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompliancePostureConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompliancePostureConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompliancePostureConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ComplianceStandard', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildComplianceStandard(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ComplianceStandard.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkComplianceStandard(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConfidentialNodes', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildConfidentialNodes(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ConfidentialNodes.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkConfidentialNodes(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConfigConnectorConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildConfigConnectorConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ConfigConnectorConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkConfigConnectorConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConsumptionMeteringConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildConsumptionMeteringConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ConsumptionMeteringConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkConsumptionMeteringConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ContainerdConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildContainerdConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ContainerdConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkContainerdConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ControlPlaneEgress', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildControlPlaneEgress(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ControlPlaneEgress.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkControlPlaneEgress(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ControlPlaneEndpointsConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildControlPlaneEndpointsConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ControlPlaneEndpointsConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkControlPlaneEndpointsConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CostManagementConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCostManagementConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CostManagementConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCostManagementConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CrashLoopBackOffConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCrashLoopBackOffConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CrashLoopBackOffConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCrashLoopBackOffConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreateClusterRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCreateClusterRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CreateClusterRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateClusterRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreateNodePoolRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCreateNodePoolRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CreateNodePoolRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateNodePoolRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DNSConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDNSConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DNSConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDNSConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DNSEndpointConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDNSEndpointConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DNSEndpointConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDNSEndpointConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DailyMaintenanceWindow', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDailyMaintenanceWindow(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DailyMaintenanceWindow.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDailyMaintenanceWindow(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DatabaseEncryption', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDatabaseEncryption(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DatabaseEncryption.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDatabaseEncryption(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DedicatedLocalSsdProfile', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDedicatedLocalSsdProfile(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DedicatedLocalSsdProfile.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDedicatedLocalSsdProfile(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DefaultComputeClassConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDefaultComputeClassConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DefaultComputeClassConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDefaultComputeClassConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DefaultSnatStatus', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDefaultSnatStatus(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DefaultSnatStatus.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDefaultSnatStatus(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DesiredAdditionalIPRangesConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDesiredAdditionalIPRangesConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DesiredAdditionalIPRangesConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDesiredAdditionalIPRangesConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DesiredEnterpriseConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDesiredEnterpriseConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DesiredEnterpriseConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDesiredEnterpriseConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DisruptionBudget', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDisruptionBudget(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DisruptionBudget.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDisruptionBudget(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DnsCacheConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDnsCacheConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DnsCacheConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDnsCacheConfig(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-EncryptionConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEncryptionConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.EncryptionConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEncryptionConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EnterpriseConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEnterpriseConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.EnterpriseConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEnterpriseConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EphemeralLocalSsdProfile', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEphemeralLocalSsdProfile(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.EphemeralLocalSsdProfile.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEphemeralLocalSsdProfile(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EphemeralStorageLocalSsdConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEphemeralStorageLocalSsdConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.EphemeralStorageLocalSsdConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEphemeralStorageLocalSsdConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EvictionGracePeriod', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEvictionGracePeriod(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.EvictionGracePeriod.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEvictionGracePeriod(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EvictionMinimumReclaim', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEvictionMinimumReclaim(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.EvictionMinimumReclaim.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEvictionMinimumReclaim(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EvictionSignals', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEvictionSignals(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.EvictionSignals.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEvictionSignals(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FastSocket', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildFastSocket(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.FastSocket.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkFastSocket(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Filter', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildFilter(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Filter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkFilter(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Fleet', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildFleet(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Fleet.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkFleet(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GCPSecretManagerCertificateConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGCPSecretManagerCertificateConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GCPSecretManagerCertificateConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGCPSecretManagerCertificateConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GPUDirectConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGPUDirectConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GPUDirectConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGPUDirectConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GPUDriverInstallationConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGPUDriverInstallationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GPUDriverInstallationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGPUDriverInstallationConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GPUSharingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGPUSharingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GPUSharingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGPUSharingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GatewayAPIConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGatewayAPIConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GatewayAPIConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGatewayAPIConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GcePersistentDiskCsiDriverConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGcePersistentDiskCsiDriverConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GcePersistentDiskCsiDriverConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGcePersistentDiskCsiDriverConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GcfsConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGcfsConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GcfsConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGcfsConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GcpFilestoreCsiDriverConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGcpFilestoreCsiDriverConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GcpFilestoreCsiDriverConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGcpFilestoreCsiDriverConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GcsFuseCsiDriverConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGcsFuseCsiDriverConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GcsFuseCsiDriverConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGcsFuseCsiDriverConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GetJSONWebKeysResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGetJSONWebKeysResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GetJSONWebKeysResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGetJSONWebKeysResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GetOpenIDConfigResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGetOpenIDConfigResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GetOpenIDConfigResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGetOpenIDConfigResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GkeAutoUpgradeConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGkeAutoUpgradeConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GkeAutoUpgradeConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGkeAutoUpgradeConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GkeBackupAgentConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGkeBackupAgentConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GkeBackupAgentConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGkeBackupAgentConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HighScaleCheckpointingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHighScaleCheckpointingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HighScaleCheckpointingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHighScaleCheckpointingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HorizontalPodAutoscaling', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHorizontalPodAutoscaling(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HorizontalPodAutoscaling.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHorizontalPodAutoscaling(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HostConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHostConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HostConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHostConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HttpCacheControlResponseHeader', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHttpCacheControlResponseHeader(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HttpCacheControlResponseHeader.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHttpCacheControlResponseHeader(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HttpLoadBalancing', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHttpLoadBalancing(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HttpLoadBalancing.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHttpLoadBalancing(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HugepagesConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHugepagesConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HugepagesConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHugepagesConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ILBSubsettingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildILBSubsettingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ILBSubsettingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkILBSubsettingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-IPAllocationPolicy', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildIPAllocationPolicy(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.IPAllocationPolicy.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkIPAllocationPolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-IPEndpointsConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildIPEndpointsConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.IPEndpointsConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkIPEndpointsConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-IdentityServiceConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildIdentityServiceConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.IdentityServiceConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkIdentityServiceConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-IntraNodeVisibilityConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildIntraNodeVisibilityConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.IntraNodeVisibilityConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkIntraNodeVisibilityConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Jwk', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildJwk(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Jwk.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkJwk(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-K8sBetaAPIConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildK8sBetaAPIConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.K8sBetaAPIConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkK8sBetaAPIConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-KubernetesDashboard', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildKubernetesDashboard(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.KubernetesDashboard.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkKubernetesDashboard(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LegacyAbac', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLegacyAbac(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LegacyAbac.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLegacyAbac(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LinuxNodeConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLinuxNodeConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LinuxNodeConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLinuxNodeConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListClustersResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListClustersResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListClustersResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListClustersResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListNodePoolsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListNodePoolsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListNodePoolsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListNodePoolsResponse(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-ListUsableSubnetworksResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListUsableSubnetworksResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListUsableSubnetworksResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListUsableSubnetworksResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LocalNvmeSsdBlockConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLocalNvmeSsdBlockConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LocalNvmeSsdBlockConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLocalNvmeSsdBlockConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LoggingComponentConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLoggingComponentConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LoggingComponentConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLoggingComponentConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LoggingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLoggingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LoggingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLoggingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LoggingVariantConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLoggingVariantConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LoggingVariantConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLoggingVariantConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LustreCsiDriverConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLustreCsiDriverConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LustreCsiDriverConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLustreCsiDriverConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MaintenanceExclusionOptions', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMaintenanceExclusionOptions(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MaintenanceExclusionOptions.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMaintenanceExclusionOptions(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MaintenancePolicy', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMaintenancePolicy(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MaintenancePolicy.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMaintenancePolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MaintenanceWindow', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMaintenanceWindow(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MaintenanceWindow.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMaintenanceWindow(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ManagedMachineLearningDiagnosticsConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildManagedMachineLearningDiagnosticsConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ManagedMachineLearningDiagnosticsConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkManagedMachineLearningDiagnosticsConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ManagedOpenTelemetryConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildManagedOpenTelemetryConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ManagedOpenTelemetryConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkManagedOpenTelemetryConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ManagedPrometheusConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildManagedPrometheusConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ManagedPrometheusConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkManagedPrometheusConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MasterAuth', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMasterAuth(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MasterAuth.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMasterAuth(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MasterAuthorizedNetworksConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMasterAuthorizedNetworksConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MasterAuthorizedNetworksConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMasterAuthorizedNetworksConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MaxPodsConstraint', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMaxPodsConstraint(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MaxPodsConstraint.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMaxPodsConstraint(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MemoryManager', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMemoryManager(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MemoryManager.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMemoryManager(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MeshCertificates', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMeshCertificates(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MeshCertificates.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMeshCertificates(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Metric', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMetric(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Metric.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMetric(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MonitoringComponentConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMonitoringComponentConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MonitoringComponentConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMonitoringComponentConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MonitoringConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMonitoringConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MonitoringConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMonitoringConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NetworkConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNetworkConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NetworkConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNetworkConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NetworkPerformanceConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNetworkPerformanceConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NetworkPerformanceConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNetworkPerformanceConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NetworkPolicy', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNetworkPolicy(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NetworkPolicy.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNetworkPolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NetworkPolicyConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNetworkPolicyConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NetworkPolicyConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNetworkPolicyConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NetworkTags', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNetworkTags(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NetworkTags.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNetworkTags(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NetworkTierConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNetworkTierConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NetworkTierConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNetworkTierConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeAffinity', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeAffinity(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeAffinity.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeAffinity(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeConfigDefaults', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeConfigDefaults(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeConfigDefaults.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeConfigDefaults(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeDrainConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeDrainConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeDrainConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeDrainConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeKernelModuleLoading', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeKernelModuleLoading(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeKernelModuleLoading.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeKernelModuleLoading(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeKubeletConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeKubeletConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeKubeletConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeKubeletConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeLabels', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeLabels(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeLabels.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeLabels(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeManagement', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeManagement(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeManagement.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeManagement(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeNetworkConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeNetworkConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeNetworkConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeNetworkConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodePool', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodePool(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodePool.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodePool(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodePoolAutoConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodePoolAutoConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodePoolAutoConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodePoolAutoConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodePoolAutoscaling', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodePoolAutoscaling(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodePoolAutoscaling.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodePoolAutoscaling(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodePoolDefaults', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodePoolDefaults(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodePoolDefaults.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodePoolDefaults(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodePoolLoggingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodePoolLoggingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodePoolLoggingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodePoolLoggingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodePoolUpgradeInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodePoolUpgradeInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodePoolUpgradeInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodePoolUpgradeInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeTaint', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeTaint(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeTaint.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeTaint(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NodeTaints', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNodeTaints(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NodeTaints.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNodeTaints(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NotificationConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNotificationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NotificationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNotificationConfig(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-OperationError', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildOperationError(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.OperationError.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkOperationError(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OperationProgress', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildOperationProgress(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.OperationProgress.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkOperationProgress(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ParallelstoreCsiDriverConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildParallelstoreCsiDriverConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ParallelstoreCsiDriverConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkParallelstoreCsiDriverConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ParentProductConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildParentProductConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ParentProductConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkParentProductConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementPolicy', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPlacementPolicy(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PlacementPolicy.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPlacementPolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PodAutoscaling', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPodAutoscaling(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PodAutoscaling.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPodAutoscaling(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PodCIDROverprovisionConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPodCIDROverprovisionConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PodCIDROverprovisionConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPodCIDROverprovisionConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PodSnapshotConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPodSnapshotConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PodSnapshotConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPodSnapshotConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PrivateClusterConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPrivateClusterConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PrivateClusterConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPrivateClusterConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PrivateClusterMasterGlobalAccessConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPrivateClusterMasterGlobalAccessConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PrivateClusterMasterGlobalAccessConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPrivateClusterMasterGlobalAccessConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PrivateRegistryAccessConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPrivateRegistryAccessConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PrivateRegistryAccessConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPrivateRegistryAccessConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PrivilegedAdmissionConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPrivilegedAdmissionConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PrivilegedAdmissionConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPrivilegedAdmissionConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PubSub', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPubSub(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PubSub.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPubSub(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-QueuedProvisioning', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildQueuedProvisioning(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.QueuedProvisioning.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkQueuedProvisioning(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RBACBindingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRBACBindingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RBACBindingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRBACBindingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RangeInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRangeInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RangeInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRangeInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RayClusterLoggingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRayClusterLoggingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RayClusterLoggingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRayClusterLoggingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RayClusterMonitoringConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRayClusterMonitoringConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RayClusterMonitoringConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRayClusterMonitoringConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RayOperatorConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRayOperatorConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RayOperatorConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRayOperatorConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RecurringTimeWindow', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRecurringTimeWindow(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RecurringTimeWindow.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRecurringTimeWindow(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RegistryHeader', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRegistryHeader(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RegistryHeader.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRegistryHeader(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RegistryHostConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRegistryHostConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RegistryHostConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRegistryHostConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReleaseChannel', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildReleaseChannel(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ReleaseChannel.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkReleaseChannel(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReleaseChannelConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildReleaseChannelConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ReleaseChannelConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkReleaseChannelConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReservationAffinity', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildReservationAffinity(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ReservationAffinity.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkReservationAffinity(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ResourceLabels', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildResourceLabels(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ResourceLabels.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkResourceLabels(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ResourceLimit', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildResourceLimit(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ResourceLimit.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkResourceLimit(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ResourceManagerTags', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildResourceManagerTags(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ResourceManagerTags.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkResourceManagerTags(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ResourceUsageExportConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildResourceUsageExportConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ResourceUsageExportConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkResourceUsageExportConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RollbackNodePoolUpgradeRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRollbackNodePoolUpgradeRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RollbackNodePoolUpgradeRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRollbackNodePoolUpgradeRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RotationConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRotationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RotationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRotationConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SandboxConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSandboxConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SandboxConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSandboxConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ScheduleUpgradeConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildScheduleUpgradeConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ScheduleUpgradeConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkScheduleUpgradeConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SecondaryBootDisk', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSecondaryBootDisk(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SecondaryBootDisk.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSecondaryBootDisk(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SecondaryBootDiskUpdateStrategy', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSecondaryBootDiskUpdateStrategy(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SecondaryBootDiskUpdateStrategy.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSecondaryBootDiskUpdateStrategy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SecretManagerConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSecretManagerConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SecretManagerConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSecretManagerConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SecretSyncConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSecretSyncConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SecretSyncConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSecretSyncConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SecurityPostureConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSecurityPostureConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SecurityPostureConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSecurityPostureConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ServerConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildServerConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ServerConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkServerConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ServiceExternalIPsConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildServiceExternalIPsConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ServiceExternalIPsConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkServiceExternalIPsConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetAddonsConfigRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetAddonsConfigRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetAddonsConfigRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetAddonsConfigRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetLabelsRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetLabelsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetLabelsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLabelsRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetLegacyAbacRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetLegacyAbacRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetLegacyAbacRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLegacyAbacRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetLocationsRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetLocationsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetLocationsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLocationsRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetLoggingServiceRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetLoggingServiceRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetLoggingServiceRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLoggingServiceRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetMaintenancePolicyRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetMaintenancePolicyRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetMaintenancePolicyRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMaintenancePolicyRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetMasterAuthRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetMasterAuthRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetMasterAuthRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMasterAuthRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetMonitoringServiceRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetMonitoringServiceRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetMonitoringServiceRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMonitoringServiceRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetNetworkPolicyRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetNetworkPolicyRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetNetworkPolicyRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNetworkPolicyRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetNodePoolAutoscalingRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetNodePoolAutoscalingRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetNodePoolAutoscalingRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolAutoscalingRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetNodePoolManagementRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetNodePoolManagementRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetNodePoolManagementRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolManagementRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetNodePoolSizeRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSetNodePoolSizeRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SetNodePoolSizeRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolSizeRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ShieldedInstanceConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildShieldedInstanceConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ShieldedInstanceConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkShieldedInstanceConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ShieldedNodes', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildShieldedNodes(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ShieldedNodes.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkShieldedNodes(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SliceControllerConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSliceControllerConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SliceControllerConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSliceControllerConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SlurmOperatorConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSlurmOperatorConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SlurmOperatorConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSlurmOperatorConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SoleTenantConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSoleTenantConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SoleTenantConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSoleTenantConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-StandardRolloutPolicy', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildStandardRolloutPolicy(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.StandardRolloutPolicy.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkStandardRolloutPolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-StartIPRotationRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildStartIPRotationRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.StartIPRotationRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkStartIPRotationRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-StatefulHAConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildStatefulHAConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.StatefulHAConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkStatefulHAConfig(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-StatusCondition', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildStatusCondition(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.StatusCondition.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkStatusCondition(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SwapConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSwapConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SwapConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSwapConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SyncRotationConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSyncRotationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SyncRotationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSyncRotationConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TaintConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildTaintConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.TaintConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkTaintConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TimeWindow', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildTimeWindow(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.TimeWindow.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkTimeWindow(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TopologyManager', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildTopologyManager(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.TopologyManager.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkTopologyManager(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UpdateClusterRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUpdateClusterRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UpdateClusterRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateClusterRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UpdateInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUpdateInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UpdateInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UpdateMasterRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUpdateMasterRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UpdateMasterRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateMasterRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UpdateNodePoolRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUpdateNodePoolRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UpdateNodePoolRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateNodePoolRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UpgradeDetails', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUpgradeDetails(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UpgradeDetails.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpgradeDetails(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UpgradeSettings', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUpgradeSettings(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UpgradeSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpgradeSettings(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UsableSubnetwork', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUsableSubnetwork(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UsableSubnetwork.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUsableSubnetwork(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UsableSubnetworkSecondaryRange', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUsableSubnetworkSecondaryRange(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UsableSubnetworkSecondaryRange.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUsableSubnetworkSecondaryRange(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserManagedKeysConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUserManagedKeysConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UserManagedKeysConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUserManagedKeysConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-VerticalPodAutoscaling', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildVerticalPodAutoscaling(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.VerticalPodAutoscaling.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkVerticalPodAutoscaling(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-VirtualNIC', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildVirtualNIC(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.VirtualNIC.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkVirtualNIC(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WindowsNodeConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildWindowsNodeConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.WindowsNodeConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkWindowsNodeConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WorkloadIdentityConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildWorkloadIdentityConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.WorkloadIdentityConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkWorkloadIdentityConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WorkloadMetadataConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildWorkloadMetadataConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.WorkloadMetadataConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkWorkloadMetadataConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WorkloadPolicyConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildWorkloadPolicyConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.WorkloadPolicyConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkWorkloadPolicyConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WritableCgroups', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildWritableCgroups(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.WritableCgroups.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkWritableCgroups(od); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAggregatedUsableSubnetworksResource', () { |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.aggregated.usableSubnetworks; |
| 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('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( |
| buildListUsableSubnetworksResponse(), |
| ); |
| 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, |
| ); |
| checkListUsableSubnetworksResponse( |
| response as api.ListUsableSubnetworksResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsResource', () { |
| unittest.test('method--getServerConfig', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations; |
| final arg_name = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildServerConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getServerConfig( |
| arg_name, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkServerConfig(response as api.ServerConfig); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsClustersResource', () { |
| unittest.test('method--checkAutopilotCompatibility', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| 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( |
| buildCheckAutopilotCompatibilityResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.checkAutopilotCompatibility( |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkCheckAutopilotCompatibilityResponse( |
| response as api.CheckAutopilotCompatibilityResponse, |
| ); |
| }); |
| |
| unittest.test('method--completeIpRotation', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildCompleteIPRotationRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CompleteIPRotationRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompleteIPRotationRequest(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.completeIpRotation( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildCreateClusterRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CreateClusterRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateClusterRequest(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.ContainerApi(mock).projects.locations.clusters; |
| final arg_name = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['clusterId']!.first, |
| unittest.equals(arg_clusterId), |
| ); |
| unittest.expect( |
| queryMap['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| 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, |
| clusterId: arg_clusterId, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--fetchClusterUpgradeInfo', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_name = 'foo'; |
| final arg_version = '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['version']!.first, |
| unittest.equals(arg_version), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildClusterUpgradeInfo()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.fetchClusterUpgradeInfo( |
| arg_name, |
| version: arg_version, |
| $fields: arg_$fields, |
| ); |
| checkClusterUpgradeInfo(response as api.ClusterUpgradeInfo); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_name = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['clusterId']!.first, |
| unittest.equals(arg_clusterId), |
| ); |
| unittest.expect( |
| queryMap['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCluster()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_name, |
| clusterId: arg_clusterId, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkCluster(response as api.Cluster); |
| }); |
| |
| unittest.test('method--getJwks', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_parent = '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(buildGetJSONWebKeysResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getJwks(arg_parent, $fields: arg_$fields); |
| checkGetJSONWebKeysResponse(response as api.GetJSONWebKeysResponse); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_parent = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListClustersResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkListClustersResponse(response as api.ListClustersResponse); |
| }); |
| |
| unittest.test('method--setAddons', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetAddonsConfigRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetAddonsConfigRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetAddonsConfigRequest(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.setAddons( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setLegacyAbac', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetLegacyAbacRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetLegacyAbacRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLegacyAbacRequest(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.setLegacyAbac( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setLocations', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetLocationsRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetLocationsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLocationsRequest(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.setLocations( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setLogging', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetLoggingServiceRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetLoggingServiceRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLoggingServiceRequest(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.setLogging( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setMaintenancePolicy', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetMaintenancePolicyRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetMaintenancePolicyRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMaintenancePolicyRequest(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.setMaintenancePolicy( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setMasterAuth', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetMasterAuthRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetMasterAuthRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMasterAuthRequest(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.setMasterAuth( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setMonitoring', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetMonitoringServiceRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetMonitoringServiceRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMonitoringServiceRequest(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.setMonitoring( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setNetworkPolicy', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetNetworkPolicyRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetNetworkPolicyRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNetworkPolicyRequest(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.setNetworkPolicy( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setResourceLabels', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildSetLabelsRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetLabelsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLabelsRequest(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.setResourceLabels( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--startIpRotation', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildStartIPRotationRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.StartIPRotationRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkStartIPRotationRequest(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.startIpRotation( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--update', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildUpdateClusterRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UpdateClusterRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateClusterRequest(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.update( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--updateMaster', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters; |
| final arg_request = buildUpdateMasterRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UpdateMasterRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateMasterRequest(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.updateMaster( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsClustersNodePoolsResource', () { |
| unittest.test('method--completeUpgrade', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_request = buildCompleteNodePoolUpgradeRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CompleteNodePoolUpgradeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompleteNodePoolUpgradeRequest(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.completeUpgrade( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkEmpty(response as api.Empty); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_request = buildCreateNodePoolRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CreateNodePoolRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateNodePoolRequest(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.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_name = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['clusterId']!.first, |
| unittest.equals(arg_clusterId), |
| ); |
| unittest.expect( |
| queryMap['nodePoolId']!.first, |
| unittest.equals(arg_nodePoolId), |
| ); |
| unittest.expect( |
| queryMap['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| 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, |
| clusterId: arg_clusterId, |
| nodePoolId: arg_nodePoolId, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--fetchNodePoolUpgradeInfo', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_name = 'foo'; |
| final arg_version = '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['version']!.first, |
| unittest.equals(arg_version), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildNodePoolUpgradeInfo()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.fetchNodePoolUpgradeInfo( |
| arg_name, |
| version: arg_version, |
| $fields: arg_$fields, |
| ); |
| checkNodePoolUpgradeInfo(response as api.NodePoolUpgradeInfo); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_name = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['clusterId']!.first, |
| unittest.equals(arg_clusterId), |
| ); |
| unittest.expect( |
| queryMap['nodePoolId']!.first, |
| unittest.equals(arg_nodePoolId), |
| ); |
| unittest.expect( |
| queryMap['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildNodePool()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_name, |
| clusterId: arg_clusterId, |
| nodePoolId: arg_nodePoolId, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkNodePool(response as api.NodePool); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_parent = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['clusterId']!.first, |
| unittest.equals(arg_clusterId), |
| ); |
| unittest.expect( |
| queryMap['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListNodePoolsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| clusterId: arg_clusterId, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkListNodePoolsResponse(response as api.ListNodePoolsResponse); |
| }); |
| |
| unittest.test('method--rollback', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_request = buildRollbackNodePoolUpgradeRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.RollbackNodePoolUpgradeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkRollbackNodePoolUpgradeRequest(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.rollback( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setAutoscaling', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_request = buildSetNodePoolAutoscalingRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetNodePoolAutoscalingRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolAutoscalingRequest(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.setAutoscaling( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setManagement', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_request = buildSetNodePoolManagementRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetNodePoolManagementRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolManagementRequest(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.setManagement( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setSize', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_request = buildSetNodePoolSizeRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetNodePoolSizeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolSizeRequest(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.setSize( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--update', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.nodePools; |
| final arg_request = buildUpdateNodePoolRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UpdateNodePoolRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateNodePoolRequest(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.update( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsClustersWellKnownResource', () { |
| unittest.test('method--getOpenidConfiguration', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.clusters.wellKnown; |
| final arg_parent = '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(buildGetOpenIDConfigResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getOpenidConfiguration( |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGetOpenIDConfigResponse(response as api.GetOpenIDConfigResponse); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsOperationsResource', () { |
| unittest.test('method--cancel', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.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--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.operations; |
| final arg_name = 'foo'; |
| final arg_operationId = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['operationId']!.first, |
| unittest.equals(arg_operationId), |
| ); |
| unittest.expect( |
| queryMap['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| 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, |
| operationId: arg_operationId, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.locations.operations; |
| final arg_parent = 'foo'; |
| final arg_projectId = 'foo'; |
| final arg_zone = '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['projectId']!.first, |
| unittest.equals(arg_projectId), |
| ); |
| unittest.expect(queryMap['zone']!.first, unittest.equals(arg_zone)); |
| 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_parent, |
| projectId: arg_projectId, |
| zone: arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkListOperationsResponse(response as api.ListOperationsResponse); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsZonesResource', () { |
| unittest.test('method--getServerconfig', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| 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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| index = path.indexOf('/serverconfig', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals('/serverconfig'), |
| ); |
| 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['name']!.first, unittest.equals(arg_name)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildServerConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getServerconfig( |
| arg_projectId, |
| arg_zone, |
| name: arg_name, |
| $fields: arg_$fields, |
| ); |
| checkServerConfig(response as api.ServerConfig); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsZonesClustersResource', () { |
| unittest.test('method--addons', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetAddonsConfigRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetAddonsConfigRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetAddonsConfigRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/addons', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals('/addons'), |
| ); |
| 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.addons( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--completeIpRotation', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildCompleteIPRotationRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CompleteIPRotationRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompleteIPRotationRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf(':completeIpRotation', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 19), |
| unittest.equals(':completeIpRotation'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.completeIpRotation( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildCreateClusterRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CreateClusterRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateClusterRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| 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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| 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['name']!.first, unittest.equals(arg_name)); |
| 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_projectId, |
| arg_zone, |
| arg_clusterId, |
| name: arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--fetchClusterUpgradeInfo', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_name = 'foo'; |
| final arg_version = '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['version']!.first, |
| unittest.equals(arg_version), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildClusterUpgradeInfo()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.fetchClusterUpgradeInfo( |
| arg_name, |
| version: arg_version, |
| $fields: arg_$fields, |
| ); |
| checkClusterUpgradeInfo(response as api.ClusterUpgradeInfo); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| 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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| 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['name']!.first, unittest.equals(arg_name)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCluster()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| name: arg_name, |
| $fields: arg_$fields, |
| ); |
| checkCluster(response as api.Cluster); |
| }); |
| |
| unittest.test('method--legacyAbac', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetLegacyAbacRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetLegacyAbacRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLegacyAbacRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/legacyAbac', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/legacyAbac'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.legacyAbac( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_parent = '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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| 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['parent']!.first, |
| unittest.equals(arg_parent), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListClustersResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_projectId, |
| arg_zone, |
| parent: arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkListClustersResponse(response as api.ListClustersResponse); |
| }); |
| |
| unittest.test('method--locations', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetLocationsRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetLocationsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLocationsRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| 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_clusterId')); |
| 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['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.locations( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--logging', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetLoggingServiceRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetLoggingServiceRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLoggingServiceRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/logging', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 8), |
| unittest.equals('/logging'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.logging( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--master', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildUpdateMasterRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UpdateMasterRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateMasterRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/master', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals('/master'), |
| ); |
| 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.master( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--monitoring', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetMonitoringServiceRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetMonitoringServiceRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMonitoringServiceRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/monitoring', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/monitoring'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.monitoring( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--resourceLabels', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetLabelsRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetLabelsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetLabelsRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/resourceLabels', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals('/resourceLabels'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.resourceLabels( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setMaintenancePolicy', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetMaintenancePolicyRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetMaintenancePolicyRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMaintenancePolicyRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf(':setMaintenancePolicy', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals(':setMaintenancePolicy'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.setMaintenancePolicy( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setMasterAuth', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetMasterAuthRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetMasterAuthRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetMasterAuthRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf(':setMasterAuth', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 14), |
| unittest.equals(':setMasterAuth'), |
| ); |
| 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['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.setMasterAuth( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setNetworkPolicy', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildSetNetworkPolicyRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetNetworkPolicyRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNetworkPolicyRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf(':setNetworkPolicy', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals(':setNetworkPolicy'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.setNetworkPolicy( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--startIpRotation', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildStartIPRotationRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.StartIPRotationRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkStartIPRotationRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf(':startIpRotation', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals(':startIpRotation'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.startIpRotation( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--update', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters; |
| final arg_request = buildUpdateClusterRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UpdateClusterRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateClusterRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.update( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsZonesClustersNodePoolsResource', () { |
| unittest.test('method--autoscaling', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_request = buildSetNodePoolAutoscalingRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetNodePoolAutoscalingRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolAutoscalingRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/nodePools/'), |
| ); |
| pathOffset += 11; |
| index = path.indexOf('/autoscaling', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_nodePoolId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals('/autoscaling'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.autoscaling( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| arg_nodePoolId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_request = buildCreateNodePoolRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CreateNodePoolRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateNodePoolRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/nodePools'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| 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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/nodePools/'), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect(subPart, unittest.equals('$arg_nodePoolId')); |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap['name']!.first, unittest.equals(arg_name)); |
| 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_projectId, |
| arg_zone, |
| arg_clusterId, |
| arg_nodePoolId, |
| name: arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--fetchNodePoolUpgradeInfo', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_name = 'foo'; |
| final arg_version = '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['version']!.first, |
| unittest.equals(arg_version), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildNodePoolUpgradeInfo()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.fetchNodePoolUpgradeInfo( |
| arg_name, |
| version: arg_version, |
| $fields: arg_$fields, |
| ); |
| checkNodePoolUpgradeInfo(response as api.NodePoolUpgradeInfo); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| 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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/nodePools/'), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect(subPart, unittest.equals('$arg_nodePoolId')); |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap['name']!.first, unittest.equals(arg_name)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildNodePool()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| arg_nodePoolId, |
| name: arg_name, |
| $fields: arg_$fields, |
| ); |
| checkNodePool(response as api.NodePool); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_parent = '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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/nodePools'), |
| ); |
| 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['parent']!.first, |
| unittest.equals(arg_parent), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListNodePoolsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| parent: arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkListNodePoolsResponse(response as api.ListNodePoolsResponse); |
| }); |
| |
| unittest.test('method--rollback', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_request = buildRollbackNodePoolUpgradeRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.RollbackNodePoolUpgradeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkRollbackNodePoolUpgradeRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/nodePools/'), |
| ); |
| pathOffset += 11; |
| index = path.indexOf(':rollback', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_nodePoolId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals(':rollback'), |
| ); |
| 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.rollback( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| arg_nodePoolId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setManagement', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_request = buildSetNodePoolManagementRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetNodePoolManagementRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolManagementRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/nodePools/'), |
| ); |
| pathOffset += 11; |
| index = path.indexOf('/setManagement', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_nodePoolId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 14), |
| unittest.equals('/setManagement'), |
| ); |
| 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['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.setManagement( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| arg_nodePoolId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--setSize', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_request = buildSetNodePoolSizeRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SetNodePoolSizeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSetNodePoolSizeRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/nodePools/'), |
| ); |
| pathOffset += 11; |
| index = path.indexOf('/setSize', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_nodePoolId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 8), |
| unittest.equals('/setSize'), |
| ); |
| 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(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.setSize( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| arg_nodePoolId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--update', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.clusters.nodePools; |
| final arg_request = buildUpdateNodePoolRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_clusterId = 'foo'; |
| final arg_nodePoolId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UpdateNodePoolRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateNodePoolRequest(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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals('/clusters/'), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/nodePools/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_clusterId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals('/nodePools/'), |
| ); |
| pathOffset += 11; |
| index = path.indexOf('/update', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_nodePoolId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals('/update'), |
| ); |
| 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.update( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_clusterId, |
| arg_nodePoolId, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsZonesOperationsResource', () { |
| unittest.test('method--cancel', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.operations; |
| final arg_request = buildCancelOperationRequest(); |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_operationId = '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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals('/operations/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf(':cancel', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = core.Uri.decodeQueryComponent( |
| path.substring(pathOffset, index), |
| ); |
| pathOffset = index; |
| unittest.expect(subPart, unittest.equals('$arg_operationId')); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals(':cancel'), |
| ); |
| 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(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.cancel( |
| arg_request, |
| arg_projectId, |
| arg_zone, |
| arg_operationId, |
| $fields: arg_$fields, |
| ); |
| checkEmpty(response as api.Empty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.operations; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_operationId = 'foo'; |
| 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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| 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_operationId')); |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap['name']!.first, unittest.equals(arg_name)); |
| 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_projectId, |
| arg_zone, |
| arg_operationId, |
| name: arg_name, |
| $fields: arg_$fields, |
| ); |
| checkOperation(response as api.Operation); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.ContainerApi(mock).projects.zones.operations; |
| final arg_projectId = 'foo'; |
| final arg_zone = 'foo'; |
| final arg_parent = '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 + 12), |
| unittest.equals('v1/projects/'), |
| ); |
| pathOffset += 12; |
| index = path.indexOf('/zones/', 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 + 7), |
| unittest.equals('/zones/'), |
| ); |
| pathOffset += 7; |
| 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_zone')); |
| 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['parent']!.first, |
| unittest.equals(arg_parent), |
| ); |
| 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_projectId, |
| arg_zone, |
| parent: arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkListOperationsResponse(response as api.ListOperationsResponse); |
| }); |
| }); |
| } |