forked from loafle/openapi-generator-original
* [dart-dio+time_machine] Add missing import, serializer
* [dart-dio] Remove bad import from `http` package
* [dart-dio] Use raw strings for those that contain variable name.
This should eliminate potential issue with variables like `$ref`.
* [dart-dio] Use `_path` instead of `path` to avoid potential conflict with op params.
See 1bec0b47b1/Kubernetes.json
, there are a few with `{path}` param.
* [dart-dio+time_machine] Use `OffsetXxx` classes for date time values
45 lines
1.1 KiB
Dart
45 lines
1.1 KiB
Dart
import 'package:openapi/model/tag.dart';
|
|
import 'package:built_collection/built_collection.dart';
|
|
import 'package:openapi/model/category.dart';
|
|
import 'package:built_value/built_value.dart';
|
|
import 'package:built_value/serializer.dart';
|
|
|
|
part 'pet.g.dart';
|
|
|
|
abstract class Pet implements Built<Pet, PetBuilder> {
|
|
|
|
|
|
@nullable
|
|
@BuiltValueField(wireName: r'id')
|
|
int get id;
|
|
|
|
@nullable
|
|
@BuiltValueField(wireName: r'category')
|
|
Category get category;
|
|
|
|
@nullable
|
|
@BuiltValueField(wireName: r'name')
|
|
String get name;
|
|
|
|
@nullable
|
|
@BuiltValueField(wireName: r'photoUrls')
|
|
BuiltList<String> get photoUrls;
|
|
|
|
@nullable
|
|
@BuiltValueField(wireName: r'tags')
|
|
BuiltList<Tag> get tags;
|
|
/* pet status in the store */
|
|
@nullable
|
|
@BuiltValueField(wireName: r'status')
|
|
String get status;
|
|
//enum statusEnum { available, pending, sold, };
|
|
|
|
// Boilerplate code needed to wire-up generated code
|
|
Pet._();
|
|
|
|
factory Pet([updates(PetBuilder b)]) = _$Pet;
|
|
static Serializer<Pet> get serializer => _$petSerializer;
|
|
|
|
}
|
|
|