/** * * * <pre> * Required. The resource name of an existing exclusion to delete: * "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.DeleteExclusionRequest buildPartial() { com.google.logging.v2.DeleteExclusionRequest result = new com.google.logging.v2.DeleteExclusionRequest(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.DeleteExclusionRequest getDefaultInstanceForType() { return com.google.logging.v2.DeleteExclusionRequest.getDefaultInstance(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.logging.v2.DeleteExclusionRequest)) { return super.equals(obj); } com.google.logging.v2.DeleteExclusionRequest other = (com.google.logging.v2.DeleteExclusionRequest) 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.DeleteExclusionRequest build() { com.google.logging.v2.DeleteExclusionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.logging.v2.DeleteExclusionRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@Test @SuppressWarnings("all") public void deleteExclusionTest() { Empty expectedResponse = Empty.newBuilder().build(); mockConfigServiceV2.addResponse(expectedResponse); ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); client.deleteExclusion(name); List<GeneratedMessageV3> actualRequests = mockConfigServiceV2.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteExclusionRequest actualRequest = (DeleteExclusionRequest) 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.DeleteExclusionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
public Builder mergeFrom(com.google.logging.v2.DeleteExclusionRequest other) { if (other == com.google.logging.v2.DeleteExclusionRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * Deletes an exclusion. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); * configClient.deleteExclusion(name); * } * </code></pre> * * @param name Required. The resource name of an existing exclusion to delete: * <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 void deleteExclusion(ExclusionName name) { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteExclusion(request); }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.logging.v2.DeleteExclusionRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
/** * Deletes an exclusion. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); * configClient.deleteExclusion(name.toString()); * } * </code></pre> * * @param name Required. The resource name of an existing exclusion to delete: * <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 void deleteExclusion(String name) { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name).build(); deleteExclusion(request); }
/** * Deletes an exclusion. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); * configClient.deleteExclusion(name); * } * </code></pre> * * @param name Required. The resource name of an existing exclusion to delete: * <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 void deleteExclusion(ExclusionName name) { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteExclusion(request); }
/** * Deletes an exclusion. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ExclusionName name = ProjectExclusionName.of("[PROJECT]", "[EXCLUSION]"); * configClient.deleteExclusion(name.toString()); * } * </code></pre> * * @param name Required. The resource name of an existing exclusion to delete: * <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 void deleteExclusion(String name) { DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(name).build(); deleteExclusion(request); }