Skip to content

Commit ab0fe73

Browse files
committed
Regenerate IAM API, with new Options type
1 parent e16f28d commit ab0fe73

File tree

2 files changed

+248
-22
lines changed

2 files changed

+248
-22
lines changed

apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.cs

Lines changed: 62 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,33 @@ static IamPolicyReflection() {
2525
byte[] descriptorData = global::System.Convert.FromBase64String(
2626
string.Concat(
2727
"Ch5nb29nbGUvaWFtL3YxL2lhbV9wb2xpY3kucHJvdG8SDWdvb2dsZS5pYW0u",
28-
"djEaGWdvb2dsZS9hcGkvcmVzb3VyY2UucHJvdG8aGmdvb2dsZS9pYW0vdjEv",
29-
"cG9saWN5LnByb3RvGhxnb29nbGUvYXBpL2Fubm90YXRpb25zLnByb3RvIk4K",
30-
"E1NldElhbVBvbGljeVJlcXVlc3QSEAoIcmVzb3VyY2UYASABKAkSJQoGcG9s",
31-
"aWN5GAIgASgLMhUuZ29vZ2xlLmlhbS52MS5Qb2xpY3kiJwoTR2V0SWFtUG9s",
32-
"aWN5UmVxdWVzdBIQCghyZXNvdXJjZRgBIAEoCSJCChlUZXN0SWFtUGVybWlz",
33-
"c2lvbnNSZXF1ZXN0EhAKCHJlc291cmNlGAEgASgJEhMKC3Blcm1pc3Npb25z",
34-
"GAIgAygJIjEKGlRlc3RJYW1QZXJtaXNzaW9uc1Jlc3BvbnNlEhMKC3Blcm1p",
35-
"c3Npb25zGAEgAygJMpQDCglJQU1Qb2xpY3kSdAoMU2V0SWFtUG9saWN5EiIu",
36-
"Z29vZ2xlLmlhbS52MS5TZXRJYW1Qb2xpY3lSZXF1ZXN0GhUuZ29vZ2xlLmlh",
37-
"bS52MS5Qb2xpY3kiKYLT5JMCIyIeL3YxL3tyZXNvdXJjZT0qKn06c2V0SWFt",
38-
"UG9saWN5OgEqEnQKDEdldElhbVBvbGljeRIiLmdvb2dsZS5pYW0udjEuR2V0",
39-
"SWFtUG9saWN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oaVGVz",
36+
"dElhbVBlcm1pc3Npb25zUmVzcG9uc2USEwoLcGVybWlzc2lvbnMYASADKAky",
37+
"tAMKCUlBTVBvbGljeRJ0CgxTZXRJYW1Qb2xpY3kSIi5nb29nbGUuaWFtLnYx",
38+
"LlNldElhbVBvbGljeVJlcXVlc3QaFS5nb29nbGUuaWFtLnYxLlBvbGljeSIp",
39+
"gtPkkwIjIh4vdjEve3Jlc291cmNlPSoqfTpzZXRJYW1Qb2xpY3k6ASoSdAoM",
40+
"R2V0SWFtUG9saWN5EiIuZ29vZ2xlLmlhbS52MS5HZXRJYW1Qb2xpY3lSZXF1",
41+
"ZXN0GhUuZ29vZ2xlLmlhbS52MS5Qb2xpY3kiKYLT5JMCIyIeL3YxL3tyZXNv",
42+
"dXJjZT0qKn06Z2V0SWFtUG9saWN5OgEqEpoBChJUZXN0SWFtUGVybWlzc2lv",
43+
"bnMSKC5nb29nbGUuaWFtLnYxLlRlc3RJYW1QZXJtaXNzaW9uc1JlcXVlc3Qa",
44+
"KS5nb29nbGUuaWFtLnYxLlRlc3RJYW1QZXJtaXNzaW9uc1Jlc3BvbnNlIi+C",
45+
"0+STAikiJC92MS97cmVzb3VyY2U9Kip9OnRlc3RJYW1QZXJtaXNzaW9uczoB",
46+
"KhoeykEbaWFtLW1ldGEtYXBpLmdvb2dsZWFwaXMuY29tQoYBChFjb20uZ29v",
47+
"Z2xlLmlhbS52MUIOSWFtUG9saWN5UHJvdG9QAVowZ29vZ2xlLmdvbGFuZy5v",
48+
"cmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9pYW0vdjE7aWFt+AEBqgITR29vZ2xl",
49+
"LkNsb3VkLklhbS5WMcoCE0dvb2dsZVxDbG91ZFxJYW1cVjFiBnByb3RvMw=="));
4850
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
49-
new pbr::FileDescriptor[] { global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Iam.V1.PolicyReflection.Descriptor, global::Google.Api.AnnotationsReflection.Descriptor, },
51+
new pbr::FileDescriptor[] { global::Google.Cloud.Iam.V1.OptionsReflection.Descriptor, global::Google.Cloud.Iam.V1.PolicyReflection.Descriptor, global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, },
5052
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
5153
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Iam.V1.SetIamPolicyRequest), global::Google.Cloud.Iam.V1.SetIamPolicyRequest.Parser, new[]{ "Resource", "Policy" }, null, null, null),
52-
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Iam.V1.GetIamPolicyRequest), global::Google.Cloud.Iam.V1.GetIamPolicyRequest.Parser, new[]{ "Resource" }, null, null, null),
54+
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Iam.V1.GetIamPolicyRequest), global::Google.Cloud.Iam.V1.GetIamPolicyRequest.Parser, new[]{ "Resource", "Options" }, null, null, null),
5355
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Iam.V1.TestIamPermissionsRequest), global::Google.Cloud.Iam.V1.TestIamPermissionsRequest.Parser, new[]{ "Resource", "Permissions" }, null, null, null),
5456
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Iam.V1.TestIamPermissionsResponse), global::Google.Cloud.Iam.V1.TestIamPermissionsResponse.Parser, new[]{ "Permissions" }, null, null, null)
5557
}));
@@ -263,6 +265,7 @@ public GetIamPolicyRequest() {
263265
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
264266
public GetIamPolicyRequest(GetIamPolicyRequest other) : this() {
265267
resource_ = other.resource_;
268+
options_ = other.options_ != null ? other.options_.Clone() : null;
266269
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
267270
}
268271

@@ -286,6 +289,21 @@ public string Resource {
286289
}
287290
}
288291

292+
/// <summary>Field number for the "options" field.</summary>
293+
public const int OptionsFieldNumber = 2;
294+
private global::Google.Cloud.Iam.V1.GetPolicyOptions options_;
295+
/// <summary>
296+
/// OPTIONAL: A `GetPolicyOptions` object for specifying options to
297+
/// `GetIamPolicy`. This field is only used by Cloud IAM.
298+
/// </summary>
299+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
300+
public global::Google.Cloud.Iam.V1.GetPolicyOptions Options {
301+
get { return options_; }
302+
set {
303+
options_ = value;
304+
}
305+
}
306+
289307
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
290308
public override bool Equals(object other) {
291309
return Equals(other as GetIamPolicyRequest);
@@ -300,13 +318,15 @@ public bool Equals(GetIamPolicyRequest other) {
300318
return true;
301319
}
302320
if (Resource != other.Resource) return false;
321+
if (!object.Equals(Options, other.Options)) return false;
303322
return Equals(_unknownFields, other._unknownFields);
304323
}
305324

306325
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
307326
public override int GetHashCode() {
308327
int hash = 1;
309328
if (Resource.Length != 0) hash ^= Resource.GetHashCode();
329+
if (options_ != null) hash ^= Options.GetHashCode();
310330
if (_unknownFields != null) {
311331
hash ^= _unknownFields.GetHashCode();
312332
}
@@ -324,6 +344,10 @@ public void WriteTo(pb::CodedOutputStream output) {
324344
output.WriteRawTag(10);
325345
output.WriteString(Resource);
326346
}
347+
if (options_ != null) {
348+
output.WriteRawTag(18);
349+
output.WriteMessage(Options);
350+
}
327351
if (_unknownFields != null) {
328352
_unknownFields.WriteTo(output);
329353
}
@@ -335,6 +359,9 @@ public int CalculateSize() {
335359
if (Resource.Length != 0) {
336360
size += 1 + pb::CodedOutputStream.ComputeStringSize(Resource);
337361
}
362+
if (options_ != null) {
363+
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options);
364+
}
338365
if (_unknownFields != null) {
339366
size += _unknownFields.CalculateSize();
340367
}
@@ -349,6 +376,12 @@ public void MergeFrom(GetIamPolicyRequest other) {
349376
if (other.Resource.Length != 0) {
350377
Resource = other.Resource;
351378
}
379+
if (other.options_ != null) {
380+
if (options_ == null) {
381+
options_ = new global::Google.Cloud.Iam.V1.GetPolicyOptions();
382+
}
383+
Options.MergeFrom(other.Options);
384+
}
352385
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
353386
}
354387

@@ -364,6 +397,13 @@ public void MergeFrom(pb::CodedInputStream input) {
364397
Resource = input.ReadString();
365398
break;
366399
}
400+
case 18: {
401+
if (options_ == null) {
402+
options_ = new global::Google.Cloud.Iam.V1.GetPolicyOptions();
403+
}
404+
input.ReadMessage(options_);
405+
break;
406+
}
367407
}
368408
}
369409
}
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
// <auto-generated>
2+
// Generated by the protocol buffer compiler. DO NOT EDIT!
3+
// source: google/iam/v1/options.proto
4+
// </auto-generated>
5+
#pragma warning disable 1591, 0612, 3021
6+
#region Designer generated code
7+
8+
using pb = global::Google.Protobuf;
9+
using pbc = global::Google.Protobuf.Collections;
10+
using pbr = global::Google.Protobuf.Reflection;
11+
using scg = global::System.Collections.Generic;
12+
namespace Google.Cloud.Iam.V1 {
13+
14+
/// <summary>Holder for reflection information generated from google/iam/v1/options.proto</summary>
15+
public static partial class OptionsReflection {
16+
17+
#region Descriptor
18+
/// <summary>File descriptor for google/iam/v1/options.proto</summary>
19+
public static pbr::FileDescriptor Descriptor {
20+
get { return descriptor; }
21+
}
22+
private static pbr::FileDescriptor descriptor;
23+
24+
static OptionsReflection() {
25+
byte[] descriptorData = global::System.Convert.FromBase64String(
26+
string.Concat(
27+
"Chtnb29nbGUvaWFtL3YxL29wdGlvbnMucHJvdG8SDWdvb2dsZS5pYW0udjEa",
28+
"HGdvb2dsZS9hcGkvYW5ub3RhdGlvbnMucHJvdG8iNAoQR2V0UG9saWN5T3B0",
29+
"aW9ucxIgChhyZXF1ZXN0ZWRfcG9saWN5X3ZlcnNpb24YASABKAVChAEKEWNv",
30+
"bS5nb29nbGUuaWFtLnYxQgxPcHRpb25zUHJvdG9QAVowZ29vZ2xlLmdvbGFu",
31+
"Zy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9pYW0vdjE7aWFt+AEBqgITR29v",
32+
"Z2xlLkNsb3VkLklhbS5WMcoCE0dvb2dsZVxDbG91ZFxJYW1cVjFiBnByb3Rv",
33+
"Mw=="));
34+
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
35+
new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, },
36+
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
37+
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Iam.V1.GetPolicyOptions), global::Google.Cloud.Iam.V1.GetPolicyOptions.Parser, new[]{ "RequestedPolicyVersion" }, null, null, null)
38+
}));
39+
}
40+
#endregion
41+
42+
}
43+
#region Messages
44+
/// <summary>
45+
/// Encapsulates settings provided to GetIamPolicy.
46+
/// </summary>
47+
public sealed partial class GetPolicyOptions : pb::IMessage<GetPolicyOptions> {
48+
private static readonly pb::MessageParser<GetPolicyOptions> _parser = new pb::MessageParser<GetPolicyOptions>(() => new GetPolicyOptions());
49+
private pb::UnknownFieldSet _unknownFields;
50+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
51+
public static pb::MessageParser<GetPolicyOptions> Parser { get { return _parser; } }
52+
53+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
54+
public static pbr::MessageDescriptor Descriptor {
55+
get { return global::Google.Cloud.Iam.V1.OptionsReflection.Descriptor.MessageTypes[0]; }
56+
}
57+
58+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
59+
pbr::MessageDescriptor pb::IMessage.Descriptor {
60+
get { return Descriptor; }
61+
}
62+
63+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
64+
public GetPolicyOptions() {
65+
OnConstruction();
66+
}
67+
68+
partial void OnConstruction();
69+
70+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
71+
public GetPolicyOptions(GetPolicyOptions other) : this() {
72+
requestedPolicyVersion_ = other.requestedPolicyVersion_;
73+
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
74+
}
75+
76+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
77+
public GetPolicyOptions Clone() {
78+
return new GetPolicyOptions(this);
79+
}
80+
81+
/// <summary>Field number for the "requested_policy_version" field.</summary>
82+
public const int RequestedPolicyVersionFieldNumber = 1;
83+
private int requestedPolicyVersion_;
84+
/// <summary>
85+
/// Optional. The policy format version to be returned.
86+
/// Acceptable values are 0 and 1.
87+
/// If the value is 0, or the field is omitted, policy format version 1 will be
88+
/// returned.
89+
/// </summary>
90+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
91+
public int RequestedPolicyVersion {
92+
get { return requestedPolicyVersion_; }
93+
set {
94+
requestedPolicyVersion_ = value;
95+
}
96+
}
97+
98+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
99+
public override bool Equals(object other) {
100+
return Equals(other as GetPolicyOptions);
101+
}
102+
103+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
104+
public bool Equals(GetPolicyOptions other) {
105+
if (ReferenceEquals(other, null)) {
106+
return false;
107+
}
108+
if (ReferenceEquals(other, this)) {
109+
return true;
110+
}
111+
if (RequestedPolicyVersion != other.RequestedPolicyVersion) return false;
112+
return Equals(_unknownFields, other._unknownFields);
113+
}
114+
115+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
116+
public override int GetHashCode() {
117+
int hash = 1;
118+
if (RequestedPolicyVersion != 0) hash ^= RequestedPolicyVersion.GetHashCode();
119+
if (_unknownFields != null) {
120+
hash ^= _unknownFields.GetHashCode();
121+
}
122+
return hash;
123+
}
124+
125+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
126+
public override string ToString() {
127+
return pb::JsonFormatter.ToDiagnosticString(this);
128+
}
129+
130+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
131+
public void WriteTo(pb::CodedOutputStream output) {
132+
if (RequestedPolicyVersion != 0) {
133+
output.WriteRawTag(8);
134+
output.WriteInt32(RequestedPolicyVersion);
135+
}
136+
if (_unknownFields != null) {
137+
_unknownFields.WriteTo(output);
138+
}
139+
}
140+
141+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
142+
public int CalculateSize() {
143+
int size = 0;
144+
if (RequestedPolicyVersion != 0) {
145+
size += 1 + pb::CodedOutputStream.ComputeInt32Size(RequestedPolicyVersion);
146+
}
147+
if (_unknownFields != null) {
148+
size += _unknownFields.CalculateSize();
149+
}
150+
return size;
151+
}
152+
153+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
154+
public void MergeFrom(GetPolicyOptions other) {
155+
if (other == null) {
156+
return;
157+
}
158+
if (other.RequestedPolicyVersion != 0) {
159+
RequestedPolicyVersion = other.RequestedPolicyVersion;
160+
}
161+
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
162+
}
163+
164+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
165+
public void MergeFrom(pb::CodedInputStream input) {
166+
uint tag;
167+
while ((tag = input.ReadTag()) != 0) {
168+
switch(tag) {
169+
default:
170+
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
171+
break;
172+
case 8: {
173+
RequestedPolicyVersion = input.ReadInt32();
174+
break;
175+
}
176+
}
177+
}
178+
}
179+
180+
}
181+
182+
#endregion
183+
184+
}
185+
186+
#endregion Designer generated code

0 commit comments

Comments
 (0)