Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat!: convert resource names to multipattern resource names (#99)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.13 (#95)

9f1e9c7
commit 9f1e9c7
Author: WhiteSource Renovate <bot@renovateapp.com>
Date:   Wed Mar 25 20:52:39 2020 +0100

    chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.13 (#95)

    This PR contains the following updates:

    | Package | Update | Change |
    |---|---|---|
    | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.12` -> `1.0.13` |

    ---

    ### Release Notes

    <details>
    <summary>GoogleCloudPlatform/java-repo-tools</summary>

    ### [`v1.0.13`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.13)

    [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.12...v1.0.13)

    Fix some issues w/ Checkstyle configuration.  We left the option to turn it off out.

    </details>

    ---

    ### Renovate configuration

    📅 **Schedule**: At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

    ---

     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-securitycenter).

* deps: update dependency com.google.api:api-common to v1.9.0 (#98)

08ea9c7
commit 08ea9c7
Author: WhiteSource Renovate <bot@renovateapp.com>
Date:   Thu Mar 26 00:21:44 2020 +0100

    deps: update dependency com.google.api:api-common to v1.9.0 (#98)

    This PR contains the following updates:

    | Package | Update | Change |
    |---|---|---|
    | [com.google.api:api-common](https://togithub.com/googleapis/api-common-java) | minor | `1.8.1` -> `1.9.0` |

    ---

    ### Release Notes

    <details>
    <summary>googleapis/api-common-java</summary>

    ### [`v1.9.0`](https://togithub.com/googleapis/api-common-java/releases/v1.9.0)

    [Compare Source](https://togithub.com/googleapis/api-common-java/compare/v1.8.1...v1.9.0)

    03-25-2020 14:09 PST

    #### New Features

    -   Add `@BetaApi` `ApiFutres.catchingAsync()` ([#&#8203;117](https://togithub.com/googleapis/api-common-java/pull/117))

    ##### Dependencies

    -   Update guava to v28.2-android ([#&#8203;110](https://togithub.com/googleapis/api-common-java/pull/110))
    -   Update error_prone_annotations to v2.2.3 ([#&#8203;111](https://togithub.com/googleapis/api-common-java/pull/111))

    </details>

    ---

    ### Renovate configuration

    📅 **Schedule**: At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

    ---

     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-securitycenter).

* chore: use latest protoc-java-resource-name-plugin in bazel WORKSPACE. new commits: - fix: stop generating `parseList` and `toStringList` if a multi-pattern resource name has subclasses (#79)

googleapis/googleapis@8bea81b
commit 8bea81bfa461698981b3d3a488a95633d2f6e9ff
Author: Google APIs <noreply@google.com>
Date:   Thu Mar 26 14:44:25 2020 -0700

    chore: use latest protoc-java-resource-name-plugin in bazel WORKSPACE.
    new commits:
    - fix: stop generating `parseList` and `toStringList` if a multi-pattern resource name has subclasses (#79)

    committer: @hzyi-google
    PiperOrigin-RevId: 303197602

* remove deprecated v1p1beta1 resource names and allow breaking changes

Co-authored-by: Jeff Ching <chingor@google.com>
  • Loading branch information
yoshi-automation and chingor13 committed Apr 8, 2020
1 parent 95ee0da commit 04de9cc
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 181 deletions.
Expand Up @@ -16,13 +16,16 @@
<className>com/google/cloud/securitycenter/v1/*OrBuilder</className>
<method>boolean has*(*)</method>
</difference>

<!-- TODO: remove after 0.121.0 -->
<difference>
<differenceType>5001</differenceType>
<className>com/google/cloud/securitycenter/v1/*Name</className>
<to>com/google/cloud/securitycenter/v1/*Name</to>
<differenceType>7002</differenceType>
<className>com/google/cloud/securitycenter/v1/SecurityMarksName</className>
<method>java.util.List parse(java.util.List)</method>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/securitycenter/v1/*Name*</className>
<differenceType>7002</differenceType>
<className>com/google/cloud/securitycenter/v1/SecurityMarksName</className>
<method>java.util.List toStrings(java.util.List)</method>
</difference>
</differences>
Expand Up @@ -22,8 +22,6 @@
import com.google.api.resourcenames.ResourceName;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;

Expand Down Expand Up @@ -152,28 +150,6 @@ public static SecurityMarksName parse(String formattedString) {
throw new ValidationException("JobName.parse: formattedString not in valid format");
}

@BetaApi("The method will be renamed to parseList after subclasses of this class are removed.")
public static List<SecurityMarksName> parse(List<String> formattedStrings) {
List<SecurityMarksName> list = new ArrayList<>(formattedStrings.size());
for (String formattedString : formattedStrings) {
list.add(parse(formattedString));
}
return list;
}

@BetaApi("The method will be renamed to toStringList after subclasses of this class are removed.")
public static List<String> toStrings(List<SecurityMarksName> values) {
List<String> list = new ArrayList<>(values.size());
for (SecurityMarksName value : values) {
if (value == null) {
list.add("");
} else {
list.add(value.toString());
}
}
return list;
}

public static boolean isParsableFrom(String formattedString) {
return ORGANIZATION_ASSET_PATH_TEMPLATE.matches(formattedString)
|| ORGANIZATION_SOURCE_FINDING_PATH_TEMPLATE.matches(formattedString);
Expand Down
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/securitycenter/v1p1beta1/*OrBuilder</className>
<method>* get*(*)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/securitycenter/v1p1beta1/*OrBuilder</className>
<method>boolean contains*(*)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/securitycenter/v1p1beta1/*OrBuilder</className>
<method>boolean has*(*)</method>
</difference>

<!-- TODO: remove after 0.121.0 -->
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/securitycenter/v1p1beta1/SecurityMarksName</className>
<method>*</method>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/securitycenter/v1p1beta1/SecurityMarksNames</className>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/securitycenter/v1p1beta1/UntypedSecurityMarksName</className>
</difference>
</differences>
Expand Up @@ -152,17 +152,15 @@ public static SecurityMarksName parse(String formattedString) {
throw new ValidationException("JobName.parse: formattedString not in valid format");
}

@BetaApi("The method will be renamed to parseList after subclasses of this class are removed.")
public static List<SecurityMarksName> parse(List<String> formattedStrings) {
public static List<SecurityMarksName> parseList(List<String> formattedStrings) {
List<SecurityMarksName> list = new ArrayList<>(formattedStrings.size());
for (String formattedString : formattedStrings) {
list.add(parse(formattedString));
}
return list;
}

@BetaApi("The method will be renamed to toStringList after subclasses of this class are removed.")
public static List<String> toStrings(List<SecurityMarksName> values) {
public static List<String> toStringList(List<SecurityMarksName> values) {
List<String> list = new ArrayList<>(values.size());
for (SecurityMarksName value : values) {
if (value == null) {
Expand Down

This file was deleted.

This file was deleted.

19 changes: 9 additions & 10 deletions synth.metadata
@@ -1,37 +1,36 @@
{
"updateTime": "2020-03-25T18:31:45.271331Z",
"updateTime": "2020-03-26T22:41:16.428212Z",
"sources": [
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "fd83ab212176a1042e8d45ea90766b3bf59ac679",
"internalRef": "302913609"
"sha": "8bea81bfa461698981b3d3a488a95633d2f6e9ff",
"internalRef": "303197602"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "fd83ab212176a1042e8d45ea90766b3bf59ac679",
"internalRef": "302913609"
"sha": "8bea81bfa461698981b3d3a488a95633d2f6e9ff",
"internalRef": "303197602"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "fd83ab212176a1042e8d45ea90766b3bf59ac679",
"internalRef": "302913609",
"log": "fd83ab212176a1042e8d45ea90766b3bf59ac679\nfix: migrate osconfig/agentendpoint/v1 go_gapic_library target to microgen impl\n\nPiperOrigin-RevId: 302913609\n\n0e07113e776bdd8fcc0783372e08bb6e76cb1b5b\ndocs: Update documentation with links to smart home developer guides and reference pages. Remove outdated authorization instructions.\n\nPiperOrigin-RevId: 302892245\n\n"
"sha": "8bea81bfa461698981b3d3a488a95633d2f6e9ff",
"internalRef": "303197602",
"log": "8bea81bfa461698981b3d3a488a95633d2f6e9ff\nchore: use latest protoc-java-resource-name-plugin in bazel WORKSPACE.\nnew commits:\n- fix: stop generating `parseList` and `toStringList` if a multi-pattern resource name has subclasses (#79)\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 303197602\n\nb14af92e565264675d6b12cd2c0ded6c94ddd7f8\nfix talent API incorrect placeholders in two resource name patterns.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303189497\n\n8e22db908ae09e1f7e2802c03b4563fd6b524e0e\nchore(google/maps): Update postprocessing script for Java.\n\n- Update root build.gradle to load local plugin\n- Change com.google.api.grpc group to com.google.maps\n\nPiperOrigin-RevId: 303176850\n\n65816afa71e588252b7119dc723592abe51ea106\nbazel: update gapic-generator-go to v0.12.5 and gapic-generator hash\n\nChanges to gapic-generator-go include:\n* feat: strip invalid link references in comments\n* chore: updating Go deps in bazel repositories\n\nChanges to gapic-generator include:\n* fix: bazel go build gen check for cloud in proto pkg name\n* Revert \"feat: allow static substitution for group name\"\n\nPiperOrigin-RevId: 303150338\n\nd4aa417ed2bba89c2d216900282bddfdafef6128\nFix incorrect retry config in gapic v2 for kms.\n\nPiperOrigin-RevId: 303010132\n\nfd08334533204fdd1b33f79fcb263dbb5bf13de0\nfix: osconfig/v1 update go_gapic_library target to microgen interface\n\nPiperOrigin-RevId: 303007866\n\ne2c0f2a0e06d86b50aba98f67f9f291587d986b3\nUpdate comments for google/rpc/error_details.proto.\n\nPiperOrigin-RevId: 303002528\n\nf786c7586748e78a286b1620ff3ddbf7b4dcab92\nfeat: Add OsConfigService v1 patch APIs.\n\nPiperOrigin-RevId: 302999346\n\n0341fa3fc2f4073a1b1f260d37b2ce620799f545\nTurn on gapic config v2 for kms.\n\nCommitter: @hzyi-google\nPiperOrigin-RevId: 302980301\n\n32dc6e832039b61ac3fb82c72eb0a27570aebcd6\nredis: v1beta1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes\n\nPiperOrigin-RevId: 302958009\n\n685f16483cc4d87c35051f21f8f13ef4fdc919b4\nredis: v1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes\n\nPiperOrigin-RevId: 302957729\n\n733cb282ae5e64673ef86c9a5dff647df803d8b7\nAdd GAPIC cofiguration for v1 client library genetration.\n\nPiperOrigin-RevId: 302928200\n\n1b0fff5f2ec6dc4a9443d9b50e70e9c94c30c45b\ndocs: remove an internal lint declaration\n\nPiperOrigin-RevId: 302928106\n\n2be23f3f3036a6f7ce0844def3d2d3da74e5d415\nfix(google/maps): Add post-processing rules for Google Maps APIs\n\nPiperOrigin-RevId: 302925222\n\n"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "e36822bfa0acb355502dab391b8ef9c4f30208d8",
"log": "e36822bfa0acb355502dab391b8ef9c4f30208d8\nchore(java): treat samples shared configuration dependency update as chore (#457)\n\n\n1b4cc80a7aaf164f6241937dd87f3bd1f4149e0c\nfix: do not run node 8 CI (#456)\n\n\n"
"sha": "e36822bfa0acb355502dab391b8ef9c4f30208d8"
}
}
],
Expand Down

0 comments on commit 04de9cc

Please sign in to comment.