/** * * * <pre> * Required. The resource name of an existing exclusion: * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.logging.v2.GetExclusionRequest buildPartial() { com.google.logging.v2.GetExclusionRequest result = new com.google.logging.v2.GetExclusionRequest(this); result.name_ = name_; onBuilt(); return result; }
@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) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public com.google.logging.v2.GetExclusionRequest getDefaultInstanceForType() { return com.google.logging.v2.GetExclusionRequest.getDefaultInstance(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.logging.v2.GetExclusionRequest)) { return super.equals(obj); } com.google.logging.v2.GetExclusionRequest other = (com.google.logging.v2.GetExclusionRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
@java.lang.Override public com.google.logging.v2.GetExclusionRequest build() { com.google.logging.v2.GetExclusionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.logging.v2.GetExclusionRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@Test @SuppressWarnings("all") public void getExclusionTest() { String name2 = "name2-1052831874"; String description = "description-1724546052"; String filter = "filter-1274492040"; boolean disabled = true; LogExclusion expectedResponse = LogExclusion.newBuilder() .setName(name2) .setDescription(description) .setFilter(filter) .setDisabled(disabled) .build(); mockConfigServiceV2.addResponse(expectedResponse); ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); LogExclusion actualResponse = client.getExclusion(name); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockConfigServiceV2.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetExclusionRequest actualRequest = (GetExclusionRequest) actualRequests.get(0); Assert.assertEquals(name, ExclusionNames.parse(actualRequest.getName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); }
public static Builder newBuilder(com.google.logging.v2.GetExclusionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
public Builder mergeFrom(com.google.logging.v2.GetExclusionRequest other) { if (other == com.google.logging.v2.GetExclusionRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * Gets the description of an exclusion. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); * LogExclusion response = configClient.getExclusion(name); * } * </code></pre> * * @param name Required. The resource name of an existing exclusion: * <p>"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * <p>Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(ExclusionName name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getExclusion(request); }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.logging.v2.GetExclusionRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
/** * Gets the description of an exclusion. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); * LogExclusion response = configClient.getExclusion(name.toString()); * } * </code></pre> * * @param name Required. The resource name of an existing exclusion: * <p>"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * <p>Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(String name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name).build(); return getExclusion(request); }
/** * Gets the description of an exclusion. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); * LogExclusion response = configClient.getExclusion(name); * } * </code></pre> * * @param name Required. The resource name of an existing exclusion: * <p>"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * <p>Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(ExclusionName name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getExclusion(request); }
/** * Gets the description of an exclusion. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); * LogExclusion response = configClient.getExclusion(name.toString()); * } * </code></pre> * * @param name Required. The resource name of an existing exclusion: * <p>"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * <p>Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion getExclusion(String name) { GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(name).build(); return getExclusion(request); }