ApiSpec class Null safety

Describes a version of an API in a structured way.

ApiSpecs provide formal descriptions that consumers can use to use a version. ApiSpec resources are intended to be fully-resolved descriptions of an ApiVersion. When specs consist of multiple files, these should be bundled together (e.g., in a zip archive) and stored as a unit. Multiple specs can exist to provide representations in different API description formats. Synchronization of these representations would be provided by tooling and background services.


ApiSpec({Map<String, String>? annotations, String? contents, String? createTime, String? description, String? filename, String? hash, Map<String, String>? labels, String? mimeType, String? name, String? revisionCreateTime, String? revisionId, String? revisionUpdateTime, int? sizeBytes, String? sourceUri})
ApiSpec.fromJson(Map json_)


annotations Map<String, String>?
Annotations attach non-identifying metadata to resources.
read / write
contents String?
Input only.
read / write
contentsAsBytes List<int>
read / write
createTime String?
Creation timestamp; when the spec resource was created.
read / write
description String?
A detailed description.
read / write
filename String?
A possibly-hierarchical name used to refer to the spec from other specs.
read / write
hash String?
A SHA-256 hash of the spec's contents.
read / write
hashCode int
The hash code for this object.
read-only, inherited
labels Map<String, String>?
Labels attach identifying metadata to resources.
read / write
mimeType String?
A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type).
read / write
name String?
Resource name.
read / write
revisionCreateTime String?
Revision creation timestamp; when the represented revision was created.
read / write
revisionId String?
The revision ID of the spec.
read / write
revisionUpdateTime String?
Last update timestamp: when the represented revision was last modified.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sizeBytes int?
The size of the spec file in bytes.
read / write
sourceUri String?
The original source URI of the spec (if one exists).
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.