com.amazonaws.services.private5g.AWSPrivate5GClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-private5g Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.private5g;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import javax.annotation.Generated;
import org.apache.commons.logging.*;
import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;
import com.amazonaws.services.private5g.AWSPrivate5GClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.private5g.model.*;
import com.amazonaws.services.private5g.model.transform.*;
/**
* Client for accessing AWS Private 5G. All service calls made using this client are blocking, and will not return until
* the service call completes.
*
*
* Amazon Web Services Private 5G is a managed service that makes it easy to deploy, operate, and scale your own private
* mobile network at your on-premises location. Private 5G provides the pre-configured hardware and software for mobile
* networks, helps automate setup, and scales capacity on demand to support additional devices as needed.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSPrivate5GClient extends AmazonWebServiceClient implements AWSPrivate5G {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSPrivate5G.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "private-networks";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.withContentTypeOverride("application/json")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.private5g.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.private5g.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.private5g.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller(
com.amazonaws.services.private5g.model.transform.ValidationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller(
com.amazonaws.services.private5g.model.transform.InternalServerExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("LimitExceededException").withExceptionUnmarshaller(
com.amazonaws.services.private5g.model.transform.LimitExceededExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.private5g.model.AWSPrivate5GException.class));
public static AWSPrivate5GClientBuilder builder() {
return AWSPrivate5GClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on AWS Private 5G using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSPrivate5GClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on AWS Private 5G using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSPrivate5GClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
super(clientParams);
this.awsCredentialsProvider = clientParams.getCredentialsProvider();
this.advancedConfig = clientParams.getAdvancedConfig();
init();
}
private void init() {
setServiceNameIntern(DEFAULT_SIGNING_NAME);
setEndpointPrefix(ENDPOINT_PREFIX);
// calling this.setEndPoint(...) will also modify the signer accordingly
setEndpoint("private-networks.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/private5g/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/private5g/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Acknowledges that the specified network order was received.
*
*
* @param acknowledgeOrderReceiptRequest
* @return Result of the AcknowledgeOrderReceipt operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.AcknowledgeOrderReceipt
* @see AWS API Documentation
*/
@Override
public AcknowledgeOrderReceiptResult acknowledgeOrderReceipt(AcknowledgeOrderReceiptRequest request) {
request = beforeClientExecution(request);
return executeAcknowledgeOrderReceipt(request);
}
@SdkInternalApi
final AcknowledgeOrderReceiptResult executeAcknowledgeOrderReceipt(AcknowledgeOrderReceiptRequest acknowledgeOrderReceiptRequest) {
ExecutionContext executionContext = createExecutionContext(acknowledgeOrderReceiptRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AcknowledgeOrderReceiptRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(acknowledgeOrderReceiptRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AcknowledgeOrderReceipt");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AcknowledgeOrderReceiptResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Activates the specified device identifier.
*
*
* @param activateDeviceIdentifierRequest
* @return Result of the ActivateDeviceIdentifier operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.ActivateDeviceIdentifier
* @see AWS API Documentation
*/
@Override
public ActivateDeviceIdentifierResult activateDeviceIdentifier(ActivateDeviceIdentifierRequest request) {
request = beforeClientExecution(request);
return executeActivateDeviceIdentifier(request);
}
@SdkInternalApi
final ActivateDeviceIdentifierResult executeActivateDeviceIdentifier(ActivateDeviceIdentifierRequest activateDeviceIdentifierRequest) {
ExecutionContext executionContext = createExecutionContext(activateDeviceIdentifierRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ActivateDeviceIdentifierRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(activateDeviceIdentifierRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ActivateDeviceIdentifier");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ActivateDeviceIdentifierResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Activates the specified network site.
*
*
* @param activateNetworkSiteRequest
* @return Result of the ActivateNetworkSite operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.ActivateNetworkSite
* @see AWS API Documentation
*/
@Override
public ActivateNetworkSiteResult activateNetworkSite(ActivateNetworkSiteRequest request) {
request = beforeClientExecution(request);
return executeActivateNetworkSite(request);
}
@SdkInternalApi
final ActivateNetworkSiteResult executeActivateNetworkSite(ActivateNetworkSiteRequest activateNetworkSiteRequest) {
ExecutionContext executionContext = createExecutionContext(activateNetworkSiteRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ActivateNetworkSiteRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(activateNetworkSiteRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ActivateNetworkSite");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ActivateNetworkSiteResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Configures the specified network resource.
*
*
* Use this action to specify the geographic position of the hardware. You must provide Certified Professional
* Installer (CPI) credentials in the request so that we can obtain spectrum grants. For more information, see Radio units in the
* Amazon Web Services Private 5G User Guide.
*
*
* @param configureAccessPointRequest
* @return Result of the ConfigureAccessPoint operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.ConfigureAccessPoint
* @see AWS API Documentation
*/
@Override
public ConfigureAccessPointResult configureAccessPoint(ConfigureAccessPointRequest request) {
request = beforeClientExecution(request);
return executeConfigureAccessPoint(request);
}
@SdkInternalApi
final ConfigureAccessPointResult executeConfigureAccessPoint(ConfigureAccessPointRequest configureAccessPointRequest) {
ExecutionContext executionContext = createExecutionContext(configureAccessPointRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ConfigureAccessPointRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(configureAccessPointRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ConfigureAccessPoint");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ConfigureAccessPointResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a network.
*
*
* @param createNetworkRequest
* @return Result of the CreateNetwork operation returned by the service.
* @throws LimitExceededException
* The limit was exceeded.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.CreateNetwork
* @see AWS
* API Documentation
*/
@Override
public CreateNetworkResult createNetwork(CreateNetworkRequest request) {
request = beforeClientExecution(request);
return executeCreateNetwork(request);
}
@SdkInternalApi
final CreateNetworkResult executeCreateNetwork(CreateNetworkRequest createNetworkRequest) {
ExecutionContext executionContext = createExecutionContext(createNetworkRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateNetworkRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createNetworkRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateNetwork");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateNetworkResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a network site.
*
*
* @param createNetworkSiteRequest
* @return Result of the CreateNetworkSite operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.CreateNetworkSite
* @see AWS API Documentation
*/
@Override
public CreateNetworkSiteResult createNetworkSite(CreateNetworkSiteRequest request) {
request = beforeClientExecution(request);
return executeCreateNetworkSite(request);
}
@SdkInternalApi
final CreateNetworkSiteResult executeCreateNetworkSite(CreateNetworkSiteRequest createNetworkSiteRequest) {
ExecutionContext executionContext = createExecutionContext(createNetworkSiteRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateNetworkSiteRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createNetworkSiteRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateNetworkSite");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateNetworkSiteResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deactivates the specified device identifier.
*
*
* @param deactivateDeviceIdentifierRequest
* @return Result of the DeactivateDeviceIdentifier operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.DeactivateDeviceIdentifier
* @see AWS API Documentation
*/
@Override
public DeactivateDeviceIdentifierResult deactivateDeviceIdentifier(DeactivateDeviceIdentifierRequest request) {
request = beforeClientExecution(request);
return executeDeactivateDeviceIdentifier(request);
}
@SdkInternalApi
final DeactivateDeviceIdentifierResult executeDeactivateDeviceIdentifier(DeactivateDeviceIdentifierRequest deactivateDeviceIdentifierRequest) {
ExecutionContext executionContext = createExecutionContext(deactivateDeviceIdentifierRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeactivateDeviceIdentifierRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deactivateDeviceIdentifierRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeactivateDeviceIdentifier");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeactivateDeviceIdentifierResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified network. You must delete network sites before you delete the network. For more information,
* see
* DeleteNetworkSite in the API Reference for Amazon Web Services Private 5G.
*
*
* @param deleteNetworkRequest
* @return Result of the DeleteNetwork operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws AccessDeniedException
* You do not have permission to perform this operation.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.DeleteNetwork
* @see AWS
* API Documentation
*/
@Override
public DeleteNetworkResult deleteNetwork(DeleteNetworkRequest request) {
request = beforeClientExecution(request);
return executeDeleteNetwork(request);
}
@SdkInternalApi
final DeleteNetworkResult executeDeleteNetwork(DeleteNetworkRequest deleteNetworkRequest) {
ExecutionContext executionContext = createExecutionContext(deleteNetworkRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteNetworkRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteNetworkRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteNetwork");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteNetworkResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified network site. Return the hardware after you delete the network site. You are responsible
* for minimum charges. For more information, see Hardware
* returns in the Amazon Web Services Private 5G User Guide.
*
*
* @param deleteNetworkSiteRequest
* @return Result of the DeleteNetworkSite operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws AccessDeniedException
* You do not have permission to perform this operation.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.DeleteNetworkSite
* @see AWS API Documentation
*/
@Override
public DeleteNetworkSiteResult deleteNetworkSite(DeleteNetworkSiteRequest request) {
request = beforeClientExecution(request);
return executeDeleteNetworkSite(request);
}
@SdkInternalApi
final DeleteNetworkSiteResult executeDeleteNetworkSite(DeleteNetworkSiteRequest deleteNetworkSiteRequest) {
ExecutionContext executionContext = createExecutionContext(deleteNetworkSiteRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteNetworkSiteRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteNetworkSiteRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteNetworkSite");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteNetworkSiteResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the specified device identifier.
*
*
* @param getDeviceIdentifierRequest
* @return Result of the GetDeviceIdentifier operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.GetDeviceIdentifier
* @see AWS API Documentation
*/
@Override
public GetDeviceIdentifierResult getDeviceIdentifier(GetDeviceIdentifierRequest request) {
request = beforeClientExecution(request);
return executeGetDeviceIdentifier(request);
}
@SdkInternalApi
final GetDeviceIdentifierResult executeGetDeviceIdentifier(GetDeviceIdentifierRequest getDeviceIdentifierRequest) {
ExecutionContext executionContext = createExecutionContext(getDeviceIdentifierRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetDeviceIdentifierRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDeviceIdentifierRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDeviceIdentifier");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDeviceIdentifierResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the specified network.
*
*
* @param getNetworkRequest
* @return Result of the GetNetwork operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.GetNetwork
* @see AWS API
* Documentation
*/
@Override
public GetNetworkResult getNetwork(GetNetworkRequest request) {
request = beforeClientExecution(request);
return executeGetNetwork(request);
}
@SdkInternalApi
final GetNetworkResult executeGetNetwork(GetNetworkRequest getNetworkRequest) {
ExecutionContext executionContext = createExecutionContext(getNetworkRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetNetworkRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getNetworkRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetNetwork");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetNetworkResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the specified network resource.
*
*
* @param getNetworkResourceRequest
* @return Result of the GetNetworkResource operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.GetNetworkResource
* @see AWS API Documentation
*/
@Override
public GetNetworkResourceResult getNetworkResource(GetNetworkResourceRequest request) {
request = beforeClientExecution(request);
return executeGetNetworkResource(request);
}
@SdkInternalApi
final GetNetworkResourceResult executeGetNetworkResource(GetNetworkResourceRequest getNetworkResourceRequest) {
ExecutionContext executionContext = createExecutionContext(getNetworkResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetNetworkResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getNetworkResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetNetworkResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetNetworkResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the specified network site.
*
*
* @param getNetworkSiteRequest
* @return Result of the GetNetworkSite operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.GetNetworkSite
* @see AWS
* API Documentation
*/
@Override
public GetNetworkSiteResult getNetworkSite(GetNetworkSiteRequest request) {
request = beforeClientExecution(request);
return executeGetNetworkSite(request);
}
@SdkInternalApi
final GetNetworkSiteResult executeGetNetworkSite(GetNetworkSiteRequest getNetworkSiteRequest) {
ExecutionContext executionContext = createExecutionContext(getNetworkSiteRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetNetworkSiteRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getNetworkSiteRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetNetworkSite");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetNetworkSiteResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the specified order.
*
*
* @param getOrderRequest
* @return Result of the GetOrder operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.GetOrder
* @see AWS API
* Documentation
*/
@Override
public GetOrderResult getOrder(GetOrderRequest request) {
request = beforeClientExecution(request);
return executeGetOrder(request);
}
@SdkInternalApi
final GetOrderResult executeGetOrder(GetOrderRequest getOrderRequest) {
ExecutionContext executionContext = createExecutionContext(getOrderRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetOrderRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getOrderRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetOrder");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetOrderResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists device identifiers. Add filters to your request to return a more specific list of results. Use filters to
* match the Amazon Resource Name (ARN) of an order, the status of device identifiers, or the ARN of the traffic
* group.
*
*
* If you specify multiple filters, filters are joined with an OR, and the request returns results that match all of
* the specified filters.
*
*
* @param listDeviceIdentifiersRequest
* @return Result of the ListDeviceIdentifiers operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.ListDeviceIdentifiers
* @see AWS API Documentation
*/
@Override
public ListDeviceIdentifiersResult listDeviceIdentifiers(ListDeviceIdentifiersRequest request) {
request = beforeClientExecution(request);
return executeListDeviceIdentifiers(request);
}
@SdkInternalApi
final ListDeviceIdentifiersResult executeListDeviceIdentifiers(ListDeviceIdentifiersRequest listDeviceIdentifiersRequest) {
ExecutionContext executionContext = createExecutionContext(listDeviceIdentifiersRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListDeviceIdentifiersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDeviceIdentifiersRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDeviceIdentifiers");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListDeviceIdentifiersResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists network resources. Add filters to your request to return a more specific list of results. Use filters to
* match the Amazon Resource Name (ARN) of an order or the status of network resources.
*
*
* If you specify multiple filters, filters are joined with an OR, and the request returns results that match all of
* the specified filters.
*
*
* @param listNetworkResourcesRequest
* @return Result of the ListNetworkResources operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.ListNetworkResources
* @see AWS API Documentation
*/
@Override
public ListNetworkResourcesResult listNetworkResources(ListNetworkResourcesRequest request) {
request = beforeClientExecution(request);
return executeListNetworkResources(request);
}
@SdkInternalApi
final ListNetworkResourcesResult executeListNetworkResources(ListNetworkResourcesRequest listNetworkResourcesRequest) {
ExecutionContext executionContext = createExecutionContext(listNetworkResourcesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListNetworkResourcesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listNetworkResourcesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListNetworkResources");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListNetworkResourcesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists network sites. Add filters to your request to return a more specific list of results. Use filters to match
* the status of the network site.
*
*
* @param listNetworkSitesRequest
* @return Result of the ListNetworkSites operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.ListNetworkSites
* @see AWS API Documentation
*/
@Override
public ListNetworkSitesResult listNetworkSites(ListNetworkSitesRequest request) {
request = beforeClientExecution(request);
return executeListNetworkSites(request);
}
@SdkInternalApi
final ListNetworkSitesResult executeListNetworkSites(ListNetworkSitesRequest listNetworkSitesRequest) {
ExecutionContext executionContext = createExecutionContext(listNetworkSitesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListNetworkSitesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listNetworkSitesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListNetworkSites");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListNetworkSitesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists networks. Add filters to your request to return a more specific list of results. Use filters to match the
* status of the network.
*
*
* @param listNetworksRequest
* @return Result of the ListNetworks operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.ListNetworks
* @see AWS
* API Documentation
*/
@Override
public ListNetworksResult listNetworks(ListNetworksRequest request) {
request = beforeClientExecution(request);
return executeListNetworks(request);
}
@SdkInternalApi
final ListNetworksResult executeListNetworks(ListNetworksRequest listNetworksRequest) {
ExecutionContext executionContext = createExecutionContext(listNetworksRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListNetworksRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listNetworksRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListNetworks");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListNetworksResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists orders. Add filters to your request to return a more specific list of results. Use filters to match the
* Amazon Resource Name (ARN) of the network site or the status of the order.
*
*
* If you specify multiple filters, filters are joined with an OR, and the request returns results that match all of
* the specified filters.
*
*
* @param listOrdersRequest
* @return Result of the ListOrders operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.ListOrders
* @see AWS API
* Documentation
*/
@Override
public ListOrdersResult listOrders(ListOrdersRequest request) {
request = beforeClientExecution(request);
return executeListOrders(request);
}
@SdkInternalApi
final ListOrdersResult executeListOrders(ListOrdersRequest listOrdersRequest) {
ExecutionContext executionContext = createExecutionContext(listOrdersRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListOrdersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listOrdersRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListOrders");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListOrdersResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the tags for the specified resource.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws AccessDeniedException
* You do not have permission to perform this operation.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AWSPrivate5G.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) {
request = beforeClientExecution(request);
return executeListTagsForResource(request);
}
@SdkInternalApi
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {
ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Checks the health of the service.
*
*
* @param pingRequest
* @return Result of the Ping operation returned by the service.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.Ping
* @see AWS API
* Documentation
*/
@Override
public PingResult ping(PingRequest request) {
request = beforeClientExecution(request);
return executePing(request);
}
@SdkInternalApi
final PingResult executePing(PingRequest pingRequest) {
ExecutionContext executionContext = createExecutionContext(pingRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(pingRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "Ping");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new PingResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Use this action to do the following tasks:
*
*
* -
*
* Update the duration and renewal status of the commitment period for a radio unit. The update goes into effect
* immediately.
*
*
* -
*
* Request a replacement for a network resource.
*
*
* -
*
* Request that you return a network resource.
*
*
*
*
* After you submit a request to replace or return a network resource, the status of the network resource changes to
* CREATING_SHIPPING_LABEL
. The shipping label is available when the status of the network resource is
* PENDING_RETURN
. After the network resource is successfully returned, its status changes to
* DELETED
. For more information, see Return a
* radio unit.
*
*
* @param startNetworkResourceUpdateRequest
* @return Result of the StartNetworkResourceUpdate operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.StartNetworkResourceUpdate
* @see AWS API Documentation
*/
@Override
public StartNetworkResourceUpdateResult startNetworkResourceUpdate(StartNetworkResourceUpdateRequest request) {
request = beforeClientExecution(request);
return executeStartNetworkResourceUpdate(request);
}
@SdkInternalApi
final StartNetworkResourceUpdateResult executeStartNetworkResourceUpdate(StartNetworkResourceUpdateRequest startNetworkResourceUpdateRequest) {
ExecutionContext executionContext = createExecutionContext(startNetworkResourceUpdateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartNetworkResourceUpdateRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(startNetworkResourceUpdateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartNetworkResourceUpdate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new StartNetworkResourceUpdateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds tags to the specified resource.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws AccessDeniedException
* You do not have permission to perform this operation.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AWSPrivate5G.TagResource
* @see AWS
* API Documentation
*/
@Override
public TagResourceResult tagResource(TagResourceRequest request) {
request = beforeClientExecution(request);
return executeTagResource(request);
}
@SdkInternalApi
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {
ExecutionContext executionContext = createExecutionContext(tagResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes tags from the specified resource.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws AccessDeniedException
* You do not have permission to perform this operation.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AWSPrivate5G.UntagResource
* @see AWS
* API Documentation
*/
@Override
public UntagResourceResult untagResource(UntagResourceRequest request) {
request = beforeClientExecution(request);
return executeUntagResource(request);
}
@SdkInternalApi
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {
ExecutionContext executionContext = createExecutionContext(untagResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the specified network site.
*
*
* @param updateNetworkSiteRequest
* @return Result of the UpdateNetworkSite operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.UpdateNetworkSite
* @see AWS API Documentation
*/
@Override
public UpdateNetworkSiteResult updateNetworkSite(UpdateNetworkSiteRequest request) {
request = beforeClientExecution(request);
return executeUpdateNetworkSite(request);
}
@SdkInternalApi
final UpdateNetworkSiteResult executeUpdateNetworkSite(UpdateNetworkSiteRequest updateNetworkSiteRequest) {
ExecutionContext executionContext = createExecutionContext(updateNetworkSiteRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateNetworkSiteRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateNetworkSiteRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateNetworkSite");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateNetworkSiteResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the specified network site plan.
*
*
* @param updateNetworkSitePlanRequest
* @return Result of the UpdateNetworkSitePlan operation returned by the service.
* @throws ResourceNotFoundException
* The resource was not found.
* @throws ValidationException
* The request failed validation.
* @throws InternalServerException
* Information about an internal error.
* @sample AWSPrivate5G.UpdateNetworkSitePlan
* @see AWS API Documentation
*/
@Override
public UpdateNetworkSitePlanResult updateNetworkSitePlan(UpdateNetworkSitePlanRequest request) {
request = beforeClientExecution(request);
return executeUpdateNetworkSitePlan(request);
}
@SdkInternalApi
final UpdateNetworkSitePlanResult executeUpdateNetworkSitePlan(UpdateNetworkSitePlanRequest updateNetworkSitePlanRequest) {
ExecutionContext executionContext = createExecutionContext(updateNetworkSitePlanRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateNetworkSitePlanRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateNetworkSitePlanRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "PrivateNetworks");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateNetworkSitePlan");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateNetworkSitePlanResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Returns additional metadata for a previously executed successful, request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
*
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext) {
return invoke(request, responseHandler, executionContext, null, null);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) {
executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider));
return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait);
}
/**
* Invoke with no authentication. Credentials are not required and any credentials set on the client or request will
* be ignored for this operation.
**/
private Response anonymousInvoke(Request request,
HttpResponseHandler> responseHandler, ExecutionContext executionContext) {
return doInvoke(request, responseHandler, executionContext, null, null);
}
/**
* Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the
* ExecutionContext beforehand.
**/
private Response doInvoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {
if (discoveredEndpoint != null) {
request.setEndpoint(discoveredEndpoint);
request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery");
} else if (uriFromEndpointTrait != null) {
request.setEndpoint(uriFromEndpointTrait);
} else {
request.setEndpoint(endpoint);
}
request.setTimeOffset(timeOffset);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());
return client.execute(request, responseHandler, errorResponseHandler, executionContext);
}
@com.amazonaws.annotation.SdkInternalApi
static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() {
return protocolFactory;
}
@Override
public void shutdown() {
super.shutdown();
}
}