@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.spanner.admin.instance.v1.DeleteInstanceRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.spanner.admin.instance.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
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); }
/** * 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); * } * </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(InstanceName name) { DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteInstance(request); }
/** * * * <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 setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.spanner.admin.instance.v1.DeleteInstanceRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.spanner.admin.instance.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <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 setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
/** * * * <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; } /**
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder( com.google.spanner.admin.instance.v1.DeleteInstanceRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
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; }
@Override public void deleteInstance(String instanceName) throws SpannerException { DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(instanceName).build(); GrpcCallContext context = newCallContext(null, instanceName); get(instanceAdminStub.deleteInstanceCallable().futureCall(request, context)); }
@java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.admin.instance.v1.DeleteInstanceRequest) { return mergeFrom((com.google.spanner.admin.instance.v1.DeleteInstanceRequest) other); } else { super.mergeFrom(other); return this; } }
@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 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@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; }
/** * 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); * } * </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(InstanceName name) { DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteInstance(request); }
/** * 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); }