/** * * * <pre> * Required. The name of the instance to be deleted. Values are of the form * `projects/<project>/instances/<instance>` * </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.spanner.admin.instance.v1.DeleteInstanceRequest buildPartial() { com.google.spanner.admin.instance.v1.DeleteInstanceRequest result = new com.google.spanner.admin.instance.v1.DeleteInstanceRequest(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.spanner.admin.instance.v1.DeleteInstanceRequest getDefaultInstanceForType() { return com.google.spanner.admin.instance.v1.DeleteInstanceRequest.getDefaultInstance(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.spanner.admin.instance.v1.DeleteInstanceRequest)) { return super.equals(obj); } com.google.spanner.admin.instance.v1.DeleteInstanceRequest other = (com.google.spanner.admin.instance.v1.DeleteInstanceRequest) 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.spanner.admin.instance.v1.DeleteInstanceRequest build() { com.google.spanner.admin.instance.v1.DeleteInstanceRequest 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.spanner.admin.instance.v1.DeleteInstanceRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@Test @SuppressWarnings("all") public void deleteInstanceTest() { Empty expectedResponse = Empty.newBuilder().build(); mockInstanceAdmin.addResponse(expectedResponse); InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); client.deleteInstance(name); List<GeneratedMessageV3> actualRequests = mockInstanceAdmin.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteInstanceRequest actualRequest = (DeleteInstanceRequest) actualRequests.get(0); Assert.assertEquals(name, InstanceName.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.spanner.admin.instance.v1.DeleteInstanceRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@java.lang.Override public com.google.spanner.admin.instance.v1.DeleteInstanceRequest build() { com.google.spanner.admin.instance.v1.DeleteInstanceRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public Builder mergeFrom(com.google.spanner.admin.instance.v1.DeleteInstanceRequest other) { if (other == com.google.spanner.admin.instance.v1.DeleteInstanceRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * Deletes an instance. * * <p>Immediately upon completion of the request: * * <p>* Billing ceases for all of the instance's reserved resources. * * <p>Soon afterward: * * <p>* The instance and *all of its databases* immediately and irrevocably disappear * from the API. All data in the databases is permanently deleted. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); * instanceAdminClient.deleteInstance(name.toString()); * } * </code></pre> * * @param name Required. The name of the instance to be deleted. Values are of the form * `projects/<project>/instances/<instance>` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteInstance(String name) { DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); deleteInstance(request); }
@java.lang.Override public com.google.spanner.admin.instance.v1.DeleteInstanceRequest getDefaultInstanceForType() { return com.google.spanner.admin.instance.v1.DeleteInstanceRequest.getDefaultInstance(); }