blob: 0f21fb8e3b64a568620e4d763360c6ee9cccdd45 [file] [log] [blame]
library googleapis_beta.videointelligence.v1beta1.test;
import "dart:core" as core;
import "dart:async" as async;
import "dart:convert" as convert;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import 'package:googleapis_beta/videointelligence/v1beta1.dart' as api;
class HttpServerMock extends http.BaseClient {
core.Function _callback;
core.bool _expectJson;
void register(core.Function callback, core.bool expectJson) {
_callback = callback;
_expectJson = expectJson;
}
async.Future<http.StreamedResponse> send(http.BaseRequest request) {
if (_expectJson) {
return request
.finalize()
.transform(convert.UTF8.decoder)
.join('')
.then((core.String jsonString) {
if (jsonString.isEmpty) {
return _callback(request, null);
} else {
return _callback(request, convert.JSON.decode(jsonString));
}
});
} else {
var stream = request.finalize();
if (stream == null) {
return _callback(request, []);
} else {
return stream.toBytes().then((data) {
return _callback(request, data);
});
}
}
}
}
http.StreamedResponse stringResponse(core.int status,
core.Map<core.String, core.String> headers, core.String body) {
var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
return new http.StreamedResponse(stream, status, headers: headers);
}
buildUnnamed4016() {
var o = new core
.List<api.GoogleCloudVideointelligenceV1VideoAnnotationProgress>();
o.add(buildGoogleCloudVideointelligenceV1VideoAnnotationProgress());
o.add(buildGoogleCloudVideointelligenceV1VideoAnnotationProgress());
return o;
}
checkUnnamed4016(
core.List<api.GoogleCloudVideointelligenceV1VideoAnnotationProgress> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1VideoAnnotationProgress(o[0]);
checkGoogleCloudVideointelligenceV1VideoAnnotationProgress(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1AnnotateVideoProgress = 0;
buildGoogleCloudVideointelligenceV1AnnotateVideoProgress() {
var o = new api.GoogleCloudVideointelligenceV1AnnotateVideoProgress();
buildCounterGoogleCloudVideointelligenceV1AnnotateVideoProgress++;
if (buildCounterGoogleCloudVideointelligenceV1AnnotateVideoProgress < 3) {
o.annotationProgress = buildUnnamed4016();
}
buildCounterGoogleCloudVideointelligenceV1AnnotateVideoProgress--;
return o;
}
checkGoogleCloudVideointelligenceV1AnnotateVideoProgress(
api.GoogleCloudVideointelligenceV1AnnotateVideoProgress o) {
buildCounterGoogleCloudVideointelligenceV1AnnotateVideoProgress++;
if (buildCounterGoogleCloudVideointelligenceV1AnnotateVideoProgress < 3) {
checkUnnamed4016(o.annotationProgress);
}
buildCounterGoogleCloudVideointelligenceV1AnnotateVideoProgress--;
}
buildUnnamed4017() {
var o =
new core.List<api.GoogleCloudVideointelligenceV1VideoAnnotationResults>();
o.add(buildGoogleCloudVideointelligenceV1VideoAnnotationResults());
o.add(buildGoogleCloudVideointelligenceV1VideoAnnotationResults());
return o;
}
checkUnnamed4017(
core.List<api.GoogleCloudVideointelligenceV1VideoAnnotationResults> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1VideoAnnotationResults(o[0]);
checkGoogleCloudVideointelligenceV1VideoAnnotationResults(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1AnnotateVideoResponse = 0;
buildGoogleCloudVideointelligenceV1AnnotateVideoResponse() {
var o = new api.GoogleCloudVideointelligenceV1AnnotateVideoResponse();
buildCounterGoogleCloudVideointelligenceV1AnnotateVideoResponse++;
if (buildCounterGoogleCloudVideointelligenceV1AnnotateVideoResponse < 3) {
o.annotationResults = buildUnnamed4017();
}
buildCounterGoogleCloudVideointelligenceV1AnnotateVideoResponse--;
return o;
}
checkGoogleCloudVideointelligenceV1AnnotateVideoResponse(
api.GoogleCloudVideointelligenceV1AnnotateVideoResponse o) {
buildCounterGoogleCloudVideointelligenceV1AnnotateVideoResponse++;
if (buildCounterGoogleCloudVideointelligenceV1AnnotateVideoResponse < 3) {
checkUnnamed4017(o.annotationResults);
}
buildCounterGoogleCloudVideointelligenceV1AnnotateVideoResponse--;
}
core.int buildCounterGoogleCloudVideointelligenceV1Entity = 0;
buildGoogleCloudVideointelligenceV1Entity() {
var o = new api.GoogleCloudVideointelligenceV1Entity();
buildCounterGoogleCloudVideointelligenceV1Entity++;
if (buildCounterGoogleCloudVideointelligenceV1Entity < 3) {
o.description = "foo";
o.entityId = "foo";
o.languageCode = "foo";
}
buildCounterGoogleCloudVideointelligenceV1Entity--;
return o;
}
checkGoogleCloudVideointelligenceV1Entity(
api.GoogleCloudVideointelligenceV1Entity o) {
buildCounterGoogleCloudVideointelligenceV1Entity++;
if (buildCounterGoogleCloudVideointelligenceV1Entity < 3) {
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.entityId, unittest.equals('foo'));
unittest.expect(o.languageCode, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1Entity--;
}
buildUnnamed4018() {
var o =
new core.List<api.GoogleCloudVideointelligenceV1ExplicitContentFrame>();
o.add(buildGoogleCloudVideointelligenceV1ExplicitContentFrame());
o.add(buildGoogleCloudVideointelligenceV1ExplicitContentFrame());
return o;
}
checkUnnamed4018(
core.List<api.GoogleCloudVideointelligenceV1ExplicitContentFrame> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1ExplicitContentFrame(o[0]);
checkGoogleCloudVideointelligenceV1ExplicitContentFrame(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1ExplicitContentAnnotation =
0;
buildGoogleCloudVideointelligenceV1ExplicitContentAnnotation() {
var o = new api.GoogleCloudVideointelligenceV1ExplicitContentAnnotation();
buildCounterGoogleCloudVideointelligenceV1ExplicitContentAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1ExplicitContentAnnotation < 3) {
o.frames = buildUnnamed4018();
}
buildCounterGoogleCloudVideointelligenceV1ExplicitContentAnnotation--;
return o;
}
checkGoogleCloudVideointelligenceV1ExplicitContentAnnotation(
api.GoogleCloudVideointelligenceV1ExplicitContentAnnotation o) {
buildCounterGoogleCloudVideointelligenceV1ExplicitContentAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1ExplicitContentAnnotation < 3) {
checkUnnamed4018(o.frames);
}
buildCounterGoogleCloudVideointelligenceV1ExplicitContentAnnotation--;
}
core.int buildCounterGoogleCloudVideointelligenceV1ExplicitContentFrame = 0;
buildGoogleCloudVideointelligenceV1ExplicitContentFrame() {
var o = new api.GoogleCloudVideointelligenceV1ExplicitContentFrame();
buildCounterGoogleCloudVideointelligenceV1ExplicitContentFrame++;
if (buildCounterGoogleCloudVideointelligenceV1ExplicitContentFrame < 3) {
o.pornographyLikelihood = "foo";
o.timeOffset = "foo";
}
buildCounterGoogleCloudVideointelligenceV1ExplicitContentFrame--;
return o;
}
checkGoogleCloudVideointelligenceV1ExplicitContentFrame(
api.GoogleCloudVideointelligenceV1ExplicitContentFrame o) {
buildCounterGoogleCloudVideointelligenceV1ExplicitContentFrame++;
if (buildCounterGoogleCloudVideointelligenceV1ExplicitContentFrame < 3) {
unittest.expect(o.pornographyLikelihood, unittest.equals('foo'));
unittest.expect(o.timeOffset, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1ExplicitContentFrame--;
}
buildUnnamed4019() {
var o = new core.List<api.GoogleCloudVideointelligenceV1Entity>();
o.add(buildGoogleCloudVideointelligenceV1Entity());
o.add(buildGoogleCloudVideointelligenceV1Entity());
return o;
}
checkUnnamed4019(core.List<api.GoogleCloudVideointelligenceV1Entity> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1Entity(o[0]);
checkGoogleCloudVideointelligenceV1Entity(o[1]);
}
buildUnnamed4020() {
var o = new core.List<api.GoogleCloudVideointelligenceV1LabelFrame>();
o.add(buildGoogleCloudVideointelligenceV1LabelFrame());
o.add(buildGoogleCloudVideointelligenceV1LabelFrame());
return o;
}
checkUnnamed4020(core.List<api.GoogleCloudVideointelligenceV1LabelFrame> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1LabelFrame(o[0]);
checkGoogleCloudVideointelligenceV1LabelFrame(o[1]);
}
buildUnnamed4021() {
var o = new core.List<api.GoogleCloudVideointelligenceV1LabelSegment>();
o.add(buildGoogleCloudVideointelligenceV1LabelSegment());
o.add(buildGoogleCloudVideointelligenceV1LabelSegment());
return o;
}
checkUnnamed4021(core.List<api.GoogleCloudVideointelligenceV1LabelSegment> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1LabelSegment(o[0]);
checkGoogleCloudVideointelligenceV1LabelSegment(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1LabelAnnotation = 0;
buildGoogleCloudVideointelligenceV1LabelAnnotation() {
var o = new api.GoogleCloudVideointelligenceV1LabelAnnotation();
buildCounterGoogleCloudVideointelligenceV1LabelAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1LabelAnnotation < 3) {
o.categoryEntities = buildUnnamed4019();
o.entity = buildGoogleCloudVideointelligenceV1Entity();
o.frames = buildUnnamed4020();
o.segments = buildUnnamed4021();
}
buildCounterGoogleCloudVideointelligenceV1LabelAnnotation--;
return o;
}
checkGoogleCloudVideointelligenceV1LabelAnnotation(
api.GoogleCloudVideointelligenceV1LabelAnnotation o) {
buildCounterGoogleCloudVideointelligenceV1LabelAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1LabelAnnotation < 3) {
checkUnnamed4019(o.categoryEntities);
checkGoogleCloudVideointelligenceV1Entity(o.entity);
checkUnnamed4020(o.frames);
checkUnnamed4021(o.segments);
}
buildCounterGoogleCloudVideointelligenceV1LabelAnnotation--;
}
core.int buildCounterGoogleCloudVideointelligenceV1LabelFrame = 0;
buildGoogleCloudVideointelligenceV1LabelFrame() {
var o = new api.GoogleCloudVideointelligenceV1LabelFrame();
buildCounterGoogleCloudVideointelligenceV1LabelFrame++;
if (buildCounterGoogleCloudVideointelligenceV1LabelFrame < 3) {
o.confidence = 42.0;
o.timeOffset = "foo";
}
buildCounterGoogleCloudVideointelligenceV1LabelFrame--;
return o;
}
checkGoogleCloudVideointelligenceV1LabelFrame(
api.GoogleCloudVideointelligenceV1LabelFrame o) {
buildCounterGoogleCloudVideointelligenceV1LabelFrame++;
if (buildCounterGoogleCloudVideointelligenceV1LabelFrame < 3) {
unittest.expect(o.confidence, unittest.equals(42.0));
unittest.expect(o.timeOffset, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1LabelFrame--;
}
core.int buildCounterGoogleCloudVideointelligenceV1LabelSegment = 0;
buildGoogleCloudVideointelligenceV1LabelSegment() {
var o = new api.GoogleCloudVideointelligenceV1LabelSegment();
buildCounterGoogleCloudVideointelligenceV1LabelSegment++;
if (buildCounterGoogleCloudVideointelligenceV1LabelSegment < 3) {
o.confidence = 42.0;
o.segment = buildGoogleCloudVideointelligenceV1VideoSegment();
}
buildCounterGoogleCloudVideointelligenceV1LabelSegment--;
return o;
}
checkGoogleCloudVideointelligenceV1LabelSegment(
api.GoogleCloudVideointelligenceV1LabelSegment o) {
buildCounterGoogleCloudVideointelligenceV1LabelSegment++;
if (buildCounterGoogleCloudVideointelligenceV1LabelSegment < 3) {
unittest.expect(o.confidence, unittest.equals(42.0));
checkGoogleCloudVideointelligenceV1VideoSegment(o.segment);
}
buildCounterGoogleCloudVideointelligenceV1LabelSegment--;
}
core.int buildCounterGoogleCloudVideointelligenceV1VideoAnnotationProgress = 0;
buildGoogleCloudVideointelligenceV1VideoAnnotationProgress() {
var o = new api.GoogleCloudVideointelligenceV1VideoAnnotationProgress();
buildCounterGoogleCloudVideointelligenceV1VideoAnnotationProgress++;
if (buildCounterGoogleCloudVideointelligenceV1VideoAnnotationProgress < 3) {
o.inputUri = "foo";
o.progressPercent = 42;
o.startTime = "foo";
o.updateTime = "foo";
}
buildCounterGoogleCloudVideointelligenceV1VideoAnnotationProgress--;
return o;
}
checkGoogleCloudVideointelligenceV1VideoAnnotationProgress(
api.GoogleCloudVideointelligenceV1VideoAnnotationProgress o) {
buildCounterGoogleCloudVideointelligenceV1VideoAnnotationProgress++;
if (buildCounterGoogleCloudVideointelligenceV1VideoAnnotationProgress < 3) {
unittest.expect(o.inputUri, unittest.equals('foo'));
unittest.expect(o.progressPercent, unittest.equals(42));
unittest.expect(o.startTime, unittest.equals('foo'));
unittest.expect(o.updateTime, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1VideoAnnotationProgress--;
}
buildUnnamed4022() {
var o = new core.List<api.GoogleCloudVideointelligenceV1LabelAnnotation>();
o.add(buildGoogleCloudVideointelligenceV1LabelAnnotation());
o.add(buildGoogleCloudVideointelligenceV1LabelAnnotation());
return o;
}
checkUnnamed4022(
core.List<api.GoogleCloudVideointelligenceV1LabelAnnotation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1LabelAnnotation(o[0]);
checkGoogleCloudVideointelligenceV1LabelAnnotation(o[1]);
}
buildUnnamed4023() {
var o = new core.List<api.GoogleCloudVideointelligenceV1LabelAnnotation>();
o.add(buildGoogleCloudVideointelligenceV1LabelAnnotation());
o.add(buildGoogleCloudVideointelligenceV1LabelAnnotation());
return o;
}
checkUnnamed4023(
core.List<api.GoogleCloudVideointelligenceV1LabelAnnotation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1LabelAnnotation(o[0]);
checkGoogleCloudVideointelligenceV1LabelAnnotation(o[1]);
}
buildUnnamed4024() {
var o = new core.List<api.GoogleCloudVideointelligenceV1VideoSegment>();
o.add(buildGoogleCloudVideointelligenceV1VideoSegment());
o.add(buildGoogleCloudVideointelligenceV1VideoSegment());
return o;
}
checkUnnamed4024(core.List<api.GoogleCloudVideointelligenceV1VideoSegment> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1VideoSegment(o[0]);
checkGoogleCloudVideointelligenceV1VideoSegment(o[1]);
}
buildUnnamed4025() {
var o = new core.List<api.GoogleCloudVideointelligenceV1LabelAnnotation>();
o.add(buildGoogleCloudVideointelligenceV1LabelAnnotation());
o.add(buildGoogleCloudVideointelligenceV1LabelAnnotation());
return o;
}
checkUnnamed4025(
core.List<api.GoogleCloudVideointelligenceV1LabelAnnotation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1LabelAnnotation(o[0]);
checkGoogleCloudVideointelligenceV1LabelAnnotation(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1VideoAnnotationResults = 0;
buildGoogleCloudVideointelligenceV1VideoAnnotationResults() {
var o = new api.GoogleCloudVideointelligenceV1VideoAnnotationResults();
buildCounterGoogleCloudVideointelligenceV1VideoAnnotationResults++;
if (buildCounterGoogleCloudVideointelligenceV1VideoAnnotationResults < 3) {
o.error = buildGoogleRpcStatus();
o.explicitAnnotation =
buildGoogleCloudVideointelligenceV1ExplicitContentAnnotation();
o.frameLabelAnnotations = buildUnnamed4022();
o.inputUri = "foo";
o.segmentLabelAnnotations = buildUnnamed4023();
o.shotAnnotations = buildUnnamed4024();
o.shotLabelAnnotations = buildUnnamed4025();
}
buildCounterGoogleCloudVideointelligenceV1VideoAnnotationResults--;
return o;
}
checkGoogleCloudVideointelligenceV1VideoAnnotationResults(
api.GoogleCloudVideointelligenceV1VideoAnnotationResults o) {
buildCounterGoogleCloudVideointelligenceV1VideoAnnotationResults++;
if (buildCounterGoogleCloudVideointelligenceV1VideoAnnotationResults < 3) {
checkGoogleRpcStatus(o.error);
checkGoogleCloudVideointelligenceV1ExplicitContentAnnotation(
o.explicitAnnotation);
checkUnnamed4022(o.frameLabelAnnotations);
unittest.expect(o.inputUri, unittest.equals('foo'));
checkUnnamed4023(o.segmentLabelAnnotations);
checkUnnamed4024(o.shotAnnotations);
checkUnnamed4025(o.shotLabelAnnotations);
}
buildCounterGoogleCloudVideointelligenceV1VideoAnnotationResults--;
}
core.int buildCounterGoogleCloudVideointelligenceV1VideoSegment = 0;
buildGoogleCloudVideointelligenceV1VideoSegment() {
var o = new api.GoogleCloudVideointelligenceV1VideoSegment();
buildCounterGoogleCloudVideointelligenceV1VideoSegment++;
if (buildCounterGoogleCloudVideointelligenceV1VideoSegment < 3) {
o.endTimeOffset = "foo";
o.startTimeOffset = "foo";
}
buildCounterGoogleCloudVideointelligenceV1VideoSegment--;
return o;
}
checkGoogleCloudVideointelligenceV1VideoSegment(
api.GoogleCloudVideointelligenceV1VideoSegment o) {
buildCounterGoogleCloudVideointelligenceV1VideoSegment++;
if (buildCounterGoogleCloudVideointelligenceV1VideoSegment < 3) {
unittest.expect(o.endTimeOffset, unittest.equals('foo'));
unittest.expect(o.startTimeOffset, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1VideoSegment--;
}
buildUnnamed4026() {
var o = new core
.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress>();
o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress());
o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress());
return o;
}
checkUnnamed4026(
core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress>
o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress(o[0]);
checkGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress =
0;
buildGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress() {
var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress();
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress++;
if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress <
3) {
o.annotationProgress = buildUnnamed4026();
}
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress(
api.GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress o) {
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress++;
if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress <
3) {
checkUnnamed4026(o.annotationProgress);
}
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress--;
}
buildUnnamed4027() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed4027(core.List<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 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest =
0;
buildGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest() {
var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest();
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest++;
if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest < 3) {
o.features = buildUnnamed4027();
o.inputContent = "foo";
o.inputUri = "foo";
o.locationId = "foo";
o.outputUri = "foo";
o.videoContext = buildGoogleCloudVideointelligenceV1beta1VideoContext();
}
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(
api.GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest o) {
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest++;
if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest < 3) {
checkUnnamed4027(o.features);
unittest.expect(o.inputContent, unittest.equals('foo'));
unittest.expect(o.inputUri, unittest.equals('foo'));
unittest.expect(o.locationId, unittest.equals('foo'));
unittest.expect(o.outputUri, unittest.equals('foo'));
checkGoogleCloudVideointelligenceV1beta1VideoContext(o.videoContext);
}
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest--;
}
buildUnnamed4028() {
var o = new core
.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotationResults>();
o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults());
o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults());
return o;
}
checkUnnamed4028(
core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotationResults>
o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(o[0]);
checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse =
0;
buildGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse() {
var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse();
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse++;
if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse <
3) {
o.annotationResults = buildUnnamed4028();
}
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse(
api.GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse o) {
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse++;
if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse <
3) {
checkUnnamed4028(o.annotationResults);
}
buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse--;
}
buildUnnamed4029() {
var o = new core.List<api.GoogleCloudVideointelligenceV1beta1LabelLocation>();
o.add(buildGoogleCloudVideointelligenceV1beta1LabelLocation());
o.add(buildGoogleCloudVideointelligenceV1beta1LabelLocation());
return o;
}
checkUnnamed4029(
core.List<api.GoogleCloudVideointelligenceV1beta1LabelLocation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta1LabelLocation(o[0]);
checkGoogleCloudVideointelligenceV1beta1LabelLocation(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation = 0;
buildGoogleCloudVideointelligenceV1beta1LabelAnnotation() {
var o = new api.GoogleCloudVideointelligenceV1beta1LabelAnnotation();
buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation < 3) {
o.description = "foo";
o.languageCode = "foo";
o.locations = buildUnnamed4029();
}
buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(
api.GoogleCloudVideointelligenceV1beta1LabelAnnotation o) {
buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation < 3) {
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.languageCode, unittest.equals('foo'));
checkUnnamed4029(o.locations);
}
buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation--;
}
core.int buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation = 0;
buildGoogleCloudVideointelligenceV1beta1LabelLocation() {
var o = new api.GoogleCloudVideointelligenceV1beta1LabelLocation();
buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation++;
if (buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation < 3) {
o.confidence = 42.0;
o.level = "foo";
o.segment = buildGoogleCloudVideointelligenceV1beta1VideoSegment();
}
buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1LabelLocation(
api.GoogleCloudVideointelligenceV1beta1LabelLocation o) {
buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation++;
if (buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation < 3) {
unittest.expect(o.confidence, unittest.equals(42.0));
unittest.expect(o.level, unittest.equals('foo'));
checkGoogleCloudVideointelligenceV1beta1VideoSegment(o.segment);
}
buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation--;
}
core.int buildCounterGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation =
0;
buildGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation() {
var o = new api.GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation();
buildCounterGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation < 3) {
o.adult = "foo";
o.medical = "foo";
o.racy = "foo";
o.spoof = "foo";
o.timeOffset = "foo";
o.violent = "foo";
}
buildCounterGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation(
api.GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation o) {
buildCounterGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation < 3) {
unittest.expect(o.adult, unittest.equals('foo'));
unittest.expect(o.medical, unittest.equals('foo'));
unittest.expect(o.racy, unittest.equals('foo'));
unittest.expect(o.spoof, unittest.equals('foo'));
unittest.expect(o.timeOffset, unittest.equals('foo'));
unittest.expect(o.violent, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation--;
}
core.int
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress = 0;
buildGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress() {
var o = new api.GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress();
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress++;
if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress <
3) {
o.inputUri = "foo";
o.progressPercent = 42;
o.startTime = "foo";
o.updateTime = "foo";
}
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress(
api.GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress o) {
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress++;
if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress <
3) {
unittest.expect(o.inputUri, unittest.equals('foo'));
unittest.expect(o.progressPercent, unittest.equals(42));
unittest.expect(o.startTime, unittest.equals('foo'));
unittest.expect(o.updateTime, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress--;
}
buildUnnamed4030() {
var o =
new core.List<api.GoogleCloudVideointelligenceV1beta1LabelAnnotation>();
o.add(buildGoogleCloudVideointelligenceV1beta1LabelAnnotation());
o.add(buildGoogleCloudVideointelligenceV1beta1LabelAnnotation());
return o;
}
checkUnnamed4030(
core.List<api.GoogleCloudVideointelligenceV1beta1LabelAnnotation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(o[0]);
checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(o[1]);
}
buildUnnamed4031() {
var o = new core
.List<api.GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation>();
o.add(buildGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation());
o.add(buildGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation());
return o;
}
checkUnnamed4031(
core.List<api.GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation(o[0]);
checkGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation(o[1]);
}
buildUnnamed4032() {
var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>();
o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment());
o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment());
return o;
}
checkUnnamed4032(
core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[0]);
checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults =
0;
buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults() {
var o = new api.GoogleCloudVideointelligenceV1beta1VideoAnnotationResults();
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults++;
if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults <
3) {
o.error = buildGoogleRpcStatus();
o.inputUri = "foo";
o.labelAnnotations = buildUnnamed4030();
o.safeSearchAnnotations = buildUnnamed4031();
o.shotAnnotations = buildUnnamed4032();
}
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(
api.GoogleCloudVideointelligenceV1beta1VideoAnnotationResults o) {
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults++;
if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults <
3) {
checkGoogleRpcStatus(o.error);
unittest.expect(o.inputUri, unittest.equals('foo'));
checkUnnamed4030(o.labelAnnotations);
checkUnnamed4031(o.safeSearchAnnotations);
checkUnnamed4032(o.shotAnnotations);
}
buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults--;
}
buildUnnamed4033() {
var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>();
o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment());
o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment());
return o;
}
checkUnnamed4033(
core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[0]);
checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoContext = 0;
buildGoogleCloudVideointelligenceV1beta1VideoContext() {
var o = new api.GoogleCloudVideointelligenceV1beta1VideoContext();
buildCounterGoogleCloudVideointelligenceV1beta1VideoContext++;
if (buildCounterGoogleCloudVideointelligenceV1beta1VideoContext < 3) {
o.labelDetectionMode = "foo";
o.labelDetectionModel = "foo";
o.safeSearchDetectionModel = "foo";
o.segments = buildUnnamed4033();
o.shotChangeDetectionModel = "foo";
o.stationaryCamera = true;
}
buildCounterGoogleCloudVideointelligenceV1beta1VideoContext--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1VideoContext(
api.GoogleCloudVideointelligenceV1beta1VideoContext o) {
buildCounterGoogleCloudVideointelligenceV1beta1VideoContext++;
if (buildCounterGoogleCloudVideointelligenceV1beta1VideoContext < 3) {
unittest.expect(o.labelDetectionMode, unittest.equals('foo'));
unittest.expect(o.labelDetectionModel, unittest.equals('foo'));
unittest.expect(o.safeSearchDetectionModel, unittest.equals('foo'));
checkUnnamed4033(o.segments);
unittest.expect(o.shotChangeDetectionModel, unittest.equals('foo'));
unittest.expect(o.stationaryCamera, unittest.isTrue);
}
buildCounterGoogleCloudVideointelligenceV1beta1VideoContext--;
}
core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment = 0;
buildGoogleCloudVideointelligenceV1beta1VideoSegment() {
var o = new api.GoogleCloudVideointelligenceV1beta1VideoSegment();
buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment++;
if (buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment < 3) {
o.endTimeOffset = "foo";
o.startTimeOffset = "foo";
}
buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment--;
return o;
}
checkGoogleCloudVideointelligenceV1beta1VideoSegment(
api.GoogleCloudVideointelligenceV1beta1VideoSegment o) {
buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment++;
if (buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment < 3) {
unittest.expect(o.endTimeOffset, unittest.equals('foo'));
unittest.expect(o.startTimeOffset, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment--;
}
buildUnnamed4034() {
var o = new core
.List<api.GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress>();
o.add(buildGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress());
o.add(buildGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress());
return o;
}
checkUnnamed4034(
core.List<api.GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress>
o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress(o[0]);
checkGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress =
0;
buildGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress() {
var o = new api.GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress();
buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress++;
if (buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress <
3) {
o.annotationProgress = buildUnnamed4034();
}
buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress(
api.GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress o) {
buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress++;
if (buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress <
3) {
checkUnnamed4034(o.annotationProgress);
}
buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress--;
}
buildUnnamed4035() {
var o = new core
.List<api.GoogleCloudVideointelligenceV1beta2VideoAnnotationResults>();
o.add(buildGoogleCloudVideointelligenceV1beta2VideoAnnotationResults());
o.add(buildGoogleCloudVideointelligenceV1beta2VideoAnnotationResults());
return o;
}
checkUnnamed4035(
core.List<api.GoogleCloudVideointelligenceV1beta2VideoAnnotationResults>
o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2VideoAnnotationResults(o[0]);
checkGoogleCloudVideointelligenceV1beta2VideoAnnotationResults(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse =
0;
buildGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse() {
var o = new api.GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse();
buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse++;
if (buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse <
3) {
o.annotationResults = buildUnnamed4035();
}
buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse(
api.GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse o) {
buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse++;
if (buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse <
3) {
checkUnnamed4035(o.annotationResults);
}
buildCounterGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse--;
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2Entity = 0;
buildGoogleCloudVideointelligenceV1beta2Entity() {
var o = new api.GoogleCloudVideointelligenceV1beta2Entity();
buildCounterGoogleCloudVideointelligenceV1beta2Entity++;
if (buildCounterGoogleCloudVideointelligenceV1beta2Entity < 3) {
o.description = "foo";
o.entityId = "foo";
o.languageCode = "foo";
}
buildCounterGoogleCloudVideointelligenceV1beta2Entity--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2Entity(
api.GoogleCloudVideointelligenceV1beta2Entity o) {
buildCounterGoogleCloudVideointelligenceV1beta2Entity++;
if (buildCounterGoogleCloudVideointelligenceV1beta2Entity < 3) {
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.entityId, unittest.equals('foo'));
unittest.expect(o.languageCode, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1beta2Entity--;
}
buildUnnamed4036() {
var o = new core
.List<api.GoogleCloudVideointelligenceV1beta2ExplicitContentFrame>();
o.add(buildGoogleCloudVideointelligenceV1beta2ExplicitContentFrame());
o.add(buildGoogleCloudVideointelligenceV1beta2ExplicitContentFrame());
return o;
}
checkUnnamed4036(
core.List<api.GoogleCloudVideointelligenceV1beta2ExplicitContentFrame> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2ExplicitContentFrame(o[0]);
checkGoogleCloudVideointelligenceV1beta2ExplicitContentFrame(o[1]);
}
core.int
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation =
0;
buildGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation() {
var o =
new api.GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation();
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation <
3) {
o.frames = buildUnnamed4036();
}
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation(
api.GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation o) {
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation <
3) {
checkUnnamed4036(o.frames);
}
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation--;
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentFrame =
0;
buildGoogleCloudVideointelligenceV1beta2ExplicitContentFrame() {
var o = new api.GoogleCloudVideointelligenceV1beta2ExplicitContentFrame();
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentFrame++;
if (buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentFrame < 3) {
o.pornographyLikelihood = "foo";
o.timeOffset = "foo";
}
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentFrame--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2ExplicitContentFrame(
api.GoogleCloudVideointelligenceV1beta2ExplicitContentFrame o) {
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentFrame++;
if (buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentFrame < 3) {
unittest.expect(o.pornographyLikelihood, unittest.equals('foo'));
unittest.expect(o.timeOffset, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1beta2ExplicitContentFrame--;
}
buildUnnamed4037() {
var o = new core.List<api.GoogleCloudVideointelligenceV1beta2Entity>();
o.add(buildGoogleCloudVideointelligenceV1beta2Entity());
o.add(buildGoogleCloudVideointelligenceV1beta2Entity());
return o;
}
checkUnnamed4037(core.List<api.GoogleCloudVideointelligenceV1beta2Entity> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2Entity(o[0]);
checkGoogleCloudVideointelligenceV1beta2Entity(o[1]);
}
buildUnnamed4038() {
var o = new core.List<api.GoogleCloudVideointelligenceV1beta2LabelFrame>();
o.add(buildGoogleCloudVideointelligenceV1beta2LabelFrame());
o.add(buildGoogleCloudVideointelligenceV1beta2LabelFrame());
return o;
}
checkUnnamed4038(
core.List<api.GoogleCloudVideointelligenceV1beta2LabelFrame> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2LabelFrame(o[0]);
checkGoogleCloudVideointelligenceV1beta2LabelFrame(o[1]);
}
buildUnnamed4039() {
var o = new core.List<api.GoogleCloudVideointelligenceV1beta2LabelSegment>();
o.add(buildGoogleCloudVideointelligenceV1beta2LabelSegment());
o.add(buildGoogleCloudVideointelligenceV1beta2LabelSegment());
return o;
}
checkUnnamed4039(
core.List<api.GoogleCloudVideointelligenceV1beta2LabelSegment> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2LabelSegment(o[0]);
checkGoogleCloudVideointelligenceV1beta2LabelSegment(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2LabelAnnotation = 0;
buildGoogleCloudVideointelligenceV1beta2LabelAnnotation() {
var o = new api.GoogleCloudVideointelligenceV1beta2LabelAnnotation();
buildCounterGoogleCloudVideointelligenceV1beta2LabelAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1beta2LabelAnnotation < 3) {
o.categoryEntities = buildUnnamed4037();
o.entity = buildGoogleCloudVideointelligenceV1beta2Entity();
o.frames = buildUnnamed4038();
o.segments = buildUnnamed4039();
}
buildCounterGoogleCloudVideointelligenceV1beta2LabelAnnotation--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2LabelAnnotation(
api.GoogleCloudVideointelligenceV1beta2LabelAnnotation o) {
buildCounterGoogleCloudVideointelligenceV1beta2LabelAnnotation++;
if (buildCounterGoogleCloudVideointelligenceV1beta2LabelAnnotation < 3) {
checkUnnamed4037(o.categoryEntities);
checkGoogleCloudVideointelligenceV1beta2Entity(o.entity);
checkUnnamed4038(o.frames);
checkUnnamed4039(o.segments);
}
buildCounterGoogleCloudVideointelligenceV1beta2LabelAnnotation--;
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2LabelFrame = 0;
buildGoogleCloudVideointelligenceV1beta2LabelFrame() {
var o = new api.GoogleCloudVideointelligenceV1beta2LabelFrame();
buildCounterGoogleCloudVideointelligenceV1beta2LabelFrame++;
if (buildCounterGoogleCloudVideointelligenceV1beta2LabelFrame < 3) {
o.confidence = 42.0;
o.timeOffset = "foo";
}
buildCounterGoogleCloudVideointelligenceV1beta2LabelFrame--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2LabelFrame(
api.GoogleCloudVideointelligenceV1beta2LabelFrame o) {
buildCounterGoogleCloudVideointelligenceV1beta2LabelFrame++;
if (buildCounterGoogleCloudVideointelligenceV1beta2LabelFrame < 3) {
unittest.expect(o.confidence, unittest.equals(42.0));
unittest.expect(o.timeOffset, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1beta2LabelFrame--;
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2LabelSegment = 0;
buildGoogleCloudVideointelligenceV1beta2LabelSegment() {
var o = new api.GoogleCloudVideointelligenceV1beta2LabelSegment();
buildCounterGoogleCloudVideointelligenceV1beta2LabelSegment++;
if (buildCounterGoogleCloudVideointelligenceV1beta2LabelSegment < 3) {
o.confidence = 42.0;
o.segment = buildGoogleCloudVideointelligenceV1beta2VideoSegment();
}
buildCounterGoogleCloudVideointelligenceV1beta2LabelSegment--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2LabelSegment(
api.GoogleCloudVideointelligenceV1beta2LabelSegment o) {
buildCounterGoogleCloudVideointelligenceV1beta2LabelSegment++;
if (buildCounterGoogleCloudVideointelligenceV1beta2LabelSegment < 3) {
unittest.expect(o.confidence, unittest.equals(42.0));
checkGoogleCloudVideointelligenceV1beta2VideoSegment(o.segment);
}
buildCounterGoogleCloudVideointelligenceV1beta2LabelSegment--;
}
core.int
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress = 0;
buildGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress() {
var o = new api.GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress();
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress++;
if (buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress <
3) {
o.inputUri = "foo";
o.progressPercent = 42;
o.startTime = "foo";
o.updateTime = "foo";
}
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress(
api.GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress o) {
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress++;
if (buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress <
3) {
unittest.expect(o.inputUri, unittest.equals('foo'));
unittest.expect(o.progressPercent, unittest.equals(42));
unittest.expect(o.startTime, unittest.equals('foo'));
unittest.expect(o.updateTime, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress--;
}
buildUnnamed4040() {
var o =
new core.List<api.GoogleCloudVideointelligenceV1beta2LabelAnnotation>();
o.add(buildGoogleCloudVideointelligenceV1beta2LabelAnnotation());
o.add(buildGoogleCloudVideointelligenceV1beta2LabelAnnotation());
return o;
}
checkUnnamed4040(
core.List<api.GoogleCloudVideointelligenceV1beta2LabelAnnotation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2LabelAnnotation(o[0]);
checkGoogleCloudVideointelligenceV1beta2LabelAnnotation(o[1]);
}
buildUnnamed4041() {
var o =
new core.List<api.GoogleCloudVideointelligenceV1beta2LabelAnnotation>();
o.add(buildGoogleCloudVideointelligenceV1beta2LabelAnnotation());
o.add(buildGoogleCloudVideointelligenceV1beta2LabelAnnotation());
return o;
}
checkUnnamed4041(
core.List<api.GoogleCloudVideointelligenceV1beta2LabelAnnotation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2LabelAnnotation(o[0]);
checkGoogleCloudVideointelligenceV1beta2LabelAnnotation(o[1]);
}
buildUnnamed4042() {
var o = new core.List<api.GoogleCloudVideointelligenceV1beta2VideoSegment>();
o.add(buildGoogleCloudVideointelligenceV1beta2VideoSegment());
o.add(buildGoogleCloudVideointelligenceV1beta2VideoSegment());
return o;
}
checkUnnamed4042(
core.List<api.GoogleCloudVideointelligenceV1beta2VideoSegment> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2VideoSegment(o[0]);
checkGoogleCloudVideointelligenceV1beta2VideoSegment(o[1]);
}
buildUnnamed4043() {
var o =
new core.List<api.GoogleCloudVideointelligenceV1beta2LabelAnnotation>();
o.add(buildGoogleCloudVideointelligenceV1beta2LabelAnnotation());
o.add(buildGoogleCloudVideointelligenceV1beta2LabelAnnotation());
return o;
}
checkUnnamed4043(
core.List<api.GoogleCloudVideointelligenceV1beta2LabelAnnotation> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudVideointelligenceV1beta2LabelAnnotation(o[0]);
checkGoogleCloudVideointelligenceV1beta2LabelAnnotation(o[1]);
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationResults =
0;
buildGoogleCloudVideointelligenceV1beta2VideoAnnotationResults() {
var o = new api.GoogleCloudVideointelligenceV1beta2VideoAnnotationResults();
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationResults++;
if (buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationResults <
3) {
o.error = buildGoogleRpcStatus();
o.explicitAnnotation =
buildGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation();
o.frameLabelAnnotations = buildUnnamed4040();
o.inputUri = "foo";
o.segmentLabelAnnotations = buildUnnamed4041();
o.shotAnnotations = buildUnnamed4042();
o.shotLabelAnnotations = buildUnnamed4043();
}
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationResults--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2VideoAnnotationResults(
api.GoogleCloudVideointelligenceV1beta2VideoAnnotationResults o) {
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationResults++;
if (buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationResults <
3) {
checkGoogleRpcStatus(o.error);
checkGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation(
o.explicitAnnotation);
checkUnnamed4040(o.frameLabelAnnotations);
unittest.expect(o.inputUri, unittest.equals('foo'));
checkUnnamed4041(o.segmentLabelAnnotations);
checkUnnamed4042(o.shotAnnotations);
checkUnnamed4043(o.shotLabelAnnotations);
}
buildCounterGoogleCloudVideointelligenceV1beta2VideoAnnotationResults--;
}
core.int buildCounterGoogleCloudVideointelligenceV1beta2VideoSegment = 0;
buildGoogleCloudVideointelligenceV1beta2VideoSegment() {
var o = new api.GoogleCloudVideointelligenceV1beta2VideoSegment();
buildCounterGoogleCloudVideointelligenceV1beta2VideoSegment++;
if (buildCounterGoogleCloudVideointelligenceV1beta2VideoSegment < 3) {
o.endTimeOffset = "foo";
o.startTimeOffset = "foo";
}
buildCounterGoogleCloudVideointelligenceV1beta2VideoSegment--;
return o;
}
checkGoogleCloudVideointelligenceV1beta2VideoSegment(
api.GoogleCloudVideointelligenceV1beta2VideoSegment o) {
buildCounterGoogleCloudVideointelligenceV1beta2VideoSegment++;
if (buildCounterGoogleCloudVideointelligenceV1beta2VideoSegment < 3) {
unittest.expect(o.endTimeOffset, unittest.equals('foo'));
unittest.expect(o.startTimeOffset, unittest.equals('foo'));
}
buildCounterGoogleCloudVideointelligenceV1beta2VideoSegment--;
}
buildUnnamed4044() {
var o = new core.Map<core.String, core.Object>();
o["x"] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o["y"] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
return o;
}
checkUnnamed4044(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'));
}
buildUnnamed4045() {
var o = new core.Map<core.String, core.Object>();
o["x"] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o["y"] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
return o;
}
checkUnnamed4045(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
var casted3 = (o["x"]) as core.Map;
unittest.expect(casted3, unittest.hasLength(3));
unittest.expect(casted3["list"], unittest.equals([1, 2, 3]));
unittest.expect(casted3["bool"], unittest.equals(true));
unittest.expect(casted3["string"], unittest.equals('foo'));
var casted4 = (o["y"]) as core.Map;
unittest.expect(casted4, unittest.hasLength(3));
unittest.expect(casted4["list"], unittest.equals([1, 2, 3]));
unittest.expect(casted4["bool"], unittest.equals(true));
unittest.expect(casted4["string"], unittest.equals('foo'));
}
core.int buildCounterGoogleLongrunningOperation = 0;
buildGoogleLongrunningOperation() {
var o = new api.GoogleLongrunningOperation();
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
o.done = true;
o.error = buildGoogleRpcStatus();
o.metadata = buildUnnamed4044();
o.name = "foo";
o.response = buildUnnamed4045();
}
buildCounterGoogleLongrunningOperation--;
return o;
}
checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) {
buildCounterGoogleLongrunningOperation++;
if (buildCounterGoogleLongrunningOperation < 3) {
unittest.expect(o.done, unittest.isTrue);
checkGoogleRpcStatus(o.error);
checkUnnamed4044(o.metadata);
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed4045(o.response);
}
buildCounterGoogleLongrunningOperation--;
}
buildUnnamed4046() {
var o = new core.Map<core.String, core.Object>();
o["x"] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o["y"] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
return o;
}
checkUnnamed4046(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
var casted5 = (o["x"]) as core.Map;
unittest.expect(casted5, unittest.hasLength(3));
unittest.expect(casted5["list"], unittest.equals([1, 2, 3]));
unittest.expect(casted5["bool"], unittest.equals(true));
unittest.expect(casted5["string"], unittest.equals('foo'));
var casted6 = (o["y"]) as core.Map;
unittest.expect(casted6, unittest.hasLength(3));
unittest.expect(casted6["list"], unittest.equals([1, 2, 3]));
unittest.expect(casted6["bool"], unittest.equals(true));
unittest.expect(casted6["string"], unittest.equals('foo'));
}
buildUnnamed4047() {
var o = new core.List<core.Map<core.String, core.Object>>();
o.add(buildUnnamed4046());
o.add(buildUnnamed4046());
return o;
}
checkUnnamed4047(core.List<core.Map<core.String, core.Object>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed4046(o[0]);
checkUnnamed4046(o[1]);
}
core.int buildCounterGoogleRpcStatus = 0;
buildGoogleRpcStatus() {
var o = new api.GoogleRpcStatus();
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
o.code = 42;
o.details = buildUnnamed4047();
o.message = "foo";
}
buildCounterGoogleRpcStatus--;
return o;
}
checkGoogleRpcStatus(api.GoogleRpcStatus o) {
buildCounterGoogleRpcStatus++;
if (buildCounterGoogleRpcStatus < 3) {
unittest.expect(o.code, unittest.equals(42));
checkUnnamed4047(o.details);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterGoogleRpcStatus--;
}
main() {
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1AnnotateVideoProgress", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1AnnotateVideoProgress();
var od =
new api.GoogleCloudVideointelligenceV1AnnotateVideoProgress.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1AnnotateVideoProgress(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1AnnotateVideoResponse", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1AnnotateVideoResponse();
var od =
new api.GoogleCloudVideointelligenceV1AnnotateVideoResponse.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1AnnotateVideoResponse(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1Entity", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1Entity();
var od =
new api.GoogleCloudVideointelligenceV1Entity.fromJson(o.toJson());
checkGoogleCloudVideointelligenceV1Entity(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1ExplicitContentAnnotation", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1ExplicitContentAnnotation();
var od = new api
.GoogleCloudVideointelligenceV1ExplicitContentAnnotation.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1ExplicitContentAnnotation(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1ExplicitContentFrame", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1ExplicitContentFrame();
var od =
new api.GoogleCloudVideointelligenceV1ExplicitContentFrame.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1ExplicitContentFrame(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1LabelAnnotation",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1LabelAnnotation();
var od = new api.GoogleCloudVideointelligenceV1LabelAnnotation.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1LabelAnnotation(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1LabelFrame", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1LabelFrame();
var od =
new api.GoogleCloudVideointelligenceV1LabelFrame.fromJson(o.toJson());
checkGoogleCloudVideointelligenceV1LabelFrame(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1LabelSegment", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1LabelSegment();
var od = new api.GoogleCloudVideointelligenceV1LabelSegment.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1LabelSegment(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1VideoAnnotationProgress", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1VideoAnnotationProgress();
var od = new api
.GoogleCloudVideointelligenceV1VideoAnnotationProgress.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1VideoAnnotationProgress(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1VideoAnnotationResults", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1VideoAnnotationResults();
var od =
new api.GoogleCloudVideointelligenceV1VideoAnnotationResults.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1VideoAnnotationResults(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1VideoSegment", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1VideoSegment();
var od = new api.GoogleCloudVideointelligenceV1VideoSegment.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1VideoSegment(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress();
var od = new api
.GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest();
var od = new api
.GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse();
var od = new api
.GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta1LabelAnnotation", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1LabelAnnotation();
var od =
new api.GoogleCloudVideointelligenceV1beta1LabelAnnotation.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta1LabelLocation",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1LabelLocation();
var od =
new api.GoogleCloudVideointelligenceV1beta1LabelLocation.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1LabelLocation(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation();
var od = new api
.GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1SafeSearchAnnotation(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress();
var od = new api
.GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta1VideoAnnotationResults",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults();
var od = new api
.GoogleCloudVideointelligenceV1beta1VideoAnnotationResults.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta1VideoContext",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1VideoContext();
var od = new api.GoogleCloudVideointelligenceV1beta1VideoContext.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1VideoContext(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta1VideoSegment",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta1VideoSegment();
var od = new api.GoogleCloudVideointelligenceV1beta1VideoSegment.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta1VideoSegment(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress();
var od = new api
.GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2AnnotateVideoProgress(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse();
var od = new api
.GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2AnnotateVideoResponse(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta2Entity", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2Entity();
var od = new api.GoogleCloudVideointelligenceV1beta2Entity.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2Entity(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation",
() {
unittest.test("to-json--from-json", () {
var o =
buildGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation();
var od = new api
.GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta2ExplicitContentFrame", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2ExplicitContentFrame();
var od = new api
.GoogleCloudVideointelligenceV1beta2ExplicitContentFrame.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2ExplicitContentFrame(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta2LabelAnnotation", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2LabelAnnotation();
var od =
new api.GoogleCloudVideointelligenceV1beta2LabelAnnotation.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2LabelAnnotation(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta2LabelFrame",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2LabelFrame();
var od = new api.GoogleCloudVideointelligenceV1beta2LabelFrame.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2LabelFrame(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta2LabelSegment",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2LabelSegment();
var od = new api.GoogleCloudVideointelligenceV1beta2LabelSegment.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2LabelSegment(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress();
var od = new api
.GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2VideoAnnotationProgress(od);
});
});
unittest.group(
"obj-schema-GoogleCloudVideointelligenceV1beta2VideoAnnotationResults",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2VideoAnnotationResults();
var od = new api
.GoogleCloudVideointelligenceV1beta2VideoAnnotationResults.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2VideoAnnotationResults(od);
});
});
unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta2VideoSegment",
() {
unittest.test("to-json--from-json", () {
var o = buildGoogleCloudVideointelligenceV1beta2VideoSegment();
var od = new api.GoogleCloudVideointelligenceV1beta2VideoSegment.fromJson(
o.toJson());
checkGoogleCloudVideointelligenceV1beta2VideoSegment(od);
});
});
unittest.group("obj-schema-GoogleLongrunningOperation", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleLongrunningOperation();
var od = new api.GoogleLongrunningOperation.fromJson(o.toJson());
checkGoogleLongrunningOperation(od);
});
});
unittest.group("obj-schema-GoogleRpcStatus", () {
unittest.test("to-json--from-json", () {
var o = buildGoogleRpcStatus();
var od = new api.GoogleRpcStatus.fromJson(o.toJson());
checkGoogleRpcStatus(od);
});
});
unittest.group("resource-VideosResourceApi", () {
unittest.test("method--annotate", () {
var mock = new HttpServerMock();
api.VideosResourceApi res = new api.VideointelligenceApi(mock).videos;
var arg_request =
buildGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest();
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api
.GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest.fromJson(
json);
checkGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(obj);
var path = (req.url).path;
var pathOffset = 0;
var index;
var subPart;
unittest.expect(
path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
pathOffset += 1;
unittest.expect(path.substring(pathOffset, pathOffset + 23),
unittest.equals("v1beta1/videos:annotate"));
pathOffset += 23;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
parseBool(n) {
if (n == "true") return true;
if (n == "false") return false;
if (n == null) return null;
throw new core.ArgumentError("Invalid boolean: $n");
}
if (query.length > 0) {
for (var part in query.split("&")) {
var keyvalue = part.split("=");
addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
core.Uri.decodeQueryComponent(keyvalue[1]));
}
}
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
"content-type": "application/json; charset=utf-8",
};
var resp = convert.JSON.encode(buildGoogleLongrunningOperation());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res.annotate(arg_request, $fields: arg_$fields).then(
unittest.expectAsync1(((api.GoogleLongrunningOperation response) {
checkGoogleLongrunningOperation(response);
})));
});
});
}