@Test @SuppressWarnings("all") public void getParentalStatusViewTest() { com.google.ads.googleads.v5.services.ParentalStatusViewName resourceName2 = com.google.ads.googleads.v5.services.ParentalStatusViewName.of( "[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"); ParentalStatusView expectedResponse = ParentalStatusView.newBuilder().setResourceName(resourceName2.toString()).build(); mockParentalStatusViewService.addResponse(expectedResponse); ParentalStatusViewName resourceName = ParentalStatusViewName.of("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"); ParentalStatusView actualResponse = client.getParentalStatusView(resourceName); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockParentalStatusViewService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetParentalStatusViewRequest actualRequest = (GetParentalStatusViewRequest) actualRequests.get(0); Assert.assertEquals( resourceName, ParentalStatusViewName.parse(actualRequest.getResourceName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
public final ParentalStatusView getParentalStatusView(ParentalStatusViewName resourceName) { GetParentalStatusViewRequest request = GetParentalStatusViewRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getParentalStatusView(request); }
ParentalStatusViewServiceClient implements BackgroundResource { public final ParentalStatusView getParentalStatusView(ParentalStatusViewName resourceName) { GetParentalStatusViewRequest request = GetParentalStatusViewRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getParentalStatusView(request); } }
ParentalStatusViewServiceClient implements BackgroundResource { public final ParentalStatusView getParentalStatusView(ParentalStatusViewName resourceName) { GetParentalStatusViewRequest request = GetParentalStatusViewRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getParentalStatusView(request); } protected  ParentalStatusViewServiceClient(ParentalStatusViewServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  ParentalStatusViewServiceClient(ParentalStatusViewServiceStub stub); }
ParentalStatusViewServiceClient implements BackgroundResource { public final ParentalStatusView getParentalStatusView(ParentalStatusViewName resourceName) { GetParentalStatusViewRequest request = GetParentalStatusViewRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getParentalStatusView(request); } protected  ParentalStatusViewServiceClient(ParentalStatusViewServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  ParentalStatusViewServiceClient(ParentalStatusViewServiceStub stub); static final ParentalStatusViewServiceClient create(); static final ParentalStatusViewServiceClient create(
      ParentalStatusViewServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final ParentalStatusViewServiceClient create(ParentalStatusViewServiceStub stub); final ParentalStatusViewServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") ParentalStatusViewServiceStub getStub(); final ParentalStatusView getParentalStatusView(ParentalStatusViewName resourceName); final ParentalStatusView getParentalStatusView(String resourceName); final ParentalStatusView getParentalStatusView(GetParentalStatusViewRequest request); final UnaryCallable<GetParentalStatusViewRequest, ParentalStatusView> getParentalStatusViewCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
ParentalStatusViewServiceClient implements BackgroundResource { public final ParentalStatusView getParentalStatusView(ParentalStatusViewName resourceName) { GetParentalStatusViewRequest request = GetParentalStatusViewRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getParentalStatusView(request); } protected  ParentalStatusViewServiceClient(ParentalStatusViewServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  ParentalStatusViewServiceClient(ParentalStatusViewServiceStub stub); static final ParentalStatusViewServiceClient create(); static final ParentalStatusViewServiceClient create(
      ParentalStatusViewServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final ParentalStatusViewServiceClient create(ParentalStatusViewServiceStub stub); final ParentalStatusViewServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") ParentalStatusViewServiceStub getStub(); final ParentalStatusView getParentalStatusView(ParentalStatusViewName resourceName); final ParentalStatusView getParentalStatusView(String resourceName); final ParentalStatusView getParentalStatusView(GetParentalStatusViewRequest request); final UnaryCallable<GetParentalStatusViewRequest, ParentalStatusView> getParentalStatusViewCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }