@Test @SuppressWarnings("all") public void getDomainCategoryExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockDomainCategoryService.addException(exception); try { DomainCategoryName resourceName = DomainCategoryName.of("[CUSTOMER]", "[DOMAIN_CATEGORY]"); client.getDomainCategory(resourceName); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final DomainCategory getDomainCategory(DomainCategoryName resourceName) { GetDomainCategoryRequest request = GetDomainCategoryRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getDomainCategory(request); }
DomainCategoryServiceClient implements BackgroundResource { public final DomainCategory getDomainCategory(DomainCategoryName resourceName) { GetDomainCategoryRequest request = GetDomainCategoryRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getDomainCategory(request); } }
DomainCategoryServiceClient implements BackgroundResource { public final DomainCategory getDomainCategory(DomainCategoryName resourceName) { GetDomainCategoryRequest request = GetDomainCategoryRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getDomainCategory(request); } protected  DomainCategoryServiceClient(DomainCategoryServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  DomainCategoryServiceClient(DomainCategoryServiceStub stub); }
DomainCategoryServiceClient implements BackgroundResource { public final DomainCategory getDomainCategory(DomainCategoryName resourceName) { GetDomainCategoryRequest request = GetDomainCategoryRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getDomainCategory(request); } protected  DomainCategoryServiceClient(DomainCategoryServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  DomainCategoryServiceClient(DomainCategoryServiceStub stub); static final DomainCategoryServiceClient create(); static final DomainCategoryServiceClient create(DomainCategoryServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final DomainCategoryServiceClient create(DomainCategoryServiceStub stub); final DomainCategoryServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") DomainCategoryServiceStub getStub(); final DomainCategory getDomainCategory(DomainCategoryName resourceName); final DomainCategory getDomainCategory(String resourceName); final DomainCategory getDomainCategory(GetDomainCategoryRequest request); final UnaryCallable<GetDomainCategoryRequest, DomainCategory> getDomainCategoryCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
DomainCategoryServiceClient implements BackgroundResource { public final DomainCategory getDomainCategory(DomainCategoryName resourceName) { GetDomainCategoryRequest request = GetDomainCategoryRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getDomainCategory(request); } protected  DomainCategoryServiceClient(DomainCategoryServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  DomainCategoryServiceClient(DomainCategoryServiceStub stub); static final DomainCategoryServiceClient create(); static final DomainCategoryServiceClient create(DomainCategoryServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final DomainCategoryServiceClient create(DomainCategoryServiceStub stub); final DomainCategoryServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") DomainCategoryServiceStub getStub(); final DomainCategory getDomainCategory(DomainCategoryName resourceName); final DomainCategory getDomainCategory(String resourceName); final DomainCategory getDomainCategory(GetDomainCategoryRequest request); final UnaryCallable<GetDomainCategoryRequest, DomainCategory> getDomainCategoryCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }