Class PowerEventClientImpl
java.lang.Object
com.eqixiac.equinix.core.client.ClientBase
com.eqixiac.equinix.core.client.ResourceClientBase<PowerEvent, PowerEventJson>
com.eqixiac.equinix.ibxsmartview.client.internal.implementation.PowerEventClientImpl
- All Implemented Interfaces:
Pageable<PowerEvent>, PageablePost<PowerEvent>, PowerEventClient<PowerEvent>
public class PowerEventClientImpl
extends ResourceClientBase<PowerEvent, PowerEventJson>
implements PowerEventClient<PowerEvent>
-
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 TypeMethodDescriptionReturns aPageablededicated to paging power alert configurations.voiddeleteAlertConfiguration(String alertConfigurationUid) getPowerEvents(List<String> ibx, List<String> status, String edgeCollectedOn, int offset, int limit) nextPage(PaginatedRequest<PowerEvent> equinixRequest) voidpauseAlertConfiguration(String alertConfigurationUid) voidresumeAlertConfiguration(String alertConfigurationUid) searchAlertConfigurations(List<String> ibx, List<String> state, int offset, int limit) voidprotected PowerEventwrap(PowerEventJson 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, patchOne, patchOne, postOne, postOne, postOne, searchPage, searchPage, searchPageQueryPaginated, searchPageQueryPaginated, updateOne, updateOne, updateOneByUuidModifier and TypeMethodDescriptionprotected PowerEventJsoncreate(body)via the derivedCreate<Singular>endpoint name.protected PowerEventJsonprotected PowerEventJsonprotected PowerEventJsondeleteOneByUuid(String uuid) delete(uuid)via the derivedDelete<Singular>endpoint name.protected PowerEventJsondryRunCreate(String serviceEndpoint, Object body) protected PowerEventJsondryRunCreate(String serviceEndpoint, Object body, com.fasterxml.jackson.databind.ser.FilterProvider filters) protected PowerEventJsondryRunPatch(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 PowerEventJsondryRunUpdate(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 PowerEventJsonprotected PowerEventJsonprotected PowerEventJsongetOneByUuid(String uuid) get(uuid)via the derivedGet<Singular>endpoint name.protected Page<PowerEventJson> listPage()list()via the derivedList<Plural>endpoint name.protected Page<PowerEventJson> protected Page<PowerEventJson> protected Page<PowerEventJson> listPagePath(String serviceEndpoint, Map<String, String> pathParams) nextPage(PaginatedPostRequest<PowerEvent> equinixRequest) Fetches the next page for the given POST-search request (its body's pagination has already been advanced by the paging pipeline).protected PowerEventJsonpatchOne(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 PowerEventJsonprotected PowerEventJsonprotected PowerEventJsonpostOne(String serviceEndpoint, Object body, com.fasterxml.jackson.databind.ser.FilterProvider filters) protected PowerEventJsonprotected Page<PowerEventJson> searchPage(Object filterSortBody) search(body)via the derivedSearch<Plural>endpoint name.protected Page<PowerEventJson> searchPage(String serviceEndpoint, Object filterSortBody) protected Page<PowerEventJson> 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<PowerEventJson> searchPageQueryPaginated(String serviceEndpoint, Map<String, List<String>> queryParams, Object filterBody) Variant ofResourceClientBase.searchPageQueryPaginated(String, Object)carrying additional query parameters (e.g.protected PowerEventJsonprotected PowerEventJsonprotected PowerEventJsonupdateOneByUuid(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
-
PowerEventClientImpl
-
-
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<PowerEvent, PowerEventJson>- Parameters:
json- the deserialized JSON model- Returns:
- the public model wrapper
-
getPowerEvents
public Page<PowerEventJson> getPowerEvents(List<String> ibx, List<String> status, String edgeCollectedOn, int offset, int limit) - Specified by:
getPowerEventsin interfacePowerEventClient<PowerEvent>
-
nextPage
- Specified by:
nextPagein interfacePageable<PowerEvent>- Overrides:
nextPagein classResourceClientBase<PowerEvent, PowerEventJson>
-
createPowerAlertConfiguration
public PowerAlertConfigurationCreateResponseJson createPowerAlertConfiguration(PowerAlertConfigurationCreatorJson creatorJson) - Specified by:
createPowerAlertConfigurationin interfacePowerEventClient<PowerEvent>
-
updatePowerAlertConfiguration
- Specified by:
updatePowerAlertConfigurationin interfacePowerEventClient<PowerEvent>
-
searchAlertConfigurations
public Page<PowerAlertConfigurationJson> searchAlertConfigurations(List<String> ibx, List<String> state, int offset, int limit) - Specified by:
searchAlertConfigurationsin interfacePowerEventClient<PowerEvent>
-
alertConfigurationPageable
Returns aPageablededicated to paging power alert configurations. Unlike power events, AlertPaginatedResponse uses the standard nesteddata/paginationshape, so paging just needs the standard handler - but withPowerAlertConfigurationJsonas the item type and an identity wrap. Reusing this client's ownnextPage(PaginatedRequest)(which is typed for PowerEvent/PowerEventJson) would ClassCastException on the deserialized configurations, so configuration paging is given its own pageable here.- Specified by:
alertConfigurationPageablein interfacePowerEventClient<PowerEvent>
-
pauseAlertConfiguration
- Specified by:
pauseAlertConfigurationin interfacePowerEventClient<PowerEvent>
-
resumeAlertConfiguration
- Specified by:
resumeAlertConfigurationin interfacePowerEventClient<PowerEvent>
-
deleteAlertConfiguration
- Specified by:
deleteAlertConfigurationin interfacePowerEventClient<PowerEvent>
-