Skip to content

Commit 7fd8258

Browse files
committed
Merge remote-tracking branch 'upstream/master' into diregapic_pagination
2 parents 6d33ad1 + bc6eb85 commit 7fd8258

40 files changed

Lines changed: 92 additions & 84 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
### [1.0.13](https://www.github.com/googleapis/gapic-generator-java/compare/v1.0.12...v1.0.13) (2021-06-16)
4+
5+
6+
### Bug Fixes
7+
8+
* **resnames:** Fix resname builder name conflicts in ctor with this assignment ([#769](https://www.github.com/googleapis/gapic-generator-java/issues/769)) ([edac844](https://www.github.com/googleapis/gapic-generator-java/commit/edac8447d74c43ab0db963a37f66e1029ab19f0c))
9+
310
### [1.0.12](https://www.github.com/googleapis/gapic-generator-java/compare/v1.0.11...v1.0.12) (2021-06-10)
411

512

src/main/java/com/google/api/generator/gapic/composer/resourcename/ResourceNameHelperClassComposer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,8 @@ private static ClassDefinition createNestedBuilderClass(
16321632
for (int i = 0; i < tokens.size(); i++) {
16331633
String token = tokens.get(i);
16341634
String lowerCamelTokenName = JavaStyle.toLowerCamelCase(token);
1635-
VariableExpr currClassTokenVarExpr = classMemberVarExprs.get(i);
1635+
VariableExpr currClassTokenVarExpr =
1636+
classMemberVarExprs.get(i).toBuilder().setExprReferenceExpr(thisExpr).build();
16361637
builderCtorBodyExprs.add(
16371638
AssignmentExpr.builder()
16381639
.setVariableExpr(currClassTokenVarExpr)

src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/AgentName.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ public class AgentName implements ResourceName {
217217
Preconditions.checkArgument(
218218
Objects.equals(agentName.pathTemplate, PROJECT_LOCATION),
219219
"toBuilder is only supported when AgentName has the pattern of projects/{project}/locations/{location}/agent");
220-
project = agentName.project;
221-
location = agentName.location;
220+
this.project = agentName.project;
221+
this.location = agentName.location;
222222
}
223223

224224
public AgentName build() {

src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/BillingAccountLocationName.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public class BillingAccountLocationName implements ResourceName {
168168
}
169169

170170
private Builder(BillingAccountLocationName billingAccountLocationName) {
171-
billingAccount = billingAccountLocationName.billingAccount;
172-
location = billingAccountLocationName.location;
171+
this.billingAccount = billingAccountLocationName.billingAccount;
172+
this.location = billingAccountLocationName.location;
173173
}
174174

175175
public BillingAccountLocationName build() {

src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/FoobarName.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ public class FoobarName implements ResourceName {
317317
Preconditions.checkArgument(
318318
Objects.equals(foobarName.pathTemplate, PROJECT_FOOBAR),
319319
"toBuilder is only supported when FoobarName has the pattern of projects/{project}/foobars/{foobar}");
320-
project = foobarName.project;
321-
foobar = foobarName.foobar;
320+
this.project = foobarName.project;
321+
this.foobar = foobarName.foobar;
322322
}
323323

324324
public FoobarName build() {

src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/SessionName.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public class SessionName implements ResourceName {
142142
}
143143

144144
private Builder(SessionName sessionName) {
145-
session = sessionName.session;
145+
this.session = sessionName.session;
146146
}
147147

148148
public SessionName build() {

src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/TestName.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ public class TestName implements ResourceName {
194194
}
195195

196196
private Builder(TestName testName) {
197-
session = testName.session;
198-
shardId = testName.shardId;
199-
testId = testName.testId;
197+
this.session = testName.session;
198+
this.shardId = testName.shardId;
199+
this.testId = testName.testId;
200200
}
201201

202202
public TestName build() {

test/integration/goldens/asset/com/google/cloud/asset/v1/FeedName.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ private Builder(FeedName feedName) {
295295
Preconditions.checkArgument(
296296
Objects.equals(feedName.pathTemplate, PROJECT_FEED),
297297
"toBuilder is only supported when FeedName has the pattern of projects/{project}/feeds/{feed}");
298-
project = feedName.project;
299-
feed = feedName.feed;
298+
this.project = feedName.project;
299+
this.feed = feedName.feed;
300300
}
301301

302302
public FeedName build() {

test/integration/goldens/credentials/com/google/cloud/iam/credentials/v1/ServiceAccountName.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ public Builder setServiceAccount(String serviceAccount) {
182182
}
183183

184184
private Builder(ServiceAccountName serviceAccountName) {
185-
project = serviceAccountName.project;
186-
serviceAccount = serviceAccountName.serviceAccount;
185+
this.project = serviceAccountName.project;
186+
this.serviceAccount = serviceAccountName.serviceAccount;
187187
}
188188

189189
public ServiceAccountName build() {

test/integration/goldens/kms/com/google/cloud/kms/v1/CryptoKeyName.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ public Builder setCryptoKey(String cryptoKey) {
248248
}
249249

250250
private Builder(CryptoKeyName cryptoKeyName) {
251-
project = cryptoKeyName.project;
252-
location = cryptoKeyName.location;
253-
keyRing = cryptoKeyName.keyRing;
254-
cryptoKey = cryptoKeyName.cryptoKey;
251+
this.project = cryptoKeyName.project;
252+
this.location = cryptoKeyName.location;
253+
this.keyRing = cryptoKeyName.keyRing;
254+
this.cryptoKey = cryptoKeyName.cryptoKey;
255255
}
256256

257257
public CryptoKeyName build() {

0 commit comments

Comments
 (0)