Class ServiceProfileClientImpl
java.lang.Object
com.eqixiac.equinix.core.client.ClientBase
com.eqixiac.equinix.core.client.ResourceClientBase<ServiceProfile, ServiceProfileJson>
com.eqixiac.equinix.fabric.client.internal.implementation.ServiceProfileClientImpl
- All Implemented Interfaces:
Pageable<ServiceProfile>, PageablePost<ServiceProfile>, ServiceProfileClient<ServiceProfile>
public class ServiceProfileClientImpl
extends ResourceClientBase<ServiceProfile, ServiceProfileJson>
implements ServiceProfileClient<ServiceProfile>
Internal client for Fabric Service Profiles. Standard request/response plumbing and paging are
provided by
ResourceClientBase; this class supplies only the JSON class, the wrapper
factory, and the per-operation endpoint names.- Author:
- ianjones
-
Nested Class Summary
Nested classes/interfaces inherited from class ClientBase
ClientBase.EquinixRequestBuilderModifier and TypeClassDescriptionprotected classFluent builder for constructingEquinixRequestinstances. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(ServiceProfileCreatorJson serviceProfileCreatorJson) createAction(String uuid, String type, String description) createEnvironmentAction(String uuid, String environmentId, EnvironmentActionRequest request) POST {uuid}/environments/{environmentId}/actions.getEnvironments(String uuid) First page ofGET {uuid}/environments.list()put(String uuid, ServiceProfileCreatorJson serviceProfileCreatorJson) PUT /fabric/v4/serviceProfiles/{uuid}.put(String uuid, ServiceProfileCreatorJson serviceProfileCreatorJson, String ifMatch) PUT /fabric/v4/serviceProfiles/{uuid}with a caller-suppliedIf-Matchvalue (an ETag from an earlier read).search(FilterPropertyList filter, SortPropertyList sort) update(String uuid, List<PatchOperation> operations) protected ServiceProfilewrap(ServiceProfileJson json) Wraps a JSON model into its public model type, binding this client so the returned object can refresh/delete/page itself.Methods inherited from class ResourceClientBase
createOne, deleteOne, deleteOne, deleteOneByUuid, dryRunCreate, dryRunCreate, dryRunPatch, dryRunUpdate, getOne, getOne, getOneByUuid, listPage, listPage, listPage, listPagePath, nextPage, nextPage, patchOne, patchOne, postOne, postOne, postOne, searchPage, searchPage, searchPageQueryPaginated, searchPageQueryPaginated, updateOne, updateOne, updateOneByUuidModifier and TypeMethodDescriptionprotected ServiceProfileJsoncreate(body)via the derivedCreate<Singular>endpoint name.protected ServiceProfileJsonprotected ServiceProfileJsonprotected ServiceProfileJsondeleteOneByUuid(String uuid) delete(uuid)via the derivedDelete<Singular>endpoint name.protected ServiceProfileJsondryRunCreate(String serviceEndpoint, Object body) protected ServiceProfileJsondryRunCreate(String serviceEndpoint, Object body, com.fasterxml.jackson.databind.ser.FilterProvider filters) protected ServiceProfileJsondryRunPatch(String serviceEndpoint, String uuid, List<PatchOperation> operations) Dry-run variant ofResourceClientBase.patchOne(String, String, List): sends the identical RFC 6902 JSON Patch request (sameapplication/json-patch+jsoncontent type) plus thedryRun=truequery parameter - per the spec, an "option to verify that API calls will succeed".protected ServiceProfileJsondryRunUpdate(String serviceEndpoint, String uuid, Object body) Dry-run variant ofResourceClientBase.updateOne(String, String, Object): sends the identical update request (same defaultapplication/jsoncontent type) plus thedryRun=truequery parameter - per the spec, an "option to verify that API calls will succeed".protected ServiceProfileJsonprotected ServiceProfileJsonprotected ServiceProfileJsongetOneByUuid(String uuid) get(uuid)via the derivedGet<Singular>endpoint name.protected Page<ServiceProfileJson> listPage()list()via the derivedList<Plural>endpoint name.protected Page<ServiceProfileJson> protected Page<ServiceProfileJson> protected Page<ServiceProfileJson> listPagePath(String serviceEndpoint, Map<String, String> pathParams) nextPage(PaginatedPostRequest<ServiceProfile> equinixRequest) Fetches the next page for the given POST-search request (its body's pagination has already been advanced by the paging pipeline).nextPage(PaginatedRequest<ServiceProfile> equinixRequest) protected ServiceProfileJsonpatchOne(String serviceEndpoint, String uuid, List<PatchOperation> operations) PATCH a resource by uuid with an RFC 6902 JSON Patch operations array, sent with content-typeapplication/json-patch+json.protected ServiceProfileJsonprotected ServiceProfileJsonprotected ServiceProfileJsonpostOne(String serviceEndpoint, Object body, com.fasterxml.jackson.databind.ser.FilterProvider filters) protected ServiceProfileJsonprotected Page<ServiceProfileJson> searchPage(Object filterSortBody) search(body)via the derivedSearch<Plural>endpoint name.protected Page<ServiceProfileJson> searchPage(String serviceEndpoint, Object filterSortBody) protected Page<ServiceProfileJson> searchPageQueryPaginated(String serviceEndpoint, Object filterBody) POST search whose pagination travels asoffset/limitquery parameters (per the endpoint's spec) rather than inside the body - e.g. assets v1 and the EIA services/prices searches.protected Page<ServiceProfileJson> searchPageQueryPaginated(String serviceEndpoint, Map<String, List<String>> queryParams, Object filterBody) Variant ofResourceClientBase.searchPageQueryPaginated(String, Object)carrying additional query parameters (e.g.protected ServiceProfileJsonprotected ServiceProfileJsonprotected ServiceProfileJsonupdateOneByUuid(String uuid, Object body) update(uuid, body)via the derivedUpdate<Singular>endpoint name.Methods inherited from class ClientBase
booleanOp, buildRequest, buildRequest, buildRequestWithPathParams, buildRequestWithQueryParams, bytesOp, createReturningLocationUuid, getAs, getAs, getConfigClient, invoke, listAs, mapOp, newRequest, postAs, postForType, postForType, postForType, postListAs, stringOp, voidOpModifier and TypeMethodDescriptionprotected booleanbooleanOp(String serviceEndpoint, RequestType requestType, Map<String, String> pathParams, Map<String, List<String>> queryParams, Object body) protected <T> EquinixRequest<T> buildRequest(String serviceEndpoint, RequestType requestType, Class<?> jsonClass) protected <T> EquinixRequest<T> buildRequest(String serviceEndpoint, RequestType requestType, Map<String, String> pathParams, Map<String, List<String>> queryParams, Class<?> jsonClass) protected <T> EquinixRequest<T> buildRequestWithPathParams(String serviceEndpoint, RequestType requestType, Map<String, String> pathParams, Class<?> jsonClass) protected <T> EquinixRequest<T> buildRequestWithQueryParams(String serviceEndpoint, RequestType requestType, Map<String, List<String>> queryParams, Class<?> jsonClass) protected byte[]bytesOp(String serviceEndpoint, Map<String, String> pathParams, Map<String, List<String>> queryParams) protected StringcreateReturningLocationUuid(String serviceEndpoint, Map<String, String> pathParams, Map<String, List<String>> queryParams, Object body) POST a body, then return the created resource's uuid parsed from the responseLocationheader (for endpoints that return201 Location: .../{uuid}rather than a body).protected <R> Rprotected <R> RgetAs(String serviceEndpoint, Map<String, String> pathParams, Map<String, List<String>> queryParams, Class<R> responseType) protected Configprotected <T> EquinixResponse<T> invoke(EquinixRequest<T> equinixRequest) protected <R> List<R> listAs(String serviceEndpoint, Map<String, String> pathParams, Map<String, List<String>> queryParams, Class<R> elementType) mapOp(String serviceEndpoint, RequestType requestType, Map<String, String> pathParams, Map<String, List<String>> queryParams, Object body) protected ClientBase.EquinixRequestBuildernewRequest(String serviceEndpoint) Creates a fluent request builder for the given service endpoint.protected <R> Rprotected <R> RpostForType(String serviceEndpoint, Object body, com.fasterxml.jackson.core.type.TypeReference<?> typeReference) protected <R> RpostForType(String serviceEndpoint, Map<String, String> pathParams, Object body, com.fasterxml.jackson.core.type.TypeReference<?> typeReference) protected <R> RpostForType(String serviceEndpoint, Map<String, String> pathParams, Map<String, List<String>> queryParams, Object body, com.fasterxml.jackson.core.type.TypeReference<?> typeReference) protected <R> List<R> postListAs(String serviceEndpoint, Object body, Class<R> elementType) protected StringstringOp(String serviceEndpoint, RequestType requestType, Map<String, String> pathParams, Map<String, List<String>> queryParams, Object body) protected voidvoidOp(String serviceEndpoint, RequestType requestType, Map<String, String> pathParams, Map<String, List<String>> queryParams, Object body) Execute a request for its side effect only - the response body is validated (throws on API error) and discarded.
-
Constructor Details
-
ServiceProfileClientImpl
-
-
Method Details
-
wrap
Description copied from class:ResourceClientBaseWraps a JSON model into its public model type, binding this client so the returned object can refresh/delete/page itself.- Specified by:
wrapin classResourceClientBase<ServiceProfile, ServiceProfileJson>- Parameters:
json- the deserialized JSON model- Returns:
- the public model wrapper
-
list
- Specified by:
listin interfaceServiceProfileClient<ServiceProfile>
-
search
- Specified by:
searchin interfaceServiceProfileClient<ServiceProfile>
-
getByUuid
- Specified by:
getByUuidin interfaceServiceProfileClient<ServiceProfile>
-
create
- Specified by:
createin interfaceServiceProfileClient<ServiceProfile>
-
update
- Specified by:
updatein interfaceServiceProfileClient<ServiceProfile>
-
put
PUT /fabric/v4/serviceProfiles/{uuid}. The spec marks theIf-Matchheaderrequired; the value is theETagthe service returns onGET /serviceProfiles/{uuid}. This overload reads the current ETag first, so the replace is conditional on the profile not having changed between the read and the write.- Specified by:
putin interfaceServiceProfileClient<ServiceProfile>
-
put
public ServiceProfileJson put(String uuid, ServiceProfileCreatorJson serviceProfileCreatorJson, String ifMatch) PUT /fabric/v4/serviceProfiles/{uuid}with a caller-suppliedIf-Matchvalue (an ETag from an earlier read). Anullvalue sends no header. -
delete
- Specified by:
deletein interfaceServiceProfileClient<ServiceProfile>
-
createAction
- Specified by:
createActionin interfaceServiceProfileClient<ServiceProfile>
-
getMetros
- Specified by:
getMetrosin interfaceServiceProfileClient<ServiceProfile>
-
getEnvironments
Description copied from interface:ServiceProfileClientFirst page ofGET {uuid}/environments. The page's associated request carries an identity page-item mapper so later pages can be fetched through this client's inheritednextPage(...). Beta catalog operation.- Specified by:
getEnvironmentsin interfaceServiceProfileClient<ServiceProfile>
-
createEnvironmentAction
public EnvironmentActionResponse createEnvironmentAction(String uuid, String environmentId, EnvironmentActionRequest request) Description copied from interface:ServiceProfileClientPOST {uuid}/environments/{environmentId}/actions. Beta catalog operation.- Specified by:
createEnvironmentActionin interfaceServiceProfileClient<ServiceProfile>
-
refresh
- Specified by:
refreshin interfaceServiceProfileClient<ServiceProfile>
-