Get the usage for a subscription.

@param location The identifier for the physical azure location.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the UsageListResultInner object
550445
public Observable<UsageListResultInner> listAsync(String location) {
        return listWithServiceResponseAsync(location).map(new Func1<ServiceResponse<UsageListResultInner>, UsageListResultInner>() {
            @Override
            public UsageListResultInner call(ServiceResponse<UsageListResultInner> response) {
                return response.body();
            }
        });
    }
1292137
@SuppressWarnings("unchecked")
    @Override
    public <T> T get(EntityGetOperation<T> getter) throws ServiceException {
        getter.setProxyData(createProxyData());
        Object rawResponse = getResource(getter).get(getter.getResponseClass());
        Object processedResponse = getter.processResponse(rawResponse);
        return (T) processedResponse;
    }
935706
public Observable<DeploymentLocationsInner> getSubscriptionDeploymentLocationsAsync() {
        return getSubscriptionDeploymentLocationsWithServiceResponseAsync().map(new Func1<ServiceResponse<DeploymentLocationsInner>, DeploymentLocationsInner>() {
            @Override
            public DeploymentLocationsInner call(ServiceResponse<DeploymentLocationsInner> response) {
                return response.body();
            }
        });
    }
1167606
public com.google.api.ads.adwords.axis.v201809.cm.Location getLocation() {
        return location;
    }
250301
public Observable<OperationResultInner> getAsync(String locationName, String operationName) {
        return getWithServiceResponseAsync(locationName, operationName).map(new Func1<ServiceResponse<OperationResultInner>, OperationResultInner>() {
            @Override
            public OperationResultInner call(ServiceResponse<OperationResultInner> response) {
                return response.body();
            }
        });
    }
1126308
public ApiResponse<GetAnyLocationsResponse> getAnyLocationsWithHttpInfo(String region) throws ApiException {
        com.squareup.okhttp.Call call = getAnyLocationsValidateBeforeCall(region, null, null);
        Type localVarReturnType = new TypeToken<GetAnyLocationsResponse>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
662817
public static URI getBaseUriForLocation(URI location) {
        // Any request to the public ELBs must be made over https
        boolean useHttps = location.getHost().toLowerCase().endsWith("nexus.bazaarvoice.com");

        return UriBuilder.fromUri(location)
                .scheme(useHttps ? "https" : "http")
                .replacePath(DataStoreClient.SERVICE_PATH)
                .replaceQuery(null)
                .build();
    }
467965
public static OutputSupplier<? extends OutputStream> newOutputSupplier(final Location location) {
    return new OutputSupplier<OutputStream>() {
      @Override
      public OutputStream getOutput() throws IOException {
        return location.getOutputStream();
      }
    };
  }
339427
public static AbstractResource getResourceFrom(final String location) throws IOException {
        val metadataLocationResource = getRawResourceFrom(location);
        if (!metadataLocationResource.exists() || !metadataLocationResource.isReadable()) {
            throw new FileNotFoundException("Resource " + location + " does not exist or is unreadable");
        }
        return metadataLocationResource;
    }
249636
public Observable<Page<UsageInner>> listAsync() {
        return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<UsageInner>>, Page<UsageInner>>() {
            @Override
            public Page<UsageInner> call(ServiceResponse<List<UsageInner>> response) {
                PageImpl<UsageInner> page = new PageImpl<>();
                page.setItems(response.body());
                return page;
            }
        });
    }
1155753
public Observable<ServiceResponse<ApplicationInfoResponse>> getWithServiceResponseAsync(UUID appId) {
        if (this.client.endpoint() == null) {
            throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
        }
        if (appId == null) {
            throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
        }
        String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
        return service.get(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationInfoResponse>>>() {
                @Override
                public Observable<ServiceResponse<ApplicationInfoResponse>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<ApplicationInfoResponse> clientResponse = getDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
1191414
@Override
    public Node visitUse(SqlBaseParser.UseContext context)
    {
        return new Use(
                getLocation(context),
                visitIfPresent(context.catalog, Identifier.class),
                (Identifier) visit(context.schema));
    }
889428
public Observable<ServiceResponse<List<Iteration>>> getIterationsWithServiceResponseAsync(UUID projectId) {
        if (projectId == null) {
            throw new IllegalArgumentException("Parameter projectId is required and cannot be null.");
        }
        if (this.client.apiKey() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiKey() is required and cannot be null.");
        }
        return service.getIterations(projectId, this.client.apiKey(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<Iteration>>>>() {
                @Override
                public Observable<ServiceResponse<List<Iteration>>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<List<Iteration>> clientResponse = getIterationsDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
1122236
public Observable<ServiceResponse<List<AzureSkuInner>>> listSkusWithServiceResponseAsync() {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.listSkus(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<AzureSkuInner>>>>() {
                @Override
                public Observable<ServiceResponse<List<AzureSkuInner>>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<PageImpl<AzureSkuInner>> result = listSkusDelegate(response);
                        List<AzureSkuInner> items = null;
                        if (result.body() != null) {
                            items = result.body().items();
                        }
                        ServiceResponse<List<AzureSkuInner>> clientResponse = new ServiceResponse<List<AzureSkuInner>>(items, result.response());
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
840253
public Observable<ServiceResponse<ApplicationGatewayAvailableWafRuleSetsResultInner>> listAvailableWafRuleSetsWithServiceResponseAsync() {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        final String apiVersion = "2018-06-01";
        return service.listAvailableWafRuleSets(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationGatewayAvailableWafRuleSetsResultInner>>>() {
                @Override
                public Observable<ServiceResponse<ApplicationGatewayAvailableWafRuleSetsResultInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<ApplicationGatewayAvailableWafRuleSetsResultInner> clientResponse = listAvailableWafRuleSetsDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
1115858
@Override
  public void doLocationInformationAnswer(ClientCxDxSession appSession, JLocationInfoRequest request, JLocationInfoAnswer answer)
      throws InternalException, IllegalDiameterStateException, RouteException, OverloadException {
    logger.info("Diameter Cx/Dx Session Factory :: doLocationInformationAnswer :: appSession[{}], Request[{}], Answer[{}]",
        new Object[]{appSession, request, answer});
  }
1043164
public static <T> GenericResponseBuilder<T> created(T entity, URI location) {
    return genericResponseBuilderFactory.create(Response.Status.CREATED.getStatusCode(), entity)
        .location(location);
  }