我有一个 protobuf 消息,当使用它转换为字符串时,TextFormat.printToString()
如下所示:-
deploymentDef {
id: "PX3C1ED"
default: true
type: ONPREM
limits {
clusterSize: 3
limits {
numVMs: 18000
numVMsWithFlows: 18000
activeFlows: 6000000
totalFlows: 24000000
flowPlanning: 4000000
numDevices: 40
}
}
isEnterprise: false
brickSize: XLARGE
clusterSize: 3
description: "Default Role, Non-Enterprise, App-Discovery and Vf services stopped"
}
原型定义如下所示
message DeploymentDef {
optional string id = 1;
optional bool default = 2;
optional DeploymentType type = 3;
optional PlatformClusterLimits limits = 4;
repeated Role roles = 5;
optional bool isEnterprise = 6;
optional Configs overrides = 7;
optional BrickSize brickSize = 8;
optional int32 clusterSize = 9;
optional string description = 10;
}
使用 将原始消息转换为字符串时是否可以显示description
为第一个字段TextFormat.printToString()
?