Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Update showcase version to 0.28.1 #1673

Merged
merged 3 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
name: ci
env:
SHOWCASE_VERSION: 0.27.0
SHOWCASE_VERSION: 0.28.0
jobs:
build:
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: SonarCloud Build
env:
SHOWCASE_VERSION: 0.27.0
SHOWCASE_VERSION: 0.28.0
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/downstream-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

set -eo pipefail

SHOWCASE_VERSION=0.27.0
SHOWCASE_VERSION=0.28.0

## Get the directory of the build script
scriptDir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
Expand Down
10 changes: 3 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,13 @@ http_archive(
)

# Showcase
_showcase_commit = "656e5f46d125a69c82c0cb7edcfcd8b03ed77b89"

_showcase_sha256 = "26d4b71ac31cbca5e4ed4cdcb5bfeca185e405392d70d2020b4528b5b47c8022"
_showcase_version = "0.28.1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@burkedavison @mpeddada1 I'm changing this to use showcase version instead of committish as I think this is more intuitive, let me know if you have any concerns.


http_archive(
name = "com_google_gapic_showcase",
sha256 = _showcase_sha256,
strip_prefix = "gapic-showcase-%s" % _showcase_commit,
strip_prefix = "gapic-showcase-%s" % _showcase_version,
urls = [
# "https://github.com/googleapis/gapic-showcase/archive/refs/tags/v%s.zip" % _showcase_version,
"https://github.com/googleapis/gapic-showcase/archive/%s.zip" % _showcase_commit,
"https://github.com/googleapis/gapic-showcase/archive/refs/tags/v%s.zip" % _showcase_version,
],
)

Expand Down
2 changes: 1 addition & 1 deletion showcase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ versions is not guaranteed. If changing the version of the server, it may also b
update to a compatible client version in `./WORKSPACE`.

```shell
$ GAPIC_SHOWCASE_VERSION=0.27.0
$ GAPIC_SHOWCASE_VERSION=0.28.0
$ go install github.com/googleapis/gapic-showcase/cmd/gapic-showcase@v"$GAPIC_SHOWCASE_VERSION"
$ PATH=$PATH:`go env GOPATH`/bin
$ gapic-showcase --help
Expand Down
2 changes: 1 addition & 1 deletion showcase/gapic-showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</parent>

<properties>
<gapic-showcase.version>0.27.0</gapic-showcase.version>
<gapic-showcase.version>0.28.0</gapic-showcase.version>
</properties>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.showcase.v1beta1;

import com.google.api.pathtemplate.PathTemplate;
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;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
@Generated("by gapic-generator-java")
public class StreamingSequenceName implements ResourceName {
private static final PathTemplate STREAMING_SEQUENCE =
PathTemplate.createWithoutUrlEncoding("streamingSequences/{streaming_sequence}");
private volatile Map<String, String> fieldValuesMap;
private final String streamingSequence;

@Deprecated
protected StreamingSequenceName() {
streamingSequence = null;
}

private StreamingSequenceName(Builder builder) {
streamingSequence = Preconditions.checkNotNull(builder.getStreamingSequence());
}

public String getStreamingSequence() {
return streamingSequence;
}

public static Builder newBuilder() {
return new Builder();
}

public Builder toBuilder() {
return new Builder(this);
}

public static StreamingSequenceName of(String streamingSequence) {
return newBuilder().setStreamingSequence(streamingSequence).build();
}

public static String format(String streamingSequence) {
return newBuilder().setStreamingSequence(streamingSequence).build().toString();
}

public static StreamingSequenceName parse(String formattedString) {
if (formattedString.isEmpty()) {
return null;
}
Map<String, String> matchMap =
STREAMING_SEQUENCE.validatedMatch(
formattedString, "StreamingSequenceName.parse: formattedString not in valid format");
return of(matchMap.get("streaming_sequence"));
}

public static List<StreamingSequenceName> parseList(List<String> formattedStrings) {
List<StreamingSequenceName> list = new ArrayList<>(formattedStrings.size());
for (String formattedString : formattedStrings) {
list.add(parse(formattedString));
}
return list;
}

public static List<String> toStringList(List<StreamingSequenceName> values) {
List<String> list = new ArrayList<>(values.size());
for (StreamingSequenceName value : values) {
if (value == null) {
list.add("");
} else {
list.add(value.toString());
}
}
return list;
}

public static boolean isParsableFrom(String formattedString) {
return STREAMING_SEQUENCE.matches(formattedString);
}

@Override
public Map<String, String> getFieldValuesMap() {
if (fieldValuesMap == null) {
synchronized (this) {
if (fieldValuesMap == null) {
ImmutableMap.Builder<String, String> fieldMapBuilder = ImmutableMap.builder();
if (streamingSequence != null) {
fieldMapBuilder.put("streaming_sequence", streamingSequence);
}
fieldValuesMap = fieldMapBuilder.build();
}
}
}
return fieldValuesMap;
}

public String getFieldValue(String fieldName) {
return getFieldValuesMap().get(fieldName);
}

@Override
public String toString() {
return STREAMING_SEQUENCE.instantiate("streaming_sequence", streamingSequence);
}

@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o != null || getClass() == o.getClass()) {
StreamingSequenceName that = ((StreamingSequenceName) o);
return Objects.equals(this.streamingSequence, that.streamingSequence);
}
return false;
}

@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= Objects.hashCode(streamingSequence);
return h;
}

/** Builder for streamingSequences/{streaming_sequence}. */
public static class Builder {
private String streamingSequence;

protected Builder() {}

public String getStreamingSequence() {
return streamingSequence;
}

public Builder setStreamingSequence(String streamingSequence) {
this.streamingSequence = streamingSequence;
return this;
}

private Builder(StreamingSequenceName streamingSequenceName) {
this.streamingSequence = streamingSequenceName.streamingSequence;
}

public StreamingSequenceName build() {
return new StreamingSequenceName(this);
}
}
}
Loading