@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.GetInstanceRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.spanner.admin.instance.v1.GetInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
public Builder mergeFrom(com.google.spanner.admin.instance.v1.GetInstanceRequest other) { if (other == com.google.spanner.admin.instance.v1.GetInstanceRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * Gets information about a particular instance. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); * Instance response = instanceAdminClient.getInstance(name); * } * </code></pre> * * @param name Required. The name of the requested instance. Values are of the form * `projects/<project>/instances/<instance>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(InstanceName name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getInstance(request); }
/** * Gets information about a particular instance. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); * Instance response = instanceAdminClient.getInstance(name.toString()); * } * </code></pre> * * @param name Required. The name of the requested instance. Values are of the form * `projects/<project>/instances/<instance>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(String name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); return getInstance(request); }
@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.GetInstanceRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.spanner.admin.instance.v1.GetInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * Required. The name of the requested instance. 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 requested instance. 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; }
/** * * * <pre> * Required. The name of the requested instance. 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.GetInstanceRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@Override public Instance getInstance(String instanceName) throws SpannerException { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(instanceName).build(); GrpcCallContext context = newCallContext(null, instanceName); return get(instanceAdminStub.getInstanceCallable().futureCall(request, context)); }
@java.lang.Override public com.google.spanner.admin.instance.v1.GetInstanceRequest build() { com.google.spanner.admin.instance.v1.GetInstanceRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public com.google.spanner.admin.instance.v1.GetInstanceRequest buildPartial() { com.google.spanner.admin.instance.v1.GetInstanceRequest result = new com.google.spanner.admin.instance.v1.GetInstanceRequest(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; } /**
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
@java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.admin.instance.v1.GetInstanceRequest) { return mergeFrom((com.google.spanner.admin.instance.v1.GetInstanceRequest) other); } else { super.mergeFrom(other); return this; } }
public Builder mergeFrom(com.google.spanner.admin.instance.v1.GetInstanceRequest other) { if (other == com.google.spanner.admin.instance.v1.GetInstanceRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * Gets information about a particular instance. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); * Instance response = instanceAdminClient.getInstance(name.toString()); * } * </code></pre> * * @param name Required. The name of the requested instance. Values are of the form * `projects/<project>/instances/<instance>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(String name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); return getInstance(request); }
/** * Gets information about a particular instance. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); * Instance response = instanceAdminClient.getInstance(name); * } * </code></pre> * * @param name Required. The name of the requested instance. Values are of the form * `projects/<project>/instances/<instance>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(InstanceName name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getInstance(request); }