/** * * * <pre> * The name of the scan configuration in the form of * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_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.containeranalysis.v1beta1.GetScanConfigRequest buildPartial() { com.google.containeranalysis.v1beta1.GetScanConfigRequest result = new com.google.containeranalysis.v1beta1.GetScanConfigRequest(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; }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public com.google.containeranalysis.v1beta1.GetScanConfigRequest getDefaultInstanceForType() { return com.google.containeranalysis.v1beta1.GetScanConfigRequest.getDefaultInstance(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.containeranalysis.v1beta1.GetScanConfigRequest)) { return super.equals(obj); } com.google.containeranalysis.v1beta1.GetScanConfigRequest other = (com.google.containeranalysis.v1beta1.GetScanConfigRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
@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() { return DEFAULT_INSTANCE.toBuilder(); }
@java.lang.Override public com.google.containeranalysis.v1beta1.GetScanConfigRequest build() { com.google.containeranalysis.v1beta1.GetScanConfigRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } 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; }
io.grpc.protobuf.ProtoUtils.marshaller( com.google.containeranalysis.v1beta1.GetScanConfigRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@Test @SuppressWarnings("all") public void getScanConfigTest() { ScanConfigName name2 = ScanConfigName.of("[PROJECT]", "[SCAN_CONFIG]"); String description = "description-1724546052"; boolean enabled = false; ScanConfig expectedResponse = ScanConfig.newBuilder() .setName(name2.toString()) .setDescription(description) .setEnabled(enabled) .build(); mockContainerAnalysisV1Beta1.addResponse(expectedResponse); ScanConfigName name = ScanConfigName.of("[PROJECT]", "[SCAN_CONFIG]"); ScanConfig actualResponse = client.getScanConfig(name); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockContainerAnalysisV1Beta1.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetScanConfigRequest actualRequest = (GetScanConfigRequest) actualRequests.get(0); Assert.assertEquals(name, ScanConfigName.parse(actualRequest.getName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
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( com.google.containeranalysis.v1beta1.GetScanConfigRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@java.lang.Override public com.google.containeranalysis.v1beta1.GetScanConfigRequest build() { com.google.containeranalysis.v1beta1.GetScanConfigRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public Builder mergeFrom(com.google.containeranalysis.v1beta1.GetScanConfigRequest other) { if (other == com.google.containeranalysis.v1beta1.GetScanConfigRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * Gets the specified scan configuration. * * <p>Sample code: * * <pre><code> * try (ContainerAnalysisV1Beta1Client containerAnalysisV1Beta1Client = ContainerAnalysisV1Beta1Client.create()) { * ScanConfigName name = ScanConfigName.of("[PROJECT]", "[SCAN_CONFIG]"); * ScanConfig response = containerAnalysisV1Beta1Client.getScanConfig(name.toString()); * } * </code></pre> * * @param name The name of the scan configuration in the form of * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ScanConfig getScanConfig(String name) { GetScanConfigRequest request = GetScanConfigRequest.newBuilder().setName(name).build(); return getScanConfig(request); }
@java.lang.Override public com.google.containeranalysis.v1beta1.GetScanConfigRequest getDefaultInstanceForType() { return com.google.containeranalysis.v1beta1.GetScanConfigRequest.getDefaultInstance(); }