Class IncidentClient
- java.lang.Object
-
- com.oracle.bmc.http.internal.BaseSyncClient
-
- com.oracle.bmc.cims.IncidentClient
-
- All Implemented Interfaces:
Incident
,AutoCloseable
@Generated(value="OracleSDKGenerator", comments="API Version: 20181231") public class IncidentClient extends BaseSyncClient implements Incident
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IncidentClient.Builder
Builder class for this client.
-
Field Summary
Fields Modifier and Type Field Description String
clientCommonLibraryVersion
Compatible SDK version, provided by the codegen.Optional<String>
minimumClientCommonLibraryVersionFromClient
Minimum compatible SDK version, maybe provided by the codegen.static Service
SERVICE
Service instance for Incident.
-
Constructor Summary
Constructors Constructor Description IncidentClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Deprecated.Use thebuilder
instead.IncidentClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Deprecated.Use thebuilder
instead.IncidentClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.IncidentClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.IncidentClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.Use thebuilder
instead.IncidentClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Deprecated.Use thebuilder
instead.IncidentClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Deprecated.Use thebuilder
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IncidentClient.Builder
builder()
Create a builder for this client.void
close()
CreateIncidentResponse
createIncident(CreateIncidentRequest request)
Creates a support request in the specified tenancy.String
getClientCommonLibraryVersion()
protected ClientConfigurator
getDefaultConfigurator()
String
getEndpoint()
GetIncidentResponse
getIncident(GetIncidentRequest request)
Gets the specified support request.Optional<String>
getMinimumClientCommonLibraryVersionFromClient()
IncidentPaginators
getPaginators()
Gets the pre-configured paginators available for list operations in this service which may return multiple pages of data.ListIncidentResourceTypesResponse
listIncidentResourceTypes(ListIncidentResourceTypesRequest request)
Depending on the selectedproductType
, either lists available products (service groups, services, service categories, and subcategories) for technical support requests or lists limits and current usage for limit increase tickets.ListIncidentsResponse
listIncidents(ListIncidentsRequest request)
Lists support requests for the specified tenancy.void
populateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)
Populate the parameters in the endpoint with its corresponding value and update the base endpoint.PutAttachmentResponse
putAttachment(PutAttachmentRequest request)
Uploads the file and attaches it to the support request.void
refreshClient()
Rebuild the backingHttpClient
.void
setEndpoint(String endpoint)
void
setRegion(Region region)
Sets the region to call (ex, Region.US_PHOENIX_1).void
setRegion(String regionId)
Sets the region to call (ex, ‘us-phoenix-1’).void
updateBaseEndpoint(String endpoint)
This method should be used for parameterized endpoint templates only.UpdateIncidentResponse
updateIncident(UpdateIncidentRequest request)
Updates the specified support request.void
useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
This method should be used to enable or disable the use of realm-specific endpoint template.ValidateUserResponse
validateUser(ValidateUserRequest request)
Checks whether the requested user is valid.-
Methods inherited from class com.oracle.bmc.http.internal.BaseSyncClient
clientCall
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface com.oracle.bmc.cims.Incident
getEndpoint, refreshClient, setEndpoint, useRealmSpecificEndpointTemplate
-
-
-
-
Constructor Detail
-
IncidentClient
@Deprecated public IncidentClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeIncidentClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)
-
IncidentClient
@Deprecated public IncidentClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeIncidentClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
-
IncidentClient
@Deprecated public IncidentClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeIncidentClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
-
IncidentClient
@Deprecated public IncidentClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeIncidentClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
-
IncidentClient
@Deprecated public IncidentClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeIncidentClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
-
IncidentClient
@Deprecated public IncidentClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeIncidentClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
endpoint
-ClientBuilderBase.endpoint(java.lang.String)
-
IncidentClient
@Deprecated public IncidentClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeIncidentClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
endpoint
-ClientBuilderBase.endpoint(java.lang.String)
signingStrategyRequestSignerFactories
-ClientBuilderBase.signingStrategyRequestSignerFactories
-
-
Method Detail
-
builder
public static IncidentClient.Builder builder()
Create a builder for this client.- Returns:
- builder
-
setRegion
public void setRegion(Region region)
Description copied from interface:Incident
Sets the region to call (ex, Region.US_PHOENIX_1).Note, this will call
setEndpoint
after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised.
-
setRegion
public void setRegion(String regionId)
Description copied from interface:Incident
Sets the region to call (ex, ‘us-phoenix-1’).Note, this will first try to map the region ID to a known Region and call
setRegion
.If no known Region could be determined, it will create an endpoint based on the default endpoint format (
Region.formatDefaultRegionEndpoint(Service, String)
and then callsetEndpoint
.
-
createIncident
public CreateIncidentResponse createIncident(CreateIncidentRequest request)
Description copied from interface:Incident
Creates a support request in the specified tenancy.For more information, see Creating Support Requests.
- Specified by:
createIncident
in interfaceIncident
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getIncident
public GetIncidentResponse getIncident(GetIncidentRequest request)
Description copied from interface:Incident
Gets the specified support request.For more information, see Getting Details for a Support Request.
- Specified by:
getIncident
in interfaceIncident
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listIncidentResourceTypes
public ListIncidentResourceTypesResponse listIncidentResourceTypes(ListIncidentResourceTypesRequest request)
Description copied from interface:Incident
Depending on the selectedproductType
, either lists available products (service groups, services, service categories, and subcategories) for technical support requests or lists limits and current usage for limit increase tickets.This operation is called during creation of technical support and limit increase tickets. For more information about listing products, see Listing Products for Support Requests. For more information about listing limits, see Listing Limits for Service Limit Increase Requests.
- Specified by:
listIncidentResourceTypes
in interfaceIncident
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listIncidents
public ListIncidentsResponse listIncidents(ListIncidentsRequest request)
Description copied from interface:Incident
Lists support requests for the specified tenancy.For more information, see Listing Support Requests.
- Specified by:
listIncidents
in interfaceIncident
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
putAttachment
public PutAttachmentResponse putAttachment(PutAttachmentRequest request)
Description copied from interface:Incident
Uploads the file and attaches it to the support request.Note: This operation consumes a stream.
If the stream supports
InputStream.mark(int)
andInputStream.reset()
, when a retry is necessary, the stream is reset so it starts at the beginning (or whatever the stream's position was at the time this operation is called}.Note this means that if the caller has used
InputStream.mark(int)
before, then the mark will not be the same anymore after this operation, and a subsequent call toInputStream.reset()
by the caller will reset the stream not to the caller's mark, but to the position the stream was in when this operation was called.If the stream is a
FileInputStream
, and the stream'sFileChannel
position can be changed (like for a regular file), the stream will be wrapped in such a way that it does provide support forInputStream.mark(int)
andInputStream.reset()
. Then the same procedure as above is followed. If the stream'sFileChannel
position cannot be changed (like for a named pipe), then the stream's contents will be buffered in memory, as described below.If the stream does not support
InputStream.mark(int)
andInputStream.reset()
, then the stream is wrapped in aBufferedInputStream
, which means the entire contents may be buffered in memory. Then the same procedure as above is followed.The contents of the stream, except when the stream is a
FileInputStream
whoseFileChannel
position can be changed, should be less than 2 GiB in size if retries are used. This is because streams 2 GiB in size or larger do no guarantee that mark-and-reset can be performed. If the stream is larger, do not use built-in retries and manage retries yourself.- Specified by:
putAttachment
in interfaceIncident
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
updateIncident
public UpdateIncidentResponse updateIncident(UpdateIncidentRequest request)
Description copied from interface:Incident
Updates the specified support request.For more information, see Updating Support Requests.
- Specified by:
updateIncident
in interfaceIncident
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
validateUser
public ValidateUserResponse validateUser(ValidateUserRequest request)
Description copied from interface:Incident
Checks whether the requested user is valid.For more information, see Validating a User.
- Specified by:
validateUser
in interfaceIncident
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getPaginators
public IncidentPaginators getPaginators()
Description copied from interface:Incident
Gets the pre-configured paginators available for list operations in this service which may return multiple pages of data.These paginators provide an
Iterable
interface so that service responses, or resources/records, can be iterated through without having to manually deal with pagination and page tokens.- Specified by:
getPaginators
in interfaceIncident
- Returns:
- The service paginators.
-
getDefaultConfigurator
protected ClientConfigurator getDefaultConfigurator()
-
useRealmSpecificEndpointTemplate
public void useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
This method should be used to enable or disable the use of realm-specific endpoint template.The default value is null. To enable the use of endpoint template defined for the realm in use, set the flag to true To disable the use of endpoint template defined for the realm in use, set the flag to false
- Parameters:
useOfRealmSpecificEndpointTemplateEnabled
- This flag can be set to true or false to enable or disable the use of realm-specific endpoint template respectively
-
populateServiceParametersInEndpoint
public final void populateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)
Populate the parameters in the endpoint with its corresponding value and update the base endpoint.The value will be populated iff the parameter in endpoint is a required request path parameter or a required request query parameter. If not, the parameter in the endpoint will be ignored and left blank.
- Parameters:
endpoint
- The endpoint template in userequiredParametersMap
- Map of parameter name as key and value set in request path or query parameter as value
-
updateBaseEndpoint
public final void updateBaseEndpoint(String endpoint)
This method should be used for parameterized endpoint templates only.This does not include {region} and {secondLevelDomain} parameters.
- Parameters:
endpoint
- The updated endpoint to use
-
setEndpoint
public final void setEndpoint(String endpoint)
-
getEndpoint
public final String getEndpoint()
-
refreshClient
public final void refreshClient()
Rebuild the backingHttpClient
.This will call
ClientConfigurator
s again, and can be used to e.g. refresh the SSL certificate.
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
-
getClientCommonLibraryVersion
public String getClientCommonLibraryVersion()
-
-