
com.azure.resourcemanager.billing.implementation.AddressImpl Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.billing.implementation;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.billing.fluent.AddressClient;
import com.azure.resourcemanager.billing.fluent.models.AddressValidationResponseInner;
import com.azure.resourcemanager.billing.models.Address;
import com.azure.resourcemanager.billing.models.AddressDetails;
import com.azure.resourcemanager.billing.models.AddressValidationResponse;
public final class AddressImpl implements Address {
private static final ClientLogger LOGGER = new ClientLogger(AddressImpl.class);
private final AddressClient innerClient;
private final com.azure.resourcemanager.billing.BillingManager serviceManager;
public AddressImpl(AddressClient innerClient, com.azure.resourcemanager.billing.BillingManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response validateWithResponse(AddressDetails parameters, Context context) {
Response inner = this.serviceClient().validateWithResponse(parameters, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new AddressValidationResponseImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public AddressValidationResponse validate(AddressDetails parameters) {
AddressValidationResponseInner inner = this.serviceClient().validate(parameters);
if (inner != null) {
return new AddressValidationResponseImpl(inner, this.manager());
} else {
return null;
}
}
private AddressClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.billing.BillingManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy