Skip to content

Commit d632e3a

Browse files
authored
Regenerate v6 with microgenerator + enable retry on searchStream. (#377)
1 parent ef70382 commit d632e3a

1,180 files changed

Lines changed: 56671 additions & 82310 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google-ads/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<auto-value.version>1.7.3</auto-value.version>
3737
<!-- Keep all versions below consistent with the io.netty version. -->
3838
<netty.version>2.0.26.Final</netty.version>
39-
<gax.version>1.57.1</gax.version>
39+
<gax.version>1.60.1</gax.version>
4040
<grpc.version>1.30.0</grpc.version>
4141
<protobuf.version>3.12.2</protobuf.version>
4242
</properties>

google-ads/src/main/java/com/google/ads/googleads/v6/common/TransactionAttribute.java

Lines changed: 36 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

google-ads/src/main/java/com/google/ads/googleads/v6/common/TransactionAttributeOrBuilder.java

Lines changed: 12 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
/*
2+
* Copyright 2020 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.ads.googleads.v6.resources;
18+
19+
import com.google.api.pathtemplate.PathTemplate;
20+
import com.google.api.resourcenames.ResourceName;
21+
import com.google.common.base.Preconditions;
22+
import com.google.common.collect.ImmutableMap;
23+
import java.util.ArrayList;
24+
import java.util.List;
25+
import java.util.Map;
26+
import java.util.Objects;
27+
import javax.annotation.Generated;
28+
29+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
30+
@Generated("by gapic-generator-java")
31+
public class AccountBudgetName implements ResourceName {
32+
private static final PathTemplate CUSTOMER_ID_ACCOUNT_BUDGET_ID =
33+
PathTemplate.createWithoutUrlEncoding(
34+
"customers/{customer_id}/accountBudgets/{account_budget_id}");
35+
private volatile Map<String, String> fieldValuesMap;
36+
private final String customerId;
37+
private final String accountBudgetId;
38+
39+
@Deprecated
40+
protected AccountBudgetName() {
41+
customerId = null;
42+
accountBudgetId = null;
43+
}
44+
45+
private AccountBudgetName(Builder builder) {
46+
customerId = Preconditions.checkNotNull(builder.getCustomerId());
47+
accountBudgetId = Preconditions.checkNotNull(builder.getAccountBudgetId());
48+
}
49+
50+
public String getCustomerId() {
51+
return customerId;
52+
}
53+
54+
public String getAccountBudgetId() {
55+
return accountBudgetId;
56+
}
57+
58+
public static Builder newBuilder() {
59+
return new Builder();
60+
}
61+
62+
public Builder toBuilder() {
63+
return new Builder(this);
64+
}
65+
66+
public static AccountBudgetName of(String customerId, String accountBudgetId) {
67+
return newBuilder().setCustomerId(customerId).setAccountBudgetId(accountBudgetId).build();
68+
}
69+
70+
public static String format(String customerId, String accountBudgetId) {
71+
return newBuilder()
72+
.setCustomerId(customerId)
73+
.setAccountBudgetId(accountBudgetId)
74+
.build()
75+
.toString();
76+
}
77+
78+
public static AccountBudgetName parse(String formattedString) {
79+
if (formattedString.isEmpty()) {
80+
return null;
81+
}
82+
Map<String, String> matchMap =
83+
CUSTOMER_ID_ACCOUNT_BUDGET_ID.validatedMatch(
84+
formattedString, "AccountBudgetName.parse: formattedString not in valid format");
85+
return of(matchMap.get("customer_id"), matchMap.get("account_budget_id"));
86+
}
87+
88+
public static List<AccountBudgetName> parseList(List<String> formattedStrings) {
89+
List<AccountBudgetName> list = new ArrayList<>(formattedStrings.size());
90+
for (String formattedString : formattedStrings) {
91+
list.add(parse(formattedString));
92+
}
93+
return list;
94+
}
95+
96+
public static List<String> toStringList(List<AccountBudgetName> values) {
97+
List<String> list = new ArrayList<>(values.size());
98+
for (AccountBudgetName value : values) {
99+
if (value == null) {
100+
list.add("");
101+
} else {
102+
list.add(value.toString());
103+
}
104+
}
105+
return list;
106+
}
107+
108+
public static boolean isParsableFrom(String formattedString) {
109+
return CUSTOMER_ID_ACCOUNT_BUDGET_ID.matches(formattedString);
110+
}
111+
112+
@Override
113+
public Map<String, String> getFieldValuesMap() {
114+
if (fieldValuesMap == null) {
115+
synchronized (this) {
116+
if (fieldValuesMap == null) {
117+
ImmutableMap.Builder<String, String> fieldMapBuilder = ImmutableMap.builder();
118+
if (customerId != null) {
119+
fieldMapBuilder.put("customer_id", customerId);
120+
}
121+
if (accountBudgetId != null) {
122+
fieldMapBuilder.put("account_budget_id", accountBudgetId);
123+
}
124+
fieldValuesMap = fieldMapBuilder.build();
125+
}
126+
}
127+
}
128+
return fieldValuesMap;
129+
}
130+
131+
public String getFieldValue(String fieldName) {
132+
return getFieldValuesMap().get(fieldName);
133+
}
134+
135+
@Override
136+
public String toString() {
137+
return CUSTOMER_ID_ACCOUNT_BUDGET_ID.instantiate(
138+
"customer_id", customerId, "account_budget_id", accountBudgetId);
139+
}
140+
141+
@Override
142+
public boolean equals(Object o) {
143+
if (o == this) {
144+
return true;
145+
}
146+
if (o != null || getClass() == o.getClass()) {
147+
AccountBudgetName that = ((AccountBudgetName) o);
148+
return Objects.equals(this.customerId, that.customerId)
149+
&& Objects.equals(this.accountBudgetId, that.accountBudgetId);
150+
}
151+
return false;
152+
}
153+
154+
@Override
155+
public int hashCode() {
156+
int h = 1;
157+
h *= 1000003;
158+
h ^= Objects.hashCode(customerId);
159+
h *= 1000003;
160+
h ^= Objects.hashCode(accountBudgetId);
161+
return h;
162+
}
163+
164+
/** Builder for customers/{customer_id}/accountBudgets/{account_budget_id}. */
165+
public static class Builder {
166+
private String customerId;
167+
private String accountBudgetId;
168+
169+
protected Builder() {}
170+
171+
public String getCustomerId() {
172+
return customerId;
173+
}
174+
175+
public String getAccountBudgetId() {
176+
return accountBudgetId;
177+
}
178+
179+
public Builder setCustomerId(String customerId) {
180+
this.customerId = customerId;
181+
return this;
182+
}
183+
184+
public Builder setAccountBudgetId(String accountBudgetId) {
185+
this.accountBudgetId = accountBudgetId;
186+
return this;
187+
}
188+
189+
private Builder(AccountBudgetName accountBudgetName) {
190+
customerId = accountBudgetName.customerId;
191+
accountBudgetId = accountBudgetName.accountBudgetId;
192+
}
193+
194+
public AccountBudgetName build() {
195+
return new AccountBudgetName(this);
196+
}
197+
}
198+
}

0 commit comments

Comments
 (0)