Skip to content

Commit 9123120

Browse files
authored
refresh clients (#3596)
1 parent 75717ae commit 9123120

File tree

65 files changed

+2807
-431
lines changed

Some content is hidden

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

65 files changed

+2807
-431
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+
* in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License
10+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
* or implied. See the License for the specific language governing permissions and limitations under
12+
* the License.
13+
*/
14+
15+
package com.google.containeranalysis.v1beta1;
16+
17+
import com.google.api.resourcenames.ResourceName;
18+
19+
// AUTO-GENERATED DOCUMENTATION AND CLASS
20+
@javax.annotation.Generated("by GAPIC protoc plugin")
21+
public abstract class IamResourceName implements ResourceName {
22+
protected IamResourceName() {}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+
* in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License
10+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
* or implied. See the License for the specific language governing permissions and limitations under
12+
* the License.
13+
*/
14+
15+
package com.google.containeranalysis.v1beta1;
16+
17+
import com.google.api.resourcenames.ResourceName;
18+
19+
// AUTO-GENERATED DOCUMENTATION AND CLASS
20+
@javax.annotation.Generated("by GAPIC protoc plugin")
21+
public class IamResourceNames {
22+
private IamResourceNames() {}
23+
24+
public static IamResourceName parse(String resourceNameString) {
25+
if (NoteName.isParsableFrom(resourceNameString)) {
26+
return NoteName.parse(resourceNameString);
27+
}
28+
if (OccurrenceName.isParsableFrom(resourceNameString)) {
29+
return OccurrenceName.parse(resourceNameString);
30+
}
31+
return UntypedIamResourceName.parse(resourceNameString);
32+
}
33+
}

google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/src/main/java/com/google/containeranalysis/v1beta1/NoteName.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// AUTO-GENERATED DOCUMENTATION AND CLASS
2626
@javax.annotation.Generated("by GAPIC protoc plugin")
27-
public class NoteName implements ResourceName {
27+
public class NoteName extends IamResourceName {
2828

2929
private static final PathTemplate PATH_TEMPLATE =
3030
PathTemplate.createWithoutUrlEncoding("projects/{project}/notes/{note}");

google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/src/main/java/com/google/containeranalysis/v1beta1/OccurrenceName.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// AUTO-GENERATED DOCUMENTATION AND CLASS
2626
@javax.annotation.Generated("by GAPIC protoc plugin")
27-
public class OccurrenceName implements ResourceName {
27+
public class OccurrenceName extends IamResourceName {
2828

2929
private static final PathTemplate PATH_TEMPLATE =
3030
PathTemplate.createWithoutUrlEncoding("projects/{project}/occurrences/{occurrence}");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/*
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+
* in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License
10+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
* or implied. See the License for the specific language governing permissions and limitations under
12+
* the License.
13+
*/
14+
15+
package com.google.containeranalysis.v1beta1;
16+
17+
import com.google.common.base.Preconditions;
18+
import com.google.api.resourcenames.ResourceName;
19+
import com.google.common.collect.ImmutableMap;
20+
import java.util.ArrayList;
21+
import java.util.List;
22+
import java.util.Map;
23+
24+
// AUTO-GENERATED DOCUMENTATION AND CLASS
25+
@javax.annotation.Generated("by GAPIC protoc plugin")
26+
public class UntypedIamResourceName extends IamResourceName {
27+
28+
private final String rawValue;
29+
private Map<String, String> valueMap;
30+
31+
private UntypedIamResourceName(String rawValue) {
32+
this.rawValue = Preconditions.checkNotNull(rawValue);
33+
this.valueMap = ImmutableMap.of("", rawValue);
34+
}
35+
36+
public static UntypedIamResourceName from(ResourceName resourceName) {
37+
return new UntypedIamResourceName(resourceName.toString());
38+
}
39+
40+
public static UntypedIamResourceName parse(String formattedString) {
41+
return new UntypedIamResourceName(formattedString);
42+
}
43+
44+
public static List<UntypedIamResourceName> parseList(List<String> formattedStrings) {
45+
List<UntypedIamResourceName> list = new ArrayList<>(formattedStrings.size());
46+
for (String formattedString : formattedStrings) {
47+
list.add(parse(formattedString));
48+
}
49+
return list;
50+
}
51+
52+
public static List<String> toStringList(List<UntypedIamResourceName> values) {
53+
List<String> list = new ArrayList<String>(values.size());
54+
for (UntypedIamResourceName value : values) {
55+
if (value == null) {
56+
list.add("");
57+
} else {
58+
list.add(value.toString());
59+
}
60+
}
61+
return list;
62+
}
63+
64+
public static boolean isParsableFrom(String formattedString) {
65+
return true;
66+
}
67+
68+
/**
69+
* Return a map with a single value rawValue keyed on an empty String "".
70+
*/
71+
public Map<String, String> getFieldValuesMap() {
72+
return valueMap;
73+
}
74+
75+
/**
76+
* Return the initial rawValue if @param fieldName is an empty String, else return null.
77+
*/
78+
public String getFieldValue(String fieldName) {
79+
return valueMap.get(fieldName);
80+
}
81+
82+
@Override
83+
public String toString() {
84+
return rawValue;
85+
}
86+
87+
@Override
88+
public boolean equals(Object o) {
89+
if (o == this) {
90+
return true;
91+
}
92+
if (o instanceof UntypedIamResourceName) {
93+
UntypedIamResourceName that = (UntypedIamResourceName) o;
94+
return this.rawValue.equals(that.rawValue);
95+
}
96+
return false;
97+
}
98+
99+
@Override
100+
public int hashCode() {
101+
return rawValue.hashCode();
102+
}
103+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+
* in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License
10+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
* or implied. See the License for the specific language governing permissions and limitations under
12+
* the License.
13+
*/
14+
15+
package io.grafeas.v1beta1;
16+
17+
import com.google.api.resourcenames.ResourceName;
18+
19+
// AUTO-GENERATED DOCUMENTATION AND CLASS
20+
@javax.annotation.Generated("by GAPIC protoc plugin")
21+
public abstract class IamResourceName implements ResourceName {
22+
protected IamResourceName() {}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+
* in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License
10+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
* or implied. See the License for the specific language governing permissions and limitations under
12+
* the License.
13+
*/
14+
15+
package io.grafeas.v1beta1;
16+
17+
import com.google.api.resourcenames.ResourceName;
18+
19+
// AUTO-GENERATED DOCUMENTATION AND CLASS
20+
@javax.annotation.Generated("by GAPIC protoc plugin")
21+
public class IamResourceNames {
22+
private IamResourceNames() {}
23+
24+
public static IamResourceName parse(String resourceNameString) {
25+
if (NoteName.isParsableFrom(resourceNameString)) {
26+
return NoteName.parse(resourceNameString);
27+
}
28+
if (OccurrenceName.isParsableFrom(resourceNameString)) {
29+
return OccurrenceName.parse(resourceNameString);
30+
}
31+
return UntypedIamResourceName.parse(resourceNameString);
32+
}
33+
}

google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/src/main/java/io/grafeas/v1beta1/NoteName.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// AUTO-GENERATED DOCUMENTATION AND CLASS
2626
@javax.annotation.Generated("by GAPIC protoc plugin")
27-
public class NoteName implements ResourceName {
27+
public class NoteName extends IamResourceName {
2828

2929
private static final PathTemplate PATH_TEMPLATE =
3030
PathTemplate.createWithoutUrlEncoding("projects/{project}/notes/{note}");

google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/src/main/java/io/grafeas/v1beta1/OccurrenceName.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// AUTO-GENERATED DOCUMENTATION AND CLASS
2626
@javax.annotation.Generated("by GAPIC protoc plugin")
27-
public class OccurrenceName implements ResourceName {
27+
public class OccurrenceName extends IamResourceName {
2828

2929
private static final PathTemplate PATH_TEMPLATE =
3030
PathTemplate.createWithoutUrlEncoding("projects/{project}/occurrences/{occurrence}");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/*
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+
* in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License
10+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
* or implied. See the License for the specific language governing permissions and limitations under
12+
* the License.
13+
*/
14+
15+
package io.grafeas.v1beta1;
16+
17+
import com.google.common.base.Preconditions;
18+
import com.google.api.resourcenames.ResourceName;
19+
import com.google.common.collect.ImmutableMap;
20+
import java.util.ArrayList;
21+
import java.util.List;
22+
import java.util.Map;
23+
24+
// AUTO-GENERATED DOCUMENTATION AND CLASS
25+
@javax.annotation.Generated("by GAPIC protoc plugin")
26+
public class UntypedIamResourceName extends IamResourceName {
27+
28+
private final String rawValue;
29+
private Map<String, String> valueMap;
30+
31+
private UntypedIamResourceName(String rawValue) {
32+
this.rawValue = Preconditions.checkNotNull(rawValue);
33+
this.valueMap = ImmutableMap.of("", rawValue);
34+
}
35+
36+
public static UntypedIamResourceName from(ResourceName resourceName) {
37+
return new UntypedIamResourceName(resourceName.toString());
38+
}
39+
40+
public static UntypedIamResourceName parse(String formattedString) {
41+
return new UntypedIamResourceName(formattedString);
42+
}
43+
44+
public static List<UntypedIamResourceName> parseList(List<String> formattedStrings) {
45+
List<UntypedIamResourceName> list = new ArrayList<>(formattedStrings.size());
46+
for (String formattedString : formattedStrings) {
47+
list.add(parse(formattedString));
48+
}
49+
return list;
50+
}
51+
52+
public static List<String> toStringList(List<UntypedIamResourceName> values) {
53+
List<String> list = new ArrayList<String>(values.size());
54+
for (UntypedIamResourceName value : values) {
55+
if (value == null) {
56+
list.add("");
57+
} else {
58+
list.add(value.toString());
59+
}
60+
}
61+
return list;
62+
}
63+
64+
public static boolean isParsableFrom(String formattedString) {
65+
return true;
66+
}
67+
68+
/**
69+
* Return a map with a single value rawValue keyed on an empty String "".
70+
*/
71+
public Map<String, String> getFieldValuesMap() {
72+
return valueMap;
73+
}
74+
75+
/**
76+
* Return the initial rawValue if @param fieldName is an empty String, else return null.
77+
*/
78+
public String getFieldValue(String fieldName) {
79+
return valueMap.get(fieldName);
80+
}
81+
82+
@Override
83+
public String toString() {
84+
return rawValue;
85+
}
86+
87+
@Override
88+
public boolean equals(Object o) {
89+
if (o == this) {
90+
return true;
91+
}
92+
if (o instanceof UntypedIamResourceName) {
93+
UntypedIamResourceName that = (UntypedIamResourceName) o;
94+
return this.rawValue.equals(that.rawValue);
95+
}
96+
return false;
97+
}
98+
99+
@Override
100+
public int hashCode() {
101+
return rawValue.hashCode();
102+
}
103+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+
* in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License
10+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
* or implied. See the License for the specific language governing permissions and limitations under
12+
* the License.
13+
*/
14+
15+
package io.grafeas.v1beta1.attestation;
16+
17+
import com.google.api.resourcenames.ResourceName;
18+
19+
// AUTO-GENERATED DOCUMENTATION AND CLASS
20+
@javax.annotation.Generated("by GAPIC protoc plugin")
21+
public abstract class IamResourceName implements ResourceName {
22+
protected IamResourceName() {}
23+
}

0 commit comments

Comments
 (0)