8000 Regenerate logging client by yoshi-automation · Pull Request #6410 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
*
*
* <pre>
* Service for configuring sinks used to export log entries out of
* Logging.
* Service for configuring sinks used to route log entries.
* </pre>
*/
@javax.annotation.Generated(
Expand Down Expand Up @@ -551,8 +550,7 @@ public static ConfigServiceV2FutureStub newFutureStub(io.grpc.Channel channel) {
*
*
* <pre>
* Service for configuring sinks used to export log entries out of
* Logging.
* Service for configuring sinks used to route log entries.
* </pre>
*/
public abstract static class ConfigServiceV2ImplBase implements io.grpc.BindableService {
Expand Down Expand Up @@ -587,9 +585,9 @@ public void getSink(
*
*
* <pre>
* Creates a sink that exports specified log entries to a destination. The
* Creates a sink that exports specified log entries to a destination. The
* export of newly-ingested log entries begins immediately, unless the sink's
* `writer_identity` is not permitted to write to the destination. A sink can
* `writer_identity` is not permitted to write to the destination. A sink can
* export log entries only from the resource owning the sink.
* </pre>
*/
Expand All @@ -603,7 +601,7 @@ public void createSink(
*
*
* <pre>
* Updates a sink. This method replaces the following fields in the existing
* Updates a sink. This method replaces the following fields in the existing
* sink with values from the new sink: `destination`, and `filter`.
* The updated sink might also have a new `writer_identity`; see the
* `unique_writer_identity` field.
Expand Down Expand Up @@ -769,8 +767,7 @@ public final io.grpc.ServerServiceDefinition bindService() {
*
*
* <pre>
* Service for configuring sinks used to export log entries out of
* Logging.
* Service for configuring sinks used to route log entries.
* </pre>
*/
public static final class ConfigServiceV2Stub
Expand Down Expand Up @@ -824,9 +821,9 @@ public void getSink(
*
*
* <pre>
* Creates a sink that exports specified log entries to a destination. The
* Creates a sink that exports specified log entries to a destination. The
* export of newly-ingested log entries begins immediately, unless the sink's
* `writer_identity` is not permitted to write to the destination. A sink can
* `writer_identity` is not permitted to write to the destination. A sink can
* export log entries only from the resource owning the sink.
* </pre>
*/
Expand All @@ -843,7 +840,7 @@ public void createSink(
*
*
* <pre>
* Updates a sink. This method replaces the following fields in the existing
* Updates a sink. This method replaces the following fields in the existing
* sink with values from the new sink: `destination`, and `filter`.
* The updated sink might also have a new `writer_identity`; see the
* `unique_writer_identity` field.
Expand Down Expand Up @@ -963,8 +960,7 @@ public void deleteExclusion(
*
*
* <pre>
* Service for configuring sinks used to export log entries out of
* Logging.
* Service for configuring sinks used to route log entries.
* </pre>
*/
public static final class ConfigServiceV2BlockingStub
Expand Down Expand Up @@ -1010,9 +1006,9 @@ public com.google.logging.v2.LogSink getSink(com.google.logging.v2.GetSinkReques
*
*
* <pre>
* Creates a sink that exports specified log entries to a destination. The
* Creates a sink that exports specified log entries to a destination. The
* export of newly-ingested log entries begins immediately, unless the sink's
* `writer_identity` is not permitted to write to the destination. A sink can
* `writer_identity` is not permitted to write to the destination. A sink can
* export log entries only from the resource owning the sink.
* </pre>
*/
Expand All @@ -1026,7 +1022,7 @@ public com.google.logging.v2.LogSink createSink(
*
*
* <pre>
* Updates a sink. This method replaces the following fields in the existing
* Updates a sink. This method replaces the following fields in the existing
* sink with values from the new sink: `destination`, and `filter`.
* The updated sink might also have a new `writer_identity`; see the
* `unique_writer_identity` field.
Expand Down Expand Up @@ -1123,8 +1119,7 @@ public com.google.protobuf.Empty deleteExclusion(
*
*
* <pre>
* Service for configuring sinks used to export log entries out of
* Logging.
* Service for configuring sinks used to route log entries.
* </pre>
*/
public static final class ConfigServiceV2FutureStub
Expand Down Expand Up @@ -1174,9 +1169,9 @@ protected ConfigServiceV2FutureStub build(
*
*
* <pre>
* Creates a sink that exports specified log entries to a destination. The
* Creates a sink that exports specified log entries to a destination. The
* export of newly-ingested log entries begins immediately, unless the sink's
* `writer_identity` is not permitted to write to the destination. A sink can
* `writer_identity` is not permitted to write to the destination. A sink can
* export log entries only from the resource owning the sink.
* </pre>
*/
Expand All @@ -1190,7 +1185,7 @@ protected ConfigServiceV2FutureStub build(
*
*
* <pre>
* Updates a sink. This method replaces the following fields in the existing
* Updates a sink. This method replaces the following fields in the existing
* sink with values from the new sink: `destination`, and `filter`.
* The updated sink might also have a new `writer_identity`; see the
* `unique_writer_identity` field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ public void writeLogEntries(
*
*
* <pre>
* Lists log entries. Use this method to retrieve log entries from
* Logging. For ways to export log entries, see
* [Exporting Logs](/logging/docs/export).
* Lists log entries. Use this method to retrieve log entries that originated
* from a project/folder/organization/billing account. For ways to export log
* entries, see [Exporting Logs](/logging/docs/export).
* </pre>
*/
public void listLogEntries(
Expand Down Expand Up @@ -514,9 +514,9 @@ public void writeLogEntries(
*
*
* <pre>
* Lists log entries. Use this method to retrieve log entries from
* Logging. For ways to export log entries, see
* [Exporting Logs](/logging/docs/export).
* Lists log entries. Use this method to retrieve log entries that originated
* from a project/folder/organization/billing account. For ways to export log
* entries, see [Exporting Logs](/logging/docs/export).
* </pre>
*/
public void listLogEntries(
Expand Down Expand Up @@ -624,9 +624,9 @@ public com.google.logging.v2.WriteLogEntriesResponse writeLogEntries(
*
*
* <pre>
* Lists log entries. Use this method to retrieve log entries from
* Logging. For ways to export log entries, see
* [Exporting Logs](/logging/docs/export).
* Lists log entries. Use this method to retrieve log entries that originated
* from a project/folder/organization/billing account. For ways to export log
* entries, see [Exporting Logs](/logging/docs/export).
* </pre>
*/
public com.google.logging.v2.ListLogEntriesResponse listLogEntries(
Expand Down Expand Up @@ -729,9 +729,9 @@ public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Em
*
*
* <pre>
* Lists log entries. Use this method to retrieve log entries from
* Logging. For ways to export log entries, see
* [Exporting Logs](/logging/docs/export).
* Lists log entries. Use this method to retrieve log entries that originated
* from a project/folder/organization/billing account. For ways to export log
* entries, see [Exporting Logs](/logging/docs/export).
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<
Expand Down
3D9E
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
/*
* Copyright 2018 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
*
* http://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.logging.type;

import com.google.api.pathtemplate.PathTemplate;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

// AUTO-GENERATED DOCUMENTATION AND CLASS
@javax.annotation.Generated("by GAPIC protoc plugin")
public class BillingExclusionName extends ExclusionName {

private static final PathTemplate PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding(
"billingAccounts/{billing_account}/exclusions/{exclusion}");

private volatile Map<String, String> fieldValuesMap;

private final String billingAccount;
private final String exclusion;

public String getBillingAccount() {
return billingAccount;
}

public String getExclusion() {
return exclusion;
}

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

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

private BillingExclusionName(Builder builder) {
billingAccount = Preconditions.checkNotNull(builder.getBillingAccount());
exclusion = Preconditions.checkNotNull(builder.getExclusion());
}

public static BillingExclusionName of(String billingAccount, String exclusion) {
return newBuilder().setBillingAccount(billingAccount).setExclusion(exclusion).build();
}

public static String format(String billingAccount, String exclusion) {
return newBuilder()
.setBillingAccount(billingAccount)
.setExclusion(exclusion)
.build()
.toString();
}

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

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

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

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

public Map<String, String> getFieldValuesMap() {
if (fieldValuesMap == null) {
synchronized (this) {
if (fieldValuesMap == null) {
ImmutableMap.Builder<String, String> fieldMapBuilder = ImmutableMap.builder();
fieldMapBuilder.put("billingAccount", billingAccount);
fieldMapBuilder.put("exclusion", exclusion);
fieldValuesMap = fieldMapBuilder.build();
}
}
}
return fieldValuesMap;
}

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

@Override
public String toString() {
return PATH_TEMPLATE.instantiate("billing_account", billingAccount, "exclusion", exclusion);
}

/** Builder for BillingExclusionName. */
public static class Builder {

private String billingAccount;
private String exclusion;

public String getBillingAccount() {
return billingAccount;
}

public String getExclusion() {
return exclusion;
}

public Builder setBillingAccount(String billingAccount) {
this.billingAccount = billingAccount;
return this;
}

public Builder setExclusion(String exclusion) {
this.exclusion = exclusion;
return this;
}

private Builder() {}

< 8AAC /span>
private Builder(BillingExclusionName billingExclusionName) {
billingAccount = billingExclusionName.billingAccount;
exclusion = billingExclusionName.exclusion;
}

public BillingExclusionName build() {
return new BillingExclusionName(this);
}
}

@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof BillingExclusionName) {
BillingExclusionName that = (BillingExclusionName) o;
return (this.billingAccount.equals(that.billingAccount))
&& (this.exclusion.equals(that.exclusion));
}
return false;
}

@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= billingAccount.hashCode();
h *= 1000003;
h ^= exclusion.hashCode();
return h;
}
}
Loading
0