Search in sources :

Example 1 with SetInstanceLabelsRequest

use of com.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest in project java-notebooks by googleapis.

the class ITNotebookServiceClientTest method testSetInstanceLabels.

@Test
public void testSetInstanceLabels() throws ExecutionException, InterruptedException {
    SetInstanceLabelsRequest setInstanceLabelsRequest = SetInstanceLabelsRequest.newBuilder().setName(INSTANCE_NAME).putLabels("a", "100").build();
    Instance response = client.setInstanceLabelsAsync(setInstanceLabelsRequest).get();
    assertEquals(response.getLabelsMap().get("a"), "100");
}
Also used : Instance(com.google.cloud.notebooks.v1beta1.Instance) SetInstanceLabelsRequest(com.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest) Test(org.junit.Test)

Aggregations

Instance (com.google.cloud.notebooks.v1beta1.Instance)1 SetInstanceLabelsRequest (com.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest)1 Test (org.junit.Test)1