我想帮助递归循环遍历协议缓冲区消息中包含的所有属性/子对象,假设我们不知道它们的名称,或者有多少.
例如,从google网站上的教程中获取以下.proto文件:
message Person {
required string name = 1;
required int32 id = 2;
optional string email = 3;
enum PhoneType {
MOBILE = 0;
HOME = 1;
WORK = 2;
}
message PhoneNumber {
required string number = 1;
optional PhoneType type = 2 [default = HOME];
}
repeated PhoneNumber phone = 4;
}
Run Code Online (Sandbox Code Playgroud)
并使用它...:
person = tutorial.Person()
person.id = 1234
person.name = "John Doe"
person.email = "jdoe@example.com"
phone = person.phone.add()
phone.number = "555-4321"
phone.type = tutorial.Person.HOME
Run Code Online (Sandbox Code Playgroud)
鉴于 …
使用Azure KeyVault我按照本指南设置了ResourceGroup,KeyVault和Key:
https://azure.microsoft.com/en-gb/documentation/articles/key-vault-get-started/
我在Active Directory中设置了应用程序客户端.但是当我尝试使用时:
Set-AzureKeyVaultAccessPolicy
Run Code Online (Sandbox Code Playgroud)
授予服务主体帐户权限时出现以下错误:
"无法在租户' tenantId '中找到Active Directory对象' clientId ' .请确保您授权的应用程序服务主体的用户已在当前订阅的Azure Active目录中注册."
clientId是正确的,因为它是从门户网站中的应用程序配置页面复制的.租户ID是当前订阅的租户ID,但不是活动目录的租户ID.
问题似乎是Active Directory的租户ID与我正在使用的订阅的租户ID不同.如何更改Azure门户中Active Directory的租户ID以匹配订阅租户ID?