Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update and regenerate common protos #756

Merged
merged 3 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 60 additions & 20 deletions Google.Api.CommonProtos/Api/Client.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,27 @@ static ClientReflection() {
"IAEoCToCOAEiQgoMUnVieVNldHRpbmdzEjIKBmNvbW1vbhgBIAEoCzIiLmdv",
"b2dsZS5hcGkuQ29tbW9uTGFuZ3VhZ2VTZXR0aW5ncyJACgpHb1NldHRpbmdz",
"EjIKBmNvbW1vbhgBIAEoCzIiLmdvb2dsZS5hcGkuQ29tbW9uTGFuZ3VhZ2VT",
"ZXR0aW5ncyKwAgoOTWV0aG9kU2V0dGluZ3MSEAoIc2VsZWN0b3IYASABKAkS",
"ZXR0aW5ncyLPAgoOTWV0aG9kU2V0dGluZ3MSEAoIc2VsZWN0b3IYASABKAkS",
"PAoMbG9uZ19ydW5uaW5nGAIgASgLMiYuZ29vZ2xlLmFwaS5NZXRob2RTZXR0",
"aW5ncy5Mb25nUnVubmluZxrNAQoLTG9uZ1J1bm5pbmcSNQoSaW5pdGlhbF9w",
"b2xsX2RlbGF5GAEgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uEh0K",
"FXBvbGxfZGVsYXlfbXVsdGlwbGllchgCIAEoAhIxCg5tYXhfcG9sbF9kZWxh",
"eRgDIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhI1ChJ0b3RhbF9w",
"b2xsX3RpbWVvdXQYBCABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24q",
"owEKG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lb3V0GAQg",
"ASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uKqMBChlDbGllbnRMaWJy",
"YXJ5T3JnYW5pemF0aW9uEisKJ0NMSUVOVF9MSUJSQVJZX09SR0FOSVpBVElP",
"Tl9VTlNQRUNJRklFRBAAEgkKBUNMT1VEEAESBwoDQURTEAISCgoGUEhPVE9T",
"EAMSDwoLU1RSRUVUX1ZJRVcQBBIMCghTSE9QUElORxAFEgcKA0dFTxAGEhEK",
"DUdFTkVSQVRJVkVfQUkQBypnChhDbGllbnRMaWJyYXJ5RGVzdGluYXRpb24S",
"KgomQ0xJRU5UX0xJQlJBUllfREVTVElOQVRJT05fVU5TUEVDSUZJRUQQABIK",
"CgZHSVRIVUIQChITCg9QQUNLQUdFX01BTkFHRVIQFDo5ChBtZXRob2Rfc2ln",
"bmF0dXJlEh4uZ29vZ2xlLnByb3RvYnVmLk1ldGhvZE9wdGlvbnMYmwggAygJ",
"OjYKDGRlZmF1bHRfaG9zdBIfLmdvb2dsZS5wcm90b2J1Zi5TZXJ2aWNlT3B0",
"aW9ucxiZCCABKAk6NgoMb2F1dGhfc2NvcGVzEh8uZ29vZ2xlLnByb3RvYnVm",
"LlNlcnZpY2VPcHRpb25zGJoIIAEoCUJpCg5jb20uZ29vZ2xlLmFwaUILQ2xp",
"ZW50UHJvdG9QAVpBZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29vZ2xl",
"YXBpcy9hcGkvYW5ub3RhdGlvbnM7YW5ub3RhdGlvbnOiAgRHQVBJYgZwcm90",
"bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Api.LaunchStageReflection.Descriptor, global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Api.ClientLibraryOrganization), typeof(global::Google.Api.ClientLibraryDestination), }, new pb::Extension[] { ClientExtensions.MethodSignature, ClientExtensions.DefaultHost, ClientExtensions.OauthScopes }, new pbr::GeneratedClrTypeInfo[] {
Expand All @@ -114,7 +115,7 @@ static ClientReflection() {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.DotnetSettings), global::Google.Api.DotnetSettings.Parser, new[]{ "Common", "RenamedServices", "RenamedResources", "IgnoredResources", "ForcedNamespaceAliases", "HandwrittenSignatures" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.RubySettings), global::Google.Api.RubySettings.Parser, new[]{ "Common" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.GoSettings), global::Google.Api.GoSettings.Parser, new[]{ "Common" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.MethodSettings), global::Google.Api.MethodSettings.Parser, new[]{ "Selector", "LongRunning" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.MethodSettings.Types.LongRunning), global::Google.Api.MethodSettings.Types.LongRunning.Parser, new[]{ "InitialPollDelay", "PollDelayMultiplier", "MaxPollDelay", "TotalPollTimeout" }, null, null, null, null)})
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.MethodSettings), global::Google.Api.MethodSettings.Parser, new[]{ "Selector", "LongRunning", "AutoPopulatedFields" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.MethodSettings.Types.LongRunning), global::Google.Api.MethodSettings.Types.LongRunning.Parser, new[]{ "InitialPollDelay", "PollDelayMultiplier", "MaxPollDelay", "TotalPollTimeout" }, null, null, null, null)})
}));
}
#endregion
Expand Down Expand Up @@ -3630,6 +3631,7 @@ public MethodSettings() {
public MethodSettings(MethodSettings other) : this() {
selector_ = other.selector_;
longRunning_ = other.longRunning_ != null ? other.longRunning_.Clone() : null;
autoPopulatedFields_ = other.autoPopulatedFields_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

Expand Down Expand Up @@ -3686,6 +3688,30 @@ public string Selector {
}
}

/// <summary>Field number for the "auto_populated_fields" field.</summary>
public const int AutoPopulatedFieldsFieldNumber = 3;
private static readonly pb::FieldCodec<string> _repeated_autoPopulatedFields_codec
= pb::FieldCodec.ForString(26);
private readonly pbc::RepeatedField<string> autoPopulatedFields_ = new pbc::RepeatedField<string>();
/// <summary>
/// List of top-level fields of the request message, that should be
/// automatically populated by the client libraries based on their
/// (google.api.field_info).format. Currently supported format: UUID4.
///
/// Example of a YAML configuration:
///
/// publishing:
/// method_settings:
/// - selector: google.example.v1.ExampleService.CreateExample
/// auto_populated_fields:
/// - request_id
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<string> AutoPopulatedFields {
get { return autoPopulatedFields_; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
Expand All @@ -3703,6 +3729,7 @@ public bool Equals(MethodSettings other) {
}
if (Selector != other.Selector) return false;
if (!object.Equals(LongRunning, other.LongRunning)) return false;
if(!autoPopulatedFields_.Equals(other.autoPopulatedFields_)) return false;
return Equals(_unknownFields, other._unknownFields);
}

Expand All @@ -3712,6 +3739,7 @@ public override int GetHashCode() {
int hash = 1;
if (Selector.Length != 0) hash ^= Selector.GetHashCode();
if (longRunning_ != null) hash ^= LongRunning.GetHashCode();
hash ^= autoPopulatedFields_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
Expand All @@ -3738,6 +3766,7 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(18);
output.WriteMessage(LongRunning);
}
autoPopulatedFields_.WriteTo(output, _repeated_autoPopulatedFields_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand All @@ -3756,6 +3785,7 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(18);
output.WriteMessage(LongRunning);
}
autoPopulatedFields_.WriteTo(ref output, _repeated_autoPopulatedFields_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
Expand All @@ -3772,6 +3802,7 @@ public int CalculateSize() {
if (longRunning_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(LongRunning);
}
size += autoPopulatedFields_.CalculateSize(_repeated_autoPopulatedFields_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
Expand All @@ -3793,6 +3824,7 @@ public void MergeFrom(MethodSettings other) {
}
LongRunning.MergeFrom(other.LongRunning);
}
autoPopulatedFields_.Add(other.autoPopulatedFields_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

Expand All @@ -3819,6 +3851,10 @@ public void MergeFrom(pb::CodedInputStream input) {
input.ReadMessage(LongRunning);
break;
}
case 26: {
autoPopulatedFields_.AddEntriesFrom(input, _repeated_autoPopulatedFields_codec);
break;
}
}
}
#endif
Expand All @@ -3845,6 +3881,10 @@ public void MergeFrom(pb::CodedInputStream input) {
input.ReadMessage(LongRunning);
break;
}
case 26: {
autoPopulatedFields_.AddEntriesFrom(ref input, _repeated_autoPopulatedFields_codec);
break;
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions Google.Api.CommonProtos/Api/FieldBehavior.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ static FieldBehaviorReflection() {
"ZWhhdmlvchIeChpGSUVMRF9CRUhBVklPUl9VTlNQRUNJRklFRBAAEgwKCE9Q",
"VElPTkFMEAESDAoIUkVRVUlSRUQQAhIPCgtPVVRQVVRfT05MWRADEg4KCklO",
"UFVUX09OTFkQBBINCglJTU1VVEFCTEUQBRISCg5VTk9SREVSRURfTElTVBAG",
"EhUKEU5PTl9FTVBUWV9ERUZBVUxUEAcSDgoKSURFTlRJRklFUhAIOlEKDmZp",
"EhUKEU5PTl9FTVBUWV9ERUZBVUxUEAcSDgoKSURFTlRJRklFUhAIOlUKDmZp",
"ZWxkX2JlaGF2aW9yEh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxic",
"CCADKA4yGS5nb29nbGUuYXBpLkZpZWxkQmVoYXZpb3JCcAoOY29tLmdvb2ds",
"ZS5hcGlCEkZpZWxkQmVoYXZpb3JQcm90b1ABWkFnb29nbGUuZ29sYW5nLm9y",
"Zy9nZW5wcm90by9nb29nbGVhcGlzL2FwaS9hbm5vdGF0aW9uczthbm5vdGF0",
"aW9uc6ICBEdBUEliBnByb3RvMw=="));
"CCADKA4yGS5nb29nbGUuYXBpLkZpZWxkQmVoYXZpb3JCAhAAQnAKDmNvbS5n",
"b29nbGUuYXBpQhJGaWVsZEJlaGF2aW9yUHJvdG9QAVpBZ29vZ2xlLmdvbGFu",
"Zy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9hcGkvYW5ub3RhdGlvbnM7YW5u",
"b3RhdGlvbnOiAgRHQVBJYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Api.FieldBehavior), }, new pb::Extension[] { FieldBehaviorExtensions.FieldBehavior }, null));
Expand All @@ -66,7 +66,7 @@ public static partial class FieldBehaviorExtensions {
/// (google.api.field_behavior) = IMMUTABLE];
/// </summary>
public static readonly pb::RepeatedExtension<global::Google.Protobuf.Reflection.FieldOptions, global::Google.Api.FieldBehavior> FieldBehavior =
new pb::RepeatedExtension<global::Google.Protobuf.Reflection.FieldOptions, global::Google.Api.FieldBehavior>(1052, pb::FieldCodec.ForEnum(8418, x => (int) x, x => (global::Google.Api.FieldBehavior) x));
new pb::RepeatedExtension<global::Google.Protobuf.Reflection.FieldOptions, global::Google.Api.FieldBehavior>(1052, pb::FieldCodec.ForEnum(8416, x => (int) x, x => (global::Google.Api.FieldBehavior) x));
}

#region Enums
Expand Down
13 changes: 13 additions & 0 deletions Google.Api.CommonProtos/protos/google/api/client.proto
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,19 @@ message MethodSettings {
// total_poll_timeout:
// seconds: 54000 # 90 minutes
LongRunning long_running = 2;

// List of top-level fields of the request message, that should be
// automatically populated by the client libraries based on their
// (google.api.field_info).format. Currently supported format: UUID4.
//
// Example of a YAML configuration:
//
// publishing:
// method_settings:
// - selector: google.example.v1.ExampleService.CreateExample
// auto_populated_fields:
// - request_id
repeated string auto_populated_fields = 3;
}

// The organization for which the client libraries are being published.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extend google.protobuf.FieldOptions {
// google.protobuf.Timestamp expire_time = 1
// [(google.api.field_behavior) = OUTPUT_ONLY,
// (google.api.field_behavior) = IMMUTABLE];
repeated google.api.FieldBehavior field_behavior = 1052;
repeated google.api.FieldBehavior field_behavior = 1052 [packed = false];
}

// An indicator of the behavior of a given field (for example, that a field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
//
#pragma warning disable 0414, 1591, 8981
#pragma warning disable 0414, 1591, 8981, 0612
#region Designer generated code

using grpc = global::Grpc.Core;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
//
#pragma warning disable 0414, 1591, 8981
#pragma warning disable 0414, 1591, 8981, 0612
#region Designer generated code

using grpc = global::Grpc.Core;
Expand Down
2 changes: 1 addition & 1 deletion Google.Api.Gax.Grpc.Tests/Rest/BadServiceGrpc.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
//
#pragma warning disable 0414, 1591, 8981
#pragma warning disable 0414, 1591, 8981, 0612
#region Designer generated code

using grpc = global::Grpc.Core;
Expand Down
2 changes: 1 addition & 1 deletion Google.Api.Gax.Grpc.Tests/Rest/TestServiceGrpc.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
//
#pragma warning disable 0414, 1591, 8981
#pragma warning disable 0414, 1591, 8981, 0612
#region Designer generated code

using grpc = global::Grpc.Core;
Expand Down
2 changes: 1 addition & 1 deletion generateprotos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ declare -r ROOT=$(realpath $(dirname $0))
cd $ROOT

PROTOBUF_VERSION=3.25.0
GRPC_VERSION=2.48.1
GRPC_VERSION=2.60.0
PROTOC=$ROOT/packages/Google.Protobuf.Tools.$PROTOBUF_VERSION/tools/${OS}_x64/protoc${EXE_SUFFIX}
CORE_PROTOS_ROOT=$ROOT/packages/Google.Protobuf.Tools.$PROTOBUF_VERSION/tools
GRPC_PLUGIN=$ROOT/packages/Grpc.Tools.$GRPC_VERSION/tools/windows_x64/grpc_csharp_plugin.exe
Expand Down