diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f031d85e80..cd9fd9211a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index 84bb86234e..7af99197fd 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -1,6 +1,6 @@ name: SonarCloud Build env: - SHOWCASE_VERSION: 0.27.0 + SHOWCASE_VERSION: 0.28.0 on: push: branches: diff --git a/.kokoro/presubmit/downstream-build.sh b/.kokoro/presubmit/downstream-build.sh index fc2616a85b..9cd49a779a 100755 --- a/.kokoro/presubmit/downstream-build.sh +++ b/.kokoro/presubmit/downstream-build.sh @@ -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]}")") diff --git a/WORKSPACE b/WORKSPACE index 0b53931add..62b1e8e511 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -107,17 +107,13 @@ http_archive( ) # Showcase -_showcase_commit = "656e5f46d125a69c82c0cb7edcfcd8b03ed77b89" - -_showcase_sha256 = "26d4b71ac31cbca5e4ed4cdcb5bfeca185e405392d70d2020b4528b5b47c8022" +_showcase_version = "0.28.1" 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, ], ) diff --git a/showcase/README.md b/showcase/README.md index 01f12161c7..a246a0416e 100644 --- a/showcase/README.md +++ b/showcase/README.md @@ -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 diff --git a/showcase/gapic-showcase/pom.xml b/showcase/gapic-showcase/pom.xml index d6876b9c25..8663ade568 100644 --- a/showcase/gapic-showcase/pom.xml +++ b/showcase/gapic-showcase/pom.xml @@ -19,7 +19,7 @@ - 0.27.0 + 0.28.0 diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java new file mode 100644 index 0000000000..8adcda635f --- /dev/null +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java @@ -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 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 matchMap = + STREAMING_SEQUENCE.validatedMatch( + formattedString, "StreamingSequenceName.parse: formattedString not in valid format"); + return of(matchMap.get("streaming_sequence")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List 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 getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder 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); + } + } +} diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java new file mode 100644 index 0000000000..106c07e1f9 --- /dev/null +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java @@ -0,0 +1,170 @@ +/* + * 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 StreamingSequenceReportName implements ResourceName { + private static final PathTemplate STREAMING_SEQUENCE = + PathTemplate.createWithoutUrlEncoding( + "streamingSequences/{streaming_sequence}/streamingSequenceReport"); + private volatile Map fieldValuesMap; + private final String streamingSequence; + + @Deprecated + protected StreamingSequenceReportName() { + streamingSequence = null; + } + + private StreamingSequenceReportName(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 StreamingSequenceReportName of(String streamingSequence) { + return newBuilder().setStreamingSequence(streamingSequence).build(); + } + + public static String format(String streamingSequence) { + return newBuilder().setStreamingSequence(streamingSequence).build().toString(); + } + + public static StreamingSequenceReportName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + STREAMING_SEQUENCE.validatedMatch( + formattedString, + "StreamingSequenceReportName.parse: formattedString not in valid format"); + return of(matchMap.get("streaming_sequence")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (StreamingSequenceReportName 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 getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder 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()) { + StreamingSequenceReportName that = ((StreamingSequenceReportName) 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}/streamingSequenceReport. */ + 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(StreamingSequenceReportName streamingSequenceReportName) { + this.streamingSequence = streamingSequenceReportName.streamingSequence; + } + + public StreamingSequenceReportName build() { + return new StreamingSequenceReportName(this); + } + } +} diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/echo/expand/AsyncExpand.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/echo/expand/AsyncExpand.java index 80c5f6d6b4..3b1c549c3e 100644 --- a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/echo/expand/AsyncExpand.java +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/echo/expand/AsyncExpand.java @@ -18,6 +18,7 @@ // [START localhost7469_v1beta1_generated_Echo_Expand_async] import com.google.api.gax.rpc.ServerStream; +import com.google.protobuf.Duration; import com.google.rpc.Status; import com.google.showcase.v1beta1.EchoClient; import com.google.showcase.v1beta1.EchoResponse; @@ -40,6 +41,7 @@ public static void asyncExpand() throws Exception { ExpandRequest.newBuilder() .setContent("content951530617") .setError(Status.newBuilder().build()) + .setStreamWaitTime(Duration.newBuilder().build()) .build(); ServerStream stream = echoClient.expandCallable().call(request); for (EchoResponse response : stream) { diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/attemptstreamingsequence/AsyncAttemptStreamingSequence.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/attemptstreamingsequence/AsyncAttemptStreamingSequence.java new file mode 100644 index 0000000000..23b2a7e142 --- /dev/null +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/attemptstreamingsequence/AsyncAttemptStreamingSequence.java @@ -0,0 +1,51 @@ +/* + * 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.samples; + +// [START localhost7469_v1beta1_generated_SequenceService_AttemptStreamingSequence_async] +import com.google.api.gax.rpc.ServerStream; +import com.google.showcase.v1beta1.AttemptStreamingSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceResponse; +import com.google.showcase.v1beta1.SequenceServiceClient; +import com.google.showcase.v1beta1.StreamingSequenceName; + +public class AsyncAttemptStreamingSequence { + + public static void main(String[] args) throws Exception { + asyncAttemptStreamingSequence(); + } + + public static void asyncAttemptStreamingSequence() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) { + AttemptStreamingSequenceRequest request = + AttemptStreamingSequenceRequest.newBuilder() + .setName(StreamingSequenceName.of("[STREAMING_SEQUENCE]").toString()) + .build(); + ServerStream stream = + sequenceServiceClient.attemptStreamingSequenceCallable().call(request); + for (AttemptStreamingSequenceResponse response : stream) { + // Do something when a response is received. + } + } + } +} +// [END localhost7469_v1beta1_generated_SequenceService_AttemptStreamingSequence_async] diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/AsyncCreateStreamingSequence.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/AsyncCreateStreamingSequence.java new file mode 100644 index 0000000000..4fd0acff60 --- /dev/null +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/AsyncCreateStreamingSequence.java @@ -0,0 +1,49 @@ +/* + * 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.samples; + +// [START localhost7469_v1beta1_generated_SequenceService_CreateStreamingSequence_async] +import com.google.api.core.ApiFuture; +import com.google.showcase.v1beta1.CreateStreamingSequenceRequest; +import com.google.showcase.v1beta1.SequenceServiceClient; +import com.google.showcase.v1beta1.StreamingSequence; + +public class AsyncCreateStreamingSequence { + + public static void main(String[] args) throws Exception { + asyncCreateStreamingSequence(); + } + + public static void asyncCreateStreamingSequence() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) { + CreateStreamingSequenceRequest request = + CreateStreamingSequenceRequest.newBuilder() + .setStreamingSequence(StreamingSequence.newBuilder().build()) + .build(); + ApiFuture future = + sequenceServiceClient.createStreamingSequenceCallable().futureCall(request); + // Do something. + StreamingSequence response = future.get(); + } + } +} +// [END localhost7469_v1beta1_generated_SequenceService_CreateStreamingSequence_async] diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/SyncCreateStreamingSequence.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/SyncCreateStreamingSequence.java new file mode 100644 index 0000000000..48fa25cbbd --- /dev/null +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/SyncCreateStreamingSequence.java @@ -0,0 +1,45 @@ +/* + * 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.samples; + +// [START localhost7469_v1beta1_generated_SequenceService_CreateStreamingSequence_sync] +import com.google.showcase.v1beta1.CreateStreamingSequenceRequest; +import com.google.showcase.v1beta1.SequenceServiceClient; +import com.google.showcase.v1beta1.StreamingSequence; + +public class SyncCreateStreamingSequence { + + public static void main(String[] args) throws Exception { + syncCreateStreamingSequence(); + } + + public static void syncCreateStreamingSequence() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) { + CreateStreamingSequenceRequest request = + CreateStreamingSequenceRequest.newBuilder() + .setStreamingSequence(StreamingSequence.newBuilder().build()) + .build(); + StreamingSequence response = sequenceServiceClient.createStreamingSequence(request); + } + } +} +// [END localhost7469_v1beta1_generated_SequenceService_CreateStreamingSequence_sync] diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/SyncCreateStreamingSequenceStreamingsequence.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/SyncCreateStreamingSequenceStreamingsequence.java new file mode 100644 index 0000000000..ac87b6eb41 --- /dev/null +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/createstreamingsequence/SyncCreateStreamingSequenceStreamingsequence.java @@ -0,0 +1,41 @@ +/* + * 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.samples; + +// [START localhost7469_v1beta1_generated_SequenceService_CreateStreamingSequence_Streamingsequence_sync] +import com.google.showcase.v1beta1.SequenceServiceClient; +import com.google.showcase.v1beta1.StreamingSequence; + +public class SyncCreateStreamingSequenceStreamingsequence { + + public static void main(String[] args) throws Exception { + syncCreateStreamingSequenceStreamingsequence(); + } + + public static void syncCreateStreamingSequenceStreamingsequence() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) { + StreamingSequence streamingSequence = StreamingSequence.newBuilder().build(); + StreamingSequence response = sequenceServiceClient.createStreamingSequence(streamingSequence); + } + } +} +// [END localhost7469_v1beta1_generated_SequenceService_CreateStreamingSequence_Streamingsequence_sync] diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/AsyncGetStreamingSequenceReport.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/AsyncGetStreamingSequenceReport.java new file mode 100644 index 0000000000..710e38524d --- /dev/null +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/AsyncGetStreamingSequenceReport.java @@ -0,0 +1,50 @@ +/* + * 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.samples; + +// [START localhost7469_v1beta1_generated_SequenceService_GetStreamingSequenceReport_async] +import com.google.api.core.ApiFuture; +import com.google.showcase.v1beta1.GetStreamingSequenceReportRequest; +import com.google.showcase.v1beta1.SequenceServiceClient; +import com.google.showcase.v1beta1.StreamingSequenceReport; +import com.google.showcase.v1beta1.StreamingSequenceReportName; + +public class AsyncGetStreamingSequenceReport { + + public static void main(String[] args) throws Exception { + asyncGetStreamingSequenceReport(); + } + + public static void asyncGetStreamingSequenceReport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) { + GetStreamingSequenceReportRequest request = + GetStreamingSequenceReportRequest.newBuilder() + .setName(StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString()) + .build(); + ApiFuture future = + sequenceServiceClient.getStreamingSequenceReportCallable().futureCall(request); + // Do something. + StreamingSequenceReport response = future.get(); + } + } +} +// [END localhost7469_v1beta1_generated_SequenceService_GetStreamingSequenceReport_async] diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReport.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReport.java new file mode 100644 index 0000000000..1a3a3b9377 --- /dev/null +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReport.java @@ -0,0 +1,46 @@ +/* + * 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.samples; + +// [START localhost7469_v1beta1_generated_SequenceService_GetStreamingSequenceReport_sync] +import com.google.showcase.v1beta1.GetStreamingSequenceReportRequest; +import com.google.showcase.v1beta1.SequenceServiceClient; +import com.google.showcase.v1beta1.StreamingSequenceReport; +import com.google.showcase.v1beta1.StreamingSequenceReportName; + +public class SyncGetStreamingSequenceReport { + + public static void main(String[] args) throws Exception { + syncGetStreamingSequenceReport(); + } + + public static void syncGetStreamingSequenceReport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) { + GetStreamingSequenceReportRequest request = + GetStreamingSequenceReportRequest.newBuilder() + .setName(StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString()) + .build(); + StreamingSequenceReport response = sequenceServiceClient.getStreamingSequenceReport(request); + } + } +} +// [END localhost7469_v1beta1_generated_SequenceService_GetStreamingSequenceReport_sync] diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReportStreamingsequencereportname.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReportStreamingsequencereportname.java new file mode 100644 index 0000000000..5a5952e9e6 --- /dev/null +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReportStreamingsequencereportname.java @@ -0,0 +1,42 @@ +/* + * 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.samples; + +// [START localhost7469_v1beta1_generated_SequenceService_GetStreamingSequenceReport_Streamingsequencereportname_sync] +import com.google.showcase.v1beta1.SequenceServiceClient; +import com.google.showcase.v1beta1.StreamingSequenceReport; +import com.google.showcase.v1beta1.StreamingSequenceReportName; + +public class SyncGetStreamingSequenceReportStreamingsequencereportname { + + public static void main(String[] args) throws Exception { + syncGetStreamingSequenceReportStreamingsequencereportname(); + } + + public static void syncGetStreamingSequenceReportStreamingsequencereportname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) { + StreamingSequenceReportName name = StreamingSequenceReportName.of("[STREAMING_SEQUENCE]"); + StreamingSequenceReport response = sequenceServiceClient.getStreamingSequenceReport(name); + } + } +} +// [END localhost7469_v1beta1_generated_SequenceService_GetStreamingSequenceReport_Streamingsequencereportname_sync] diff --git a/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReportString.java b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReportString.java new file mode 100644 index 0000000000..a869686aaa --- /dev/null +++ b/showcase/gapic-showcase/samples/snippets/generated/src/main/java/com/google/showcase/v1beta1/sequenceservice/getstreamingsequencereport/SyncGetStreamingSequenceReportString.java @@ -0,0 +1,42 @@ +/* + * 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.samples; + +// [START localhost7469_v1beta1_generated_SequenceService_GetStreamingSequenceReport_String_sync] +import com.google.showcase.v1beta1.SequenceServiceClient; +import com.google.showcase.v1beta1.StreamingSequenceReport; +import com.google.showcase.v1beta1.StreamingSequenceReportName; + +public class SyncGetStreamingSequenceReportString { + + public static void main(String[] args) throws Exception { + syncGetStreamingSequenceReportString(); + } + + public static void syncGetStreamingSequenceReportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) { + String name = StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString(); + StreamingSequenceReport response = sequenceServiceClient.getStreamingSequenceReport(name); + } + } +} +// [END localhost7469_v1beta1_generated_SequenceService_GetStreamingSequenceReport_String_sync] diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java index db436f4b78..70decdf855 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java @@ -293,6 +293,7 @@ public final UnaryCallable echoCallable() { * ExpandRequest.newBuilder() * .setContent("content951530617") * .setError(Status.newBuilder().build()) + * .setStreamWaitTime(Duration.newBuilder().build()) * .build(); * ServerStream stream = echoClient.expandCallable().call(request); * for (EchoResponse response : stream) { diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java index 58b9d96d7b..c49de63088 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java @@ -24,6 +24,7 @@ import com.google.api.gax.paging.AbstractPage; import com.google.api.gax.paging.AbstractPagedListResponse; import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -259,6 +260,90 @@ public final UnaryCallable createSequenceCallab return stub.createSequenceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a sequence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+   *   StreamingSequence streamingSequence = StreamingSequence.newBuilder().build();
+   *   StreamingSequence response = sequenceServiceClient.createStreamingSequence(streamingSequence);
+   * }
+   * }
+ * + * @param streamingSequence + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StreamingSequence createStreamingSequence(StreamingSequence streamingSequence) { + CreateStreamingSequenceRequest request = + CreateStreamingSequenceRequest.newBuilder().setStreamingSequence(streamingSequence).build(); + return createStreamingSequence(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a sequence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+   *   CreateStreamingSequenceRequest request =
+   *       CreateStreamingSequenceRequest.newBuilder()
+   *           .setStreamingSequence(StreamingSequence.newBuilder().build())
+   *           .build();
+   *   StreamingSequence response = sequenceServiceClient.createStreamingSequence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StreamingSequence createStreamingSequence(CreateStreamingSequenceRequest request) { + return createStreamingSequenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a sequence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+   *   CreateStreamingSequenceRequest request =
+   *       CreateStreamingSequenceRequest.newBuilder()
+   *           .setStreamingSequence(StreamingSequence.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       sequenceServiceClient.createStreamingSequenceCallable().futureCall(request);
+   *   // Do something.
+   *   StreamingSequence response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createStreamingSequenceCallable() { + return stub.createStreamingSequenceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a sequence. @@ -370,6 +455,121 @@ public final UnaryCallable getSequence return stub.getSequenceReportCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a sequence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+   *   StreamingSequenceReportName name = StreamingSequenceReportName.of("[STREAMING_SEQUENCE]");
+   *   StreamingSequenceReport response = sequenceServiceClient.getStreamingSequenceReport(name);
+   * }
+   * }
+ * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StreamingSequenceReport getStreamingSequenceReport( + StreamingSequenceReportName name) { + GetStreamingSequenceReportRequest request = + GetStreamingSequenceReportRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getStreamingSequenceReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a sequence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+   *   String name = StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString();
+   *   StreamingSequenceReport response = sequenceServiceClient.getStreamingSequenceReport(name);
+   * }
+   * }
+ * + * @param name + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StreamingSequenceReport getStreamingSequenceReport(String name) { + GetStreamingSequenceReportRequest request = + GetStreamingSequenceReportRequest.newBuilder().setName(name).build(); + return getStreamingSequenceReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a sequence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+   *   GetStreamingSequenceReportRequest request =
+   *       GetStreamingSequenceReportRequest.newBuilder()
+   *           .setName(StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString())
+   *           .build();
+   *   StreamingSequenceReport response = sequenceServiceClient.getStreamingSequenceReport(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StreamingSequenceReport getStreamingSequenceReport( + GetStreamingSequenceReportRequest request) { + return getStreamingSequenceReportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a sequence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+   *   GetStreamingSequenceReportRequest request =
+   *       GetStreamingSequenceReportRequest.newBuilder()
+   *           .setName(StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       sequenceServiceClient.getStreamingSequenceReportCallable().futureCall(request);
+   *   // Do something.
+   *   StreamingSequenceReport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getStreamingSequenceReportCallable() { + return stub.getStreamingSequenceReportCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Attempts a sequence. @@ -478,6 +678,37 @@ public final UnaryCallable attemptSequenceCallabl return stub.attemptSequenceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Attempts a streaming sequence. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+   *   AttemptStreamingSequenceRequest request =
+   *       AttemptStreamingSequenceRequest.newBuilder()
+   *           .setName(StreamingSequenceName.of("[STREAMING_SEQUENCE]").toString())
+   *           .build();
+   *   ServerStream stream =
+   *       sequenceServiceClient.attemptStreamingSequenceCallable().call(request);
+   *   for (AttemptStreamingSequenceResponse response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceCallable() { + return stub.attemptStreamingSequenceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceSettings.java index 484bd124e7..083da1863c 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceSettings.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceSettings.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; @@ -87,16 +88,35 @@ public UnaryCallSettings createSequenceSettings return ((SequenceServiceStubSettings) getStubSettings()).createSequenceSettings(); } + /** Returns the object with the settings used for calls to createStreamingSequence. */ + public UnaryCallSettings + createStreamingSequenceSettings() { + return ((SequenceServiceStubSettings) getStubSettings()).createStreamingSequenceSettings(); + } + /** Returns the object with the settings used for calls to getSequenceReport. */ public UnaryCallSettings getSequenceReportSettings() { return ((SequenceServiceStubSettings) getStubSettings()).getSequenceReportSettings(); } + /** Returns the object with the settings used for calls to getStreamingSequenceReport. */ + public UnaryCallSettings + getStreamingSequenceReportSettings() { + return ((SequenceServiceStubSettings) getStubSettings()).getStreamingSequenceReportSettings(); + } + /** Returns the object with the settings used for calls to attemptSequence. */ public UnaryCallSettings attemptSequenceSettings() { return ((SequenceServiceStubSettings) getStubSettings()).attemptSequenceSettings(); } + /** Returns the object with the settings used for calls to attemptStreamingSequence. */ + public ServerStreamingCallSettings< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceSettings() { + return ((SequenceServiceStubSettings) getStubSettings()).attemptStreamingSequenceSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -228,17 +248,36 @@ public UnaryCallSettings.Builder createSequence return getStubSettingsBuilder().createSequenceSettings(); } + /** Returns the builder for the settings used for calls to createStreamingSequence. */ + public UnaryCallSettings.Builder + createStreamingSequenceSettings() { + return getStubSettingsBuilder().createStreamingSequenceSettings(); + } + /** Returns the builder for the settings used for calls to getSequenceReport. */ public UnaryCallSettings.Builder getSequenceReportSettings() { return getStubSettingsBuilder().getSequenceReportSettings(); } + /** Returns the builder for the settings used for calls to getStreamingSequenceReport. */ + public UnaryCallSettings.Builder + getStreamingSequenceReportSettings() { + return getStubSettingsBuilder().getStreamingSequenceReportSettings(); + } + /** Returns the builder for the settings used for calls to attemptSequence. */ public UnaryCallSettings.Builder attemptSequenceSettings() { return getStubSettingsBuilder().attemptSequenceSettings(); } + /** Returns the builder for the settings used for calls to attemptStreamingSequence. */ + public ServerStreamingCallSettings.Builder< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceSettings() { + return getStubSettingsBuilder().attemptStreamingSequenceSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json index 5dca2e3fd9..b79bfb905f 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json @@ -187,15 +187,24 @@ "AttemptSequence": { "methods": ["attemptSequence", "attemptSequence", "attemptSequence", "attemptSequenceCallable"] }, + "AttemptStreamingSequence": { + "methods": ["attemptStreamingSequenceCallable"] + }, "CreateSequence": { "methods": ["createSequence", "createSequence", "createSequenceCallable"] }, + "CreateStreamingSequence": { + "methods": ["createStreamingSequence", "createStreamingSequence", "createStreamingSequenceCallable"] + }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, "GetSequenceReport": { "methods": ["getSequenceReport", "getSequenceReport", "getSequenceReport", "getSequenceReportCallable"] }, + "GetStreamingSequenceReport": { + "methods": ["getStreamingSequenceReport", "getStreamingSequenceReport", "getStreamingSequenceReport", "getStreamingSequenceReportCallable"] + }, "ListLocations": { "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] } diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java index 411d9ab420..24c4d58065 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java @@ -24,6 +24,7 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -33,10 +34,16 @@ import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; import com.google.showcase.v1beta1.AttemptSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceResponse; import com.google.showcase.v1beta1.CreateSequenceRequest; +import com.google.showcase.v1beta1.CreateStreamingSequenceRequest; import com.google.showcase.v1beta1.GetSequenceReportRequest; +import com.google.showcase.v1beta1.GetStreamingSequenceReportRequest; import com.google.showcase.v1beta1.Sequence; import com.google.showcase.v1beta1.SequenceReport; +import com.google.showcase.v1beta1.StreamingSequence; +import com.google.showcase.v1beta1.StreamingSequenceReport; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; @@ -63,6 +70,16 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Sequence.getDefaultInstance())) .build(); + private static final MethodDescriptor + createStreamingSequenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.showcase.v1beta1.SequenceService/CreateStreamingSequence") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateStreamingSequenceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(StreamingSequence.getDefaultInstance())) + .build(); + private static final MethodDescriptor getSequenceReportMethodDescriptor = MethodDescriptor.newBuilder() @@ -73,6 +90,18 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(SequenceReport.getDefaultInstance())) .build(); + private static final MethodDescriptor + getStreamingSequenceReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.showcase.v1beta1.SequenceService/GetStreamingSequenceReport") + .setRequestMarshaller( + ProtoUtils.marshaller(GetStreamingSequenceReportRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StreamingSequenceReport.getDefaultInstance())) + .build(); + private static final MethodDescriptor attemptSequenceMethodDescriptor = MethodDescriptor.newBuilder() @@ -83,6 +112,19 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.showcase.v1beta1.SequenceService/AttemptStreamingSequence") + .setRequestMarshaller( + ProtoUtils.marshaller(AttemptStreamingSequenceRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AttemptStreamingSequenceResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -103,8 +145,15 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .build(); private final UnaryCallable createSequenceCallable; + private final UnaryCallable + createStreamingSequenceCallable; private final UnaryCallable getSequenceReportCallable; + private final UnaryCallable + getStreamingSequenceReportCallable; private final UnaryCallable attemptSequenceCallable; + private final ServerStreamingCallable< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -158,6 +207,11 @@ protected GrpcSequenceServiceStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(createSequenceMethodDescriptor) .build(); + GrpcCallSettings + createStreamingSequenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createStreamingSequenceMethodDescriptor) + .build(); GrpcCallSettings getSequenceReportTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getSequenceReportMethodDescriptor) @@ -168,6 +222,18 @@ protected GrpcSequenceServiceStub( return params.build(); }) .build(); + GrpcCallSettings + getStreamingSequenceReportTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getStreamingSequenceReportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings attemptSequenceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(attemptSequenceMethodDescriptor) @@ -178,6 +244,18 @@ protected GrpcSequenceServiceStub( return params.build(); }) .build(); + GrpcCallSettings + attemptStreamingSequenceTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(attemptStreamingSequenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -202,14 +280,29 @@ protected GrpcSequenceServiceStub( this.createSequenceCallable = callableFactory.createUnaryCallable( createSequenceTransportSettings, settings.createSequenceSettings(), clientContext); + this.createStreamingSequenceCallable = + callableFactory.createUnaryCallable( + createStreamingSequenceTransportSettings, + settings.createStreamingSequenceSettings(), + clientContext); this.getSequenceReportCallable = callableFactory.createUnaryCallable( getSequenceReportTransportSettings, settings.getSequenceReportSettings(), clientContext); + this.getStreamingSequenceReportCallable = + callableFactory.createUnaryCallable( + getStreamingSequenceReportTransportSettings, + settings.getStreamingSequenceReportSettings(), + clientContext); this.attemptSequenceCallable = callableFactory.createUnaryCallable( attemptSequenceTransportSettings, settings.attemptSequenceSettings(), clientContext); + this.attemptStreamingSequenceCallable = + callableFactory.createServerStreamingCallable( + attemptStreamingSequenceTransportSettings, + settings.attemptStreamingSequenceSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -233,16 +326,34 @@ public UnaryCallable createSequenceCallable() { return createSequenceCallable; } + @Override + public UnaryCallable + createStreamingSequenceCallable() { + return createStreamingSequenceCallable; + } + @Override public UnaryCallable getSequenceReportCallable() { return getSequenceReportCallable; } + @Override + public UnaryCallable + getStreamingSequenceReportCallable() { + return getStreamingSequenceReportCallable; + } + @Override public UnaryCallable attemptSequenceCallable() { return attemptSequenceCallable; } + @Override + public ServerStreamingCallable + attemptStreamingSequenceCallable() { + return attemptStreamingSequenceCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/HttpJsonSequenceServiceStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/HttpJsonSequenceServiceStub.java index 44f5f0e2bb..86e488d457 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/HttpJsonSequenceServiceStub.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/HttpJsonSequenceServiceStub.java @@ -29,6 +29,7 @@ import com.google.api.gax.httpjson.ProtoMessageResponseParser; import com.google.api.gax.httpjson.ProtoRestSerializer; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -37,10 +38,16 @@ import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; import com.google.showcase.v1beta1.AttemptSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceResponse; import com.google.showcase.v1beta1.CreateSequenceRequest; +import com.google.showcase.v1beta1.CreateStreamingSequenceRequest; import com.google.showcase.v1beta1.GetSequenceReportRequest; +import com.google.showcase.v1beta1.GetStreamingSequenceReportRequest; import com.google.showcase.v1beta1.Sequence; import com.google.showcase.v1beta1.SequenceReport; +import com.google.showcase.v1beta1.StreamingSequence; +import com.google.showcase.v1beta1.StreamingSequenceReport; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; @@ -95,6 +102,42 @@ public class HttpJsonSequenceServiceStub extends SequenceServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + createStreamingSequenceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.showcase.v1beta1.SequenceService/CreateStreamingSequence") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/streamingSequences", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "streamingSequence", request.getStreamingSequence(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(StreamingSequence.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor getSequenceReportMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -128,6 +171,42 @@ public class HttpJsonSequenceServiceStub extends SequenceServiceStub { .build()) .build(); + private static final ApiMethodDescriptor< + GetStreamingSequenceReportRequest, StreamingSequenceReport> + getStreamingSequenceReportMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.showcase.v1beta1.SequenceService/GetStreamingSequenceReport") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=streamingSequences/*/streamingSequenceReport}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(StreamingSequenceReport.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor attemptSequenceMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -164,6 +243,44 @@ public class HttpJsonSequenceServiceStub extends SequenceServiceStub { .build()) .build(); + private static final ApiMethodDescriptor< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.showcase.v1beta1.SequenceService/AttemptStreamingSequence") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=streamingSequences/*}:stream", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AttemptStreamingSequenceResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -231,8 +348,15 @@ public class HttpJsonSequenceServiceStub extends SequenceServiceStub { .build(); private final UnaryCallable createSequenceCallable; + private final UnaryCallable + createStreamingSequenceCallable; private final UnaryCallable getSequenceReportCallable; + private final UnaryCallable + getStreamingSequenceReportCallable; private final UnaryCallable attemptSequenceCallable; + private final ServerStreamingCallable< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -285,17 +409,37 @@ protected HttpJsonSequenceServiceStub( .setMethodDescriptor(createSequenceMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + createStreamingSequenceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createStreamingSequenceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings getSequenceReportTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getSequenceReportMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + getStreamingSequenceReportTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getStreamingSequenceReportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings attemptSequenceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(attemptSequenceMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + attemptStreamingSequenceTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(attemptStreamingSequenceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -311,14 +455,29 @@ protected HttpJsonSequenceServiceStub( this.createSequenceCallable = callableFactory.createUnaryCallable( createSequenceTransportSettings, settings.createSequenceSettings(), clientContext); + this.createStreamingSequenceCallable = + callableFactory.createUnaryCallable( + createStreamingSequenceTransportSettings, + settings.createStreamingSequenceSettings(), + clientContext); this.getSequenceReportCallable = callableFactory.createUnaryCallable( getSequenceReportTransportSettings, settings.getSequenceReportSettings(), clientContext); + this.getStreamingSequenceReportCallable = + callableFactory.createUnaryCallable( + getStreamingSequenceReportTransportSettings, + settings.getStreamingSequenceReportSettings(), + clientContext); this.attemptSequenceCallable = callableFactory.createUnaryCallable( attemptSequenceTransportSettings, settings.attemptSequenceSettings(), clientContext); + this.attemptStreamingSequenceCallable = + callableFactory.createServerStreamingCallable( + attemptStreamingSequenceTransportSettings, + settings.attemptStreamingSequenceSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -337,8 +496,11 @@ protected HttpJsonSequenceServiceStub( public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(createSequenceMethodDescriptor); + methodDescriptors.add(createStreamingSequenceMethodDescriptor); methodDescriptors.add(getSequenceReportMethodDescriptor); + methodDescriptors.add(getStreamingSequenceReportMethodDescriptor); methodDescriptors.add(attemptSequenceMethodDescriptor); + methodDescriptors.add(attemptStreamingSequenceMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -349,16 +511,34 @@ public UnaryCallable createSequenceCallable() { return createSequenceCallable; } + @Override + public UnaryCallable + createStreamingSequenceCallable() { + return createStreamingSequenceCallable; + } + @Override public UnaryCallable getSequenceReportCallable() { return getSequenceReportCallable; } + @Override + public UnaryCallable + getStreamingSequenceReportCallable() { + return getStreamingSequenceReportCallable; + } + @Override public UnaryCallable attemptSequenceCallable() { return attemptSequenceCallable; } + @Override + public ServerStreamingCallable + attemptStreamingSequenceCallable() { + return attemptStreamingSequenceCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/SequenceServiceStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/SequenceServiceStub.java index ddc3d06cb4..45c67ac0d6 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/SequenceServiceStub.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/SequenceServiceStub.java @@ -20,6 +20,7 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -27,10 +28,16 @@ import com.google.cloud.location.Location; import com.google.protobuf.Empty; import com.google.showcase.v1beta1.AttemptSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceResponse; import com.google.showcase.v1beta1.CreateSequenceRequest; +import com.google.showcase.v1beta1.CreateStreamingSequenceRequest; import com.google.showcase.v1beta1.GetSequenceReportRequest; +import com.google.showcase.v1beta1.GetStreamingSequenceReportRequest; import com.google.showcase.v1beta1.Sequence; import com.google.showcase.v1beta1.SequenceReport; +import com.google.showcase.v1beta1.StreamingSequence; +import com.google.showcase.v1beta1.StreamingSequenceReport; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @@ -47,14 +54,30 @@ public UnaryCallable createSequenceCallable() { throw new UnsupportedOperationException("Not implemented: createSequenceCallable()"); } + public UnaryCallable + createStreamingSequenceCallable() { + throw new UnsupportedOperationException("Not implemented: createStreamingSequenceCallable()"); + } + public UnaryCallable getSequenceReportCallable() { throw new UnsupportedOperationException("Not implemented: getSequenceReportCallable()"); } + public UnaryCallable + getStreamingSequenceReportCallable() { + throw new UnsupportedOperationException( + "Not implemented: getStreamingSequenceReportCallable()"); + } + public UnaryCallable attemptSequenceCallable() { throw new UnsupportedOperationException("Not implemented: attemptSequenceCallable()"); } + public ServerStreamingCallable + attemptStreamingSequenceCallable() { + throw new UnsupportedOperationException("Not implemented: attemptStreamingSequenceCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/SequenceServiceStubSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/SequenceServiceStubSettings.java index 67f42ebd0c..cb794357a3 100644 --- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/SequenceServiceStubSettings.java +++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/SequenceServiceStubSettings.java @@ -38,6 +38,7 @@ import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; @@ -53,10 +54,16 @@ import com.google.common.collect.Lists; import com.google.protobuf.Empty; import com.google.showcase.v1beta1.AttemptSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceRequest; +import com.google.showcase.v1beta1.AttemptStreamingSequenceResponse; import com.google.showcase.v1beta1.CreateSequenceRequest; +import com.google.showcase.v1beta1.CreateStreamingSequenceRequest; import com.google.showcase.v1beta1.GetSequenceReportRequest; +import com.google.showcase.v1beta1.GetStreamingSequenceReportRequest; import com.google.showcase.v1beta1.Sequence; import com.google.showcase.v1beta1.SequenceReport; +import com.google.showcase.v1beta1.StreamingSequence; +import com.google.showcase.v1beta1.StreamingSequenceReport; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -107,9 +114,16 @@ public class SequenceServiceStubSettings extends StubSettingsbuilder().build(); private final UnaryCallSettings createSequenceSettings; + private final UnaryCallSettings + createStreamingSequenceSettings; private final UnaryCallSettings getSequenceReportSettings; + private final UnaryCallSettings + getStreamingSequenceReportSettings; private final UnaryCallSettings attemptSequenceSettings; + private final ServerStreamingCallSettings< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -173,16 +187,35 @@ public UnaryCallSettings createSequenceSettings return createSequenceSettings; } + /** Returns the object with the settings used for calls to createStreamingSequence. */ + public UnaryCallSettings + createStreamingSequenceSettings() { + return createStreamingSequenceSettings; + } + /** Returns the object with the settings used for calls to getSequenceReport. */ public UnaryCallSettings getSequenceReportSettings() { return getSequenceReportSettings; } + /** Returns the object with the settings used for calls to getStreamingSequenceReport. */ + public UnaryCallSettings + getStreamingSequenceReportSettings() { + return getStreamingSequenceReportSettings; + } + /** Returns the object with the settings used for calls to attemptSequence. */ public UnaryCallSettings attemptSequenceSettings() { return attemptSequenceSettings; } + /** Returns the object with the settings used for calls to attemptStreamingSequence. */ + public ServerStreamingCallSettings< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceSettings() { + return attemptStreamingSequenceSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -301,8 +334,12 @@ protected SequenceServiceStubSettings(Builder settingsBuilder) throws IOExceptio super(settingsBuilder); createSequenceSettings = settingsBuilder.createSequenceSettings().build(); + createStreamingSequenceSettings = settingsBuilder.createStreamingSequenceSettings().build(); getSequenceReportSettings = settingsBuilder.getSequenceReportSettings().build(); + getStreamingSequenceReportSettings = + settingsBuilder.getStreamingSequenceReportSettings().build(); attemptSequenceSettings = settingsBuilder.attemptSequenceSettings().build(); + attemptStreamingSequenceSettings = settingsBuilder.attemptStreamingSequenceSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -311,9 +348,17 @@ protected SequenceServiceStubSettings(Builder settingsBuilder) throws IOExceptio public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; private final UnaryCallSettings.Builder createSequenceSettings; + private final UnaryCallSettings.Builder + createStreamingSequenceSettings; private final UnaryCallSettings.Builder getSequenceReportSettings; + private final UnaryCallSettings.Builder< + GetStreamingSequenceReportRequest, StreamingSequenceReport> + getStreamingSequenceReportSettings; private final UnaryCallSettings.Builder attemptSequenceSettings; + private final ServerStreamingCallSettings.Builder< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -369,15 +414,20 @@ protected Builder(ClientContext clientContext) { super(clientContext); createSequenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createStreamingSequenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getSequenceReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getStreamingSequenceReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); attemptSequenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + attemptStreamingSequenceSettings = ServerStreamingCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( createSequenceSettings, + createStreamingSequenceSettings, getSequenceReportSettings, + getStreamingSequenceReportSettings, attemptSequenceSettings, listLocationsSettings, getLocationSettings); @@ -388,15 +438,20 @@ protected Builder(SequenceServiceStubSettings settings) { super(settings); createSequenceSettings = settings.createSequenceSettings.toBuilder(); + createStreamingSequenceSettings = settings.createStreamingSequenceSettings.toBuilder(); getSequenceReportSettings = settings.getSequenceReportSettings.toBuilder(); + getStreamingSequenceReportSettings = settings.getStreamingSequenceReportSettings.toBuilder(); attemptSequenceSettings = settings.attemptSequenceSettings.toBuilder(); + attemptStreamingSequenceSettings = settings.attemptStreamingSequenceSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( createSequenceSettings, + createStreamingSequenceSettings, getSequenceReportSettings, + getStreamingSequenceReportSettings, attemptSequenceSettings, listLocationsSettings, getLocationSettings); @@ -434,16 +489,31 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .createStreamingSequenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .getSequenceReportSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .getStreamingSequenceReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .attemptSequenceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder + .attemptStreamingSequenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -477,17 +547,36 @@ public UnaryCallSettings.Builder createSequence return createSequenceSettings; } + /** Returns the builder for the settings used for calls to createStreamingSequence. */ + public UnaryCallSettings.Builder + createStreamingSequenceSettings() { + return createStreamingSequenceSettings; + } + /** Returns the builder for the settings used for calls to getSequenceReport. */ public UnaryCallSettings.Builder getSequenceReportSettings() { return getSequenceReportSettings; } + /** Returns the builder for the settings used for calls to getStreamingSequenceReport. */ + public UnaryCallSettings.Builder + getStreamingSequenceReportSettings() { + return getStreamingSequenceReportSettings; + } + /** Returns the builder for the settings used for calls to attemptSequence. */ public UnaryCallSettings.Builder attemptSequenceSettings() { return attemptSequenceSettings; } + /** Returns the builder for the settings used for calls to attemptStreamingSequence. */ + public ServerStreamingCallSettings.Builder< + AttemptStreamingSequenceRequest, AttemptStreamingSequenceResponse> + attemptStreamingSequenceSettings() { + return attemptStreamingSequenceSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/EchoClientTest.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/EchoClientTest.java index 5720a2c807..c36512bbab 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/EchoClientTest.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/EchoClientTest.java @@ -166,6 +166,7 @@ public void expandTest() throws Exception { ExpandRequest.newBuilder() .setContent("content951530617") .setError(Status.newBuilder().build()) + .setStreamWaitTime(Duration.newBuilder().build()) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -186,6 +187,7 @@ public void expandExceptionTest() throws Exception { ExpandRequest.newBuilder() .setContent("content951530617") .setError(Status.newBuilder().build()) + .setStreamWaitTime(Duration.newBuilder().build()) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/MockSequenceServiceImpl.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/MockSequenceServiceImpl.java index a529856c95..718d5419b0 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/MockSequenceServiceImpl.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/MockSequenceServiceImpl.java @@ -80,6 +80,27 @@ public void createSequence( } } + @Override + public void createStreamingSequence( + CreateStreamingSequenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof StreamingSequence) { + requests.add(request); + responseObserver.onNext(((StreamingSequence) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateStreamingSequence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StreamingSequence.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getSequenceReport( GetSequenceReportRequest request, StreamObserver responseObserver) { @@ -101,6 +122,28 @@ public void getSequenceReport( } } + @Override + public void getStreamingSequenceReport( + GetStreamingSequenceReportRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof StreamingSequenceReport) { + requests.add(request); + responseObserver.onNext(((StreamingSequenceReport) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetStreamingSequenceReport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StreamingSequenceReport.class.getName(), + Exception.class.getName()))); + } + } + @Override public void attemptSequence( AttemptSequenceRequest request, StreamObserver responseObserver) { @@ -121,4 +164,26 @@ public void attemptSequence( Exception.class.getName()))); } } + + @Override + public void attemptStreamingSequence( + AttemptStreamingSequenceRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AttemptStreamingSequenceResponse) { + requests.add(request); + responseObserver.onNext(((AttemptStreamingSequenceResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AttemptStreamingSequence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AttemptStreamingSequenceResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/SequenceServiceClientHttpJsonTest.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/SequenceServiceClientHttpJsonTest.java index 3b956caaab..3551e72112 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/SequenceServiceClientHttpJsonTest.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/SequenceServiceClientHttpJsonTest.java @@ -128,6 +128,52 @@ public void createSequenceExceptionTest() throws Exception { } } + @Test + public void createStreamingSequenceTest() throws Exception { + StreamingSequence expectedResponse = + StreamingSequence.newBuilder() + .setName(StreamingSequenceName.of("[STREAMING_SEQUENCE]").toString()) + .setContent("content951530617") + .addAllResponses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + StreamingSequence streamingSequence = StreamingSequence.newBuilder().build(); + + StreamingSequence actualResponse = client.createStreamingSequence(streamingSequence); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createStreamingSequenceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StreamingSequence streamingSequence = StreamingSequence.newBuilder().build(); + client.createStreamingSequence(streamingSequence); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getSequenceReportTest() throws Exception { SequenceReport expectedResponse = @@ -218,6 +264,96 @@ public void getSequenceReportExceptionTest2() throws Exception { } } + @Test + public void getStreamingSequenceReportTest() throws Exception { + StreamingSequenceReport expectedResponse = + StreamingSequenceReport.newBuilder() + .setName(StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString()) + .addAllAttempts(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + StreamingSequenceReportName name = StreamingSequenceReportName.of("[STREAMING_SEQUENCE]"); + + StreamingSequenceReport actualResponse = client.getStreamingSequenceReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getStreamingSequenceReportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StreamingSequenceReportName name = StreamingSequenceReportName.of("[STREAMING_SEQUENCE]"); + client.getStreamingSequenceReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStreamingSequenceReportTest2() throws Exception { + StreamingSequenceReport expectedResponse = + StreamingSequenceReport.newBuilder() + .setName(StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString()) + .addAllAttempts(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "streamingSequences/streamingSequence-962/streamingSequenceReport"; + + StreamingSequenceReport actualResponse = client.getStreamingSequenceReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getStreamingSequenceReportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "streamingSequences/streamingSequence-962/streamingSequenceReport"; + client.getStreamingSequenceReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void attemptSequenceTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); @@ -298,6 +434,17 @@ public void attemptSequenceExceptionTest2() throws Exception { } } + @Test + public void attemptStreamingSequenceTest() throws Exception {} + + @Test + public void attemptStreamingSequenceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/SequenceServiceClientTest.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/SequenceServiceClientTest.java index 609a3fa3f3..2111e0b260 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/SequenceServiceClientTest.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/SequenceServiceClientTest.java @@ -23,8 +23,11 @@ import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.grpc.testing.MockGrpcService; import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.grpc.testing.MockStreamObserver; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StatusCode; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -40,6 +43,7 @@ import java.util.HashMap; import java.util.List; import java.util.UUID; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -128,6 +132,47 @@ public void createSequenceExceptionTest() throws Exception { } } + @Test + public void createStreamingSequenceTest() throws Exception { + StreamingSequence expectedResponse = + StreamingSequence.newBuilder() + .setName(StreamingSequenceName.of("[STREAMING_SEQUENCE]").toString()) + .setContent("content951530617") + .addAllResponses(new ArrayList()) + .build(); + mockSequenceService.addResponse(expectedResponse); + + StreamingSequence streamingSequence = StreamingSequence.newBuilder().build(); + + StreamingSequence actualResponse = client.createStreamingSequence(streamingSequence); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSequenceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateStreamingSequenceRequest actualRequest = + ((CreateStreamingSequenceRequest) actualRequests.get(0)); + + Assert.assertEquals(streamingSequence, actualRequest.getStreamingSequence()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createStreamingSequenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSequenceService.addException(exception); + + try { + StreamingSequence streamingSequence = StreamingSequence.newBuilder().build(); + client.createStreamingSequence(streamingSequence); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getSequenceReportTest() throws Exception { SequenceReport expectedResponse = @@ -206,6 +251,86 @@ public void getSequenceReportExceptionTest2() throws Exception { } } + @Test + public void getStreamingSequenceReportTest() throws Exception { + StreamingSequenceReport expectedResponse = + StreamingSequenceReport.newBuilder() + .setName(StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString()) + .addAllAttempts(new ArrayList()) + .build(); + mockSequenceService.addResponse(expectedResponse); + + StreamingSequenceReportName name = StreamingSequenceReportName.of("[STREAMING_SEQUENCE]"); + + StreamingSequenceReport actualResponse = client.getStreamingSequenceReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSequenceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStreamingSequenceReportRequest actualRequest = + ((GetStreamingSequenceReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStreamingSequenceReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSequenceService.addException(exception); + + try { + StreamingSequenceReportName name = StreamingSequenceReportName.of("[STREAMING_SEQUENCE]"); + client.getStreamingSequenceReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStreamingSequenceReportTest2() throws Exception { + StreamingSequenceReport expectedResponse = + StreamingSequenceReport.newBuilder() + .setName(StreamingSequenceReportName.of("[STREAMING_SEQUENCE]").toString()) + .addAllAttempts(new ArrayList()) + .build(); + mockSequenceService.addResponse(expectedResponse); + + String name = "name3373707"; + + StreamingSequenceReport actualResponse = client.getStreamingSequenceReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSequenceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStreamingSequenceReportRequest actualRequest = + ((GetStreamingSequenceReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStreamingSequenceReportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSequenceService.addException(exception); + + try { + String name = "name3373707"; + client.getStreamingSequenceReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void attemptSequenceTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); @@ -274,6 +399,54 @@ public void attemptSequenceExceptionTest2() throws Exception { } } + @Test + public void attemptStreamingSequenceTest() throws Exception { + AttemptStreamingSequenceResponse expectedResponse = + AttemptStreamingSequenceResponse.newBuilder().setContent("content951530617").build(); + mockSequenceService.addResponse(expectedResponse); + AttemptStreamingSequenceRequest request = + AttemptStreamingSequenceRequest.newBuilder() + .setName(StreamingSequenceName.of("[STREAMING_SEQUENCE]").toString()) + .build(); + + MockStreamObserver responseObserver = + new MockStreamObserver<>(); + + ServerStreamingCallable + callable = client.attemptStreamingSequenceCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void attemptStreamingSequenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSequenceService.addException(exception); + AttemptStreamingSequenceRequest request = + AttemptStreamingSequenceRequest.newBuilder() + .setName(StreamingSequenceName.of("[STREAMING_SEQUENCE]").toString()) + .build(); + + MockStreamObserver responseObserver = + new MockStreamObserver<>(); + + ServerStreamingCallable + callable = client.attemptStreamingSequenceCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/showcase/grpc-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceServiceGrpc.java b/showcase/grpc-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceServiceGrpc.java index a891daf387..acb83bf8c5 100644 --- a/showcase/grpc-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceServiceGrpc.java +++ b/showcase/grpc-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceServiceGrpc.java @@ -46,6 +46,37 @@ com.google.showcase.v1beta1.Sequence> getCreateSequenceMethod() { return getCreateSequenceMethod; } + private static volatile io.grpc.MethodDescriptor getCreateStreamingSequenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateStreamingSequence", + requestType = com.google.showcase.v1beta1.CreateStreamingSequenceRequest.class, + responseType = com.google.showcase.v1beta1.StreamingSequence.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateStreamingSequenceMethod() { + io.grpc.MethodDescriptor getCreateStreamingSequenceMethod; + if ((getCreateStreamingSequenceMethod = SequenceServiceGrpc.getCreateStreamingSequenceMethod) == null) { + synchronized (SequenceServiceGrpc.class) { + if ((getCreateStreamingSequenceMethod = SequenceServiceGrpc.getCreateStreamingSequenceMethod) == null) { + SequenceServiceGrpc.getCreateStreamingSequenceMethod = getCreateStreamingSequenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateStreamingSequence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.showcase.v1beta1.CreateStreamingSequenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance())) + .setSchemaDescriptor(new SequenceServiceMethodDescriptorSupplier("CreateStreamingSequence")) + .build(); + } + } + } + return getCreateStreamingSequenceMethod; + } + private static volatile io.grpc.MethodDescriptor getGetSequenceReportMethod; @@ -77,6 +108,37 @@ com.google.showcase.v1beta1.SequenceReport> getGetSequenceReportMethod() { return getGetSequenceReportMethod; } + private static volatile io.grpc.MethodDescriptor getGetStreamingSequenceReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetStreamingSequenceReport", + requestType = com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.class, + responseType = com.google.showcase.v1beta1.StreamingSequenceReport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetStreamingSequenceReportMethod() { + io.grpc.MethodDescriptor getGetStreamingSequenceReportMethod; + if ((getGetStreamingSequenceReportMethod = SequenceServiceGrpc.getGetStreamingSequenceReportMethod) == null) { + synchronized (SequenceServiceGrpc.class) { + if ((getGetStreamingSequenceReportMethod = SequenceServiceGrpc.getGetStreamingSequenceReportMethod) == null) { + SequenceServiceGrpc.getGetStreamingSequenceReportMethod = getGetStreamingSequenceReportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStreamingSequenceReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.showcase.v1beta1.StreamingSequenceReport.getDefaultInstance())) + .setSchemaDescriptor(new SequenceServiceMethodDescriptorSupplier("GetStreamingSequenceReport")) + .build(); + } + } + } + return getGetStreamingSequenceReportMethod; + } + private static volatile io.grpc.MethodDescriptor getAttemptSequenceMethod; @@ -108,6 +170,37 @@ com.google.protobuf.Empty> getAttemptSequenceMethod() { return getAttemptSequenceMethod; } + private static volatile io.grpc.MethodDescriptor getAttemptStreamingSequenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AttemptStreamingSequence", + requestType = com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.class, + responseType = com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getAttemptStreamingSequenceMethod() { + io.grpc.MethodDescriptor getAttemptStreamingSequenceMethod; + if ((getAttemptStreamingSequenceMethod = SequenceServiceGrpc.getAttemptStreamingSequenceMethod) == null) { + synchronized (SequenceServiceGrpc.class) { + if ((getAttemptStreamingSequenceMethod = SequenceServiceGrpc.getAttemptStreamingSequenceMethod) == null) { + SequenceServiceGrpc.getAttemptStreamingSequenceMethod = getAttemptStreamingSequenceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AttemptStreamingSequence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.getDefaultInstance())) + .setSchemaDescriptor(new SequenceServiceMethodDescriptorSupplier("AttemptStreamingSequence")) + .build(); + } + } + } + return getAttemptStreamingSequenceMethod; + } + /** * Creates a new async stub that supports all call types for the service */ @@ -163,6 +256,13 @@ default void createSequence(com.google.showcase.v1beta1.CreateSequenceRequest re io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSequenceMethod(), responseObserver); } + /** + */ + default void createStreamingSequence(com.google.showcase.v1beta1.CreateStreamingSequenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateStreamingSequenceMethod(), responseObserver); + } + /** */ default void getSequenceReport(com.google.showcase.v1beta1.GetSequenceReportRequest request, @@ -170,12 +270,26 @@ default void getSequenceReport(com.google.showcase.v1beta1.GetSequenceReportRequ io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSequenceReportMethod(), responseObserver); } + /** + */ + default void getStreamingSequenceReport(com.google.showcase.v1beta1.GetStreamingSequenceReportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamingSequenceReportMethod(), responseObserver); + } + /** */ default void attemptSequence(com.google.showcase.v1beta1.AttemptSequenceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAttemptSequenceMethod(), responseObserver); } + + /** + */ + default void attemptStreamingSequence(com.google.showcase.v1beta1.AttemptStreamingSequenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAttemptStreamingSequenceMethod(), responseObserver); + } } /** @@ -213,6 +327,14 @@ public void createSequence(com.google.showcase.v1beta1.CreateSequenceRequest req getChannel().newCall(getCreateSequenceMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void createStreamingSequence(com.google.showcase.v1beta1.CreateStreamingSequenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateStreamingSequenceMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void getSequenceReport(com.google.showcase.v1beta1.GetSequenceReportRequest request, @@ -221,6 +343,14 @@ public void getSequenceReport(com.google.showcase.v1beta1.GetSequenceReportReque getChannel().newCall(getGetSequenceReportMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void getStreamingSequenceReport(com.google.showcase.v1beta1.GetStreamingSequenceReportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetStreamingSequenceReportMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void attemptSequence(com.google.showcase.v1beta1.AttemptSequenceRequest request, @@ -228,6 +358,14 @@ public void attemptSequence(com.google.showcase.v1beta1.AttemptSequenceRequest r io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getAttemptSequenceMethod(), getCallOptions()), request, responseObserver); } + + /** + */ + public void attemptStreamingSequence(com.google.showcase.v1beta1.AttemptStreamingSequenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getAttemptStreamingSequenceMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -253,6 +391,13 @@ public com.google.showcase.v1beta1.Sequence createSequence(com.google.showcase.v getChannel(), getCreateSequenceMethod(), getCallOptions(), request); } + /** + */ + public com.google.showcase.v1beta1.StreamingSequence createStreamingSequence(com.google.showcase.v1beta1.CreateStreamingSequenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateStreamingSequenceMethod(), getCallOptions(), request); + } + /** */ public com.google.showcase.v1beta1.SequenceReport getSequenceReport(com.google.showcase.v1beta1.GetSequenceReportRequest request) { @@ -260,12 +405,27 @@ public com.google.showcase.v1beta1.SequenceReport getSequenceReport(com.google.s getChannel(), getGetSequenceReportMethod(), getCallOptions(), request); } + /** + */ + public com.google.showcase.v1beta1.StreamingSequenceReport getStreamingSequenceReport(com.google.showcase.v1beta1.GetStreamingSequenceReportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetStreamingSequenceReportMethod(), getCallOptions(), request); + } + /** */ public com.google.protobuf.Empty attemptSequence(com.google.showcase.v1beta1.AttemptSequenceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getAttemptSequenceMethod(), getCallOptions(), request); } + + /** + */ + public java.util.Iterator attemptStreamingSequence( + com.google.showcase.v1beta1.AttemptStreamingSequenceRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getAttemptStreamingSequenceMethod(), getCallOptions(), request); + } } /** @@ -292,6 +452,14 @@ public com.google.common.util.concurrent.ListenableFuture createStreamingSequence( + com.google.showcase.v1beta1.CreateStreamingSequenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateStreamingSequenceMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture getSequenceReport( @@ -300,6 +468,14 @@ public com.google.common.util.concurrent.ListenableFuture getStreamingSequenceReport( + com.google.showcase.v1beta1.GetStreamingSequenceReportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetStreamingSequenceReportMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture attemptSequence( @@ -310,8 +486,11 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -334,14 +513,26 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.createSequence((com.google.showcase.v1beta1.CreateSequenceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_STREAMING_SEQUENCE: + serviceImpl.createStreamingSequence((com.google.showcase.v1beta1.CreateStreamingSequenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_SEQUENCE_REPORT: serviceImpl.getSequenceReport((com.google.showcase.v1beta1.GetSequenceReportRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_STREAMING_SEQUENCE_REPORT: + serviceImpl.getStreamingSequenceReport((com.google.showcase.v1beta1.GetStreamingSequenceReportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_ATTEMPT_SEQUENCE: serviceImpl.attemptSequence((com.google.showcase.v1beta1.AttemptSequenceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_ATTEMPT_STREAMING_SEQUENCE: + serviceImpl.attemptStreamingSequence((com.google.showcase.v1beta1.AttemptStreamingSequenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -367,6 +558,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.showcase.v1beta1.CreateSequenceRequest, com.google.showcase.v1beta1.Sequence>( service, METHODID_CREATE_SEQUENCE))) + .addMethod( + getCreateStreamingSequenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.showcase.v1beta1.CreateStreamingSequenceRequest, + com.google.showcase.v1beta1.StreamingSequence>( + service, METHODID_CREATE_STREAMING_SEQUENCE))) .addMethod( getGetSequenceReportMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -374,6 +572,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.showcase.v1beta1.GetSequenceReportRequest, com.google.showcase.v1beta1.SequenceReport>( service, METHODID_GET_SEQUENCE_REPORT))) + .addMethod( + getGetStreamingSequenceReportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.showcase.v1beta1.GetStreamingSequenceReportRequest, + com.google.showcase.v1beta1.StreamingSequenceReport>( + service, METHODID_GET_STREAMING_SEQUENCE_REPORT))) .addMethod( getAttemptSequenceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -381,6 +586,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.showcase.v1beta1.AttemptSequenceRequest, com.google.protobuf.Empty>( service, METHODID_ATTEMPT_SEQUENCE))) + .addMethod( + getAttemptStreamingSequenceMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.showcase.v1beta1.AttemptStreamingSequenceRequest, + com.google.showcase.v1beta1.AttemptStreamingSequenceResponse>( + service, METHODID_ATTEMPT_STREAMING_SEQUENCE))) .build(); } @@ -430,8 +642,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SequenceServiceFileDescriptorSupplier()) .addMethod(getCreateSequenceMethod()) + .addMethod(getCreateStreamingSequenceMethod()) .addMethod(getGetSequenceReportMethod()) + .addMethod(getGetStreamingSequenceReportMethod()) .addMethod(getAttemptSequenceMethod()) + .addMethod(getAttemptStreamingSequenceMethod()) .build(); } } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceRequest.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceRequest.java new file mode 100644 index 0000000000..41183edca6 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceRequest.java @@ -0,0 +1,544 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +/** + * Protobuf type {@code google.showcase.v1beta1.AttemptStreamingSequenceRequest} + */ +public final class AttemptStreamingSequenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.AttemptStreamingSequenceRequest) + AttemptStreamingSequenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttemptStreamingSequenceRequest.newBuilder() to construct. + private AttemptStreamingSequenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttemptStreamingSequenceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttemptStreamingSequenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.class, com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.showcase.v1beta1.AttemptStreamingSequenceRequest)) { + return super.equals(obj); + } + com.google.showcase.v1beta1.AttemptStreamingSequenceRequest other = (com.google.showcase.v1beta1.AttemptStreamingSequenceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.showcase.v1beta1.AttemptStreamingSequenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.showcase.v1beta1.AttemptStreamingSequenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.AttemptStreamingSequenceRequest) + com.google.showcase.v1beta1.AttemptStreamingSequenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.class, com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.Builder.class); + } + + // Construct using com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceRequest_descriptor; + } + + @java.lang.Override + public com.google.showcase.v1beta1.AttemptStreamingSequenceRequest getDefaultInstanceForType() { + return com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.showcase.v1beta1.AttemptStreamingSequenceRequest build() { + com.google.showcase.v1beta1.AttemptStreamingSequenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.showcase.v1beta1.AttemptStreamingSequenceRequest buildPartial() { + com.google.showcase.v1beta1.AttemptStreamingSequenceRequest result = new com.google.showcase.v1beta1.AttemptStreamingSequenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.showcase.v1beta1.AttemptStreamingSequenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.showcase.v1beta1.AttemptStreamingSequenceRequest) { + return mergeFrom((com.google.showcase.v1beta1.AttemptStreamingSequenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.showcase.v1beta1.AttemptStreamingSequenceRequest other) { + if (other == com.google.showcase.v1beta1.AttemptStreamingSequenceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.showcase.v1beta1.AttemptStreamingSequenceRequest) + } + + // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.AttemptStreamingSequenceRequest) + private static final com.google.showcase.v1beta1.AttemptStreamingSequenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.showcase.v1beta1.AttemptStreamingSequenceRequest(); + } + + public static com.google.showcase.v1beta1.AttemptStreamingSequenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttemptStreamingSequenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.showcase.v1beta1.AttemptStreamingSequenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceRequestOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceRequestOrBuilder.java new file mode 100644 index 0000000000..60e34d667f --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceRequestOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +public interface AttemptStreamingSequenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.AttemptStreamingSequenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceResponse.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceResponse.java new file mode 100644 index 0000000000..d51a763763 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceResponse.java @@ -0,0 +1,580 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +/** + *
+ * The response message for the Echo methods.
+ * 
+ * + * Protobuf type {@code google.showcase.v1beta1.AttemptStreamingSequenceResponse} + */ +public final class AttemptStreamingSequenceResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.AttemptStreamingSequenceResponse) + AttemptStreamingSequenceResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttemptStreamingSequenceResponse.newBuilder() to construct. + private AttemptStreamingSequenceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttemptStreamingSequenceResponse() { + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttemptStreamingSequenceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.class, com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + *
+   * The content specified in the request.
+   * 
+ * + * string content = 1; + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + *
+   * The content specified in the request.
+   * 
+ * + * string content = 1; + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.showcase.v1beta1.AttemptStreamingSequenceResponse)) { + return super.equals(obj); + } + com.google.showcase.v1beta1.AttemptStreamingSequenceResponse other = (com.google.showcase.v1beta1.AttemptStreamingSequenceResponse) obj; + + if (!getContent() + .equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.showcase.v1beta1.AttemptStreamingSequenceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The response message for the Echo methods.
+   * 
+ * + * Protobuf type {@code google.showcase.v1beta1.AttemptStreamingSequenceResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.AttemptStreamingSequenceResponse) + com.google.showcase.v1beta1.AttemptStreamingSequenceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.class, com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.Builder.class); + } + + // Construct using com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_AttemptStreamingSequenceResponse_descriptor; + } + + @java.lang.Override + public com.google.showcase.v1beta1.AttemptStreamingSequenceResponse getDefaultInstanceForType() { + return com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.showcase.v1beta1.AttemptStreamingSequenceResponse build() { + com.google.showcase.v1beta1.AttemptStreamingSequenceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.showcase.v1beta1.AttemptStreamingSequenceResponse buildPartial() { + com.google.showcase.v1beta1.AttemptStreamingSequenceResponse result = new com.google.showcase.v1beta1.AttemptStreamingSequenceResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.showcase.v1beta1.AttemptStreamingSequenceResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.showcase.v1beta1.AttemptStreamingSequenceResponse) { + return mergeFrom((com.google.showcase.v1beta1.AttemptStreamingSequenceResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.showcase.v1beta1.AttemptStreamingSequenceResponse other) { + if (other == com.google.showcase.v1beta1.AttemptStreamingSequenceResponse.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object content_ = ""; + /** + *
+     * The content specified in the request.
+     * 
+ * + * string content = 1; + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The content specified in the request.
+     * 
+ * + * string content = 1; + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The content specified in the request.
+     * 
+ * + * string content = 1; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The content specified in the request.
+     * 
+ * + * string content = 1; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The content specified in the request.
+     * 
+ * + * string content = 1; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.showcase.v1beta1.AttemptStreamingSequenceResponse) + } + + // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.AttemptStreamingSequenceResponse) + private static final com.google.showcase.v1beta1.AttemptStreamingSequenceResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.showcase.v1beta1.AttemptStreamingSequenceResponse(); + } + + public static com.google.showcase.v1beta1.AttemptStreamingSequenceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttemptStreamingSequenceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.showcase.v1beta1.AttemptStreamingSequenceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceResponseOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceResponseOrBuilder.java new file mode 100644 index 0000000000..fa092161c0 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptStreamingSequenceResponseOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +public interface AttemptStreamingSequenceResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.AttemptStreamingSequenceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The content specified in the request.
+   * 
+ * + * string content = 1; + * @return The content. + */ + java.lang.String getContent(); + /** + *
+   * The content specified in the request.
+   * 
+ * + * string content = 1; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); +} diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/CreateStreamingSequenceRequest.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/CreateStreamingSequenceRequest.java new file mode 100644 index 0000000000..06d85837dc --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/CreateStreamingSequenceRequest.java @@ -0,0 +1,589 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +/** + * Protobuf type {@code google.showcase.v1beta1.CreateStreamingSequenceRequest} + */ +public final class CreateStreamingSequenceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.CreateStreamingSequenceRequest) + CreateStreamingSequenceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateStreamingSequenceRequest.newBuilder() to construct. + private CreateStreamingSequenceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateStreamingSequenceRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateStreamingSequenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_CreateStreamingSequenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_CreateStreamingSequenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.CreateStreamingSequenceRequest.class, com.google.showcase.v1beta1.CreateStreamingSequenceRequest.Builder.class); + } + + public static final int STREAMING_SEQUENCE_FIELD_NUMBER = 1; + private com.google.showcase.v1beta1.StreamingSequence streamingSequence_; + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + * @return Whether the streamingSequence field is set. + */ + @java.lang.Override + public boolean hasStreamingSequence() { + return streamingSequence_ != null; + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + * @return The streamingSequence. + */ + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence getStreamingSequence() { + return streamingSequence_ == null ? com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance() : streamingSequence_; + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceOrBuilder getStreamingSequenceOrBuilder() { + return streamingSequence_ == null ? com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance() : streamingSequence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (streamingSequence_ != null) { + output.writeMessage(1, getStreamingSequence()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (streamingSequence_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStreamingSequence()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.showcase.v1beta1.CreateStreamingSequenceRequest)) { + return super.equals(obj); + } + com.google.showcase.v1beta1.CreateStreamingSequenceRequest other = (com.google.showcase.v1beta1.CreateStreamingSequenceRequest) obj; + + if (hasStreamingSequence() != other.hasStreamingSequence()) return false; + if (hasStreamingSequence()) { + if (!getStreamingSequence() + .equals(other.getStreamingSequence())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStreamingSequence()) { + hash = (37 * hash) + STREAMING_SEQUENCE_FIELD_NUMBER; + hash = (53 * hash) + getStreamingSequence().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.showcase.v1beta1.CreateStreamingSequenceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.showcase.v1beta1.CreateStreamingSequenceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.CreateStreamingSequenceRequest) + com.google.showcase.v1beta1.CreateStreamingSequenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_CreateStreamingSequenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_CreateStreamingSequenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.CreateStreamingSequenceRequest.class, com.google.showcase.v1beta1.CreateStreamingSequenceRequest.Builder.class); + } + + // Construct using com.google.showcase.v1beta1.CreateStreamingSequenceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + streamingSequence_ = null; + if (streamingSequenceBuilder_ != null) { + streamingSequenceBuilder_.dispose(); + streamingSequenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_CreateStreamingSequenceRequest_descriptor; + } + + @java.lang.Override + public com.google.showcase.v1beta1.CreateStreamingSequenceRequest getDefaultInstanceForType() { + return com.google.showcase.v1beta1.CreateStreamingSequenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.showcase.v1beta1.CreateStreamingSequenceRequest build() { + com.google.showcase.v1beta1.CreateStreamingSequenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.showcase.v1beta1.CreateStreamingSequenceRequest buildPartial() { + com.google.showcase.v1beta1.CreateStreamingSequenceRequest result = new com.google.showcase.v1beta1.CreateStreamingSequenceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.showcase.v1beta1.CreateStreamingSequenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.streamingSequence_ = streamingSequenceBuilder_ == null + ? streamingSequence_ + : streamingSequenceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.showcase.v1beta1.CreateStreamingSequenceRequest) { + return mergeFrom((com.google.showcase.v1beta1.CreateStreamingSequenceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.showcase.v1beta1.CreateStreamingSequenceRequest other) { + if (other == com.google.showcase.v1beta1.CreateStreamingSequenceRequest.getDefaultInstance()) return this; + if (other.hasStreamingSequence()) { + mergeStreamingSequence(other.getStreamingSequence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStreamingSequenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.showcase.v1beta1.StreamingSequence streamingSequence_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequence, com.google.showcase.v1beta1.StreamingSequence.Builder, com.google.showcase.v1beta1.StreamingSequenceOrBuilder> streamingSequenceBuilder_; + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + * @return Whether the streamingSequence field is set. + */ + public boolean hasStreamingSequence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + * @return The streamingSequence. + */ + public com.google.showcase.v1beta1.StreamingSequence getStreamingSequence() { + if (streamingSequenceBuilder_ == null) { + return streamingSequence_ == null ? com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance() : streamingSequence_; + } else { + return streamingSequenceBuilder_.getMessage(); + } + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + public Builder setStreamingSequence(com.google.showcase.v1beta1.StreamingSequence value) { + if (streamingSequenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamingSequence_ = value; + } else { + streamingSequenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + public Builder setStreamingSequence( + com.google.showcase.v1beta1.StreamingSequence.Builder builderForValue) { + if (streamingSequenceBuilder_ == null) { + streamingSequence_ = builderForValue.build(); + } else { + streamingSequenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + public Builder mergeStreamingSequence(com.google.showcase.v1beta1.StreamingSequence value) { + if (streamingSequenceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + streamingSequence_ != null && + streamingSequence_ != com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance()) { + getStreamingSequenceBuilder().mergeFrom(value); + } else { + streamingSequence_ = value; + } + } else { + streamingSequenceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + public Builder clearStreamingSequence() { + bitField0_ = (bitField0_ & ~0x00000001); + streamingSequence_ = null; + if (streamingSequenceBuilder_ != null) { + streamingSequenceBuilder_.dispose(); + streamingSequenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + public com.google.showcase.v1beta1.StreamingSequence.Builder getStreamingSequenceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStreamingSequenceFieldBuilder().getBuilder(); + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + public com.google.showcase.v1beta1.StreamingSequenceOrBuilder getStreamingSequenceOrBuilder() { + if (streamingSequenceBuilder_ != null) { + return streamingSequenceBuilder_.getMessageOrBuilder(); + } else { + return streamingSequence_ == null ? + com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance() : streamingSequence_; + } + } + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequence, com.google.showcase.v1beta1.StreamingSequence.Builder, com.google.showcase.v1beta1.StreamingSequenceOrBuilder> + getStreamingSequenceFieldBuilder() { + if (streamingSequenceBuilder_ == null) { + streamingSequenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequence, com.google.showcase.v1beta1.StreamingSequence.Builder, com.google.showcase.v1beta1.StreamingSequenceOrBuilder>( + getStreamingSequence(), + getParentForChildren(), + isClean()); + streamingSequence_ = null; + } + return streamingSequenceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.showcase.v1beta1.CreateStreamingSequenceRequest) + } + + // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.CreateStreamingSequenceRequest) + private static final com.google.showcase.v1beta1.CreateStreamingSequenceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.showcase.v1beta1.CreateStreamingSequenceRequest(); + } + + public static com.google.showcase.v1beta1.CreateStreamingSequenceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateStreamingSequenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.showcase.v1beta1.CreateStreamingSequenceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/CreateStreamingSequenceRequestOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/CreateStreamingSequenceRequestOrBuilder.java new file mode 100644 index 0000000000..1bda2f8083 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/CreateStreamingSequenceRequestOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +public interface CreateStreamingSequenceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.CreateStreamingSequenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + * @return Whether the streamingSequence field is set. + */ + boolean hasStreamingSequence(); + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + * @return The streamingSequence. + */ + com.google.showcase.v1beta1.StreamingSequence getStreamingSequence(); + /** + * .google.showcase.v1beta1.StreamingSequence streaming_sequence = 1; + */ + com.google.showcase.v1beta1.StreamingSequenceOrBuilder getStreamingSequenceOrBuilder(); +} diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoOuterClass.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoOuterClass.java index 7f860781d4..a605e0df52 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoOuterClass.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/EchoOuterClass.java @@ -107,79 +107,81 @@ public static void registerAllExtensions( "ader\030\004 \001(\t\022\024\n\014other_header\030\005 \001(\tB\n\n\010resp" + "onse\"T\n\014EchoResponse\022\017\n\007content\030\001 \001(\t\0223\n" + "\010severity\030\002 \001(\0162!.google.showcase.v1beta" + - "1.Severity\"C\n\rExpandRequest\022\017\n\007content\030\001" + - " \001(\t\022!\n\005error\030\002 \001(\0132\022.google.rpc.Status\"" + - "Q\n\022PagedExpandRequest\022\024\n\007content\030\001 \001(\tB\003" + - "\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + - "(\t\"Y\n\030PagedExpandLegacyRequest\022\024\n\007conten" + - "t\030\001 \001(\tB\003\340A\002\022\023\n\013max_results\030\002 \001(\005\022\022\n\npag" + - "e_token\030\003 \001(\t\"h\n\023PagedExpandResponse\0228\n\t" + - "responses\030\001 \003(\0132%.google.showcase.v1beta" + - "1.EchoResponse\022\027\n\017next_page_token\030\002 \001(\t\"" + - "(\n\027PagedExpandResponseList\022\r\n\005words\030\001 \003(" + - "\t\"\203\002\n\037PagedExpandLegacyMappedResponse\022`\n" + - "\014alphabetized\030\001 \003(\0132J.google.showcase.v1" + - "beta1.PagedExpandLegacyMappedResponse.Al" + - "phabetizedEntry\022\027\n\017next_page_token\030\002 \001(\t" + - "\032e\n\021AlphabetizedEntry\022\013\n\003key\030\001 \001(\t\022?\n\005va" + - "lue\030\002 \001(\01320.google.showcase.v1beta1.Page" + - "dExpandResponseList:\0028\001\"\331\001\n\013WaitRequest\022" + - ".\n\010end_time\030\001 \001(\0132\032.google.protobuf.Time" + - "stampH\000\022(\n\003ttl\030\004 \001(\0132\031.google.protobuf.D" + - "urationH\000\022#\n\005error\030\002 \001(\0132\022.google.rpc.St" + - "atusH\001\0228\n\007success\030\003 \001(\0132%.google.showcas" + - "e.v1beta1.WaitResponseH\001B\005\n\003endB\n\n\010respo" + - "nse\"\037\n\014WaitResponse\022\017\n\007content\030\001 \001(\t\"<\n\014" + - "WaitMetadata\022,\n\010end_time\030\001 \001(\0132\032.google." + - "protobuf.Timestamp\"\255\001\n\014BlockRequest\0221\n\016r" + - "esponse_delay\030\001 \001(\0132\031.google.protobuf.Du" + - "ration\022#\n\005error\030\002 \001(\0132\022.google.rpc.Statu" + - "sH\000\0229\n\007success\030\003 \001(\0132&.google.showcase.v" + - "1beta1.BlockResponseH\000B\n\n\010response\" \n\rBl" + - "ockResponse\022\017\n\007content\030\001 \001(\t*D\n\010Severity" + - "\022\017\n\013UNNECESSARY\020\000\022\r\n\tNECESSARY\020\001\022\n\n\006URGE" + - "NT\020\002\022\014\n\010CRITICAL\020\0032\377\013\n\004Echo\022\224\003\n\004Echo\022$.g" + - "oogle.showcase.v1beta1.EchoRequest\032%.goo" + - "gle.showcase.v1beta1.EchoResponse\"\276\002\202\323\344\223" + - "\002\027\"\022/v1beta1/echo:echo:\001*\212\323\344\223\002\232\002\022\010\n\006head" + - "er\022\031\n\006header\022\017{routing_id=**}\022+\n\006header\022" + - "!{table_name=regions/*/zones/*/**}\022\"\n\006he" + - "ader\022\030{super_id=projects/*}/**\0220\n\006header" + - "\022&{table_name=projects/*/instances/*/**}" + - "\0221\n\006header\022\'projects/*/{instance_id=inst" + - "ances/*}/**\022\030\n\014other_header\022\010{baz=**}\022#\n" + - "\014other_header\022\023{qux=projects/*}/**\022\212\001\n\006E" + - "xpand\022&.google.showcase.v1beta1.ExpandRe" + - "quest\032%.google.showcase.v1beta1.EchoResp" + - "onse\"/\202\323\344\223\002\031\"\024/v1beta1/echo:expand:\001*\332A\r" + - "content,error0\001\022z\n\007Collect\022$.google.show" + - "case.v1beta1.EchoRequest\032%.google.showca" + - "se.v1beta1.EchoResponse\" \202\323\344\223\002\032\"\025/v1beta" + - "1/echo:collect:\001*(\001\022W\n\004Chat\022$.google.sho" + - "wcase.v1beta1.EchoRequest\032%.google.showc" + - "ase.v1beta1.EchoResponse(\0010\001\022\216\001\n\013PagedEx" + - "pand\022+.google.showcase.v1beta1.PagedExpa" + - "ndRequest\032,.google.showcase.v1beta1.Page" + - "dExpandResponse\"$\202\323\344\223\002\036\"\031/v1beta1/echo:p" + - "agedExpand:\001*\022\240\001\n\021PagedExpandLegacy\0221.go" + - "ogle.showcase.v1beta1.PagedExpandLegacyR" + - "equest\032,.google.showcase.v1beta1.PagedEx" + - "pandResponse\"*\202\323\344\223\002$\"\037/v1beta1/echo:page" + - "dExpandLegacy:\001*\022\262\001\n\027PagedExpandLegacyMa" + - "pped\022+.google.showcase.v1beta1.PagedExpa" + - "ndRequest\0328.google.showcase.v1beta1.Page" + - "dExpandLegacyMappedResponse\"0\202\323\344\223\002*\"%/v1" + - "beta1/echo:pagedExpandLegacyMapped:\001*\022\211\001" + - "\n\004Wait\022$.google.showcase.v1beta1.WaitReq" + - "uest\032\035.google.longrunning.Operation\"<\202\323\344" + - "\223\002\027\"\022/v1beta1/echo:wait:\001*\312A\034\n\014WaitRespo" + - "nse\022\014WaitMetadata\022v\n\005Block\022%.google.show" + - "case.v1beta1.BlockRequest\032&.google.showc" + - "ase.v1beta1.BlockResponse\"\036\202\323\344\223\002\030\"\023/v1be" + - "ta1/echo:block:\001*\032\021\312A\016localhost:7469Bq\n\033" + - "com.google.showcase.v1beta1P\001Z4github.co" + - "m/googleapis/gapic-showcase/server/genpr" + - "oto\352\002\031Google::Showcase::V1beta1b\006proto3" + "1.Severity\"x\n\rExpandRequest\022\017\n\007content\030\001" + + " \001(\t\022!\n\005error\030\002 \001(\0132\022.google.rpc.Status\022" + + "3\n\020stream_wait_time\030\003 \001(\0132\031.google.proto" + + "buf.Duration\"Q\n\022PagedExpandRequest\022\024\n\007co" + + "ntent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\np" + + "age_token\030\003 \001(\t\"Y\n\030PagedExpandLegacyRequ" + + "est\022\024\n\007content\030\001 \001(\tB\003\340A\002\022\023\n\013max_results" + + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"h\n\023PagedExpan" + + "dResponse\0228\n\tresponses\030\001 \003(\0132%.google.sh" + + "owcase.v1beta1.EchoResponse\022\027\n\017next_page" + + "_token\030\002 \001(\t\"(\n\027PagedExpandResponseList\022" + + "\r\n\005words\030\001 \003(\t\"\203\002\n\037PagedExpandLegacyMapp" + + "edResponse\022`\n\014alphabetized\030\001 \003(\0132J.googl" + + "e.showcase.v1beta1.PagedExpandLegacyMapp" + + "edResponse.AlphabetizedEntry\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\032e\n\021AlphabetizedEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.google.showcase" + + ".v1beta1.PagedExpandResponseList:\0028\001\"\331\001\n" + + "\013WaitRequest\022.\n\010end_time\030\001 \001(\0132\032.google." + + "protobuf.TimestampH\000\022(\n\003ttl\030\004 \001(\0132\031.goog" + + "le.protobuf.DurationH\000\022#\n\005error\030\002 \001(\0132\022." + + "google.rpc.StatusH\001\0228\n\007success\030\003 \001(\0132%.g" + + "oogle.showcase.v1beta1.WaitResponseH\001B\005\n" + + "\003endB\n\n\010response\"\037\n\014WaitResponse\022\017\n\007cont" + + "ent\030\001 \001(\t\"<\n\014WaitMetadata\022,\n\010end_time\030\001 " + + "\001(\0132\032.google.protobuf.Timestamp\"\255\001\n\014Bloc" + + "kRequest\0221\n\016response_delay\030\001 \001(\0132\031.googl" + + "e.protobuf.Duration\022#\n\005error\030\002 \001(\0132\022.goo" + + "gle.rpc.StatusH\000\0229\n\007success\030\003 \001(\0132&.goog" + + "le.showcase.v1beta1.BlockResponseH\000B\n\n\010r" + + "esponse\" \n\rBlockResponse\022\017\n\007content\030\001 \001(" + + "\t*D\n\010Severity\022\017\n\013UNNECESSARY\020\000\022\r\n\tNECESS" + + "ARY\020\001\022\n\n\006URGENT\020\002\022\014\n\010CRITICAL\020\0032\377\013\n\004Echo" + + "\022\224\003\n\004Echo\022$.google.showcase.v1beta1.Echo" + + "Request\032%.google.showcase.v1beta1.EchoRe" + + "sponse\"\276\002\202\323\344\223\002\027\"\022/v1beta1/echo:echo:\001*\212\323" + + "\344\223\002\232\002\022\010\n\006header\022\031\n\006header\022\017{routing_id=*" + + "*}\022+\n\006header\022!{table_name=regions/*/zone" + + "s/*/**}\022\"\n\006header\022\030{super_id=projects/*}" + + "/**\0220\n\006header\022&{table_name=projects/*/in" + + "stances/*/**}\0221\n\006header\022\'projects/*/{ins" + + "tance_id=instances/*}/**\022\030\n\014other_header" + + "\022\010{baz=**}\022#\n\014other_header\022\023{qux=project" + + "s/*}/**\022\212\001\n\006Expand\022&.google.showcase.v1b" + + "eta1.ExpandRequest\032%.google.showcase.v1b" + + "eta1.EchoResponse\"/\202\323\344\223\002\031\"\024/v1beta1/echo" + + ":expand:\001*\332A\rcontent,error0\001\022z\n\007Collect\022" + + "$.google.showcase.v1beta1.EchoRequest\032%." + + "google.showcase.v1beta1.EchoResponse\" \202\323" + + "\344\223\002\032\"\025/v1beta1/echo:collect:\001*(\001\022W\n\004Chat" + + "\022$.google.showcase.v1beta1.EchoRequest\032%" + + ".google.showcase.v1beta1.EchoResponse(\0010" + + "\001\022\216\001\n\013PagedExpand\022+.google.showcase.v1be" + + "ta1.PagedExpandRequest\032,.google.showcase" + + ".v1beta1.PagedExpandResponse\"$\202\323\344\223\002\036\"\031/v" + + "1beta1/echo:pagedExpand:\001*\022\240\001\n\021PagedExpa" + + "ndLegacy\0221.google.showcase.v1beta1.Paged" + + "ExpandLegacyRequest\032,.google.showcase.v1" + + "beta1.PagedExpandResponse\"*\202\323\344\223\002$\"\037/v1be" + + "ta1/echo:pagedExpandLegacy:\001*\022\262\001\n\027PagedE" + + "xpandLegacyMapped\022+.google.showcase.v1be" + + "ta1.PagedExpandRequest\0328.google.showcase" + + ".v1beta1.PagedExpandLegacyMappedResponse" + + "\"0\202\323\344\223\002*\"%/v1beta1/echo:pagedExpandLegac" + + "yMapped:\001*\022\211\001\n\004Wait\022$.google.showcase.v1" + + "beta1.WaitRequest\032\035.google.longrunning.O" + + "peration\"<\202\323\344\223\002\027\"\022/v1beta1/echo:wait:\001*\312" + + "A\034\n\014WaitResponse\022\014WaitMetadata\022v\n\005Block\022" + + "%.google.showcase.v1beta1.BlockRequest\032&" + + ".google.showcase.v1beta1.BlockResponse\"\036" + + "\202\323\344\223\002\030\"\023/v1beta1/echo:block:\001*\032\021\312A\016local" + + "host:7469Bq\n\033com.google.showcase.v1beta1" + + "P\001Z4github.com/googleapis/gapic-showcase" + + "/server/genproto\352\002\031Google::Showcase::V1b" + + "eta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -210,7 +212,7 @@ public static void registerAllExtensions( internal_static_google_showcase_v1beta1_ExpandRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_showcase_v1beta1_ExpandRequest_descriptor, - new java.lang.String[] { "Content", "Error", }); + new java.lang.String[] { "Content", "Error", "StreamWaitTime", }); internal_static_google_showcase_v1beta1_PagedExpandRequest_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_google_showcase_v1beta1_PagedExpandRequest_fieldAccessorTable = new diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ExpandRequest.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ExpandRequest.java index 35b7500bbb..3348bc259d 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ExpandRequest.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ExpandRequest.java @@ -133,6 +133,44 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; } + public static final int STREAM_WAIT_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Duration streamWaitTime_; + /** + *
+   *The wait time between each server streaming messages
+   * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + * @return Whether the streamWaitTime field is set. + */ + @java.lang.Override + public boolean hasStreamWaitTime() { + return streamWaitTime_ != null; + } + /** + *
+   *The wait time between each server streaming messages
+   * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + * @return The streamWaitTime. + */ + @java.lang.Override + public com.google.protobuf.Duration getStreamWaitTime() { + return streamWaitTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : streamWaitTime_; + } + /** + *
+   *The wait time between each server streaming messages
+   * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getStreamWaitTimeOrBuilder() { + return streamWaitTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : streamWaitTime_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -153,6 +191,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (error_ != null) { output.writeMessage(2, getError()); } + if (streamWaitTime_ != null) { + output.writeMessage(3, getStreamWaitTime()); + } getUnknownFields().writeTo(output); } @@ -169,6 +210,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getError()); } + if (streamWaitTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getStreamWaitTime()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -191,6 +236,11 @@ public boolean equals(final java.lang.Object obj) { if (!getError() .equals(other.getError())) return false; } + if (hasStreamWaitTime() != other.hasStreamWaitTime()) return false; + if (hasStreamWaitTime()) { + if (!getStreamWaitTime() + .equals(other.getStreamWaitTime())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -208,6 +258,10 @@ public int hashCode() { hash = (37 * hash) + ERROR_FIELD_NUMBER; hash = (53 * hash) + getError().hashCode(); } + if (hasStreamWaitTime()) { + hash = (37 * hash) + STREAM_WAIT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStreamWaitTime().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -347,6 +401,11 @@ public Builder clear() { errorBuilder_.dispose(); errorBuilder_ = null; } + streamWaitTime_ = null; + if (streamWaitTimeBuilder_ != null) { + streamWaitTimeBuilder_.dispose(); + streamWaitTimeBuilder_ = null; + } return this; } @@ -388,6 +447,11 @@ private void buildPartial0(com.google.showcase.v1beta1.ExpandRequest result) { ? error_ : errorBuilder_.build(); } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.streamWaitTime_ = streamWaitTimeBuilder_ == null + ? streamWaitTime_ + : streamWaitTimeBuilder_.build(); + } } @java.lang.Override @@ -442,6 +506,9 @@ public Builder mergeFrom(com.google.showcase.v1beta1.ExpandRequest other) { if (other.hasError()) { mergeError(other.getError()); } + if (other.hasStreamWaitTime()) { + mergeStreamWaitTime(other.getStreamWaitTime()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -480,6 +547,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: { + input.readMessage( + getStreamWaitTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -743,6 +817,161 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { } return errorBuilder_; } + + private com.google.protobuf.Duration streamWaitTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> streamWaitTimeBuilder_; + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + * @return Whether the streamWaitTime field is set. + */ + public boolean hasStreamWaitTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + * @return The streamWaitTime. + */ + public com.google.protobuf.Duration getStreamWaitTime() { + if (streamWaitTimeBuilder_ == null) { + return streamWaitTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : streamWaitTime_; + } else { + return streamWaitTimeBuilder_.getMessage(); + } + } + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + public Builder setStreamWaitTime(com.google.protobuf.Duration value) { + if (streamWaitTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamWaitTime_ = value; + } else { + streamWaitTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + public Builder setStreamWaitTime( + com.google.protobuf.Duration.Builder builderForValue) { + if (streamWaitTimeBuilder_ == null) { + streamWaitTime_ = builderForValue.build(); + } else { + streamWaitTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + public Builder mergeStreamWaitTime(com.google.protobuf.Duration value) { + if (streamWaitTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + streamWaitTime_ != null && + streamWaitTime_ != com.google.protobuf.Duration.getDefaultInstance()) { + getStreamWaitTimeBuilder().mergeFrom(value); + } else { + streamWaitTime_ = value; + } + } else { + streamWaitTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + public Builder clearStreamWaitTime() { + bitField0_ = (bitField0_ & ~0x00000004); + streamWaitTime_ = null; + if (streamWaitTimeBuilder_ != null) { + streamWaitTimeBuilder_.dispose(); + streamWaitTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + public com.google.protobuf.Duration.Builder getStreamWaitTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStreamWaitTimeFieldBuilder().getBuilder(); + } + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + public com.google.protobuf.DurationOrBuilder getStreamWaitTimeOrBuilder() { + if (streamWaitTimeBuilder_ != null) { + return streamWaitTimeBuilder_.getMessageOrBuilder(); + } else { + return streamWaitTime_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : streamWaitTime_; + } + } + /** + *
+     *The wait time between each server streaming messages
+     * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getStreamWaitTimeFieldBuilder() { + if (streamWaitTimeBuilder_ == null) { + streamWaitTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getStreamWaitTime(), + getParentForChildren(), + isClean()); + streamWaitTime_ = null; + } + return streamWaitTimeBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ExpandRequestOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ExpandRequestOrBuilder.java index 3286ec98c7..51eef45ac2 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ExpandRequestOrBuilder.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ExpandRequestOrBuilder.java @@ -53,4 +53,31 @@ public interface ExpandRequestOrBuilder extends * .google.rpc.Status error = 2; */ com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + *
+   *The wait time between each server streaming messages
+   * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + * @return Whether the streamWaitTime field is set. + */ + boolean hasStreamWaitTime(); + /** + *
+   *The wait time between each server streaming messages
+   * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + * @return The streamWaitTime. + */ + com.google.protobuf.Duration getStreamWaitTime(); + /** + *
+   *The wait time between each server streaming messages
+   * 
+ * + * .google.protobuf.Duration stream_wait_time = 3; + */ + com.google.protobuf.DurationOrBuilder getStreamWaitTimeOrBuilder(); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/GetStreamingSequenceReportRequest.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/GetStreamingSequenceReportRequest.java new file mode 100644 index 0000000000..96b0d6df99 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/GetStreamingSequenceReportRequest.java @@ -0,0 +1,544 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +/** + * Protobuf type {@code google.showcase.v1beta1.GetStreamingSequenceReportRequest} + */ +public final class GetStreamingSequenceReportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.GetStreamingSequenceReportRequest) + GetStreamingSequenceReportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetStreamingSequenceReportRequest.newBuilder() to construct. + private GetStreamingSequenceReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetStreamingSequenceReportRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetStreamingSequenceReportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_GetStreamingSequenceReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_GetStreamingSequenceReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.class, com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.showcase.v1beta1.GetStreamingSequenceReportRequest)) { + return super.equals(obj); + } + com.google.showcase.v1beta1.GetStreamingSequenceReportRequest other = (com.google.showcase.v1beta1.GetStreamingSequenceReportRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.showcase.v1beta1.GetStreamingSequenceReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.showcase.v1beta1.GetStreamingSequenceReportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.GetStreamingSequenceReportRequest) + com.google.showcase.v1beta1.GetStreamingSequenceReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_GetStreamingSequenceReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_GetStreamingSequenceReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.class, com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.Builder.class); + } + + // Construct using com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_GetStreamingSequenceReportRequest_descriptor; + } + + @java.lang.Override + public com.google.showcase.v1beta1.GetStreamingSequenceReportRequest getDefaultInstanceForType() { + return com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.showcase.v1beta1.GetStreamingSequenceReportRequest build() { + com.google.showcase.v1beta1.GetStreamingSequenceReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.showcase.v1beta1.GetStreamingSequenceReportRequest buildPartial() { + com.google.showcase.v1beta1.GetStreamingSequenceReportRequest result = new com.google.showcase.v1beta1.GetStreamingSequenceReportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.showcase.v1beta1.GetStreamingSequenceReportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.showcase.v1beta1.GetStreamingSequenceReportRequest) { + return mergeFrom((com.google.showcase.v1beta1.GetStreamingSequenceReportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.showcase.v1beta1.GetStreamingSequenceReportRequest other) { + if (other == com.google.showcase.v1beta1.GetStreamingSequenceReportRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.showcase.v1beta1.GetStreamingSequenceReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.GetStreamingSequenceReportRequest) + private static final com.google.showcase.v1beta1.GetStreamingSequenceReportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.showcase.v1beta1.GetStreamingSequenceReportRequest(); + } + + public static com.google.showcase.v1beta1.GetStreamingSequenceReportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetStreamingSequenceReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.showcase.v1beta1.GetStreamingSequenceReportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/GetStreamingSequenceReportRequestOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/GetStreamingSequenceReportRequestOrBuilder.java new file mode 100644 index 0000000000..c166d1ccf5 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/GetStreamingSequenceReportRequestOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +public interface GetStreamingSequenceReportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.GetStreamingSequenceReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceOuterClass.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceOuterClass.java index d3c0d424eb..a4b1da88d7 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceOuterClass.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceOuterClass.java @@ -24,6 +24,26 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_showcase_v1beta1_Sequence_Response_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_showcase_v1beta1_StreamingSequence_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_showcase_v1beta1_StreamingSequence_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_showcase_v1beta1_StreamingSequence_Response_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_showcase_v1beta1_StreamingSequence_Response_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_showcase_v1beta1_StreamingSequenceReport_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_showcase_v1beta1_StreamingSequenceReport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_showcase_v1beta1_StreamingSequenceReport_Attempt_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_showcase_v1beta1_StreamingSequenceReport_Attempt_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_showcase_v1beta1_SequenceReport_descriptor; static final @@ -39,16 +59,36 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_showcase_v1beta1_CreateSequenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_showcase_v1beta1_CreateStreamingSequenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_showcase_v1beta1_CreateStreamingSequenceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_showcase_v1beta1_AttemptSequenceRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_showcase_v1beta1_AttemptSequenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_showcase_v1beta1_AttemptStreamingSequenceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_showcase_v1beta1_AttemptStreamingSequenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_showcase_v1beta1_AttemptStreamingSequenceResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_showcase_v1beta1_AttemptStreamingSequenceResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_showcase_v1beta1_GetSequenceReportRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_showcase_v1beta1_GetSequenceReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_showcase_v1beta1_GetStreamingSequenceReportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_showcase_v1beta1_GetStreamingSequenceReportRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -71,40 +111,85 @@ public static void registerAllExtensions( "e\032X\n\010Response\022\"\n\006status\030\001 \001(\0132\022.google.r" + "pc.Status\022(\n\005delay\030\002 \001(\0132\031.google.protob" + "uf.Duration:;\352A8\n showcase.googleapis.co" + - "m/Sequence\022\024sequences/{sequence}\"\233\003\n\016Seq" + - "uenceReport\022\021\n\004name\030\001 \001(\tB\003\340A\003\022A\n\010attemp" + - "ts\030\002 \003(\0132/.google.showcase.v1beta1.Seque" + - "nceReport.Attempt\032\340\001\n\007Attempt\022\026\n\016attempt" + - "_number\030\001 \001(\005\0224\n\020attempt_deadline\030\002 \001(\0132" + - "\032.google.protobuf.Timestamp\0221\n\rresponse_" + - "time\030\003 \001(\0132\032.google.protobuf.Timestamp\0220" + - "\n\rattempt_delay\030\004 \001(\0132\031.google.protobuf." + - "Duration\022\"\n\006status\030\005 \001(\0132\022.google.rpc.St" + - "atus:P\352AM\n&showcase.googleapis.com/Seque" + - "nceReport\022#sequences/{sequence}/sequence" + - "Report\"L\n\025CreateSequenceRequest\0223\n\010seque" + - "nce\030\001 \001(\0132!.google.showcase.v1beta1.Sequ" + - "ence\"P\n\026AttemptSequenceRequest\0226\n\004name\030\001" + - " \001(\tB(\372A\"\n showcase.googleapis.com/Seque" + - "nce\340A\002\"X\n\030GetSequenceReportRequest\022<\n\004na" + - "me\030\001 \001(\tB.\372A(\n&showcase.googleapis.com/S" + - "equenceReport\340A\0022\364\003\n\017SequenceService\022\224\001\n" + - "\016CreateSequence\022..google.showcase.v1beta" + - "1.CreateSequenceRequest\032!.google.showcas" + - "e.v1beta1.Sequence\"/\202\323\344\223\002\036\"\022/v1beta1/seq" + - "uences:\010sequence\332A\010sequence\022\252\001\n\021GetSeque" + - "nceReport\0221.google.showcase.v1beta1.GetS" + - "equenceReportRequest\032\'.google.showcase.v" + - "1beta1.SequenceReport\"9\202\323\344\223\002,\022*/v1beta1/" + - "{name=sequences/*/sequenceReport}\332A\004name" + - "\022\211\001\n\017AttemptSequence\022/.google.showcase.v" + - "1beta1.AttemptSequenceRequest\032\026.google.p" + - "rotobuf.Empty\"-\202\323\344\223\002 \"\033/v1beta1/{name=se" + - "quences/*}:\001*\332A\004name\032\021\312A\016localhost:7469B" + - "q\n\033com.google.showcase.v1beta1P\001Z4github" + - ".com/googleapis/gapic-showcase/server/ge" + - "nproto\352\002\031Google::Showcase::V1beta1b\006prot" + - "o3" + "m/Sequence\022\024sequences/{sequence}\"\312\002\n\021Str" + + "eamingSequence\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\017\n\007con" + + "tent\030\002 \001(\t\022F\n\tresponses\030\003 \003(\01323.google.s" + + "howcase.v1beta1.StreamingSequence.Respon" + + "se\032p\n\010Response\022\"\n\006status\030\001 \001(\0132\022.google." + + "rpc.Status\022(\n\005delay\030\002 \001(\0132\031.google.proto" + + "buf.Duration\022\026\n\016response_index\030\003 \001(\005:W\352A" + + "T\n)showcase.googleapis.com/StreamingSequ" + + "ence\022\'streamingSequences/{streaming_sequ" + + "ence}\"\350\003\n\027StreamingSequenceReport\022\021\n\004nam" + + "e\030\001 \001(\tB\003\340A\003\022J\n\010attempts\030\002 \003(\01328.google." + + "showcase.v1beta1.StreamingSequenceReport" + + ".Attempt\032\366\001\n\007Attempt\022\026\n\016attempt_number\030\001" + + " \001(\005\0224\n\020attempt_deadline\030\002 \001(\0132\032.google." + + "protobuf.Timestamp\0221\n\rresponse_time\030\003 \001(" + + "\0132\032.google.protobuf.Timestamp\0220\n\rattempt" + + "_delay\030\004 \001(\0132\031.google.protobuf.Duration\022" + + "\"\n\006status\030\005 \001(\0132\022.google.rpc.Status\022\024\n\014c" + + "ontent_sent\030\006 \001(\t:u\352Ar\n/showcase.googlea" + + "pis.com/StreamingSequenceReport\022?streami" + + "ngSequences/{streaming_sequence}/streami" + + "ngSequenceReport\"\233\003\n\016SequenceReport\022\021\n\004n" + + "ame\030\001 \001(\tB\003\340A\003\022A\n\010attempts\030\002 \003(\0132/.googl" + + "e.showcase.v1beta1.SequenceReport.Attemp" + + "t\032\340\001\n\007Attempt\022\026\n\016attempt_number\030\001 \001(\005\0224\n" + + "\020attempt_deadline\030\002 \001(\0132\032.google.protobu" + + "f.Timestamp\0221\n\rresponse_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\0220\n\rattempt_delay\030" + + "\004 \001(\0132\031.google.protobuf.Duration\022\"\n\006stat" + + "us\030\005 \001(\0132\022.google.rpc.Status:P\352AM\n&showc" + + "ase.googleapis.com/SequenceReport\022#seque" + + "nces/{sequence}/sequenceReport\"L\n\025Create" + + "SequenceRequest\0223\n\010sequence\030\001 \001(\0132!.goog" + + "le.showcase.v1beta1.Sequence\"h\n\036CreateSt" + + "reamingSequenceRequest\022F\n\022streaming_sequ" + + "ence\030\001 \001(\0132*.google.showcase.v1beta1.Str" + + "eamingSequence\"P\n\026AttemptSequenceRequest" + + "\0226\n\004name\030\001 \001(\tB(\372A\"\n showcase.googleapis" + + ".com/Sequence\340A\002\"b\n\037AttemptStreamingSequ" + + "enceRequest\022?\n\004name\030\001 \001(\tB1\372A+\n)showcase" + + ".googleapis.com/StreamingSequence\340A\002\"3\n " + + "AttemptStreamingSequenceResponse\022\017\n\007cont" + + "ent\030\001 \001(\t\"X\n\030GetSequenceReportRequest\022<\n" + + "\004name\030\001 \001(\tB.\372A(\n&showcase.googleapis.co" + + "m/SequenceReport\340A\002\"j\n!GetStreamingSeque" + + "nceReportRequest\022E\n\004name\030\001 \001(\tB7\372A1\n/sho" + + "wcase.googleapis.com/StreamingSequenceRe" + + "port\340A\0022\360\010\n\017SequenceService\022\224\001\n\016CreateSe" + + "quence\022..google.showcase.v1beta1.CreateS" + + "equenceRequest\032!.google.showcase.v1beta1" + + ".Sequence\"/\202\323\344\223\002\036\"\022/v1beta1/sequences:\010s" + + "equence\332A\010sequence\022\314\001\n\027CreateStreamingSe" + + "quence\0227.google.showcase.v1beta1.CreateS" + + "treamingSequenceRequest\032*.google.showcas" + + "e.v1beta1.StreamingSequence\"L\202\323\344\223\0021\"\033/v1" + + "beta1/streamingSequences:\022streaming_sequ" + + "ence\332A\022streaming_sequence\022\252\001\n\021GetSequenc" + + "eReport\0221.google.showcase.v1beta1.GetSeq" + + "uenceReportRequest\032\'.google.showcase.v1b" + + "eta1.SequenceReport\"9\202\323\344\223\002,\022*/v1beta1/{n" + + "ame=sequences/*/sequenceReport}\332A\004name\022\327" + + "\001\n\032GetStreamingSequenceReport\022:.google.s" + + "howcase.v1beta1.GetStreamingSequenceRepo" + + "rtRequest\0320.google.showcase.v1beta1.Stre" + + "amingSequenceReport\"K\202\323\344\223\002>\022 builder) { + super(builder); + } + private StreamingSequence() { + name_ = ""; + content_ = ""; + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StreamingSequence(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.StreamingSequence.class, com.google.showcase.v1beta1.StreamingSequence.Builder.class); + } + + public interface ResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.StreamingSequence.Response) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The status to return for an individual attempt.
+     * 
+ * + * .google.rpc.Status status = 1; + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + *
+     * The status to return for an individual attempt.
+     * 
+ * + * .google.rpc.Status status = 1; + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + *
+     * The status to return for an individual attempt.
+     * 
+ * + * .google.rpc.Status status = 1; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + *
+     * The amount of time to delay sending the response.
+     * 
+ * + * .google.protobuf.Duration delay = 2; + * @return Whether the delay field is set. + */ + boolean hasDelay(); + /** + *
+     * The amount of time to delay sending the response.
+     * 
+ * + * .google.protobuf.Duration delay = 2; + * @return The delay. + */ + com.google.protobuf.Duration getDelay(); + /** + *
+     * The amount of time to delay sending the response.
+     * 
+ * + * .google.protobuf.Duration delay = 2; + */ + com.google.protobuf.DurationOrBuilder getDelayOrBuilder(); + + /** + *
+     * The index that the status should be sent
+     * 
+ * + * int32 response_index = 3; + * @return The responseIndex. + */ + int getResponseIndex(); + } + /** + *
+   * A server response to an RPC Attempt in a sequence.
+   * 
+ * + * Protobuf type {@code google.showcase.v1beta1.StreamingSequence.Response} + */ + public static final class Response extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.StreamingSequence.Response) + ResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Response.newBuilder() to construct. + private Response(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Response() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Response(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_Response_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.StreamingSequence.Response.class, com.google.showcase.v1beta1.StreamingSequence.Response.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private com.google.rpc.Status status_; + /** + *
+     * The status to return for an individual attempt.
+     * 
+ * + * .google.rpc.Status status = 1; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + *
+     * The status to return for an individual attempt.
+     * 
+ * + * .google.rpc.Status status = 1; + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + *
+     * The status to return for an individual attempt.
+     * 
+ * + * .google.rpc.Status status = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + public static final int DELAY_FIELD_NUMBER = 2; + private com.google.protobuf.Duration delay_; + /** + *
+     * The amount of time to delay sending the response.
+     * 
+ * + * .google.protobuf.Duration delay = 2; + * @return Whether the delay field is set. + */ + @java.lang.Override + public boolean hasDelay() { + return delay_ != null; + } + /** + *
+     * The amount of time to delay sending the response.
+     * 
+ * + * .google.protobuf.Duration delay = 2; + * @return The delay. + */ + @java.lang.Override + public com.google.protobuf.Duration getDelay() { + return delay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delay_; + } + /** + *
+     * The amount of time to delay sending the response.
+     * 
+ * + * .google.protobuf.Duration delay = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDelayOrBuilder() { + return delay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delay_; + } + + public static final int RESPONSE_INDEX_FIELD_NUMBER = 3; + private int responseIndex_ = 0; + /** + *
+     * The index that the status should be sent
+     * 
+ * + * int32 response_index = 3; + * @return The responseIndex. + */ + @java.lang.Override + public int getResponseIndex() { + return responseIndex_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (status_ != null) { + output.writeMessage(1, getStatus()); + } + if (delay_ != null) { + output.writeMessage(2, getDelay()); + } + if (responseIndex_ != 0) { + output.writeInt32(3, responseIndex_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStatus()); + } + if (delay_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDelay()); + } + if (responseIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, responseIndex_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.showcase.v1beta1.StreamingSequence.Response)) { + return super.equals(obj); + } + com.google.showcase.v1beta1.StreamingSequence.Response other = (com.google.showcase.v1beta1.StreamingSequence.Response) obj; + + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus() + .equals(other.getStatus())) return false; + } + if (hasDelay() != other.hasDelay()) return false; + if (hasDelay()) { + if (!getDelay() + .equals(other.getDelay())) return false; + } + if (getResponseIndex() + != other.getResponseIndex()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasDelay()) { + hash = (37 * hash) + DELAY_FIELD_NUMBER; + hash = (53 * hash) + getDelay().hashCode(); + } + hash = (37 * hash) + RESPONSE_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getResponseIndex(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequence.Response parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.showcase.v1beta1.StreamingSequence.Response prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A server response to an RPC Attempt in a sequence.
+     * 
+ * + * Protobuf type {@code google.showcase.v1beta1.StreamingSequence.Response} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.StreamingSequence.Response) + com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_Response_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.StreamingSequence.Response.class, com.google.showcase.v1beta1.StreamingSequence.Response.Builder.class); + } + + // Construct using com.google.showcase.v1beta1.StreamingSequence.Response.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + delay_ = null; + if (delayBuilder_ != null) { + delayBuilder_.dispose(); + delayBuilder_ = null; + } + responseIndex_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_Response_descriptor; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence.Response getDefaultInstanceForType() { + return com.google.showcase.v1beta1.StreamingSequence.Response.getDefaultInstance(); + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence.Response build() { + com.google.showcase.v1beta1.StreamingSequence.Response result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence.Response buildPartial() { + com.google.showcase.v1beta1.StreamingSequence.Response result = new com.google.showcase.v1beta1.StreamingSequence.Response(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.showcase.v1beta1.StreamingSequence.Response result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.status_ = statusBuilder_ == null + ? status_ + : statusBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.delay_ = delayBuilder_ == null + ? delay_ + : delayBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.responseIndex_ = responseIndex_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.showcase.v1beta1.StreamingSequence.Response) { + return mergeFrom((com.google.showcase.v1beta1.StreamingSequence.Response)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.showcase.v1beta1.StreamingSequence.Response other) { + if (other == com.google.showcase.v1beta1.StreamingSequence.Response.getDefaultInstance()) return this; + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasDelay()) { + mergeDelay(other.getDelay()); + } + if (other.getResponseIndex() != 0) { + setResponseIndex(other.getResponseIndex()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStatusFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getDelayFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + responseIndex_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder setStatus( + com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + status_ != null && + status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + *
+       * The status to return for an individual attempt.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + + private com.google.protobuf.Duration delay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> delayBuilder_; + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + * @return Whether the delay field is set. + */ + public boolean hasDelay() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + * @return The delay. + */ + public com.google.protobuf.Duration getDelay() { + if (delayBuilder_ == null) { + return delay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delay_; + } else { + return delayBuilder_.getMessage(); + } + } + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + */ + public Builder setDelay(com.google.protobuf.Duration value) { + if (delayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + delay_ = value; + } else { + delayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + */ + public Builder setDelay( + com.google.protobuf.Duration.Builder builderForValue) { + if (delayBuilder_ == null) { + delay_ = builderForValue.build(); + } else { + delayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + */ + public Builder mergeDelay(com.google.protobuf.Duration value) { + if (delayBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + delay_ != null && + delay_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDelayBuilder().mergeFrom(value); + } else { + delay_ = value; + } + } else { + delayBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + */ + public Builder clearDelay() { + bitField0_ = (bitField0_ & ~0x00000002); + delay_ = null; + if (delayBuilder_ != null) { + delayBuilder_.dispose(); + delayBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + */ + public com.google.protobuf.Duration.Builder getDelayBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDelayFieldBuilder().getBuilder(); + } + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + */ + public com.google.protobuf.DurationOrBuilder getDelayOrBuilder() { + if (delayBuilder_ != null) { + return delayBuilder_.getMessageOrBuilder(); + } else { + return delay_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : delay_; + } + } + /** + *
+       * The amount of time to delay sending the response.
+       * 
+ * + * .google.protobuf.Duration delay = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getDelayFieldBuilder() { + if (delayBuilder_ == null) { + delayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getDelay(), + getParentForChildren(), + isClean()); + delay_ = null; + } + return delayBuilder_; + } + + private int responseIndex_ ; + /** + *
+       * The index that the status should be sent
+       * 
+ * + * int32 response_index = 3; + * @return The responseIndex. + */ + @java.lang.Override + public int getResponseIndex() { + return responseIndex_; + } + /** + *
+       * The index that the status should be sent
+       * 
+ * + * int32 response_index = 3; + * @param value The responseIndex to set. + * @return This builder for chaining. + */ + public Builder setResponseIndex(int value) { + + responseIndex_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The index that the status should be sent
+       * 
+ * + * int32 response_index = 3; + * @return This builder for chaining. + */ + public Builder clearResponseIndex() { + bitField0_ = (bitField0_ & ~0x00000004); + responseIndex_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.showcase.v1beta1.StreamingSequence.Response) + } + + // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.StreamingSequence.Response) + private static final com.google.showcase.v1beta1.StreamingSequence.Response DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.showcase.v1beta1.StreamingSequence.Response(); + } + + public static com.google.showcase.v1beta1.StreamingSequence.Response getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Response parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence.Response getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + *
+   * The Content that the stream will send
+   * 
+ * + * string content = 2; + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + *
+   * The Content that the stream will send
+   * 
+ * + * string content = 2; + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List responses_; + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence.Response getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(3, responses_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, responses_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.showcase.v1beta1.StreamingSequence)) { + return super.equals(obj); + } + com.google.showcase.v1beta1.StreamingSequence other = (com.google.showcase.v1beta1.StreamingSequence) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.showcase.v1beta1.StreamingSequence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.showcase.v1beta1.StreamingSequence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.showcase.v1beta1.StreamingSequence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.StreamingSequence) + com.google.showcase.v1beta1.StreamingSequenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.StreamingSequence.class, com.google.showcase.v1beta1.StreamingSequence.Builder.class); + } + + // Construct using com.google.showcase.v1beta1.StreamingSequence.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + content_ = ""; + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + } else { + responses_ = null; + responsesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequence_descriptor; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence getDefaultInstanceForType() { + return com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance(); + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence build() { + com.google.showcase.v1beta1.StreamingSequence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence buildPartial() { + com.google.showcase.v1beta1.StreamingSequence result = new com.google.showcase.v1beta1.StreamingSequence(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.showcase.v1beta1.StreamingSequence result) { + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + } + + private void buildPartial0(com.google.showcase.v1beta1.StreamingSequence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.showcase.v1beta1.StreamingSequence) { + return mergeFrom((com.google.showcase.v1beta1.StreamingSequence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.showcase.v1beta1.StreamingSequence other) { + if (other == com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000004); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.showcase.v1beta1.StreamingSequence.Response m = + input.readMessage( + com.google.showcase.v1beta1.StreamingSequence.Response.parser(), + extensionRegistry); + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(m); + } else { + responsesBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + *
+     * The Content that the stream will send
+     * 
+ * + * string content = 2; + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Content that the stream will send
+     * 
+ * + * string content = 2; + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Content that the stream will send
+     * 
+ * + * string content = 2; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The Content that the stream will send
+     * 
+ * + * string content = 2; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The Content that the stream will send
+     * 
+ * + * string content = 2; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequence.Response, com.google.showcase.v1beta1.StreamingSequence.Response.Builder, com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public com.google.showcase.v1beta1.StreamingSequence.Response getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder setResponses( + int index, com.google.showcase.v1beta1.StreamingSequence.Response value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder setResponses( + int index, com.google.showcase.v1beta1.StreamingSequence.Response.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder addResponses(com.google.showcase.v1beta1.StreamingSequence.Response value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder addResponses( + int index, com.google.showcase.v1beta1.StreamingSequence.Response value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder addResponses( + com.google.showcase.v1beta1.StreamingSequence.Response.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder addResponses( + int index, com.google.showcase.v1beta1.StreamingSequence.Response.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public com.google.showcase.v1beta1.StreamingSequence.Response.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public com.google.showcase.v1beta1.StreamingSequence.Response.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.showcase.v1beta1.StreamingSequence.Response.getDefaultInstance()); + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public com.google.showcase.v1beta1.StreamingSequence.Response.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.showcase.v1beta1.StreamingSequence.Response.getDefaultInstance()); + } + /** + *
+     * Sequence of responses to return in order for each attempt. If empty, the
+     * default response is an immediate OK.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequence.Response, com.google.showcase.v1beta1.StreamingSequence.Response.Builder, com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequence.Response, com.google.showcase.v1beta1.StreamingSequence.Response.Builder, com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.showcase.v1beta1.StreamingSequence) + } + + // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.StreamingSequence) + private static final com.google.showcase.v1beta1.StreamingSequence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.showcase.v1beta1.StreamingSequence(); + } + + public static com.google.showcase.v1beta1.StreamingSequence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingSequence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java new file mode 100644 index 0000000000..8adcda635f --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java @@ -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 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 matchMap = + STREAMING_SEQUENCE.validatedMatch( + formattedString, "StreamingSequenceName.parse: formattedString not in valid format"); + return of(matchMap.get("streaming_sequence")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List 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 getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder 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); + } + } +} diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceOrBuilder.java new file mode 100644 index 0000000000..819dbcf614 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceOrBuilder.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +public interface StreamingSequenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.StreamingSequence) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The Content that the stream will send
+   * 
+ * + * string content = 2; + * @return The content. + */ + java.lang.String getContent(); + /** + *
+   * The Content that the stream will send
+   * 
+ * + * string content = 2; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + java.util.List + getResponsesList(); + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + com.google.showcase.v1beta1.StreamingSequence.Response getResponses(int index); + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + int getResponsesCount(); + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Sequence of responses to return in order for each attempt. If empty, the
+   * default response is an immediate OK.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3; + */ + com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReport.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReport.java new file mode 100644 index 0000000000..e25e3e3e32 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReport.java @@ -0,0 +1,2699 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +/** + * Protobuf type {@code google.showcase.v1beta1.StreamingSequenceReport} + */ +public final class StreamingSequenceReport extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.StreamingSequenceReport) + StreamingSequenceReportOrBuilder { +private static final long serialVersionUID = 0L; + // Use StreamingSequenceReport.newBuilder() to construct. + private StreamingSequenceReport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StreamingSequenceReport() { + name_ = ""; + attempts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StreamingSequenceReport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.StreamingSequenceReport.class, com.google.showcase.v1beta1.StreamingSequenceReport.Builder.class); + } + + public interface AttemptOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.StreamingSequenceReport.Attempt) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The attempt number - starting at 0.
+     * 
+ * + * int32 attempt_number = 1; + * @return The attemptNumber. + */ + int getAttemptNumber(); + + /** + *
+     * The deadline dictated by the attempt to the server.
+     * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + * @return Whether the attemptDeadline field is set. + */ + boolean hasAttemptDeadline(); + /** + *
+     * The deadline dictated by the attempt to the server.
+     * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + * @return The attemptDeadline. + */ + com.google.protobuf.Timestamp getAttemptDeadline(); + /** + *
+     * The deadline dictated by the attempt to the server.
+     * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + com.google.protobuf.TimestampOrBuilder getAttemptDeadlineOrBuilder(); + + /** + *
+     * The time that the server responded to the RPC attempt. Used for
+     * calculating attempt_delay.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + * @return Whether the responseTime field is set. + */ + boolean hasResponseTime(); + /** + *
+     * The time that the server responded to the RPC attempt. Used for
+     * calculating attempt_delay.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + * @return The responseTime. + */ + com.google.protobuf.Timestamp getResponseTime(); + /** + *
+     * The time that the server responded to the RPC attempt. Used for
+     * calculating attempt_delay.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getResponseTimeOrBuilder(); + + /** + *
+     * The server perceived delay between sending the last response and
+     * receiving this attempt. Used for validating attempt delay backoff.
+     * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + * @return Whether the attemptDelay field is set. + */ + boolean hasAttemptDelay(); + /** + *
+     * The server perceived delay between sending the last response and
+     * receiving this attempt. Used for validating attempt delay backoff.
+     * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + * @return The attemptDelay. + */ + com.google.protobuf.Duration getAttemptDelay(); + /** + *
+     * The server perceived delay between sending the last response and
+     * receiving this attempt. Used for validating attempt delay backoff.
+     * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + com.google.protobuf.DurationOrBuilder getAttemptDelayOrBuilder(); + + /** + *
+     * The status returned to the attempt.
+     * 
+ * + * .google.rpc.Status status = 5; + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + *
+     * The status returned to the attempt.
+     * 
+ * + * .google.rpc.Status status = 5; + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + *
+     * The status returned to the attempt.
+     * 
+ * + * .google.rpc.Status status = 5; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + * string content_sent = 6; + * @return The contentSent. + */ + java.lang.String getContentSent(); + /** + * string content_sent = 6; + * @return The bytes for contentSent. + */ + com.google.protobuf.ByteString + getContentSentBytes(); + } + /** + *
+   * Contains metrics on individual RPC Attempts in a sequence.
+   * 
+ * + * Protobuf type {@code google.showcase.v1beta1.StreamingSequenceReport.Attempt} + */ + public static final class Attempt extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.StreamingSequenceReport.Attempt) + AttemptOrBuilder { + private static final long serialVersionUID = 0L; + // Use Attempt.newBuilder() to construct. + private Attempt(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Attempt() { + contentSent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Attempt(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_Attempt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_Attempt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.class, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder.class); + } + + public static final int ATTEMPT_NUMBER_FIELD_NUMBER = 1; + private int attemptNumber_ = 0; + /** + *
+     * The attempt number - starting at 0.
+     * 
+ * + * int32 attempt_number = 1; + * @return The attemptNumber. + */ + @java.lang.Override + public int getAttemptNumber() { + return attemptNumber_; + } + + public static final int ATTEMPT_DEADLINE_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp attemptDeadline_; + /** + *
+     * The deadline dictated by the attempt to the server.
+     * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + * @return Whether the attemptDeadline field is set. + */ + @java.lang.Override + public boolean hasAttemptDeadline() { + return attemptDeadline_ != null; + } + /** + *
+     * The deadline dictated by the attempt to the server.
+     * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + * @return The attemptDeadline. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getAttemptDeadline() { + return attemptDeadline_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : attemptDeadline_; + } + /** + *
+     * The deadline dictated by the attempt to the server.
+     * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getAttemptDeadlineOrBuilder() { + return attemptDeadline_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : attemptDeadline_; + } + + public static final int RESPONSE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp responseTime_; + /** + *
+     * The time that the server responded to the RPC attempt. Used for
+     * calculating attempt_delay.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + * @return Whether the responseTime field is set. + */ + @java.lang.Override + public boolean hasResponseTime() { + return responseTime_ != null; + } + /** + *
+     * The time that the server responded to the RPC attempt. Used for
+     * calculating attempt_delay.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + * @return The responseTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getResponseTime() { + return responseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : responseTime_; + } + /** + *
+     * The time that the server responded to the RPC attempt. Used for
+     * calculating attempt_delay.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getResponseTimeOrBuilder() { + return responseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : responseTime_; + } + + public static final int ATTEMPT_DELAY_FIELD_NUMBER = 4; + private com.google.protobuf.Duration attemptDelay_; + /** + *
+     * The server perceived delay between sending the last response and
+     * receiving this attempt. Used for validating attempt delay backoff.
+     * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + * @return Whether the attemptDelay field is set. + */ + @java.lang.Override + public boolean hasAttemptDelay() { + return attemptDelay_ != null; + } + /** + *
+     * The server perceived delay between sending the last response and
+     * receiving this attempt. Used for validating attempt delay backoff.
+     * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + * @return The attemptDelay. + */ + @java.lang.Override + public com.google.protobuf.Duration getAttemptDelay() { + return attemptDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : attemptDelay_; + } + /** + *
+     * The server perceived delay between sending the last response and
+     * receiving this attempt. Used for validating attempt delay backoff.
+     * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getAttemptDelayOrBuilder() { + return attemptDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : attemptDelay_; + } + + public static final int STATUS_FIELD_NUMBER = 5; + private com.google.rpc.Status status_; + /** + *
+     * The status returned to the attempt.
+     * 
+ * + * .google.rpc.Status status = 5; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + *
+     * The status returned to the attempt.
+     * 
+ * + * .google.rpc.Status status = 5; + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + *
+     * The status returned to the attempt.
+     * 
+ * + * .google.rpc.Status status = 5; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + public static final int CONTENT_SENT_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object contentSent_ = ""; + /** + * string content_sent = 6; + * @return The contentSent. + */ + @java.lang.Override + public java.lang.String getContentSent() { + java.lang.Object ref = contentSent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentSent_ = s; + return s; + } + } + /** + * string content_sent = 6; + * @return The bytes for contentSent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentSentBytes() { + java.lang.Object ref = contentSent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentSent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (attemptNumber_ != 0) { + output.writeInt32(1, attemptNumber_); + } + if (attemptDeadline_ != null) { + output.writeMessage(2, getAttemptDeadline()); + } + if (responseTime_ != null) { + output.writeMessage(3, getResponseTime()); + } + if (attemptDelay_ != null) { + output.writeMessage(4, getAttemptDelay()); + } + if (status_ != null) { + output.writeMessage(5, getStatus()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentSent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, contentSent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (attemptNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, attemptNumber_); + } + if (attemptDeadline_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAttemptDeadline()); + } + if (responseTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResponseTime()); + } + if (attemptDelay_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getAttemptDelay()); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getStatus()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentSent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, contentSent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.showcase.v1beta1.StreamingSequenceReport.Attempt)) { + return super.equals(obj); + } + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt other = (com.google.showcase.v1beta1.StreamingSequenceReport.Attempt) obj; + + if (getAttemptNumber() + != other.getAttemptNumber()) return false; + if (hasAttemptDeadline() != other.hasAttemptDeadline()) return false; + if (hasAttemptDeadline()) { + if (!getAttemptDeadline() + .equals(other.getAttemptDeadline())) return false; + } + if (hasResponseTime() != other.hasResponseTime()) return false; + if (hasResponseTime()) { + if (!getResponseTime() + .equals(other.getResponseTime())) return false; + } + if (hasAttemptDelay() != other.hasAttemptDelay()) return false; + if (hasAttemptDelay()) { + if (!getAttemptDelay() + .equals(other.getAttemptDelay())) return false; + } + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus() + .equals(other.getStatus())) return false; + } + if (!getContentSent() + .equals(other.getContentSent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTEMPT_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getAttemptNumber(); + if (hasAttemptDeadline()) { + hash = (37 * hash) + ATTEMPT_DEADLINE_FIELD_NUMBER; + hash = (53 * hash) + getAttemptDeadline().hashCode(); + } + if (hasResponseTime()) { + hash = (37 * hash) + RESPONSE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getResponseTime().hashCode(); + } + if (hasAttemptDelay()) { + hash = (37 * hash) + ATTEMPT_DELAY_FIELD_NUMBER; + hash = (53 * hash) + getAttemptDelay().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (37 * hash) + CONTENT_SENT_FIELD_NUMBER; + hash = (53 * hash) + getContentSent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.showcase.v1beta1.StreamingSequenceReport.Attempt prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Contains metrics on individual RPC Attempts in a sequence.
+     * 
+ * + * Protobuf type {@code google.showcase.v1beta1.StreamingSequenceReport.Attempt} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.StreamingSequenceReport.Attempt) + com.google.showcase.v1beta1.StreamingSequenceReport.AttemptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_Attempt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_Attempt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.class, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder.class); + } + + // Construct using com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attemptNumber_ = 0; + attemptDeadline_ = null; + if (attemptDeadlineBuilder_ != null) { + attemptDeadlineBuilder_.dispose(); + attemptDeadlineBuilder_ = null; + } + responseTime_ = null; + if (responseTimeBuilder_ != null) { + responseTimeBuilder_.dispose(); + responseTimeBuilder_ = null; + } + attemptDelay_ = null; + if (attemptDelayBuilder_ != null) { + attemptDelayBuilder_.dispose(); + attemptDelayBuilder_ = null; + } + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + contentSent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_Attempt_descriptor; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt getDefaultInstanceForType() { + return com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.getDefaultInstance(); + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt build() { + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt buildPartial() { + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt result = new com.google.showcase.v1beta1.StreamingSequenceReport.Attempt(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.showcase.v1beta1.StreamingSequenceReport.Attempt result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attemptNumber_ = attemptNumber_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attemptDeadline_ = attemptDeadlineBuilder_ == null + ? attemptDeadline_ + : attemptDeadlineBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.responseTime_ = responseTimeBuilder_ == null + ? responseTime_ + : responseTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attemptDelay_ = attemptDelayBuilder_ == null + ? attemptDelay_ + : attemptDelayBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.status_ = statusBuilder_ == null + ? status_ + : statusBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.contentSent_ = contentSent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.showcase.v1beta1.StreamingSequenceReport.Attempt) { + return mergeFrom((com.google.showcase.v1beta1.StreamingSequenceReport.Attempt)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.showcase.v1beta1.StreamingSequenceReport.Attempt other) { + if (other == com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.getDefaultInstance()) return this; + if (other.getAttemptNumber() != 0) { + setAttemptNumber(other.getAttemptNumber()); + } + if (other.hasAttemptDeadline()) { + mergeAttemptDeadline(other.getAttemptDeadline()); + } + if (other.hasResponseTime()) { + mergeResponseTime(other.getResponseTime()); + } + if (other.hasAttemptDelay()) { + mergeAttemptDelay(other.getAttemptDelay()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (!other.getContentSent().isEmpty()) { + contentSent_ = other.contentSent_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + attemptNumber_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getAttemptDeadlineFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getResponseTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getAttemptDelayFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getStatusFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + contentSent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int attemptNumber_ ; + /** + *
+       * The attempt number - starting at 0.
+       * 
+ * + * int32 attempt_number = 1; + * @return The attemptNumber. + */ + @java.lang.Override + public int getAttemptNumber() { + return attemptNumber_; + } + /** + *
+       * The attempt number - starting at 0.
+       * 
+ * + * int32 attempt_number = 1; + * @param value The attemptNumber to set. + * @return This builder for chaining. + */ + public Builder setAttemptNumber(int value) { + + attemptNumber_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The attempt number - starting at 0.
+       * 
+ * + * int32 attempt_number = 1; + * @return This builder for chaining. + */ + public Builder clearAttemptNumber() { + bitField0_ = (bitField0_ & ~0x00000001); + attemptNumber_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp attemptDeadline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> attemptDeadlineBuilder_; + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + * @return Whether the attemptDeadline field is set. + */ + public boolean hasAttemptDeadline() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + * @return The attemptDeadline. + */ + public com.google.protobuf.Timestamp getAttemptDeadline() { + if (attemptDeadlineBuilder_ == null) { + return attemptDeadline_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : attemptDeadline_; + } else { + return attemptDeadlineBuilder_.getMessage(); + } + } + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + public Builder setAttemptDeadline(com.google.protobuf.Timestamp value) { + if (attemptDeadlineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attemptDeadline_ = value; + } else { + attemptDeadlineBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + public Builder setAttemptDeadline( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (attemptDeadlineBuilder_ == null) { + attemptDeadline_ = builderForValue.build(); + } else { + attemptDeadlineBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + public Builder mergeAttemptDeadline(com.google.protobuf.Timestamp value) { + if (attemptDeadlineBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + attemptDeadline_ != null && + attemptDeadline_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getAttemptDeadlineBuilder().mergeFrom(value); + } else { + attemptDeadline_ = value; + } + } else { + attemptDeadlineBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + public Builder clearAttemptDeadline() { + bitField0_ = (bitField0_ & ~0x00000002); + attemptDeadline_ = null; + if (attemptDeadlineBuilder_ != null) { + attemptDeadlineBuilder_.dispose(); + attemptDeadlineBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + public com.google.protobuf.Timestamp.Builder getAttemptDeadlineBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAttemptDeadlineFieldBuilder().getBuilder(); + } + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + public com.google.protobuf.TimestampOrBuilder getAttemptDeadlineOrBuilder() { + if (attemptDeadlineBuilder_ != null) { + return attemptDeadlineBuilder_.getMessageOrBuilder(); + } else { + return attemptDeadline_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : attemptDeadline_; + } + } + /** + *
+       * The deadline dictated by the attempt to the server.
+       * 
+ * + * .google.protobuf.Timestamp attempt_deadline = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getAttemptDeadlineFieldBuilder() { + if (attemptDeadlineBuilder_ == null) { + attemptDeadlineBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getAttemptDeadline(), + getParentForChildren(), + isClean()); + attemptDeadline_ = null; + } + return attemptDeadlineBuilder_; + } + + private com.google.protobuf.Timestamp responseTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> responseTimeBuilder_; + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + * @return Whether the responseTime field is set. + */ + public boolean hasResponseTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + * @return The responseTime. + */ + public com.google.protobuf.Timestamp getResponseTime() { + if (responseTimeBuilder_ == null) { + return responseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : responseTime_; + } else { + return responseTimeBuilder_.getMessage(); + } + } + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public Builder setResponseTime(com.google.protobuf.Timestamp value) { + if (responseTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + responseTime_ = value; + } else { + responseTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public Builder setResponseTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (responseTimeBuilder_ == null) { + responseTime_ = builderForValue.build(); + } else { + responseTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public Builder mergeResponseTime(com.google.protobuf.Timestamp value) { + if (responseTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + responseTime_ != null && + responseTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getResponseTimeBuilder().mergeFrom(value); + } else { + responseTime_ = value; + } + } else { + responseTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public Builder clearResponseTime() { + bitField0_ = (bitField0_ & ~0x00000004); + responseTime_ = null; + if (responseTimeBuilder_ != null) { + responseTimeBuilder_.dispose(); + responseTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getResponseTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getResponseTimeFieldBuilder().getBuilder(); + } + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getResponseTimeOrBuilder() { + if (responseTimeBuilder_ != null) { + return responseTimeBuilder_.getMessageOrBuilder(); + } else { + return responseTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : responseTime_; + } + } + /** + *
+       * The time that the server responded to the RPC attempt. Used for
+       * calculating attempt_delay.
+       * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getResponseTimeFieldBuilder() { + if (responseTimeBuilder_ == null) { + responseTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getResponseTime(), + getParentForChildren(), + isClean()); + responseTime_ = null; + } + return responseTimeBuilder_; + } + + private com.google.protobuf.Duration attemptDelay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> attemptDelayBuilder_; + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + * @return Whether the attemptDelay field is set. + */ + public boolean hasAttemptDelay() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + * @return The attemptDelay. + */ + public com.google.protobuf.Duration getAttemptDelay() { + if (attemptDelayBuilder_ == null) { + return attemptDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : attemptDelay_; + } else { + return attemptDelayBuilder_.getMessage(); + } + } + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + public Builder setAttemptDelay(com.google.protobuf.Duration value) { + if (attemptDelayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attemptDelay_ = value; + } else { + attemptDelayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + public Builder setAttemptDelay( + com.google.protobuf.Duration.Builder builderForValue) { + if (attemptDelayBuilder_ == null) { + attemptDelay_ = builderForValue.build(); + } else { + attemptDelayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + public Builder mergeAttemptDelay(com.google.protobuf.Duration value) { + if (attemptDelayBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + attemptDelay_ != null && + attemptDelay_ != com.google.protobuf.Duration.getDefaultInstance()) { + getAttemptDelayBuilder().mergeFrom(value); + } else { + attemptDelay_ = value; + } + } else { + attemptDelayBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + public Builder clearAttemptDelay() { + bitField0_ = (bitField0_ & ~0x00000008); + attemptDelay_ = null; + if (attemptDelayBuilder_ != null) { + attemptDelayBuilder_.dispose(); + attemptDelayBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + public com.google.protobuf.Duration.Builder getAttemptDelayBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getAttemptDelayFieldBuilder().getBuilder(); + } + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + public com.google.protobuf.DurationOrBuilder getAttemptDelayOrBuilder() { + if (attemptDelayBuilder_ != null) { + return attemptDelayBuilder_.getMessageOrBuilder(); + } else { + return attemptDelay_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : attemptDelay_; + } + } + /** + *
+       * The server perceived delay between sending the last response and
+       * receiving this attempt. Used for validating attempt delay backoff.
+       * 
+ * + * .google.protobuf.Duration attempt_delay = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getAttemptDelayFieldBuilder() { + if (attemptDelayBuilder_ == null) { + attemptDelayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getAttemptDelay(), + getParentForChildren(), + isClean()); + attemptDelay_ = null; + } + return attemptDelayBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + */ + public Builder setStatus( + com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + status_ != null && + status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000010); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + *
+       * The status returned to the attempt.
+       * 
+ * + * .google.rpc.Status status = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + + private java.lang.Object contentSent_ = ""; + /** + * string content_sent = 6; + * @return The contentSent. + */ + public java.lang.String getContentSent() { + java.lang.Object ref = contentSent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentSent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string content_sent = 6; + * @return The bytes for contentSent. + */ + public com.google.protobuf.ByteString + getContentSentBytes() { + java.lang.Object ref = contentSent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentSent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string content_sent = 6; + * @param value The contentSent to set. + * @return This builder for chaining. + */ + public Builder setContentSent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + contentSent_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string content_sent = 6; + * @return This builder for chaining. + */ + public Builder clearContentSent() { + contentSent_ = getDefaultInstance().getContentSent(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string content_sent = 6; + * @param value The bytes for contentSent to set. + * @return This builder for chaining. + */ + public Builder setContentSentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + contentSent_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.showcase.v1beta1.StreamingSequenceReport.Attempt) + } + + // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.StreamingSequenceReport.Attempt) + private static final com.google.showcase.v1beta1.StreamingSequenceReport.Attempt DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.showcase.v1beta1.StreamingSequenceReport.Attempt(); + } + + public static com.google.showcase.v1beta1.StreamingSequenceReport.Attempt getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Attempt parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTEMPTS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List attempts_; + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + @java.lang.Override + public java.util.List getAttemptsList() { + return attempts_; + } + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + @java.lang.Override + public java.util.List + getAttemptsOrBuilderList() { + return attempts_; + } + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + @java.lang.Override + public int getAttemptsCount() { + return attempts_.size(); + } + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt getAttempts(int index) { + return attempts_.get(index); + } + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport.AttemptOrBuilder getAttemptsOrBuilder( + int index) { + return attempts_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < attempts_.size(); i++) { + output.writeMessage(2, attempts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < attempts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, attempts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.showcase.v1beta1.StreamingSequenceReport)) { + return super.equals(obj); + } + com.google.showcase.v1beta1.StreamingSequenceReport other = (com.google.showcase.v1beta1.StreamingSequenceReport) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getAttemptsList() + .equals(other.getAttemptsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getAttemptsCount() > 0) { + hash = (37 * hash) + ATTEMPTS_FIELD_NUMBER; + hash = (53 * hash) + getAttemptsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.showcase.v1beta1.StreamingSequenceReport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.showcase.v1beta1.StreamingSequenceReport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.showcase.v1beta1.StreamingSequenceReport} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.StreamingSequenceReport) + com.google.showcase.v1beta1.StreamingSequenceReportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.showcase.v1beta1.StreamingSequenceReport.class, com.google.showcase.v1beta1.StreamingSequenceReport.Builder.class); + } + + // Construct using com.google.showcase.v1beta1.StreamingSequenceReport.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (attemptsBuilder_ == null) { + attempts_ = java.util.Collections.emptyList(); + } else { + attempts_ = null; + attemptsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.showcase.v1beta1.SequenceOuterClass.internal_static_google_showcase_v1beta1_StreamingSequenceReport_descriptor; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport getDefaultInstanceForType() { + return com.google.showcase.v1beta1.StreamingSequenceReport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport build() { + com.google.showcase.v1beta1.StreamingSequenceReport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport buildPartial() { + com.google.showcase.v1beta1.StreamingSequenceReport result = new com.google.showcase.v1beta1.StreamingSequenceReport(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.showcase.v1beta1.StreamingSequenceReport result) { + if (attemptsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + attempts_ = java.util.Collections.unmodifiableList(attempts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.attempts_ = attempts_; + } else { + result.attempts_ = attemptsBuilder_.build(); + } + } + + private void buildPartial0(com.google.showcase.v1beta1.StreamingSequenceReport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.showcase.v1beta1.StreamingSequenceReport) { + return mergeFrom((com.google.showcase.v1beta1.StreamingSequenceReport)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.showcase.v1beta1.StreamingSequenceReport other) { + if (other == com.google.showcase.v1beta1.StreamingSequenceReport.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (attemptsBuilder_ == null) { + if (!other.attempts_.isEmpty()) { + if (attempts_.isEmpty()) { + attempts_ = other.attempts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAttemptsIsMutable(); + attempts_.addAll(other.attempts_); + } + onChanged(); + } + } else { + if (!other.attempts_.isEmpty()) { + if (attemptsBuilder_.isEmpty()) { + attemptsBuilder_.dispose(); + attemptsBuilder_ = null; + attempts_ = other.attempts_; + bitField0_ = (bitField0_ & ~0x00000002); + attemptsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAttemptsFieldBuilder() : null; + } else { + attemptsBuilder_.addAllMessages(other.attempts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt m = + input.readMessage( + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.parser(), + extensionRegistry); + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.add(m); + } else { + attemptsBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List attempts_ = + java.util.Collections.emptyList(); + private void ensureAttemptsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + attempts_ = new java.util.ArrayList(attempts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder, com.google.showcase.v1beta1.StreamingSequenceReport.AttemptOrBuilder> attemptsBuilder_; + + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public java.util.List getAttemptsList() { + if (attemptsBuilder_ == null) { + return java.util.Collections.unmodifiableList(attempts_); + } else { + return attemptsBuilder_.getMessageList(); + } + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public int getAttemptsCount() { + if (attemptsBuilder_ == null) { + return attempts_.size(); + } else { + return attemptsBuilder_.getCount(); + } + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt getAttempts(int index) { + if (attemptsBuilder_ == null) { + return attempts_.get(index); + } else { + return attemptsBuilder_.getMessage(index); + } + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder setAttempts( + int index, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt value) { + if (attemptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttemptsIsMutable(); + attempts_.set(index, value); + onChanged(); + } else { + attemptsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder setAttempts( + int index, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder builderForValue) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.set(index, builderForValue.build()); + onChanged(); + } else { + attemptsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder addAttempts(com.google.showcase.v1beta1.StreamingSequenceReport.Attempt value) { + if (attemptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttemptsIsMutable(); + attempts_.add(value); + onChanged(); + } else { + attemptsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder addAttempts( + int index, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt value) { + if (attemptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttemptsIsMutable(); + attempts_.add(index, value); + onChanged(); + } else { + attemptsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder addAttempts( + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder builderForValue) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.add(builderForValue.build()); + onChanged(); + } else { + attemptsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder addAttempts( + int index, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder builderForValue) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.add(index, builderForValue.build()); + onChanged(); + } else { + attemptsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder addAllAttempts( + java.lang.Iterable values) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, attempts_); + onChanged(); + } else { + attemptsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder clearAttempts() { + if (attemptsBuilder_ == null) { + attempts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + attemptsBuilder_.clear(); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public Builder removeAttempts(int index) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.remove(index); + onChanged(); + } else { + attemptsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder getAttemptsBuilder( + int index) { + return getAttemptsFieldBuilder().getBuilder(index); + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public com.google.showcase.v1beta1.StreamingSequenceReport.AttemptOrBuilder getAttemptsOrBuilder( + int index) { + if (attemptsBuilder_ == null) { + return attempts_.get(index); } else { + return attemptsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public java.util.List + getAttemptsOrBuilderList() { + if (attemptsBuilder_ != null) { + return attemptsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attempts_); + } + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder addAttemptsBuilder() { + return getAttemptsFieldBuilder().addBuilder( + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.getDefaultInstance()); + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder addAttemptsBuilder( + int index) { + return getAttemptsFieldBuilder().addBuilder( + index, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.getDefaultInstance()); + } + /** + *
+     * The set of RPC attempts received by the server for a Sequence.
+     * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + public java.util.List + getAttemptsBuilderList() { + return getAttemptsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder, com.google.showcase.v1beta1.StreamingSequenceReport.AttemptOrBuilder> + getAttemptsFieldBuilder() { + if (attemptsBuilder_ == null) { + attemptsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt, com.google.showcase.v1beta1.StreamingSequenceReport.Attempt.Builder, com.google.showcase.v1beta1.StreamingSequenceReport.AttemptOrBuilder>( + attempts_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + attempts_ = null; + } + return attemptsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.showcase.v1beta1.StreamingSequenceReport) + } + + // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.StreamingSequenceReport) + private static final com.google.showcase.v1beta1.StreamingSequenceReport DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.showcase.v1beta1.StreamingSequenceReport(); + } + + public static com.google.showcase.v1beta1.StreamingSequenceReport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingSequenceReport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.showcase.v1beta1.StreamingSequenceReport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java new file mode 100644 index 0000000000..106c07e1f9 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java @@ -0,0 +1,170 @@ +/* + * 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 StreamingSequenceReportName implements ResourceName { + private static final PathTemplate STREAMING_SEQUENCE = + PathTemplate.createWithoutUrlEncoding( + "streamingSequences/{streaming_sequence}/streamingSequenceReport"); + private volatile Map fieldValuesMap; + private final String streamingSequence; + + @Deprecated + protected StreamingSequenceReportName() { + streamingSequence = null; + } + + private StreamingSequenceReportName(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 StreamingSequenceReportName of(String streamingSequence) { + return newBuilder().setStreamingSequence(streamingSequence).build(); + } + + public static String format(String streamingSequence) { + return newBuilder().setStreamingSequence(streamingSequence).build().toString(); + } + + public static StreamingSequenceReportName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + STREAMING_SEQUENCE.validatedMatch( + formattedString, + "StreamingSequenceReportName.parse: formattedString not in valid format"); + return of(matchMap.get("streaming_sequence")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (StreamingSequenceReportName 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 getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder 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()) { + StreamingSequenceReportName that = ((StreamingSequenceReportName) 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}/streamingSequenceReport. */ + 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(StreamingSequenceReportName streamingSequenceReportName) { + this.streamingSequence = streamingSequenceReportName.streamingSequence; + } + + public StreamingSequenceReportName build() { + return new StreamingSequenceReportName(this); + } + } +} diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportOrBuilder.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportOrBuilder.java new file mode 100644 index 0000000000..810ec7b434 --- /dev/null +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: schema/google/showcase/v1beta1/sequence.proto + +package com.google.showcase.v1beta1; + +public interface StreamingSequenceReportOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.StreamingSequenceReport) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + java.util.List + getAttemptsList(); + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + com.google.showcase.v1beta1.StreamingSequenceReport.Attempt getAttempts(int index); + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + int getAttemptsCount(); + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + java.util.List + getAttemptsOrBuilderList(); + /** + *
+   * The set of RPC attempts received by the server for a Sequence.
+   * 
+ * + * repeated .google.showcase.v1beta1.StreamingSequenceReport.Attempt attempts = 2; + */ + com.google.showcase.v1beta1.StreamingSequenceReport.AttemptOrBuilder getAttemptsOrBuilder( + int index); +}