data class ProfileFileElement
A single .wire file. This file is structured similarly to a .proto file, but with
different elements.
A project may have 0 or more .wire files. These files should be in the same directory as
the .proto files so they may be automatically discovered by Wire.
Each file starts with a syntax declaration. The syntax must be "wire2". This is followed by an
optional package declaration, which should match to the package declarations of the .proto files in the directory.
Profiles may import any number of proto files. Note that it is an error to import .wire files.
These imports are used to resolve types specified later in the file.
Profiles may specify any number of type configurations. These specify a fully qualified type, its target Java type, and an adapter to do the encoding and decoding.
syntax = "wire2";
package squareup.dinosaurs;
import "squareup/geology/period.proto";
// Roar!
type squareup.dinosaurs.Dinosaur {
target com.squareup.dino.Dinosaur using com.squareup.dino.Dinosaurs#DINO_ADAPTER;
}
ProfileFileElement(location: Location, packageName: String? = null, imports: List<String> = emptyList(), typeConfigs: List<TypeConfigElement> = emptyList())
A single |
val imports: List<String> |
|
val location: Location |
|
val packageName: String? |
|
val typeConfigs: List<TypeConfigElement> |
fun toSchema(): <ERROR CLASS> |