Skip to content
Permalink
Browse files
fix: migrate oslogin/v1 to grpc_service_config (#177)
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/c330ec71-3b2b-4ad2-9d49-78b97f45869d/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 315988875
Source-Link: googleapis/googleapis@91b7e0e
  • Loading branch information
yoshi-automation committed Jun 12, 2020
1 parent ee5bb12 commit 3ae5f85dd7e1f3f03c88d4077ae11fe7055aa5b4
@@ -340,6 +340,190 @@ public final UnaryCallable<DeleteSshPublicKeyRequest, Empty> deleteSshPublicKeyC
return stub.deleteSshPublicKeyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the profile information used for logging in to a virtual machine on Google Compute
* Engine.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* UserName name = UserName.of("[USER]");
* LoginProfile response = osLoginServiceClient.getLoginProfile(name);
* }
* </code></pre>
*
* @param name Required. The unique ID for the user in format `users/{user}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final LoginProfile getLoginProfile(UserName name) {
GetLoginProfileRequest request =
GetLoginProfileRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getLoginProfile(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the profile information used for logging in to a virtual machine on Google Compute
* Engine.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* UserName name = UserName.of("[USER]");
* LoginProfile response = osLoginServiceClient.getLoginProfile(name.toString());
* }
* </code></pre>
*
* @param name Required. The unique ID for the user in format `users/{user}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final LoginProfile getLoginProfile(String name) {
GetLoginProfileRequest request = GetLoginProfileRequest.newBuilder().setName(name).build();
return getLoginProfile(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the profile information used for logging in to a virtual machine on Google Compute
* Engine.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* UserName name = UserName.of("[USER]");
* GetLoginProfileRequest request = GetLoginProfileRequest.newBuilder()
* .setName(name.toString())
* .build();
* LoginProfile response = osLoginServiceClient.getLoginProfile(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final LoginProfile getLoginProfile(GetLoginProfileRequest request) {
return getLoginProfileCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the profile information used for logging in to a virtual machine on Google Compute
* Engine.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* UserName name = UserName.of("[USER]");
* GetLoginProfileRequest request = GetLoginProfileRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;LoginProfile&gt; future = osLoginServiceClient.getLoginProfileCallable().futureCall(request);
* // Do something
* LoginProfile response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<GetLoginProfileRequest, LoginProfile> getLoginProfileCallable() {
return stub.getLoginProfileCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves an SSH public key.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* FingerprintName name = FingerprintName.of("[USER]", "[FINGERPRINT]");
* SshPublicKey response = osLoginServiceClient.getSshPublicKey(name);
* }
* </code></pre>
*
* @param name Required. The fingerprint of the public key to retrieve. Public keys are identified
* by their SHA-256 fingerprint. The fingerprint of the public key is in format
* `users/{user}/sshPublicKeys/{fingerprint}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final SshPublicKey getSshPublicKey(FingerprintName name) {
GetSshPublicKeyRequest request =
GetSshPublicKeyRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getSshPublicKey(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves an SSH public key.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* FingerprintName name = FingerprintName.of("[USER]", "[FINGERPRINT]");
* SshPublicKey response = osLoginServiceClient.getSshPublicKey(name.toString());
* }
* </code></pre>
*
* @param name Required. The fingerprint of the public key to retrieve. Public keys are identified
* by their SHA-256 fingerprint. The fingerprint of the public key is in format
* `users/{user}/sshPublicKeys/{fingerprint}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final SshPublicKey getSshPublicKey(String name) {
GetSshPublicKeyRequest request = GetSshPublicKeyRequest.newBuilder().setName(name).build();
return getSshPublicKey(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves an SSH public key.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* FingerprintName name = FingerprintName.of("[USER]", "[FINGERPRINT]");
* GetSshPublicKeyRequest request = GetSshPublicKeyRequest.newBuilder()
* .setName(name.toString())
* .build();
* SshPublicKey response = osLoginServiceClient.getSshPublicKey(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final SshPublicKey getSshPublicKey(GetSshPublicKeyRequest request) {
return getSshPublicKeyCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves an SSH public key.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* FingerprintName name = FingerprintName.of("[USER]", "[FINGERPRINT]");
* GetSshPublicKeyRequest request = GetSshPublicKeyRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;SshPublicKey&gt; future = osLoginServiceClient.getSshPublicKeyCallable().futureCall(request);
* // Do something
* SshPublicKey response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<GetSshPublicKeyRequest, SshPublicKey> getSshPublicKeyCallable() {
return stub.getSshPublicKeyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Adds an SSH public key and returns the profile information. Default POSIX account information
@@ -686,190 +870,6 @@ public final UnaryCallable<UpdateSshPublicKeyRequest, SshPublicKey> updateSshPub
return stub.updateSshPublicKeyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the profile information used for logging in to a virtual machine on Google Compute
* Engine.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* UserName name = UserName.of("[USER]");
* LoginProfile response = osLoginServiceClient.getLoginProfile(name);
* }
* </code></pre>
*
* @param name Required. The unique ID for the user in format `users/{user}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final LoginProfile getLoginProfile(UserName name) {
GetLoginProfileRequest request =
GetLoginProfileRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getLoginProfile(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the profile information used for logging in to a virtual machine on Google Compute
* Engine.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* UserName name = UserName.of("[USER]");
* LoginProfile response = osLoginServiceClient.getLoginProfile(name.toString());
* }
* </code></pre>
*
* @param name Required. The unique ID for the user in format `users/{user}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final LoginProfile getLoginProfile(String name) {
GetLoginProfileRequest request = GetLoginProfileRequest.newBuilder().setName(name).build();
return getLoginProfile(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the profile information used for logging in to a virtual machine on Google Compute
* Engine.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* UserName name = UserName.of("[USER]");
* GetLoginProfileRequest request = GetLoginProfileRequest.newBuilder()
* .setName(name.toString())
* .build();
* LoginProfile response = osLoginServiceClient.getLoginProfile(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final LoginProfile getLoginProfile(GetLoginProfileRequest request) {
return getLoginProfileCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the profile information used for logging in to a virtual machine on Google Compute
* Engine.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* UserName name = UserName.of("[USER]");
* GetLoginProfileRequest request = GetLoginProfileRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;LoginProfile&gt; future = osLoginServiceClient.getLoginProfileCallable().futureCall(request);
* // Do something
* LoginProfile response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<GetLoginProfileRequest, LoginProfile> getLoginProfileCallable() {
return stub.getLoginProfileCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves an SSH public key.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* FingerprintName name = FingerprintName.of("[USER]", "[FINGERPRINT]");
* SshPublicKey response = osLoginServiceClient.getSshPublicKey(name);
* }
* </code></pre>
*
* @param name Required. The fingerprint of the public key to retrieve. Public keys are identified
* by their SHA-256 fingerprint. The fingerprint of the public key is in format
* `users/{user}/sshPublicKeys/{fingerprint}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final SshPublicKey getSshPublicKey(FingerprintName name) {
GetSshPublicKeyRequest request =
GetSshPublicKeyRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getSshPublicKey(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves an SSH public key.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* FingerprintName name = FingerprintName.of("[USER]", "[FINGERPRINT]");
* SshPublicKey response = osLoginServiceClient.getSshPublicKey(name.toString());
* }
* </code></pre>
*
* @param name Required. The fingerprint of the public key to retrieve. Public keys are identified
* by their SHA-256 fingerprint. The fingerprint of the public key is in format
* `users/{user}/sshPublicKeys/{fingerprint}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final SshPublicKey getSshPublicKey(String name) {
GetSshPublicKeyRequest request = GetSshPublicKeyRequest.newBuilder().setName(name).build();
return getSshPublicKey(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves an SSH public key.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* FingerprintName name = FingerprintName.of("[USER]", "[FINGERPRINT]");
* GetSshPublicKeyRequest request = GetSshPublicKeyRequest.newBuilder()
* .setName(name.toString())
* .build();
* SshPublicKey response = osLoginServiceClient.getSshPublicKey(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final SshPublicKey getSshPublicKey(GetSshPublicKeyRequest request) {
return getSshPublicKeyCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves an SSH public key.
*
* <p>Sample code:
*
* <pre><code>
* try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
* FingerprintName name = FingerprintName.of("[USER]", "[FINGERPRINT]");
* GetSshPublicKeyRequest request = GetSshPublicKeyRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;SshPublicKey&gt; future = osLoginServiceClient.getSshPublicKeyCallable().futureCall(request);
* // Do something
* SshPublicKey response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<GetSshPublicKeyRequest, SshPublicKey> getSshPublicKeyCallable() {
return stub.getSshPublicKeyCallable();
}

@Override
public final void close() {
stub.close();

0 comments on commit 3ae5f85

Please sign in to comment.