diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationService.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationService.java index 5f122b593a..3515a2e893 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationService.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationService.java @@ -51,12 +51,4 @@ public interface ApiApplicationRegistrationService { @Path("register") Response register(RegistrationProfile registrationProfile); - /** - * This method is used to unregister an API application. - * @param applicationName name of the application that needs to be unregistered. - * @return the response status of request. - */ - @DELETE - @Path("unregister") - Response unregister(@QueryParam("applicationName") String applicationName); } diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java index b2f46dc09e..4656653988 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java @@ -18,6 +18,7 @@ package org.wso2.carbon.apimgt.application.extension.api; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; @@ -95,6 +96,8 @@ public class ApiApplicationRegistrationServiceImpl implements ApiApplicationRegi return Response.status(Response.Status.NOT_ACCEPTABLE).entity("APIs(Tags) are not allowed to this user." ).build(); } + PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(PrivilegedCarbonContext. + getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration().getAdminUserName()); String username = APIUtil.getAuthenticatedUser(); APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); String validityPeriod; @@ -103,35 +106,29 @@ public class ApiApplicationRegistrationServiceImpl implements ApiApplicationRegi } else { validityPeriod = registrationProfile.getValidityPeriod(); } - ApiApplicationKey apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( - registrationProfile.getApplicationName(), registrationProfile.getTags(), - ApiApplicationConstants.DEFAULT_TOKEN_TYPE, username, - registrationProfile.isAllowedToAllDomains(), validityPeriod); - return Response.status(Response.Status.CREATED).entity(apiApplicationKey.toString()).build(); + + String applicationName = registrationProfile.getApplicationName(); + synchronized (ApiApplicationRegistrationServiceImpl.class) { + ApiApplicationKey apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( + applicationName, registrationProfile.getTags(), + ApiApplicationConstants.DEFAULT_TOKEN_TYPE, username, + registrationProfile.isAllowedToAllDomains(), validityPeriod); + return Response.status(Response.Status.CREATED).entity(apiApplicationKey.toString()).build(); + } } catch (APIManagerException e) { - String msg = "Error occurred while registering an application '" - + registrationProfile.getApplicationName() + "'"; + String msg = "Error occurred while registering an application with apis '" + + StringUtils.join(registrationProfile.getTags(), ",") + "'"; log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("false").build(); } catch (DeviceManagementException e) { String msg = "Failed to retrieve the device service"; log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); - } - } - - @Path("unregister") - @DELETE - public Response unregister(@QueryParam("applicationName") String applicationName) { - try { - String username = APIUtil.getAuthenticatedUser() + "@" + APIUtil.getTenantDomainOftheUser(); - APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); - apiManagementProviderService.removeAPIApplication(applicationName, username); - return Response.status(Response.Status.ACCEPTED).build(); - } catch (APIManagerException e) { - String msg = "Error occurred while removing the application '" + applicationName; + } catch (UserStoreException e) { + String msg = "Failed to access user space."; log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } + } \ No newline at end of file diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/RegistrationProfile.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/RegistrationProfile.java index ef63946fd3..44cc5554fc 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/RegistrationProfile.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/RegistrationProfile.java @@ -30,7 +30,6 @@ import javax.xml.bind.annotation.XmlRootElement; @JsonIgnoreProperties(ignoreUnknown = true) public class RegistrationProfile { - @XmlElement(required = true) private String applicationName; @XmlElement(required = true) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/META-INF/permissions.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/META-INF/permissions.xml index 9c41774ce5..2d907f170e 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/META-INF/permissions.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/META-INF/permissions.xml @@ -37,16 +37,9 @@ Register application - /manage/api/subscribe + /device-mgt/device/api/subscribe /register POST application_user - - Delete application - /manage/api/subscribe - /unregister - DELETE - application_user - \ No newline at end of file diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml index 3f240c3340..c72fcb0b8e 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml @@ -55,6 +55,10 @@ org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.integration.client + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.integration.generated.client + com.googlecode.json-simple.wso2 json-simple @@ -103,7 +107,10 @@ org.wso2.carbon.base, org.wso2.carbon.registry.core.*;resolution:=optional, org.wso2.carbon.registry.indexing.*; version="${carbon.registry.imp.pkg.version.range}", - org.wso2.carbon.apimgt.integration.client.* + org.wso2.carbon.apimgt.integration.client.*, + org.wso2.carbon.apimgt.integration.generated.client.store.api, + org.wso2.carbon.apimgt.integration.generated.client.store.model, + feign !org.wso2.carbon.apimgt.application.extension.internal, diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java index 4dd85b2532..fa473a4133 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java @@ -18,6 +18,7 @@ package org.wso2.carbon.apimgt.application.extension; +import feign.FeignException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants; @@ -26,12 +27,14 @@ import org.wso2.carbon.apimgt.application.extension.exception.APIManagerExceptio import org.wso2.carbon.apimgt.application.extension.internal.APIApplicationManagerExtensionDataHolder; import org.wso2.carbon.apimgt.application.extension.util.APIManagerUtil; import org.wso2.carbon.apimgt.integration.client.store.*; -import org.wso2.carbon.apimgt.integration.client.store.model.*; +import org.wso2.carbon.apimgt.integration.generated.client.store.model.*; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * This class represents an implementation of APIManagementProviderService. @@ -41,6 +44,9 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe private static final Log log = LogFactory.getLog(APIManagementProviderServiceImpl.class); private static final String CONTENT_TYPE = "application/json"; private static final int MAX_API_PER_TAG = 200; + private static final String APP_TIER_TYPE = "application"; + private static final Map tiersMap = new HashMap<>(); + private static final int MAX_ATTEMPTS = 10; @Override public void removeAPIApplication(String applicationName, String username) throws APIManagerException { @@ -66,6 +72,32 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe throws APIManagerException { StoreClient storeClient = APIApplicationManagerExtensionDataHolder.getInstance().getIntegrationClientService() .getStoreClient(); + //This is a fix to avoid race condition and trying to load tenant related tiers before invocation. + String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getTenantDomain(); + String tiersLoadedForTenant = tiersMap.get(tenantDomain); + if (tiersLoadedForTenant == null) { + int tierStatus = 0; + int attempts = 0; + do { + try { + storeClient.getIndividualTier() + .tiersTierLevelTierNameGet(ApiApplicationConstants.DEFAULT_TIER, APP_TIER_TYPE, + tenantDomain, CONTENT_TYPE, null, null); + tiersMap.put(tenantDomain, "exist"); + tierStatus = 200; + } catch (FeignException e) { + tierStatus = e.status(); + attempts++; + try { + Thread.sleep(500); + } catch (InterruptedException ex) { + log.warn("Interrupted the waiting for tier availability."); + } + } + } while (tierStatus == 500 && attempts < MAX_ATTEMPTS); + } + ApplicationList applicationList = storeClient.getApplications() .applicationsGet("", applicationName, 1, 0, CONTENT_TYPE, null); Application application; @@ -94,7 +126,6 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe // subscribe to apis. if (tags != null && tags.length > 0) { for (String tag: tags) { - String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); APIList apiList = storeClient.getApis().apisGet(MAX_API_PER_TAG, 0, tenantDomain, "tag:" + tag , CONTENT_TYPE, null); if (apiList.getList() == null || apiList.getList().size() == 0) { @@ -129,7 +160,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe } } if (!needToSubscribe.isEmpty()) { - storeClient.getIndividualSubscription().subscriptionsPost(needToSubscribe, CONTENT_TYPE); + storeClient.getSubscriptionMultitpleApi().subscriptionsMultiplePost(needToSubscribe, CONTENT_TYPE); } //end of subscription diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml index 5a9ada7d42..8756c25905 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml @@ -55,6 +55,9 @@ feign.codec, feign.auth, feign.gson, + feign.slf4j, + org.wso2.carbon.apimgt.integration.generated.client.publisher.api, + org.wso2.carbon.apimgt.integration.generated.client.store.api, javax.xml.bind, javax.xml.bind.annotation, javax.xml.parsers;resolution:=optional, @@ -68,7 +71,8 @@ io.swagger.annotations, org.wso2.carbon.core.util, javax.xml, - org.wso2.carbon.base + org.wso2.carbon.base, + javax.net.ssl, jsr311-api, @@ -135,6 +139,10 @@ org.wso2.carbon.devicemgt org.wso2.carbon.identity.jwt.client.extension + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.integration.generated.client + diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/OAuthRequestInterceptor.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/OAuthRequestInterceptor.java index 2f893d74cb..d9afb2aa55 100755 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/OAuthRequestInterceptor.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/OAuthRequestInterceptor.java @@ -15,25 +15,28 @@ package org.wso2.carbon.apimgt.integration.client; import feign.Feign; +import feign.Logger; import feign.RequestInterceptor; import feign.RequestTemplate; import feign.auth.BasicAuthRequestInterceptor; import feign.gson.GsonDecoder; import feign.gson.GsonEncoder; import feign.jaxrs.JAXRSContract; +import feign.slf4j.Slf4jLogger; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.wso2.carbon.apimgt.integration.client.configs.APIMConfigReader; import org.wso2.carbon.apimgt.integration.client.exception.APIMClientOAuthException; import org.wso2.carbon.apimgt.integration.client.internal.APIIntegrationClientDataHolder; import org.wso2.carbon.apimgt.integration.client.model.ClientProfile; import org.wso2.carbon.apimgt.integration.client.model.DCRClient; import org.wso2.carbon.apimgt.integration.client.model.OAuthApplication; -import org.wso2.carbon.apimgt.integration.client.util.PropertyUtils; +import org.wso2.carbon.apimgt.integration.client.util.Utils; import org.wso2.carbon.base.MultitenantConstants; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.jwt.client.extension.JWTClient; import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo; import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException; -import org.wso2.carbon.user.api.UserStoreException; import java.util.HashMap; import java.util.Map; @@ -48,10 +51,12 @@ public class OAuthRequestInterceptor implements RequestInterceptor { private static final String REQUIRED_SCOPE = "apim:api_create apim:api_view apim:api_publish apim:subscribe apim:tier_view apim:tier_manage " + "apim:subscription_view apim:subscription_block"; + private static final String APIM_SUBSCRIBE_SCOPE = "apim:subscribe"; private static final long DEFAULT_REFRESH_TIME_OFFSET_IN_MILLIS = 100000; private DCRClient dcrClient; private static OAuthApplication oAuthApplication; private static Map tenantUserTokenMap = new HashMap<>(); + private static final Log log = LogFactory.getLog(OAuthRequestInterceptor.class); /** * Creates an interceptor that authenticates all requests. @@ -59,10 +64,10 @@ public class OAuthRequestInterceptor implements RequestInterceptor { public OAuthRequestInterceptor() { String username = APIMConfigReader.getInstance().getConfig().getUsername(); String password = APIMConfigReader.getInstance().getConfig().getPassword(); - dcrClient = Feign.builder().requestInterceptor( - new BasicAuthRequestInterceptor(username, password)) + dcrClient = Feign.builder().client(Utils.getSSLClient()).logger(new Slf4jLogger()).logLevel( + Logger.Level.FULL).requestInterceptor(new BasicAuthRequestInterceptor(username, password)) .contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder()) - .target(DCRClient.class, PropertyUtils.replaceProperties( + .target(DCRClient.class, Utils.replaceProperties( APIMConfigReader.getInstance().getConfig().getDcrEndpoint())); } @@ -96,7 +101,9 @@ public class OAuthRequestInterceptor implements RequestInterceptor { REQUIRED_SCOPE); tenantBasedAccessTokenInfo.setExpiresIn( System.currentTimeMillis() + (tenantBasedAccessTokenInfo.getExpiresIn() * 1000)); - tenantUserTokenMap.put(username, tenantBasedAccessTokenInfo); + if (tenantBasedAccessTokenInfo.getScopes().contains(APIM_SUBSCRIBE_SCOPE)) { + tenantUserTokenMap.put(username, tenantBasedAccessTokenInfo); + } } if (tenantBasedAccessTokenInfo.getAccessToken() != null) { diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/PublisherClient.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/PublisherClient.java index ab1e130954..5ce49b7e83 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/PublisherClient.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/PublisherClient.java @@ -18,12 +18,15 @@ package org.wso2.carbon.apimgt.integration.client.publisher; import feign.Feign; +import feign.Logger; import feign.RequestInterceptor; import feign.gson.GsonDecoder; import feign.gson.GsonEncoder; +import feign.slf4j.Slf4jLogger; +import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.apimgt.integration.client.configs.APIMConfigReader; -import org.wso2.carbon.apimgt.integration.client.publisher.api.*; +import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.*; import org.wso2.carbon.core.util.Utils; /** @@ -31,7 +34,7 @@ import org.wso2.carbon.core.util.Utils; */ public class PublisherClient { - private static final org.apache.commons.logging.Log log = LogFactory.getLog(PublisherClient.class); + private static final Log log = LogFactory.getLog(PublisherClient.class); private APIsApi api = null; private APIDocumentApi document = null; private ApplicationsApi application = null; @@ -45,8 +48,10 @@ public class PublisherClient { * */ public PublisherClient(RequestInterceptor requestInterceptor) { - Feign.Builder builder = Feign.builder().requestInterceptor(requestInterceptor) - .encoder(new GsonEncoder()).decoder(new GsonDecoder()); + Feign.Builder builder = Feign.builder().client( + org.wso2.carbon.apimgt.integration.client.util.Utils.getSSLClient()).logger(new Slf4jLogger()) + .logLevel(Logger.Level.FULL) + .requestInterceptor(requestInterceptor).encoder(new GsonEncoder()).decoder(new GsonDecoder()); String basePath = Utils.replaceSystemProperty(APIMConfigReader.getInstance().getConfig().getPublisherEndpoint()); api = builder.target(APIsApi.class, basePath); diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/APIDocumentApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/APIDocumentApi.java deleted file mode 100644 index 86942d349f..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/APIDocumentApi.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.publisher.model.Document; -import org.wso2.carbon.apimgt.integration.client.publisher.model.DocumentList; - - -import java.io.File; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public interface APIDocumentApi { - - - /** - * Get document content - * Downloads a FILE type document/get the inline content or source url of a certain document. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param documentId **Document Identifier** (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return void - */ - @RequestLine("GET /apis/{apiId}/documents/{documentId}/content") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - void apisApiIdDocumentsDocumentIdContentGet(@Param("apiId") String apiId, @Param("documentId") String documentId, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Update API document content. - * Upload a file to a document or add inline content to the document. Document's source type should be **FILE** in order to upload a file to the document using **file** parameter. Document's source type should be **INLINE** in order to add inline content to the document using **inlineContent** parameter. Only one of **file** or **inlineContent** can be specified at one time. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param documentId **Document Identifier** (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @param file Document to upload (optional) - * @param inlineContent Inline content of the document (optional) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return Document - */ - @RequestLine("POST /apis/{apiId}/documents/{documentId}/content") - @Headers({ - "Content-type: multipart/form-data", - "Accept: application/json", - "Content-Type: {contentType}", - - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - Document apisApiIdDocumentsDocumentIdContentPost(@Param("apiId") String apiId, @Param("documentId") String documentId, - @Param("contentType") String contentType, @Param("file") File file, - @Param("inlineContent") String inlineContent, - @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Delete an API Document - * Delete a document of an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param documentId **Document Identifier** (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("DELETE /apis/{apiId}/documents/{documentId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void apisApiIdDocumentsDocumentIdDelete(@Param("apiId") String apiId, @Param("documentId") String documentId, - @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get an API Document - * Get a particular document associated with an API. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param documentId **Document Identifier** (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly - * retrieved variant of the resource. (optional) - * @return Document - */ - @RequestLine("GET /apis/{apiId}/documents/{documentId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - Document apisApiIdDocumentsDocumentIdGet(@Param("apiId") String apiId, @Param("documentId") String documentId, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Update an API Document - * Update document details. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param documentId **Document Identifier** (required) - * @param body Document object that needs to be added (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return Document - */ - @RequestLine("PUT /apis/{apiId}/documents/{documentId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}", - - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - Document apisApiIdDocumentsDocumentIdPut(@Param("apiId") String apiId, @Param("documentId") String documentId, - Document body, @Param("contentType") String contentType, - @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get API Documents - * Get a list of documents belonging to an API. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return DocumentList - */ - @RequestLine("GET /apis/{apiId}/documents?limit={limit}&offset={offset}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - DocumentList apisApiIdDocumentsGet(@Param("apiId") String apiId, @Param("limit") Integer limit, - @Param("offset") Integer offset, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch); - - /** - * Add a new document - * Add a new document to an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param body Document object that needs to be added (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @return Document - */ - @RequestLine("POST /apis/{apiId}/documents") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}" - }) - Document apisApiIdDocumentsPost(@Param("apiId") String apiId, Document body, @Param("contentType") String contentType); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/APIsApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/APIsApi.java deleted file mode 100644 index b1bb6fe021..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/APIsApi.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.publisher.model.API; -import org.wso2.carbon.apimgt.integration.client.publisher.model.APIList; -import org.wso2.carbon.apimgt.integration.client.publisher.model.FileInfo; - - -import java.io.File; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public interface APIsApi { - - - /** - * Delete API - * Delete an existing API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("DELETE /apis/{apiId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void apisApiIdDelete(@Param("apiId") String apiId, @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get API details - * Get details of an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return API - */ - @RequestLine("GET /apis/{apiId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - API apisApiIdGet(@Param("apiId") String apiId, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Update an existing API - * Update an existing API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param body API object that needs to be added (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return API - */ - @RequestLine("PUT /apis/{apiId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}", - - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - API apisApiIdPut(@Param("apiId") String apiId, API body, @Param("contentType") String contentType, - @Param("ifMatch") String ifMatch, @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get API Definition - * Get the swagger of an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return void - */ - @RequestLine("GET /apis/{apiId}/swagger") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - void apisApiIdSwaggerGet(@Param("apiId") String apiId, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Update API Definition - * Update an existing swagger definition of an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param apiDefinition Swagger definition of the API (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("PUT /apis/{apiId}/swagger") - @Headers({ - "Content-type: multipart/form-data", - "Accept: application/json", - "Content-Type: {contentType}", - - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void apisApiIdSwaggerPut(@Param("apiId") String apiId, @Param("apiDefinition") String apiDefinition, - @Param("contentType") String contentType, @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get the thumbnail image - * Downloads a thumbnail image of an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return void - */ - @RequestLine("GET /apis/{apiId}/thumbnail") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - void apisApiIdThumbnailGet(@Param("apiId") String apiId, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Upload a thumbnail image - * Upload a thumbnail image to an API. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param file Image to upload (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return FileInfo - */ - @RequestLine("POST /apis/{apiId}/thumbnail") - @Headers({ - "Content-type: multipart/form-data", - "Accept: application/json", - "Content-Type: {contentType}", - - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - FileInfo apisApiIdThumbnailPost(@Param("apiId") String apiId, @Param("file") File file, - @Param("contentType") String contentType, @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Change API Status - * Change the lifecycle of an API - * @param action The action to demote or promote the state of the API. Supported actions are [ **Publish, Deploy as a Prototype, Demote to Created, Demote to Prototyped, Block, Deprecate, Re-Publish, Retire **] (required) - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. (required) - * @param lifecycleChecklist You can specify additional checklist items by using an **\"attribute:\"** modifier. Eg: \"Deprecate Old Versions:true\" will deprecate older versions of a particular API when it is promoted to Published state from Created state. Multiple checklist items can be given in \"attribute1:true, attribute2:false\" format. Supported checklist items are as follows. 1. **Deprecate Old Versions**: Setting this to true will deprecate older versions of a particular API when it is promoted to Published state from Created state. 2. **Require Re-Subscription**: If you set this to true, users need to re subscribe to the API although they may have subscribed to an older version. (optional) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("POST /apis/change-lifecycle?action={action}&lifecycleChecklist={lifecycleChecklist}&apiId={apiId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void apisChangeLifecyclePost(@Param("action") String action, @Param("apiId") String apiId, - @Param("lifecycleChecklist") String lifecycleChecklist, @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Copy API - * Create a new API by copying an existing API - * @param newVersion Version of the new API. (required) - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. (required) - * @return void - */ - @RequestLine("POST /apis/copy-api?newVersion={newVersion}&apiId={apiId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json" - }) - void apisCopyApiPost(@Param("newVersion") String newVersion, @Param("apiId") String apiId); - - /** - * Get all APIs - * Get a list of available APIs qualifying under a given search condition. - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param query **Search condition**. You can search in attributes by using an **\"attribute:\"** modifier. Eg. \"provider:wso2\" will match an API if the provider of the API contains \"wso2\". Supported attribute modifiers are [**version, context, status, description, subcontext, doc, provider**] If no advanced attribute modifier has been specified, search will match the given query string against API Name. (optional) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of - * the resourec. (optional) - * @return APIList - */ - @RequestLine("GET /apis?limit={limit}&offset={offset}&query={query}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - APIList apisGet(@Param("limit") Integer limit, @Param("offset") Integer offset, @Param("query") String query, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch); - - /** - * Create a new API - * Create a new API - * @param body API object that needs to be added (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @return API - */ - @RequestLine("POST /apis") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}" - }) - API apisPost(API body, @Param("contentType") String contentType); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/ApplicationsApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/ApplicationsApi.java deleted file mode 100644 index 228755ffdf..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/ApplicationsApi.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.publisher.model.Application; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public interface ApplicationsApi { - - - /** - * Get Application - * Get application details - * @param applicationId **Application Identifier** consisting of the UUID of the Application. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return Application - */ - @RequestLine("GET /applications/{applicationId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - Application applicationsApplicationIdGet(@Param("applicationId") String applicationId, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/EnvironmentsApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/EnvironmentsApi.java deleted file mode 100644 index babc1b7949..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/EnvironmentsApi.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.publisher.model.EnvironmentList; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public interface EnvironmentsApi { - - - /** - * Get gateway environments - * Get a list of gateway environments configured previously. - * @param apiId Will return environment list for the provided API. (optional) - * @return EnvironmentList - */ - @RequestLine("GET /environments?apiId={apiId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json" - }) - EnvironmentList environmentsGet(@Param("apiId") String apiId); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/SubscriptionsApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/SubscriptionsApi.java deleted file mode 100644 index b9e11e3141..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/SubscriptionsApi.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.publisher.model.Subscription; -import org.wso2.carbon.apimgt.integration.client.publisher.model.SubscriptionList; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public interface SubscriptionsApi { - - - /** - * Block a subscription - * Block a subscription. - * @param subscriptionId Subscription Id (required) - * @param blockState Subscription block state. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("POST /subscriptions/block-subscription?subscriptionId={subscriptionId}&blockState={blockState}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void subscriptionsBlockSubscriptionPost(@Param("subscriptionId") String subscriptionId, - @Param("blockState") String blockState, @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get All Subscriptions - * Get subscription list. The API Identifier and corresponding Application Identifier the subscriptions of which are to be returned are passed as parameters. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. (required) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return SubscriptionList - */ - @RequestLine("GET /subscriptions?apiId={apiId}&limit={limit}&offset={offset}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - SubscriptionList subscriptionsGet(@Param("apiId") String apiId, @Param("limit") Integer limit, - @Param("offset") Integer offset, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch); - - /** - * Get a Subscription - * Get subscription details - * @param subscriptionId Subscription Id (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return Subscription - */ - @RequestLine("GET /subscriptions/{subscriptionId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - Subscription subscriptionsSubscriptionIdGet(@Param("subscriptionId") String subscriptionId, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Unblock a Subscription - * Unblock a subscription. - * @param subscriptionId Subscription Id (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("POST /subscriptions/unblock-subscription?subscriptionId={subscriptionId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void subscriptionsUnblockSubscriptionPost(@Param("subscriptionId") String subscriptionId, - @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/TiersApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/TiersApi.java deleted file mode 100644 index b25c26b948..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/api/TiersApi.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.publisher.model.Tier; -import org.wso2.carbon.apimgt.integration.client.publisher.model.TierList; -import org.wso2.carbon.apimgt.integration.client.publisher.model.TierPermission; - - -import java.util.List; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public interface TiersApi { - - - /** - * List Tiers - * Get available tiers - * @param tierLevel List API or Application or Resource type tiers. (required) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return TierList - */ - @RequestLine("GET /tiers/{tierLevel}?limit={limit}&offset={offset}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - TierList tiersTierLevelGet(@Param("tierLevel") String tierLevel, @Param("limit") Integer limit, - @Param("offset") Integer offset, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch); - - /** - * Add a new Tier - * Add a new tier - * @param body Tier object that should to be added (required) - * @param tierLevel List API or Application or Resource type tiers. (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @return Tier - */ - @RequestLine("POST /tiers/{tierLevel}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}" - }) - Tier tiersTierLevelPost(Tier body, @Param("tierLevel") String tierLevel, @Param("contentType") String contentType); - - /** - * Delete a Tier - * Remove a tier - * @param tierName Tier name (required) - * @param tierLevel List API or Application or Resource type tiers. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("DELETE /tiers/{tierLevel}/{tierName}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void tiersTierLevelTierNameDelete(@Param("tierName") String tierName, @Param("tierLevel") String tierLevel, - @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get a Tier - * Get tier details - * @param tierName Tier name (required) - * @param tierLevel List API or Application or Resource type tiers. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return Tier - */ - @RequestLine("GET /tiers/{tierLevel}/{tierName}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - Tier tiersTierLevelTierNameGet(@Param("tierName") String tierName, @Param("tierLevel") String tierLevel, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Update a Tier - * Update tier details - * @param tierName Tier name (required) - * @param body Tier object that needs to be modified (required) - * @param tierLevel List API or Application or Resource type tiers. (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return Tier - */ - @RequestLine("PUT /tiers/{tierLevel}/{tierName}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}", - - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - Tier tiersTierLevelTierNamePut(@Param("tierName") String tierName, Tier body, @Param("tierLevel") String tierLevel, - @Param("contentType") String contentType, @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Update Tier Permission - * Update tier permission - * @param tierName Name of the tier (required) - * @param tierLevel List API or Application or Resource type tiers. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @param permissions (optional) - * @return List - */ - @RequestLine("POST /tiers/update-permission?tierName={tierName}&tierLevel={tierLevel}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - List tiersUpdatePermissionPost(@Param("tierName") String tierName, @Param("tierLevel") String tierLevel, - @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince, TierPermission permissions); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/API.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/API.java deleted file mode 100644 index 0e881e9922..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/API.java +++ /dev/null @@ -1,847 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * API - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class API { - @JsonProperty("id") - private String id = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("context") - private String context = null; - - @JsonProperty("version") - private String version = null; - - @JsonProperty("provider") - private String provider = null; - - @JsonProperty("apiDefinition") - private String apiDefinition = null; - - @JsonProperty("wsdlUri") - private String wsdlUri = null; - - @JsonProperty("status") - private String status = null; - - @JsonProperty("responseCaching") - private String responseCaching = null; - - @JsonProperty("cacheTimeout") - private Integer cacheTimeout = null; - - @JsonProperty("destinationStatsEnabled") - private String destinationStatsEnabled = null; - - @JsonProperty("isDefaultVersion") - private Boolean isDefaultVersion = null; - - @JsonProperty("transport") - private List transport = new ArrayList(); - - @JsonProperty("tags") - private List tags = new ArrayList(); - - @JsonProperty("tiers") - private List tiers = new ArrayList(); - - @JsonProperty("maxTps") - private APIMaxTps maxTps = null; - - @JsonProperty("thumbnailUri") - private String thumbnailUri = null; - - /** - * Gets or Sets visibility - */ - public enum VisibilityEnum { - PUBLIC("PUBLIC"), - - PRIVATE("PRIVATE"), - - RESTRICTED("RESTRICTED"), - - CONTROLLED("CONTROLLED"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static VisibilityEnum fromValue(String text) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("visibility") - private VisibilityEnum visibility = null; - - @JsonProperty("visibleRoles") - private List visibleRoles = new ArrayList(); - - @JsonProperty("visibleTenants") - private List visibleTenants = new ArrayList(); - - @JsonProperty("endpointConfig") - private String endpointConfig = null; - - @JsonProperty("endpointSecurity") - private APIEndpointSecurity endpointSecurity = null; - - @JsonProperty("gatewayEnvironments") - private String gatewayEnvironments = null; - - @JsonProperty("sequences") - private List sequences = new ArrayList(); - - /** - * Gets or Sets subscriptionAvailability - */ - public enum SubscriptionAvailabilityEnum { - current_tenant("current_tenant"), - - all_tenants("all_tenants"), - - specific_tenants("specific_tenants"); - - private String value; - - SubscriptionAvailabilityEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SubscriptionAvailabilityEnum fromValue(String text) { - for (SubscriptionAvailabilityEnum b : SubscriptionAvailabilityEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("subscriptionAvailability") - private SubscriptionAvailabilityEnum subscriptionAvailability = null; - - @JsonProperty("subscriptionAvailableTenants") - private List subscriptionAvailableTenants = new ArrayList(); - - @JsonProperty("businessInformation") - private APIBusinessInformation businessInformation = null; - - @JsonProperty("corsConfiguration") - private APICorsConfiguration corsConfiguration = null; - - public API id(String id) { - this.id = id; - return this; - } - - /** - * UUID of the api registry artifact - * @return id - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "UUID of the api registry artifact ") - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public API name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorAPI", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public API description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "A calculator API that supports basic operations", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public API context(String context) { - this.context = context; - return this; - } - - /** - * Get context - * @return context - **/ - @ApiModelProperty(example = "CalculatorAPI", required = true, value = "") - public String getContext() { - return context; - } - - public void setContext(String context) { - this.context = context; - } - - public API version(String version) { - this.version = version; - return this; - } - - /** - * Get version - * @return version - **/ - @ApiModelProperty(example = "1.0.0", required = true, value = "") - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public API provider(String provider) { - this.provider = provider; - return this; - } - - /** - * If the provider value is not given user invoking the api will be used as the provider. - * @return provider - **/ - @ApiModelProperty(example = "admin", value = "If the provider value is not given user invoking the api will be used as the provider. ") - public String getProvider() { - return provider; - } - - public void setProvider(String provider) { - this.provider = provider; - } - - public API apiDefinition(String apiDefinition) { - this.apiDefinition = apiDefinition; - return this; - } - - /** - * Swagger definition of the API which contains details about URI templates and scopes - * @return apiDefinition - **/ - @ApiModelProperty(example = "null", required = true, value = "Swagger definition of the API which contains details about URI templates and scopes ") - public String getApiDefinition() { - return apiDefinition; - } - - public void setApiDefinition(String apiDefinition) { - this.apiDefinition = apiDefinition; - } - - public API wsdlUri(String wsdlUri) { - this.wsdlUri = wsdlUri; - return this; - } - - /** - * WSDL URL if the API is based on a WSDL endpoint - * @return wsdlUri - **/ - @ApiModelProperty(example = "http://www.webservicex.com/globalweather.asmx?wsdl", value = "WSDL URL if the API is based on a WSDL endpoint ") - public String getWsdlUri() { - return wsdlUri; - } - - public void setWsdlUri(String wsdlUri) { - this.wsdlUri = wsdlUri; - } - - public API status(String status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @ApiModelProperty(example = "CREATED", value = "") - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public API responseCaching(String responseCaching) { - this.responseCaching = responseCaching; - return this; - } - - /** - * Get responseCaching - * @return responseCaching - **/ - @ApiModelProperty(example = "Disabled", value = "") - public String getResponseCaching() { - return responseCaching; - } - - public void setResponseCaching(String responseCaching) { - this.responseCaching = responseCaching; - } - - public API cacheTimeout(Integer cacheTimeout) { - this.cacheTimeout = cacheTimeout; - return this; - } - - /** - * Get cacheTimeout - * @return cacheTimeout - **/ - @ApiModelProperty(example = "300", value = "") - public Integer getCacheTimeout() { - return cacheTimeout; - } - - public void setCacheTimeout(Integer cacheTimeout) { - this.cacheTimeout = cacheTimeout; - } - - public API destinationStatsEnabled(String destinationStatsEnabled) { - this.destinationStatsEnabled = destinationStatsEnabled; - return this; - } - - /** - * Get destinationStatsEnabled - * @return destinationStatsEnabled - **/ - @ApiModelProperty(example = "Disabled", value = "") - public String getDestinationStatsEnabled() { - return destinationStatsEnabled; - } - - public void setDestinationStatsEnabled(String destinationStatsEnabled) { - this.destinationStatsEnabled = destinationStatsEnabled; - } - - public API isDefaultVersion(Boolean isDefaultVersion) { - this.isDefaultVersion = isDefaultVersion; - return this; - } - - /** - * Get isDefaultVersion - * @return isDefaultVersion - **/ - @ApiModelProperty(example = "false", required = true, value = "") - public Boolean getIsDefaultVersion() { - return isDefaultVersion; - } - - public void setIsDefaultVersion(Boolean isDefaultVersion) { - this.isDefaultVersion = isDefaultVersion; - } - - public API transport(List transport) { - this.transport = transport; - return this; - } - - public API addTransportItem(String transportItem) { - this.transport.add(transportItem); - return this; - } - - /** - * Supported transports for the API (http and/or https). - * @return transport - **/ - @ApiModelProperty(example = "null", required = true, value = "Supported transports for the API (http and/or https). ") - public List getTransport() { - return transport; - } - - public void setTransport(List transport) { - this.transport = transport; - } - - public API tags(List tags) { - this.tags = tags; - return this; - } - - public API addTagsItem(String tagsItem) { - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @ApiModelProperty(example = "null", value = "") - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public API tiers(List tiers) { - this.tiers = tiers; - return this; - } - - public API addTiersItem(String tiersItem) { - this.tiers.add(tiersItem); - return this; - } - - /** - * Get tiers - * @return tiers - **/ - @ApiModelProperty(example = "null", required = true, value = "") - public List getTiers() { - return tiers; - } - - public void setTiers(List tiers) { - this.tiers = tiers; - } - - public API maxTps(APIMaxTps maxTps) { - this.maxTps = maxTps; - return this; - } - - /** - * Get maxTps - * @return maxTps - **/ - @ApiModelProperty(example = "null", value = "") - public APIMaxTps getMaxTps() { - return maxTps; - } - - public void setMaxTps(APIMaxTps maxTps) { - this.maxTps = maxTps; - } - - public API thumbnailUri(String thumbnailUri) { - this.thumbnailUri = thumbnailUri; - return this; - } - - /** - * Get thumbnailUri - * @return thumbnailUri - **/ - @ApiModelProperty(example = "/apis/01234567-0123-0123-0123-012345678901/thumbnail", value = "") - public String getThumbnailUri() { - return thumbnailUri; - } - - public void setThumbnailUri(String thumbnailUri) { - this.thumbnailUri = thumbnailUri; - } - - public API visibility(VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Get visibility - * @return visibility - **/ - @ApiModelProperty(example = "PUBLIC", required = true, value = "") - public VisibilityEnum getVisibility() { - return visibility; - } - - public void setVisibility(VisibilityEnum visibility) { - this.visibility = visibility; - } - - public API visibleRoles(List visibleRoles) { - this.visibleRoles = visibleRoles; - return this; - } - - public API addVisibleRolesItem(String visibleRolesItem) { - this.visibleRoles.add(visibleRolesItem); - return this; - } - - /** - * Get visibleRoles - * @return visibleRoles - **/ - @ApiModelProperty(example = "null", value = "") - public List getVisibleRoles() { - return visibleRoles; - } - - public void setVisibleRoles(List visibleRoles) { - this.visibleRoles = visibleRoles; - } - - public API visibleTenants(List visibleTenants) { - this.visibleTenants = visibleTenants; - return this; - } - - public API addVisibleTenantsItem(String visibleTenantsItem) { - this.visibleTenants.add(visibleTenantsItem); - return this; - } - - /** - * Get visibleTenants - * @return visibleTenants - **/ - @ApiModelProperty(example = "null", value = "") - public List getVisibleTenants() { - return visibleTenants; - } - - public void setVisibleTenants(List visibleTenants) { - this.visibleTenants = visibleTenants; - } - - public API endpointConfig(String endpointConfig) { - this.endpointConfig = endpointConfig; - return this; - } - - /** - * Get endpointConfig - * @return endpointConfig - **/ - @ApiModelProperty(example = "{"production_endpoints":{"url":"http://localhost:9763/am/sample/calculator/v1/api","config":null},"implementation_status":"managed","endpoint_type":"http"}", required = true, value = "") - public String getEndpointConfig() { - return endpointConfig; - } - - public void setEndpointConfig(String endpointConfig) { - this.endpointConfig = endpointConfig; - } - - public API endpointSecurity(APIEndpointSecurity endpointSecurity) { - this.endpointSecurity = endpointSecurity; - return this; - } - - /** - * Get endpointSecurity - * @return endpointSecurity - **/ - @ApiModelProperty(example = "null", value = "") - public APIEndpointSecurity getEndpointSecurity() { - return endpointSecurity; - } - - public void setEndpointSecurity(APIEndpointSecurity endpointSecurity) { - this.endpointSecurity = endpointSecurity; - } - - public API gatewayEnvironments(String gatewayEnvironments) { - this.gatewayEnvironments = gatewayEnvironments; - return this; - } - - /** - * Comma separated list of gateway environments. - * @return gatewayEnvironments - **/ - @ApiModelProperty(example = "Production and Sandbox", value = "Comma separated list of gateway environments. ") - public String getGatewayEnvironments() { - return gatewayEnvironments; - } - - public void setGatewayEnvironments(String gatewayEnvironments) { - this.gatewayEnvironments = gatewayEnvironments; - } - - public API sequences(List sequences) { - this.sequences = sequences; - return this; - } - - public API addSequencesItem(Sequence sequencesItem) { - this.sequences.add(sequencesItem); - return this; - } - - /** - * Get sequences - * @return sequences - **/ - @ApiModelProperty(example = "null", value = "") - public List getSequences() { - return sequences; - } - - public void setSequences(List sequences) { - this.sequences = sequences; - } - - public API subscriptionAvailability(SubscriptionAvailabilityEnum subscriptionAvailability) { - this.subscriptionAvailability = subscriptionAvailability; - return this; - } - - /** - * Get subscriptionAvailability - * @return subscriptionAvailability - **/ - @ApiModelProperty(example = "current_tenant", value = "") - public SubscriptionAvailabilityEnum getSubscriptionAvailability() { - return subscriptionAvailability; - } - - public void setSubscriptionAvailability(SubscriptionAvailabilityEnum subscriptionAvailability) { - this.subscriptionAvailability = subscriptionAvailability; - } - - public API subscriptionAvailableTenants(List subscriptionAvailableTenants) { - this.subscriptionAvailableTenants = subscriptionAvailableTenants; - return this; - } - - public API addSubscriptionAvailableTenantsItem(String subscriptionAvailableTenantsItem) { - this.subscriptionAvailableTenants.add(subscriptionAvailableTenantsItem); - return this; - } - - /** - * Get subscriptionAvailableTenants - * @return subscriptionAvailableTenants - **/ - @ApiModelProperty(example = "null", value = "") - public List getSubscriptionAvailableTenants() { - return subscriptionAvailableTenants; - } - - public void setSubscriptionAvailableTenants(List subscriptionAvailableTenants) { - this.subscriptionAvailableTenants = subscriptionAvailableTenants; - } - - public API businessInformation(APIBusinessInformation businessInformation) { - this.businessInformation = businessInformation; - return this; - } - - /** - * Get businessInformation - * @return businessInformation - **/ - @ApiModelProperty(example = "null", value = "") - public APIBusinessInformation getBusinessInformation() { - return businessInformation; - } - - public void setBusinessInformation(APIBusinessInformation businessInformation) { - this.businessInformation = businessInformation; - } - - public API corsConfiguration(APICorsConfiguration corsConfiguration) { - this.corsConfiguration = corsConfiguration; - return this; - } - - /** - * Get corsConfiguration - * @return corsConfiguration - **/ - @ApiModelProperty(example = "null", value = "") - public APICorsConfiguration getCorsConfiguration() { - return corsConfiguration; - } - - public void setCorsConfiguration(APICorsConfiguration corsConfiguration) { - this.corsConfiguration = corsConfiguration; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - API API = (org.wso2.carbon.apimgt.integration.client.publisher.model.API) o; - return Objects.equals(this.id, API.id) && - Objects.equals(this.name, API.name) && - Objects.equals(this.description, API.description) && - Objects.equals(this.context, API.context) && - Objects.equals(this.version, API.version) && - Objects.equals(this.provider, API.provider) && - Objects.equals(this.apiDefinition, API.apiDefinition) && - Objects.equals(this.wsdlUri, API.wsdlUri) && - Objects.equals(this.status, API.status) && - Objects.equals(this.responseCaching, API.responseCaching) && - Objects.equals(this.cacheTimeout, API.cacheTimeout) && - Objects.equals(this.destinationStatsEnabled, API.destinationStatsEnabled) && - Objects.equals(this.isDefaultVersion, API.isDefaultVersion) && - Objects.equals(this.transport, API.transport) && - Objects.equals(this.tags, API.tags) && - Objects.equals(this.tiers, API.tiers) && - Objects.equals(this.maxTps, API.maxTps) && - Objects.equals(this.thumbnailUri, API.thumbnailUri) && - Objects.equals(this.visibility, API.visibility) && - Objects.equals(this.visibleRoles, API.visibleRoles) && - Objects.equals(this.visibleTenants, API.visibleTenants) && - Objects.equals(this.endpointConfig, API.endpointConfig) && - Objects.equals(this.endpointSecurity, API.endpointSecurity) && - Objects.equals(this.gatewayEnvironments, API.gatewayEnvironments) && - Objects.equals(this.sequences, API.sequences) && - Objects.equals(this.subscriptionAvailability, API.subscriptionAvailability) && - Objects.equals(this.subscriptionAvailableTenants, API.subscriptionAvailableTenants) && - Objects.equals(this.businessInformation, API.businessInformation) && - Objects.equals(this.corsConfiguration, API.corsConfiguration); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, description, context, version, provider, apiDefinition, wsdlUri, status, responseCaching, cacheTimeout, destinationStatsEnabled, isDefaultVersion, transport, tags, tiers, maxTps, thumbnailUri, visibility, visibleRoles, visibleTenants, endpointConfig, endpointSecurity, gatewayEnvironments, sequences, subscriptionAvailability, subscriptionAvailableTenants, businessInformation, corsConfiguration); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class API {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); - sb.append(" apiDefinition: ").append(toIndentedString(apiDefinition)).append("\n"); - sb.append(" wsdlUri: ").append(toIndentedString(wsdlUri)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" responseCaching: ").append(toIndentedString(responseCaching)).append("\n"); - sb.append(" cacheTimeout: ").append(toIndentedString(cacheTimeout)).append("\n"); - sb.append(" destinationStatsEnabled: ").append(toIndentedString(destinationStatsEnabled)).append("\n"); - sb.append(" isDefaultVersion: ").append(toIndentedString(isDefaultVersion)).append("\n"); - sb.append(" transport: ").append(toIndentedString(transport)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n"); - sb.append(" maxTps: ").append(toIndentedString(maxTps)).append("\n"); - sb.append(" thumbnailUri: ").append(toIndentedString(thumbnailUri)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" visibleRoles: ").append(toIndentedString(visibleRoles)).append("\n"); - sb.append(" visibleTenants: ").append(toIndentedString(visibleTenants)).append("\n"); - sb.append(" endpointConfig: ").append(toIndentedString(endpointConfig)).append("\n"); - sb.append(" endpointSecurity: ").append(toIndentedString(endpointSecurity)).append("\n"); - sb.append(" gatewayEnvironments: ").append(toIndentedString(gatewayEnvironments)).append("\n"); - sb.append(" sequences: ").append(toIndentedString(sequences)).append("\n"); - sb.append(" subscriptionAvailability: ").append(toIndentedString(subscriptionAvailability)).append("\n"); - sb.append(" subscriptionAvailableTenants: ").append(toIndentedString(subscriptionAvailableTenants)).append("\n"); - sb.append(" businessInformation: ").append(toIndentedString(businessInformation)).append("\n"); - sb.append(" corsConfiguration: ").append(toIndentedString(corsConfiguration)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIBusinessInformation.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIBusinessInformation.java deleted file mode 100644 index 0ef7335d5e..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIBusinessInformation.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * APIBusinessInformation - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class APIBusinessInformation { - @JsonProperty("businessOwner") - private String businessOwner = null; - - @JsonProperty("businessOwnerEmail") - private String businessOwnerEmail = null; - - @JsonProperty("technicalOwner") - private String technicalOwner = null; - - @JsonProperty("technicalOwnerEmail") - private String technicalOwnerEmail = null; - - public APIBusinessInformation businessOwner(String businessOwner) { - this.businessOwner = businessOwner; - return this; - } - - /** - * Get businessOwner - * @return businessOwner - **/ - @ApiModelProperty(example = "businessowner", value = "") - public String getBusinessOwner() { - return businessOwner; - } - - public void setBusinessOwner(String businessOwner) { - this.businessOwner = businessOwner; - } - - public APIBusinessInformation businessOwnerEmail(String businessOwnerEmail) { - this.businessOwnerEmail = businessOwnerEmail; - return this; - } - - /** - * Get businessOwnerEmail - * @return businessOwnerEmail - **/ - @ApiModelProperty(example = "businessowner@wso2.com", value = "") - public String getBusinessOwnerEmail() { - return businessOwnerEmail; - } - - public void setBusinessOwnerEmail(String businessOwnerEmail) { - this.businessOwnerEmail = businessOwnerEmail; - } - - public APIBusinessInformation technicalOwner(String technicalOwner) { - this.technicalOwner = technicalOwner; - return this; - } - - /** - * Get technicalOwner - * @return technicalOwner - **/ - @ApiModelProperty(example = "technicalowner", value = "") - public String getTechnicalOwner() { - return technicalOwner; - } - - public void setTechnicalOwner(String technicalOwner) { - this.technicalOwner = technicalOwner; - } - - public APIBusinessInformation technicalOwnerEmail(String technicalOwnerEmail) { - this.technicalOwnerEmail = technicalOwnerEmail; - return this; - } - - /** - * Get technicalOwnerEmail - * @return technicalOwnerEmail - **/ - @ApiModelProperty(example = "technicalowner@wso2.com", value = "") - public String getTechnicalOwnerEmail() { - return technicalOwnerEmail; - } - - public void setTechnicalOwnerEmail(String technicalOwnerEmail) { - this.technicalOwnerEmail = technicalOwnerEmail; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIBusinessInformation aPIBusinessInformation = (APIBusinessInformation) o; - return Objects.equals(this.businessOwner, aPIBusinessInformation.businessOwner) && - Objects.equals(this.businessOwnerEmail, aPIBusinessInformation.businessOwnerEmail) && - Objects.equals(this.technicalOwner, aPIBusinessInformation.technicalOwner) && - Objects.equals(this.technicalOwnerEmail, aPIBusinessInformation.technicalOwnerEmail); - } - - @Override - public int hashCode() { - return Objects.hash(businessOwner, businessOwnerEmail, technicalOwner, technicalOwnerEmail); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIBusinessInformation {\n"); - - sb.append(" businessOwner: ").append(toIndentedString(businessOwner)).append("\n"); - sb.append(" businessOwnerEmail: ").append(toIndentedString(businessOwnerEmail)).append("\n"); - sb.append(" technicalOwner: ").append(toIndentedString(technicalOwner)).append("\n"); - sb.append(" technicalOwnerEmail: ").append(toIndentedString(technicalOwnerEmail)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APICorsConfiguration.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APICorsConfiguration.java deleted file mode 100644 index 707e5c08fc..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APICorsConfiguration.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * CORS configuration for the API - */ -@ApiModel(description = "CORS configuration for the API ") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class APICorsConfiguration { - @JsonProperty("corsConfigurationEnabled") - private Boolean corsConfigurationEnabled = false; - - @JsonProperty("accessControlAllowOrigins") - private List accessControlAllowOrigins = new ArrayList(); - - @JsonProperty("accessControlAllowCredentials") - private Boolean accessControlAllowCredentials = false; - - @JsonProperty("accessControlAllowHeaders") - private List accessControlAllowHeaders = new ArrayList(); - - @JsonProperty("accessControlAllowMethods") - private List accessControlAllowMethods = new ArrayList(); - - public APICorsConfiguration corsConfigurationEnabled(Boolean corsConfigurationEnabled) { - this.corsConfigurationEnabled = corsConfigurationEnabled; - return this; - } - - /** - * Get corsConfigurationEnabled - * @return corsConfigurationEnabled - **/ - @ApiModelProperty(example = "null", value = "") - public Boolean getCorsConfigurationEnabled() { - return corsConfigurationEnabled; - } - - public void setCorsConfigurationEnabled(Boolean corsConfigurationEnabled) { - this.corsConfigurationEnabled = corsConfigurationEnabled; - } - - public APICorsConfiguration accessControlAllowOrigins(List accessControlAllowOrigins) { - this.accessControlAllowOrigins = accessControlAllowOrigins; - return this; - } - - public APICorsConfiguration addAccessControlAllowOriginsItem(String accessControlAllowOriginsItem) { - this.accessControlAllowOrigins.add(accessControlAllowOriginsItem); - return this; - } - - /** - * Get accessControlAllowOrigins - * @return accessControlAllowOrigins - **/ - @ApiModelProperty(example = "null", value = "") - public List getAccessControlAllowOrigins() { - return accessControlAllowOrigins; - } - - public void setAccessControlAllowOrigins(List accessControlAllowOrigins) { - this.accessControlAllowOrigins = accessControlAllowOrigins; - } - - public APICorsConfiguration accessControlAllowCredentials(Boolean accessControlAllowCredentials) { - this.accessControlAllowCredentials = accessControlAllowCredentials; - return this; - } - - /** - * Get accessControlAllowCredentials - * @return accessControlAllowCredentials - **/ - @ApiModelProperty(example = "null", value = "") - public Boolean getAccessControlAllowCredentials() { - return accessControlAllowCredentials; - } - - public void setAccessControlAllowCredentials(Boolean accessControlAllowCredentials) { - this.accessControlAllowCredentials = accessControlAllowCredentials; - } - - public APICorsConfiguration accessControlAllowHeaders(List accessControlAllowHeaders) { - this.accessControlAllowHeaders = accessControlAllowHeaders; - return this; - } - - public APICorsConfiguration addAccessControlAllowHeadersItem(String accessControlAllowHeadersItem) { - this.accessControlAllowHeaders.add(accessControlAllowHeadersItem); - return this; - } - - /** - * Get accessControlAllowHeaders - * @return accessControlAllowHeaders - **/ - @ApiModelProperty(example = "null", value = "") - public List getAccessControlAllowHeaders() { - return accessControlAllowHeaders; - } - - public void setAccessControlAllowHeaders(List accessControlAllowHeaders) { - this.accessControlAllowHeaders = accessControlAllowHeaders; - } - - public APICorsConfiguration accessControlAllowMethods(List accessControlAllowMethods) { - this.accessControlAllowMethods = accessControlAllowMethods; - return this; - } - - public APICorsConfiguration addAccessControlAllowMethodsItem(String accessControlAllowMethodsItem) { - this.accessControlAllowMethods.add(accessControlAllowMethodsItem); - return this; - } - - /** - * Get accessControlAllowMethods - * @return accessControlAllowMethods - **/ - @ApiModelProperty(example = "null", value = "") - public List getAccessControlAllowMethods() { - return accessControlAllowMethods; - } - - public void setAccessControlAllowMethods(List accessControlAllowMethods) { - this.accessControlAllowMethods = accessControlAllowMethods; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APICorsConfiguration aPICorsConfiguration = (APICorsConfiguration) o; - return Objects.equals(this.corsConfigurationEnabled, aPICorsConfiguration.corsConfigurationEnabled) && - Objects.equals(this.accessControlAllowOrigins, aPICorsConfiguration.accessControlAllowOrigins) && - Objects.equals(this.accessControlAllowCredentials, aPICorsConfiguration.accessControlAllowCredentials) && - Objects.equals(this.accessControlAllowHeaders, aPICorsConfiguration.accessControlAllowHeaders) && - Objects.equals(this.accessControlAllowMethods, aPICorsConfiguration.accessControlAllowMethods); - } - - @Override - public int hashCode() { - return Objects.hash(corsConfigurationEnabled, accessControlAllowOrigins, accessControlAllowCredentials, accessControlAllowHeaders, accessControlAllowMethods); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APICorsConfiguration {\n"); - - sb.append(" corsConfigurationEnabled: ").append(toIndentedString(corsConfigurationEnabled)).append("\n"); - sb.append(" accessControlAllowOrigins: ").append(toIndentedString(accessControlAllowOrigins)).append("\n"); - sb.append(" accessControlAllowCredentials: ").append(toIndentedString(accessControlAllowCredentials)).append("\n"); - sb.append(" accessControlAllowHeaders: ").append(toIndentedString(accessControlAllowHeaders)).append("\n"); - sb.append(" accessControlAllowMethods: ").append(toIndentedString(accessControlAllowMethods)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIEndpointSecurity.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIEndpointSecurity.java deleted file mode 100644 index 9ffc7088ec..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIEndpointSecurity.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * APIEndpointSecurity - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class APIEndpointSecurity { - /** - * Gets or Sets type - */ - public enum TypeEnum { - BASIC("basic"), - - DIGEST("digest"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String text) { - for (TypeEnum b : TypeEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("type") - private TypeEnum type = null; - - @JsonProperty("username") - private String username = null; - - @JsonProperty("password") - private String password = null; - - public APIEndpointSecurity type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @ApiModelProperty(example = "basic", value = "") - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - public APIEndpointSecurity username(String username) { - this.username = username; - return this; - } - - /** - * Get username - * @return username - **/ - @ApiModelProperty(example = "admin", value = "") - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public APIEndpointSecurity password(String password) { - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @ApiModelProperty(example = "password", value = "") - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIEndpointSecurity aPIEndpointSecurity = (APIEndpointSecurity) o; - return Objects.equals(this.type, aPIEndpointSecurity.type) && - Objects.equals(this.username, aPIEndpointSecurity.username) && - Objects.equals(this.password, aPIEndpointSecurity.password); - } - - @Override - public int hashCode() { - return Objects.hash(type, username, password); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIEndpointSecurity {\n"); - - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIInfo.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIInfo.java deleted file mode 100644 index 05abbdc698..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIInfo.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * APIInfo - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class APIInfo { - @JsonProperty("id") - private String id = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("context") - private String context = null; - - @JsonProperty("version") - private String version = null; - - @JsonProperty("provider") - private String provider = null; - - @JsonProperty("status") - private String status = null; - - public APIInfo id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public APIInfo name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorAPI", value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public APIInfo description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "A calculator API that supports basic operations", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public APIInfo context(String context) { - this.context = context; - return this; - } - - /** - * Get context - * @return context - **/ - @ApiModelProperty(example = "CalculatorAPI", value = "") - public String getContext() { - return context; - } - - public void setContext(String context) { - this.context = context; - } - - public APIInfo version(String version) { - this.version = version; - return this; - } - - /** - * Get version - * @return version - **/ - @ApiModelProperty(example = "1.0.0", value = "") - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public APIInfo provider(String provider) { - this.provider = provider; - return this; - } - - /** - * If the provider value is not given, the user invoking the API will be used as the provider. - * @return provider - **/ - @ApiModelProperty(example = "admin", value = "If the provider value is not given, the user invoking the API will be used as the provider. ") - public String getProvider() { - return provider; - } - - public void setProvider(String provider) { - this.provider = provider; - } - - public APIInfo status(String status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @ApiModelProperty(example = "CREATED", value = "") - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIInfo aPIInfo = (APIInfo) o; - return Objects.equals(this.id, aPIInfo.id) && - Objects.equals(this.name, aPIInfo.name) && - Objects.equals(this.description, aPIInfo.description) && - Objects.equals(this.context, aPIInfo.context) && - Objects.equals(this.version, aPIInfo.version) && - Objects.equals(this.provider, aPIInfo.provider) && - Objects.equals(this.status, aPIInfo.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, description, context, version, provider, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIInfo {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIList.java deleted file mode 100644 index f62fea9a8c..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * APIList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class APIList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public APIList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of APIs returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of APIs returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public APIList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/apis?limit=1&offset=2&query=", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public APIList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/apis?limit=1&offset=0&query=", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public APIList list(List list) { - this.list = list; - return this; - } - - public APIList addListItem(APIInfo listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIList aPIList = (APIList) o; - return Objects.equals(this.count, aPIList.count) && - Objects.equals(this.next, aPIList.next) && - Objects.equals(this.previous, aPIList.previous) && - Objects.equals(this.list, aPIList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIMaxTps.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIMaxTps.java deleted file mode 100644 index a6a83ffd53..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/APIMaxTps.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * APIMaxTps - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class APIMaxTps { - @JsonProperty("production") - private Long production = null; - - @JsonProperty("sandbox") - private Long sandbox = null; - - public APIMaxTps production(Long production) { - this.production = production; - return this; - } - - /** - * Get production - * @return production - **/ - @ApiModelProperty(example = "1000", value = "") - public Long getProduction() { - return production; - } - - public void setProduction(Long production) { - this.production = production; - } - - public APIMaxTps sandbox(Long sandbox) { - this.sandbox = sandbox; - return this; - } - - /** - * Get sandbox - * @return sandbox - **/ - @ApiModelProperty(example = "1000", value = "") - public Long getSandbox() { - return sandbox; - } - - public void setSandbox(Long sandbox) { - this.sandbox = sandbox; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIMaxTps aPIMaxTps = (APIMaxTps) o; - return Objects.equals(this.production, aPIMaxTps.production) && - Objects.equals(this.sandbox, aPIMaxTps.sandbox); - } - - @Override - public int hashCode() { - return Objects.hash(production, sandbox); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIMaxTps {\n"); - - sb.append(" production: ").append(toIndentedString(production)).append("\n"); - sb.append(" sandbox: ").append(toIndentedString(sandbox)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Application.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Application.java deleted file mode 100644 index 09e0fa9429..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Application.java +++ /dev/null @@ -1,214 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * Application - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class Application { - @JsonProperty("applicationId") - private String applicationId = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("subscriber") - private String subscriber = null; - - @JsonProperty("throttlingTier") - private String throttlingTier = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("groupId") - private String groupId = null; - - public Application applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Get applicationId - * @return applicationId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public Application name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorApp", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Application subscriber(String subscriber) { - this.subscriber = subscriber; - return this; - } - - /** - * Get subscriber - * @return subscriber - **/ - @ApiModelProperty(example = "admin", value = "") - public String getSubscriber() { - return subscriber; - } - - public void setSubscriber(String subscriber) { - this.subscriber = subscriber; - } - - public Application throttlingTier(String throttlingTier) { - this.throttlingTier = throttlingTier; - return this; - } - - /** - * Get throttlingTier - * @return throttlingTier - **/ - @ApiModelProperty(example = "Unlimited", required = true, value = "") - public String getThrottlingTier() { - return throttlingTier; - } - - public void setThrottlingTier(String throttlingTier) { - this.throttlingTier = throttlingTier; - } - - public Application description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "Sample calculator application", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Application groupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get groupId - * @return groupId - **/ - @ApiModelProperty(example = "", value = "") - public String getGroupId() { - return groupId; - } - - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Application application = (Application) o; - return Objects.equals(this.applicationId, application.applicationId) && - Objects.equals(this.name, application.name) && - Objects.equals(this.subscriber, application.subscriber) && - Objects.equals(this.throttlingTier, application.throttlingTier) && - Objects.equals(this.description, application.description) && - Objects.equals(this.groupId, application.groupId); - } - - @Override - public int hashCode() { - return Objects.hash(applicationId, name, subscriber, throttlingTier, description, groupId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Application {\n"); - - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" subscriber: ").append(toIndentedString(subscriber)).append("\n"); - sb.append(" throttlingTier: ").append(toIndentedString(throttlingTier)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Document.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Document.java deleted file mode 100644 index d0dfa2ad90..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Document.java +++ /dev/null @@ -1,365 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * Document - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class Document { - @JsonProperty("documentId") - private String documentId = null; - - @JsonProperty("name") - private String name = null; - - /** - * Gets or Sets type - */ - public enum TypeEnum { - HOWTO("HOWTO"), - - SAMPLES("SAMPLES"), - - PUBLIC_FORUM("PUBLIC_FORUM"), - - SUPPORT_FORUM("SUPPORT_FORUM"), - - API_MESSAGE_FORMAT("API_MESSAGE_FORMAT"), - - SWAGGER_DOC("SWAGGER_DOC"), - - OTHER("OTHER"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String text) { - for (TypeEnum b : TypeEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("type") - private TypeEnum type = null; - - @JsonProperty("summary") - private String summary = null; - - /** - * Gets or Sets sourceType - */ - public enum SourceTypeEnum { - INLINE("INLINE"), - - URL("URL"), - - FILE("FILE"); - - private String value; - - SourceTypeEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SourceTypeEnum fromValue(String text) { - for (SourceTypeEnum b : SourceTypeEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("sourceType") - private SourceTypeEnum sourceType = null; - - @JsonProperty("sourceUrl") - private String sourceUrl = null; - - @JsonProperty("otherTypeName") - private String otherTypeName = null; - - /** - * Gets or Sets visibility - */ - public enum VisibilityEnum { - OWNER_ONLY("OWNER_ONLY"), - - PRIVATE("PRIVATE"), - - API_LEVEL("API_LEVEL"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static VisibilityEnum fromValue(String text) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("visibility") - private VisibilityEnum visibility = null; - - public Document documentId(String documentId) { - this.documentId = documentId; - return this; - } - - /** - * Get documentId - * @return documentId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getDocumentId() { - return documentId; - } - - public void setDocumentId(String documentId) { - this.documentId = documentId; - } - - public Document name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorDoc", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Document type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @ApiModelProperty(example = "HOWTO", required = true, value = "") - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - public Document summary(String summary) { - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @ApiModelProperty(example = "Summary of Calculator Documentation", value = "") - public String getSummary() { - return summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - public Document sourceType(SourceTypeEnum sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get sourceType - * @return sourceType - **/ - @ApiModelProperty(example = "INLINE", required = true, value = "") - public SourceTypeEnum getSourceType() { - return sourceType; - } - - public void setSourceType(SourceTypeEnum sourceType) { - this.sourceType = sourceType; - } - - public Document sourceUrl(String sourceUrl) { - this.sourceUrl = sourceUrl; - return this; - } - - /** - * Get sourceUrl - * @return sourceUrl - **/ - @ApiModelProperty(example = "", value = "") - public String getSourceUrl() { - return sourceUrl; - } - - public void setSourceUrl(String sourceUrl) { - this.sourceUrl = sourceUrl; - } - - public Document otherTypeName(String otherTypeName) { - this.otherTypeName = otherTypeName; - return this; - } - - /** - * Get otherTypeName - * @return otherTypeName - **/ - @ApiModelProperty(example = "", value = "") - public String getOtherTypeName() { - return otherTypeName; - } - - public void setOtherTypeName(String otherTypeName) { - this.otherTypeName = otherTypeName; - } - - public Document visibility(VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Get visibility - * @return visibility - **/ - @ApiModelProperty(example = "API_LEVEL", required = true, value = "") - public VisibilityEnum getVisibility() { - return visibility; - } - - public void setVisibility(VisibilityEnum visibility) { - this.visibility = visibility; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Document document = (Document) o; - return Objects.equals(this.documentId, document.documentId) && - Objects.equals(this.name, document.name) && - Objects.equals(this.type, document.type) && - Objects.equals(this.summary, document.summary) && - Objects.equals(this.sourceType, document.sourceType) && - Objects.equals(this.sourceUrl, document.sourceUrl) && - Objects.equals(this.otherTypeName, document.otherTypeName) && - Objects.equals(this.visibility, document.visibility); - } - - @Override - public int hashCode() { - return Objects.hash(documentId, name, type, summary, sourceType, sourceUrl, otherTypeName, visibility); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Document {\n"); - - sb.append(" documentId: ").append(toIndentedString(documentId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); - sb.append(" sourceUrl: ").append(toIndentedString(sourceUrl)).append("\n"); - sb.append(" otherTypeName: ").append(toIndentedString(otherTypeName)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/DocumentList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/DocumentList.java deleted file mode 100644 index 9a9c16003f..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/DocumentList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * DocumentList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class DocumentList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public DocumentList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of Documents returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of Documents returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public DocumentList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/apis/01234567-0123-0123-0123-012345678901/documents?limit=1&offset=2", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public DocumentList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/apis/01234567-0123-0123-0123-012345678901/documents?limit=1&offset=0", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public DocumentList list(List list) { - this.list = list; - return this; - } - - public DocumentList addListItem(Document listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DocumentList documentList = (DocumentList) o; - return Objects.equals(this.count, documentList.count) && - Objects.equals(this.next, documentList.next) && - Objects.equals(this.previous, documentList.previous) && - Objects.equals(this.list, documentList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DocumentList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Environment.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Environment.java deleted file mode 100644 index 7744ed91b7..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Environment.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * Environment - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class Environment { - @JsonProperty("name") - private String name = null; - - @JsonProperty("type") - private String type = null; - - @JsonProperty("serverUrl") - private String serverUrl = null; - - @JsonProperty("showInApiConsole") - private Boolean showInApiConsole = null; - - @JsonProperty("endpoints") - private EnvironmentEndpoints endpoints = null; - - public Environment name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "Production and Sandbox", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Environment type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @ApiModelProperty(example = "hybrid", required = true, value = "") - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Environment serverUrl(String serverUrl) { - this.serverUrl = serverUrl; - return this; - } - - /** - * Get serverUrl - * @return serverUrl - **/ - @ApiModelProperty(example = "https://localhost:9443//services/", required = true, value = "") - public String getServerUrl() { - return serverUrl; - } - - public void setServerUrl(String serverUrl) { - this.serverUrl = serverUrl; - } - - public Environment showInApiConsole(Boolean showInApiConsole) { - this.showInApiConsole = showInApiConsole; - return this; - } - - /** - * Get showInApiConsole - * @return showInApiConsole - **/ - @ApiModelProperty(example = "true", required = true, value = "") - public Boolean getShowInApiConsole() { - return showInApiConsole; - } - - public void setShowInApiConsole(Boolean showInApiConsole) { - this.showInApiConsole = showInApiConsole; - } - - public Environment endpoints(EnvironmentEndpoints endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Get endpoints - * @return endpoints - **/ - @ApiModelProperty(example = "null", required = true, value = "") - public EnvironmentEndpoints getEndpoints() { - return endpoints; - } - - public void setEndpoints(EnvironmentEndpoints endpoints) { - this.endpoints = endpoints; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Environment environment = (Environment) o; - return Objects.equals(this.name, environment.name) && - Objects.equals(this.type, environment.type) && - Objects.equals(this.serverUrl, environment.serverUrl) && - Objects.equals(this.showInApiConsole, environment.showInApiConsole) && - Objects.equals(this.endpoints, environment.endpoints); - } - - @Override - public int hashCode() { - return Objects.hash(name, type, serverUrl, showInApiConsole, endpoints); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Environment {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" serverUrl: ").append(toIndentedString(serverUrl)).append("\n"); - sb.append(" showInApiConsole: ").append(toIndentedString(showInApiConsole)).append("\n"); - sb.append(" endpoints: ").append(toIndentedString(endpoints)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/EnvironmentEndpoints.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/EnvironmentEndpoints.java deleted file mode 100644 index d25686dcdb..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/EnvironmentEndpoints.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * EnvironmentEndpoints - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class EnvironmentEndpoints { - @JsonProperty("http") - private String http = null; - - @JsonProperty("https") - private String https = null; - - public EnvironmentEndpoints http(String http) { - this.http = http; - return this; - } - - /** - * HTTP environment URL - * @return http - **/ - @ApiModelProperty(example = "http://localhost:8280", value = "HTTP environment URL") - public String getHttp() { - return http; - } - - public void setHttp(String http) { - this.http = http; - } - - public EnvironmentEndpoints https(String https) { - this.https = https; - return this; - } - - /** - * HTTPS environment URL - * @return https - **/ - @ApiModelProperty(example = "https://localhost:8244", value = "HTTPS environment URL") - public String getHttps() { - return https; - } - - public void setHttps(String https) { - this.https = https; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnvironmentEndpoints environmentEndpoints = (EnvironmentEndpoints) o; - return Objects.equals(this.http, environmentEndpoints.http) && - Objects.equals(this.https, environmentEndpoints.https); - } - - @Override - public int hashCode() { - return Objects.hash(http, https); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnvironmentEndpoints {\n"); - - sb.append(" http: ").append(toIndentedString(http)).append("\n"); - sb.append(" https: ").append(toIndentedString(https)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/EnvironmentList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/EnvironmentList.java deleted file mode 100644 index 6440009cb2..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/EnvironmentList.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * EnvironmentList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class EnvironmentList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public EnvironmentList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of Environments returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of Environments returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public EnvironmentList list(List list) { - this.list = list; - return this; - } - - public EnvironmentList addListItem(Environment listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnvironmentList environmentList = (EnvironmentList) o; - return Objects.equals(this.count, environmentList.count) && - Objects.equals(this.list, environmentList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnvironmentList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Error.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Error.java deleted file mode 100644 index 94ced5af6b..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Error.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * Error - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class Error { - @JsonProperty("code") - private Long code = null; - - @JsonProperty("message") - private String message = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("moreInfo") - private String moreInfo = null; - - @JsonProperty("error") - private List error = new ArrayList(); - - public Error code(Long code) { - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @ApiModelProperty(example = "null", required = true, value = "") - public Long getCode() { - return code; - } - - public void setCode(Long code) { - this.code = code; - } - - public Error message(String message) { - this.message = message; - return this; - } - - /** - * Error message. - * @return message - **/ - @ApiModelProperty(example = "null", required = true, value = "Error message.") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public Error description(String description) { - this.description = description; - return this; - } - - /** - * A detail description about the error message. - * @return description - **/ - @ApiModelProperty(example = "null", value = "A detail description about the error message. ") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Error moreInfo(String moreInfo) { - this.moreInfo = moreInfo; - return this; - } - - /** - * Preferably an url with more details about the error. - * @return moreInfo - **/ - @ApiModelProperty(example = "null", value = "Preferably an url with more details about the error. ") - public String getMoreInfo() { - return moreInfo; - } - - public void setMoreInfo(String moreInfo) { - this.moreInfo = moreInfo; - } - - public Error error(List error) { - this.error = error; - return this; - } - - public Error addErrorItem(ErrorListItem errorItem) { - this.error.add(errorItem); - return this; - } - - /** - * If there are more than one error list them out. For example, list out validation errors by each field. - * @return error - **/ - @ApiModelProperty(example = "null", value = "If there are more than one error list them out. For example, list out validation errors by each field. ") - public List getError() { - return error; - } - - public void setError(List error) { - this.error = error; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Error error = (Error) o; - return Objects.equals(this.code, error.code) && - Objects.equals(this.message, error.message) && - Objects.equals(this.description, error.description) && - Objects.equals(this.moreInfo, error.moreInfo) && - Objects.equals(this.error, error.error); - } - - @Override - public int hashCode() { - return Objects.hash(code, message, description, moreInfo, error); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Error {\n"); - - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" moreInfo: ").append(toIndentedString(moreInfo)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/ErrorListItem.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/ErrorListItem.java deleted file mode 100644 index a25c6827a3..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/ErrorListItem.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * ErrorListItem - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class ErrorListItem { - @JsonProperty("code") - private String code = null; - - @JsonProperty("message") - private String message = null; - - public ErrorListItem code(String code) { - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @ApiModelProperty(example = "null", required = true, value = "") - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public ErrorListItem message(String message) { - this.message = message; - return this; - } - - /** - * Description about individual errors occurred - * @return message - **/ - @ApiModelProperty(example = "null", required = true, value = "Description about individual errors occurred ") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorListItem errorListItem = (ErrorListItem) o; - return Objects.equals(this.code, errorListItem.code) && - Objects.equals(this.message, errorListItem.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorListItem {\n"); - - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/FileInfo.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/FileInfo.java deleted file mode 100644 index bfcd100386..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/FileInfo.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * FileInfo - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class FileInfo { - @JsonProperty("relativePath") - private String relativePath = null; - - @JsonProperty("mediaType") - private String mediaType = null; - - public FileInfo relativePath(String relativePath) { - this.relativePath = relativePath; - return this; - } - - /** - * relative location of the file (excluding the base context and host of the Publisher API) - * @return relativePath - **/ - @ApiModelProperty(example = "apis/01234567-0123-0123-0123-012345678901/thumbnail", value = "relative location of the file (excluding the base context and host of the Publisher API)") - public String getRelativePath() { - return relativePath; - } - - public void setRelativePath(String relativePath) { - this.relativePath = relativePath; - } - - public FileInfo mediaType(String mediaType) { - this.mediaType = mediaType; - return this; - } - - /** - * media-type of the file - * @return mediaType - **/ - @ApiModelProperty(example = "image/jpeg", value = "media-type of the file") - public String getMediaType() { - return mediaType; - } - - public void setMediaType(String mediaType) { - this.mediaType = mediaType; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileInfo fileInfo = (FileInfo) o; - return Objects.equals(this.relativePath, fileInfo.relativePath) && - Objects.equals(this.mediaType, fileInfo.mediaType); - } - - @Override - public int hashCode() { - return Objects.hash(relativePath, mediaType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileInfo {\n"); - - sb.append(" relativePath: ").append(toIndentedString(relativePath)).append("\n"); - sb.append(" mediaType: ").append(toIndentedString(mediaType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Sequence.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Sequence.java deleted file mode 100644 index 7cd5b67d86..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Sequence.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * Sequence - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class Sequence { - @JsonProperty("name") - private String name = null; - - @JsonProperty("config") - private String config = null; - - @JsonProperty("type") - private String type = null; - - public Sequence name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "log_in_message", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Sequence config(String config) { - this.config = config; - return this; - } - - /** - * Get config - * @return config - **/ - @ApiModelProperty(example = "", value = "") - public String getConfig() { - return config; - } - - public void setConfig(String config) { - this.config = config; - } - - public Sequence type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @ApiModelProperty(example = "in", value = "") - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Sequence sequence = (Sequence) o; - return Objects.equals(this.name, sequence.name) && - Objects.equals(this.config, sequence.config) && - Objects.equals(this.type, sequence.type); - } - - @Override - public int hashCode() { - return Objects.hash(name, config, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Sequence {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" config: ").append(toIndentedString(config)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Subscription.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Subscription.java deleted file mode 100644 index 5a4c4c3ca6..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Subscription.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * Subscription - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class Subscription { - @JsonProperty("subscriptionId") - private String subscriptionId = null; - - @JsonProperty("applicationId") - private String applicationId = null; - - @JsonProperty("apiIdentifier") - private String apiIdentifier = null; - - @JsonProperty("tier") - private String tier = null; - - /** - * Gets or Sets status - */ - public enum StatusEnum { - BLOCKED("BLOCKED"), - - PROD_ONLY_BLOCKED("PROD_ONLY_BLOCKED"), - - UNBLOCKED("UNBLOCKED"), - - ON_HOLD("ON_HOLD"), - - REJECTED("REJECTED"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String text) { - for (StatusEnum b : StatusEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("status") - private StatusEnum status = null; - - public Subscription subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get subscriptionId - * @return subscriptionId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getSubscriptionId() { - return subscriptionId; - } - - public void setSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - } - - public Subscription applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Get applicationId - * @return applicationId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", required = true, value = "") - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public Subscription apiIdentifier(String apiIdentifier) { - this.apiIdentifier = apiIdentifier; - return this; - } - - /** - * Get apiIdentifier - * @return apiIdentifier - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", required = true, value = "") - public String getApiIdentifier() { - return apiIdentifier; - } - - public void setApiIdentifier(String apiIdentifier) { - this.apiIdentifier = apiIdentifier; - } - - public Subscription tier(String tier) { - this.tier = tier; - return this; - } - - /** - * Get tier - * @return tier - **/ - @ApiModelProperty(example = "Unlimited", required = true, value = "") - public String getTier() { - return tier; - } - - public void setTier(String tier) { - this.tier = tier; - } - - public Subscription status(StatusEnum status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @ApiModelProperty(example = "UNBLOCKED", value = "") - public StatusEnum getStatus() { - return status; - } - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Subscription subscription = (Subscription) o; - return Objects.equals(this.subscriptionId, subscription.subscriptionId) && - Objects.equals(this.applicationId, subscription.applicationId) && - Objects.equals(this.apiIdentifier, subscription.apiIdentifier) && - Objects.equals(this.tier, subscription.tier) && - Objects.equals(this.status, subscription.status); - } - - @Override - public int hashCode() { - return Objects.hash(subscriptionId, applicationId, apiIdentifier, tier, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Subscription {\n"); - - sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" apiIdentifier: ").append(toIndentedString(apiIdentifier)).append("\n"); - sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/SubscriptionList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/SubscriptionList.java deleted file mode 100644 index 5c167402cd..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/SubscriptionList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * SubscriptionList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class SubscriptionList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public SubscriptionList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of Subscriptions returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of Subscriptions returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public SubscriptionList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/subscriptions?limit=1&offset=2&apiId=01234567-0123-0123-0123-012345678901&groupId=", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public SubscriptionList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/subscriptions?limit=1&offset=0&apiId=01234567-0123-0123-0123-012345678901&groupId=", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public SubscriptionList list(List list) { - this.list = list; - return this; - } - - public SubscriptionList addListItem(Subscription listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubscriptionList subscriptionList = (SubscriptionList) o; - return Objects.equals(this.count, subscriptionList.count) && - Objects.equals(this.next, subscriptionList.next) && - Objects.equals(this.previous, subscriptionList.previous) && - Objects.equals(this.list, subscriptionList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubscriptionList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Tier.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Tier.java deleted file mode 100644 index 7f0aa83910..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/Tier.java +++ /dev/null @@ -1,353 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - - -/** - * Tier - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class Tier { - @JsonProperty("name") - private String name = null; - - @JsonProperty("description") - private String description = null; - - /** - * Gets or Sets tierLevel - */ - public enum TierLevelEnum { - API("api"), - - APPLICATION("application"), - - RESOURCE("resource"); - - private String value; - - TierLevelEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TierLevelEnum fromValue(String text) { - for (TierLevelEnum b : TierLevelEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("tierLevel") - private TierLevelEnum tierLevel = null; - - @JsonProperty("attributes") - private Map attributes = new HashMap(); - - @JsonProperty("requestCount") - private Long requestCount = null; - - @JsonProperty("unitTime") - private Long unitTime = null; - - @JsonProperty("timeUnit") - private String timeUnit = null; - - /** - * This attribute declares whether this tier is available under commercial or free - */ - public enum TierPlanEnum { - FREE("FREE"), - - COMMERCIAL("COMMERCIAL"); - - private String value; - - TierPlanEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TierPlanEnum fromValue(String text) { - for (TierPlanEnum b : TierPlanEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("tierPlan") - private TierPlanEnum tierPlan = null; - - @JsonProperty("stopOnQuotaReach") - private Boolean stopOnQuotaReach = null; - - public Tier name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "Platinum", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Tier description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "Allows 50 request(s) per minute.", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Tier tierLevel(TierLevelEnum tierLevel) { - this.tierLevel = tierLevel; - return this; - } - - /** - * Get tierLevel - * @return tierLevel - **/ - @ApiModelProperty(example = "api", value = "") - public TierLevelEnum getTierLevel() { - return tierLevel; - } - - public void setTierLevel(TierLevelEnum tierLevel) { - this.tierLevel = tierLevel; - } - - public Tier attributes(Map attributes) { - this.attributes = attributes; - return this; - } - - public Tier putAttributesItem(String key, String attributesItem) { - this.attributes.put(key, attributesItem); - return this; - } - - /** - * Custom attributes added to the tier policy - * @return attributes - **/ - @ApiModelProperty(example = "null", value = "Custom attributes added to the tier policy ") - public Map getAttributes() { - return attributes; - } - - public void setAttributes(Map attributes) { - this.attributes = attributes; - } - - public Tier requestCount(Long requestCount) { - this.requestCount = requestCount; - return this; - } - - /** - * Maximum number of requests which can be sent within a provided unit time - * @return requestCount - **/ - @ApiModelProperty(example = "50", required = true, value = "Maximum number of requests which can be sent within a provided unit time ") - public Long getRequestCount() { - return requestCount; - } - - public void setRequestCount(Long requestCount) { - this.requestCount = requestCount; - } - - public Tier unitTime(Long unitTime) { - this.unitTime = unitTime; - return this; - } - - /** - * Get unitTime - * @return unitTime - **/ - @ApiModelProperty(example = "60000", required = true, value = "") - public Long getUnitTime() { - return unitTime; - } - - public void setUnitTime(Long unitTime) { - this.unitTime = unitTime; - } - - public Tier timeUnit(String timeUnit) { - this.timeUnit = timeUnit; - return this; - } - - /** - * Get timeUnit - * @return timeUnit - **/ - @ApiModelProperty(example = "min", value = "") - public String getTimeUnit() { - return timeUnit; - } - - public void setTimeUnit(String timeUnit) { - this.timeUnit = timeUnit; - } - - public Tier tierPlan(TierPlanEnum tierPlan) { - this.tierPlan = tierPlan; - return this; - } - - /** - * This attribute declares whether this tier is available under commercial or free - * @return tierPlan - **/ - @ApiModelProperty(example = "FREE", required = true, value = "This attribute declares whether this tier is available under commercial or free ") - public TierPlanEnum getTierPlan() { - return tierPlan; - } - - public void setTierPlan(TierPlanEnum tierPlan) { - this.tierPlan = tierPlan; - } - - public Tier stopOnQuotaReach(Boolean stopOnQuotaReach) { - this.stopOnQuotaReach = stopOnQuotaReach; - return this; - } - - /** - * By making this attribute to false, you are capabale of sending requests even if the request count exceeded within a unit time - * @return stopOnQuotaReach - **/ - @ApiModelProperty(example = "true", required = true, value = "By making this attribute to false, you are capabale of sending requests even if the request count exceeded within a unit time ") - public Boolean getStopOnQuotaReach() { - return stopOnQuotaReach; - } - - public void setStopOnQuotaReach(Boolean stopOnQuotaReach) { - this.stopOnQuotaReach = stopOnQuotaReach; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tier tier = (Tier) o; - return Objects.equals(this.name, tier.name) && - Objects.equals(this.description, tier.description) && - Objects.equals(this.tierLevel, tier.tierLevel) && - Objects.equals(this.attributes, tier.attributes) && - Objects.equals(this.requestCount, tier.requestCount) && - Objects.equals(this.unitTime, tier.unitTime) && - Objects.equals(this.timeUnit, tier.timeUnit) && - Objects.equals(this.tierPlan, tier.tierPlan) && - Objects.equals(this.stopOnQuotaReach, tier.stopOnQuotaReach); - } - - @Override - public int hashCode() { - return Objects.hash(name, description, tierLevel, attributes, requestCount, unitTime, timeUnit, tierPlan, stopOnQuotaReach); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tier {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" tierLevel: ").append(toIndentedString(tierLevel)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" requestCount: ").append(toIndentedString(requestCount)).append("\n"); - sb.append(" unitTime: ").append(toIndentedString(unitTime)).append("\n"); - sb.append(" timeUnit: ").append(toIndentedString(timeUnit)).append("\n"); - sb.append(" tierPlan: ").append(toIndentedString(tierPlan)).append("\n"); - sb.append(" stopOnQuotaReach: ").append(toIndentedString(stopOnQuotaReach)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/TierList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/TierList.java deleted file mode 100644 index a93c73e401..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/TierList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * TierList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class TierList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public TierList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of Tiers returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of Tiers returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public TierList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/tiers/api?limit=1&offset=2", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public TierList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/tiers/api?limit=1&offset=0", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public TierList list(List list) { - this.list = list; - return this; - } - - public TierList addListItem(Tier listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TierList tierList = (TierList) o; - return Objects.equals(this.count, tierList.count) && - Objects.equals(this.next, tierList.next) && - Objects.equals(this.previous, tierList.previous) && - Objects.equals(this.list, tierList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TierList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/TierPermission.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/TierPermission.java deleted file mode 100644 index 8069b9d1c9..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/model/TierPermission.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * WSO2 API Manager - Publisher API - * This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.publisher.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * TierPermission - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:49.624+05:30") -public class TierPermission { - /** - * Gets or Sets permissionType - */ - public enum PermissionTypeEnum { - ALLOW("allow"), - - DENY("deny"); - - private String value; - - PermissionTypeEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PermissionTypeEnum fromValue(String text) { - for (PermissionTypeEnum b : PermissionTypeEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("permissionType") - private PermissionTypeEnum permissionType = null; - - @JsonProperty("roles") - private List roles = new ArrayList(); - - public TierPermission permissionType(PermissionTypeEnum permissionType) { - this.permissionType = permissionType; - return this; - } - - /** - * Get permissionType - * @return permissionType - **/ - @ApiModelProperty(example = "deny", required = true, value = "") - public PermissionTypeEnum getPermissionType() { - return permissionType; - } - - public void setPermissionType(PermissionTypeEnum permissionType) { - this.permissionType = permissionType; - } - - public TierPermission roles(List roles) { - this.roles = roles; - return this; - } - - public TierPermission addRolesItem(String rolesItem) { - this.roles.add(rolesItem); - return this; - } - - /** - * Get roles - * @return roles - **/ - @ApiModelProperty(example = "null", required = true, value = "") - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TierPermission tierPermission = (TierPermission) o; - return Objects.equals(this.permissionType, tierPermission.permissionType) && - Objects.equals(this.roles, tierPermission.roles); - } - - @Override - public int hashCode() { - return Objects.hash(permissionType, roles); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TierPermission {\n"); - - sb.append(" permissionType: ").append(toIndentedString(permissionType)).append("\n"); - sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/StoreClient.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/StoreClient.java index da22e8ef7b..9c12b0cdaa 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/StoreClient.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/StoreClient.java @@ -18,12 +18,14 @@ package org.wso2.carbon.apimgt.integration.client.store; import feign.Feign; +import feign.Logger; import feign.RequestInterceptor; import feign.gson.GsonDecoder; import feign.gson.GsonEncoder; +import feign.slf4j.Slf4jLogger; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.apimgt.integration.client.configs.APIMConfigReader; -import org.wso2.carbon.apimgt.integration.client.store.api.*; +import org.wso2.carbon.apimgt.integration.generated.client.store.api.*; import org.wso2.carbon.core.util.Utils; /** @@ -32,40 +34,44 @@ import org.wso2.carbon.core.util.Utils; public class StoreClient { private static final org.apache.commons.logging.Log log = LogFactory.getLog(StoreClient.class); - private ApisAPIApi apis = null; - private APIindividualApi individualApi = null; + private APICollectionApi apis = null; + private APIIndividualApi individualApi = null; private ApplicationCollectionApi applications = null; - private ApplicationindividualApi individualApplication = null; + private ApplicationIndividualApi individualApplication = null; private SubscriptionCollectionApi subscriptions = null; - private SubscriptionindividualApi individualSubscription = null; - private TierindividualApi individualTier = null; + private SubscriptionIndividualApi individualSubscription = null; + private SubscriptionMultitpleApi subscriptionMultitpleApi = null; + private ThrottlingTierIndividualApi individualTier = null; private TagCollectionApi tags = null; - private TierCollectionApi tiers = null; + private ThrottlingTierCollectionApi tiers = null; public StoreClient(RequestInterceptor requestInterceptor) { - Feign.Builder builder = Feign.builder().requestInterceptor(requestInterceptor) - .encoder(new GsonEncoder()).decoder(new GsonDecoder()); + Feign.Builder builder = Feign.builder().client( + org.wso2.carbon.apimgt.integration.client.util.Utils.getSSLClient()).logger(new Slf4jLogger()) + .logLevel(Logger.Level.FULL) + .requestInterceptor(requestInterceptor).encoder(new GsonEncoder()).decoder(new GsonDecoder()); String basePath = Utils.replaceSystemProperty(APIMConfigReader.getInstance().getConfig().getStoreEndpoint()); - apis = builder.target(ApisAPIApi.class, basePath); - individualApi = builder.target(APIindividualApi.class, basePath); + apis = builder.target(APICollectionApi.class, basePath); + individualApi = builder.target(APIIndividualApi.class, basePath); applications = builder.target(ApplicationCollectionApi.class, basePath); - individualApplication = builder.target(ApplicationindividualApi.class, basePath); + individualApplication = builder.target(ApplicationIndividualApi.class, basePath); subscriptions = builder.target(SubscriptionCollectionApi.class, basePath); - individualSubscription = builder.target(SubscriptionindividualApi.class, basePath); + individualSubscription = builder.target(SubscriptionIndividualApi.class, basePath); + subscriptionMultitpleApi = builder.target(SubscriptionMultitpleApi.class, basePath); tags = builder.target(TagCollectionApi.class, basePath); - tiers = builder.target(TierCollectionApi.class, basePath); - individualTier = builder.target(TierindividualApi.class, basePath); + tiers = builder.target(ThrottlingTierCollectionApi.class, basePath); + individualTier = builder.target(ThrottlingTierIndividualApi.class, basePath); } - public ApisAPIApi getApis() { + public APICollectionApi getApis() { return apis; } - public APIindividualApi getIndividualApi() { + public APIIndividualApi getIndividualApi() { return individualApi; } @@ -73,7 +79,7 @@ public class StoreClient { return applications; } - public ApplicationindividualApi getIndividualApplication() { + public ApplicationIndividualApi getIndividualApplication() { return individualApplication; } @@ -81,11 +87,11 @@ public class StoreClient { return subscriptions; } - public SubscriptionindividualApi getIndividualSubscription() { + public SubscriptionIndividualApi getIndividualSubscription() { return individualSubscription; } - public TierindividualApi getIndividualTier() { + public ThrottlingTierIndividualApi getIndividualTier() { return individualTier; } @@ -93,7 +99,11 @@ public class StoreClient { return tags; } - public TierCollectionApi getTiers() { + public ThrottlingTierCollectionApi getTiers() { return tiers; } + + public SubscriptionMultitpleApi getSubscriptionMultitpleApi() { + return subscriptionMultitpleApi; + } } diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/APIindividualApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/APIindividualApi.java deleted file mode 100644 index ebbff73ebf..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/APIindividualApi.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.API; -import org.wso2.carbon.apimgt.integration.client.store.model.Document; -import org.wso2.carbon.apimgt.integration.client.store.model.DocumentList; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface APIindividualApi { - - - /** - * Downloads a FILE type document/get the inline content or source url of a certain document. - * Downloads a FILE type document/get the inline content or source url of a certain document. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param documentId **Document Identifier** (required) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return void - */ - @RequestLine("GET /apis/{apiId}/documents/{documentId}/content") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "X-WSO2-Tenant: {xWSO2Tenant}", - - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - void apisApiIdDocumentsDocumentIdContentGet(@Param("apiId") String apiId, @Param("documentId") String documentId, - @Param("xWSO2Tenant") String xWSO2Tenant, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Get a particular document associated with an API. - * Get a particular document associated with an API. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param documentId **Document Identifier** (required) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return Document - */ - @RequestLine("GET /apis/{apiId}/documents/{documentId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "X-WSO2-Tenant: {xWSO2Tenant}", - - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - Document apisApiIdDocumentsDocumentIdGet(@Param("apiId") String apiId, @Param("documentId") String documentId, - @Param("xWSO2Tenant") String xWSO2Tenant, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Get a list of documents belonging to an API. - * Get a list of documents belonging to an API. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return DocumentList - */ - @RequestLine("GET /apis/{apiId}/documents?limit={limit}&offset={offset}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "X-WSO2-Tenant: {xWSO2Tenant}", - - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - DocumentList apisApiIdDocumentsGet(@Param("apiId") String apiId, @Param("limit") Integer limit, - @Param("offset") Integer offset, @Param("xWSO2Tenant") String xWSO2Tenant, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch); - - /** - * Get Details of API - * Get details of an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @return API - */ - @RequestLine("GET /apis/{apiId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}", - - "X-WSO2-Tenant: {xWSO2Tenant}" - }) - API apisApiIdGet(@Param("apiId") String apiId, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, @Param("ifModifiedSince") String ifModifiedSince, - @Param("xWSO2Tenant") String xWSO2Tenant); - - /** - * Get the swagger of an API - * Get the swagger of an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @return void - */ - @RequestLine("GET /apis/{apiId}/swagger") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}", - - "X-WSO2-Tenant: {xWSO2Tenant}" - }) - void apisApiIdSwaggerGet(@Param("apiId") String apiId, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, @Param("ifModifiedSince") String ifModifiedSince, - @Param("xWSO2Tenant") String xWSO2Tenant); - - /** - * Get the thumbnail image - * Downloads a thumbnail image of an API - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly - * retrieved variant of the resource. (optional) - * @return void - */ - @RequestLine("GET /apis/{apiId}/thumbnail") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - void apisApiIdThumbnailGet(@Param("apiId") String apiId, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, @Param("ifModifiedSince") String ifModifiedSince); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApisAPIApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApisAPIApi.java deleted file mode 100644 index 35ccfdd3c0..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApisAPIApi.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.APIList; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface ApisAPIApi { - - - /** - * Retrieving APIs - * Get a list of available APIs qualifying under a given search condition. - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @param query **Search condition**. You can search in attributes by using an **\"attribute:\"** modifier. Eg. \"provider:wso2\" will match an API if the provider of the API is exactly \"wso2\". Additionally you can use wildcards. Eg. \"provider:wso2\\*\" will match an API if the provider of the API starts with \"wso2\". Supported attribute modifiers are [**version, context, status, description, subcontext, doc, provider, tag**] If no advanced attribute modifier has been specified, search will match the given query string against API Name. (optional) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return APIList - */ - @RequestLine("GET /apis?limit={limit}&offset={offset}&query={query}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "X-WSO2-Tenant: {xWSO2Tenant}", - - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - APIList apisGet(@Param("limit") Integer limit, @Param("offset") Integer offset, - @Param("xWSO2Tenant") String xWSO2Tenant, @Param("query") String query, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApplicationCollectionApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApplicationCollectionApi.java deleted file mode 100644 index f627e4dcc3..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApplicationCollectionApi.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.ApplicationList; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface ApplicationCollectionApi { - - - /** - * Get a list of applications - * Get a list of applications - * @param groupId Application Group Id (optional) - * @param query **Search condition**. You can search for an application by specifying the name as \"query\" attribute. Eg. \"app1\" will match an application if the name is exactly \"app1\". Currently this does not support wildcards. Given name must exactly match the application name. (optional) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return ApplicationList - */ - @RequestLine("GET /applications?groupId={groupId}&query={query}&limit={limit}&offset={offset}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - ApplicationList applicationsGet(@Param("groupId") String groupId, @Param("query") String query, - @Param("limit") Integer limit, @Param("offset") Integer offset, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApplicationindividualApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApplicationindividualApi.java deleted file mode 100644 index 7c2cabcd3f..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/ApplicationindividualApi.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.Application; -import org.wso2.carbon.apimgt.integration.client.store.model.ApplicationKey; -import org.wso2.carbon.apimgt.integration.client.store.model.ApplicationKeyGenerateRequest; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface ApplicationindividualApi { - - - /** - * Remove an application - * Remove an application - * @param applicationId **Application Identifier** consisting of the UUID of the Application. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("DELETE /applications/{applicationId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void applicationsApplicationIdDelete(@Param("applicationId") String applicationId, @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get application details - * Get application details - * @param applicationId **Application Identifier** consisting of the UUID of the Application. (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return Application - */ - @RequestLine("GET /applications/{applicationId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - Application applicationsApplicationIdGet(@Param("applicationId") String applicationId, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); - - /** - * Update application details - * Update application details - * @param applicationId **Application Identifier** consisting of the UUID of the Application. (required) - * @param body Application object that needs to be updated (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return Application - */ - @RequestLine("PUT /applications/{applicationId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}", - - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - Application applicationsApplicationIdPut(@Param("applicationId") String applicationId, Application body, - @Param("contentType") String contentType, @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Generate keys for application - * Generate keys for application - * @param applicationId **Application Identifier** consisting of the UUID of the Application. (required) - * @param body Application object the keys of which are to be generated (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return ApplicationKey - */ - @RequestLine("POST /applications/generate-keys?applicationId={applicationId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}", - - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - ApplicationKey applicationsGenerateKeysPost(@Param("applicationId") String applicationId, - ApplicationKeyGenerateRequest body, - @Param("contentType") String contentType, - @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Create a new application. - * Create a new application. - * @param body Application object that is to be created. (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @return Application - */ - @RequestLine("POST /applications") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}" - }) - Application applicationsPost(Application body, @Param("contentType") String contentType); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionCollectionApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionCollectionApi.java deleted file mode 100644 index 43075305f6..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionCollectionApi.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.SubscriptionList; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface SubscriptionCollectionApi { - - - /** - * Get subscription list. - * Get subscription list. The API Identifier or Application Identifier the subscriptions of which are to be returned are passed as parameters. - * @param apiId **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. (required) - * @param applicationId **Application Identifier** consisting of the UUID of the Application. (required) - * @param groupId Application Group Id (optional) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return SubscriptionList - */ - @RequestLine("GET /subscriptions?apiId={apiId}&applicationId={applicationId}&groupId={groupId}&offset={offset}&limit={limit}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - SubscriptionList subscriptionsGet(@Param("apiId") String apiId, @Param("applicationId") String applicationId, - @Param("groupId") String groupId, @Param("offset") Integer offset, - @Param("limit") Integer limit, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionindividualApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionindividualApi.java deleted file mode 100644 index 02e24ebe62..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionindividualApi.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.Subscription; - -import java.util.List; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface SubscriptionindividualApi { - - - /** - * Add a new subscription - * Add a new subscription - * @param body Subscription object that should to be added (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @return Subscription - */ - @RequestLine("POST /subscriptions") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}" - }) - Subscription subscriptionsPost(Subscription body, @Param("contentType") String contentType); - - /** - * Add new subscriptions - * Add new subscriptions - * @param body Subscription objects that should to be added (required) - * @param contentType Media type of the entity in the body. Default is JSON. (required) - * @return Subscription - */ - @RequestLine("POST /subscriptions/multiple") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Content-Type: {contentType}" - }) - List subscriptionsPost(List body, @Param("contentType") String contentType); - - /** - * Remove subscription - * Remove subscription - * @param subscriptionId Subscription Id (required) - * @param ifMatch Validator for conditional requests; based on ETag. (optional) - * @param ifUnmodifiedSince Validator for conditional requests; based on Last Modified header. (optional) - * @return void - */ - @RequestLine("DELETE /subscriptions/{subscriptionId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "If-Match: {ifMatch}", - - "If-Unmodified-Since: {ifUnmodifiedSince}" - }) - void subscriptionsSubscriptionIdDelete(@Param("subscriptionId") String subscriptionId, - @Param("ifMatch") String ifMatch, - @Param("ifUnmodifiedSince") String ifUnmodifiedSince); - - /** - * Get subscription details - * Get subscription details - * @param subscriptionId Subscription Id (required) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return Subscription - */ - @RequestLine("GET /subscriptions/{subscriptionId}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - Subscription subscriptionsSubscriptionIdGet(@Param("subscriptionId") String subscriptionId, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TagCollectionApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TagCollectionApi.java deleted file mode 100644 index e57da1494c..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TagCollectionApi.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.TagList; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface TagCollectionApi { - - - /** - * Get a list of tags that are already added to APIs - * Get a list of tags that are already added to APIs - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return TagList - */ - @RequestLine("GET /tags?limit={limit}&offset={offset}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "X-WSO2-Tenant: {xWSO2Tenant}", - - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - TagList tagsGet(@Param("limit") Integer limit, @Param("offset") Integer offset, - @Param("xWSO2Tenant") String xWSO2Tenant, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TierCollectionApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TierCollectionApi.java deleted file mode 100644 index bf8dce98a1..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TierCollectionApi.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.TierList; - - -import java.util.List; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface TierCollectionApi { - - - /** - * Get available tiers - * Get available tiers - * @param tierLevel List API or Application type tiers. (required) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @return List - */ - @RequestLine("GET /tiers/{tierLevel}?limit={limit}&offset={offset}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "X-WSO2-Tenant: {xWSO2Tenant}", - - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}" - }) - List tiersTierLevelGet(@Param("tierLevel") String tierLevel, @Param("limit") Integer limit, - @Param("offset") Integer offset, @Param("xWSO2Tenant") String xWSO2Tenant, - @Param("accept") String accept, @Param("ifNoneMatch") String ifNoneMatch); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TierindividualApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TierindividualApi.java deleted file mode 100644 index c62d53503e..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/TierindividualApi.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.api; - -import feign.Headers; -import feign.Param; -import feign.RequestLine; -import org.wso2.carbon.apimgt.integration.client.store.model.Tier; - - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public interface TierindividualApi { - - - /** - * Get tier details - * Get tier details - * @param tierName Tier name (required) - * @param tierLevel List API or Application type tiers. (required) - * @param xWSO2Tenant For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. (optional) - * @param accept Media types acceptable for the response. Default is JSON. (optional, default to JSON) - * @param ifNoneMatch Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. (optional) - * @param ifModifiedSince Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. (optional) - * @return Tier - */ - @RequestLine("GET /tiers/{tierLevel}/{tierName}") - @Headers({ - "Content-type: application/json", - "Accept: application/json", - "X-WSO2-Tenant: {xWSO2Tenant}", - - "Accept: {accept}", - - "If-None-Match: {ifNoneMatch}", - - "If-Modified-Since: {ifModifiedSince}" - }) - Tier tiersTierLevelTierNameGet(@Param("tierName") String tierName, @Param("tierLevel") String tierLevel, - @Param("xWSO2Tenant") String xWSO2Tenant, @Param("accept") String accept, - @Param("ifNoneMatch") String ifNoneMatch, - @Param("ifModifiedSince") String ifModifiedSince); -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/API.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/API.java deleted file mode 100644 index 90ea61fe6f..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/API.java +++ /dev/null @@ -1,466 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * API - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class API { - @JsonProperty("id") - private String id = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("context") - private String context = null; - - @JsonProperty("version") - private String version = null; - - @JsonProperty("provider") - private String provider = null; - - @JsonProperty("apiDefinition") - private String apiDefinition = null; - - @JsonProperty("wsdlUri") - private String wsdlUri = null; - - @JsonProperty("status") - private String status = null; - - @JsonProperty("isDefaultVersion") - private Boolean isDefaultVersion = null; - - @JsonProperty("transport") - private List transport = new ArrayList(); - - @JsonProperty("tags") - private List tags = new ArrayList(); - - @JsonProperty("tiers") - private List tiers = new ArrayList(); - - @JsonProperty("thumbnailUrl") - private String thumbnailUrl = null; - - @JsonProperty("endpointURLs") - private List endpointURLs = new ArrayList(); - - @JsonProperty("businessInformation") - private APIBusinessInformation businessInformation = null; - - public API id(String id) { - this.id = id; - return this; - } - - /** - * UUID of the api registry artifact - * @return id - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "UUID of the api registry artifact ") - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public API name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorAPI", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public API description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "A calculator API that supports basic operations", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public API context(String context) { - this.context = context; - return this; - } - - /** - * Get context - * @return context - **/ - @ApiModelProperty(example = "CalculatorAPI", required = true, value = "") - public String getContext() { - return context; - } - - public void setContext(String context) { - this.context = context; - } - - public API version(String version) { - this.version = version; - return this; - } - - /** - * Get version - * @return version - **/ - @ApiModelProperty(example = "1.0.0", required = true, value = "") - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public API provider(String provider) { - this.provider = provider; - return this; - } - - /** - * If the provider value is not given user invoking the api will be used as the provider. - * @return provider - **/ - @ApiModelProperty(example = "admin", required = true, value = "If the provider value is not given user invoking the api will be used as the provider. ") - public String getProvider() { - return provider; - } - - public void setProvider(String provider) { - this.provider = provider; - } - - public API apiDefinition(String apiDefinition) { - this.apiDefinition = apiDefinition; - return this; - } - - /** - * Swagger definition of the API which contains details about URI templates and scopes - * @return apiDefinition - **/ - @ApiModelProperty(example = "", required = true, value = "Swagger definition of the API which contains details about URI templates and scopes ") - public String getApiDefinition() { - return apiDefinition; - } - - public void setApiDefinition(String apiDefinition) { - this.apiDefinition = apiDefinition; - } - - public API wsdlUri(String wsdlUri) { - this.wsdlUri = wsdlUri; - return this; - } - - /** - * WSDL URL if the API is based on a WSDL endpoint - * @return wsdlUri - **/ - @ApiModelProperty(example = "http://www.webservicex.com/globalweather.asmx?wsdl", value = "WSDL URL if the API is based on a WSDL endpoint ") - public String getWsdlUri() { - return wsdlUri; - } - - public void setWsdlUri(String wsdlUri) { - this.wsdlUri = wsdlUri; - } - - public API status(String status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @ApiModelProperty(example = "PUBLISHED", required = true, value = "") - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public API isDefaultVersion(Boolean isDefaultVersion) { - this.isDefaultVersion = isDefaultVersion; - return this; - } - - /** - * Get isDefaultVersion - * @return isDefaultVersion - **/ - @ApiModelProperty(example = "false", value = "") - public Boolean getIsDefaultVersion() { - return isDefaultVersion; - } - - public void setIsDefaultVersion(Boolean isDefaultVersion) { - this.isDefaultVersion = isDefaultVersion; - } - - public API transport(List transport) { - this.transport = transport; - return this; - } - - public API addTransportItem(String transportItem) { - this.transport.add(transportItem); - return this; - } - - /** - * Get transport - * @return transport - **/ - @ApiModelProperty(example = "null", value = "") - public List getTransport() { - return transport; - } - - public void setTransport(List transport) { - this.transport = transport; - } - - public API tags(List tags) { - this.tags = tags; - return this; - } - - public API addTagsItem(String tagsItem) { - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @ApiModelProperty(example = "null", value = "") - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public API tiers(List tiers) { - this.tiers = tiers; - return this; - } - - public API addTiersItem(String tiersItem) { - this.tiers.add(tiersItem); - return this; - } - - /** - * Get tiers - * @return tiers - **/ - @ApiModelProperty(example = "null", value = "") - public List getTiers() { - return tiers; - } - - public void setTiers(List tiers) { - this.tiers = tiers; - } - - public API thumbnailUrl(String thumbnailUrl) { - this.thumbnailUrl = thumbnailUrl; - return this; - } - - /** - * Get thumbnailUrl - * @return thumbnailUrl - **/ - @ApiModelProperty(example = "", value = "") - public String getThumbnailUrl() { - return thumbnailUrl; - } - - public void setThumbnailUrl(String thumbnailUrl) { - this.thumbnailUrl = thumbnailUrl; - } - - public API endpointURLs(List endpointURLs) { - this.endpointURLs = endpointURLs; - return this; - } - - public API addEndpointURLsItem(APIEndpointURLs endpointURLsItem) { - this.endpointURLs.add(endpointURLsItem); - return this; - } - - /** - * Get endpointURLs - * @return endpointURLs - **/ - @ApiModelProperty(example = "null", value = "") - public List getEndpointURLs() { - return endpointURLs; - } - - public void setEndpointURLs(List endpointURLs) { - this.endpointURLs = endpointURLs; - } - - public API businessInformation(APIBusinessInformation businessInformation) { - this.businessInformation = businessInformation; - return this; - } - - /** - * Get businessInformation - * @return businessInformation - **/ - @ApiModelProperty(example = "null", value = "") - public APIBusinessInformation getBusinessInformation() { - return businessInformation; - } - - public void setBusinessInformation(APIBusinessInformation businessInformation) { - this.businessInformation = businessInformation; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - API API = (org.wso2.carbon.apimgt.integration.client.store.model.API) o; - return Objects.equals(this.id, API.id) && - Objects.equals(this.name, API.name) && - Objects.equals(this.description, API.description) && - Objects.equals(this.context, API.context) && - Objects.equals(this.version, API.version) && - Objects.equals(this.provider, API.provider) && - Objects.equals(this.apiDefinition, API.apiDefinition) && - Objects.equals(this.wsdlUri, API.wsdlUri) && - Objects.equals(this.status, API.status) && - Objects.equals(this.isDefaultVersion, API.isDefaultVersion) && - Objects.equals(this.transport, API.transport) && - Objects.equals(this.tags, API.tags) && - Objects.equals(this.tiers, API.tiers) && - Objects.equals(this.thumbnailUrl, API.thumbnailUrl) && - Objects.equals(this.endpointURLs, API.endpointURLs) && - Objects.equals(this.businessInformation, API.businessInformation); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, description, context, version, provider, apiDefinition, wsdlUri, status, isDefaultVersion, transport, tags, tiers, thumbnailUrl, endpointURLs, businessInformation); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class API {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); - sb.append(" apiDefinition: ").append(toIndentedString(apiDefinition)).append("\n"); - sb.append(" wsdlUri: ").append(toIndentedString(wsdlUri)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" isDefaultVersion: ").append(toIndentedString(isDefaultVersion)).append("\n"); - sb.append(" transport: ").append(toIndentedString(transport)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n"); - sb.append(" thumbnailUrl: ").append(toIndentedString(thumbnailUrl)).append("\n"); - sb.append(" endpointURLs: ").append(toIndentedString(endpointURLs)).append("\n"); - sb.append(" businessInformation: ").append(toIndentedString(businessInformation)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIBusinessInformation.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIBusinessInformation.java deleted file mode 100644 index dea7cc81fe..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIBusinessInformation.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * APIBusinessInformation - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class APIBusinessInformation { - @JsonProperty("businessOwner") - private String businessOwner = null; - - @JsonProperty("businessOwnerEmail") - private String businessOwnerEmail = null; - - @JsonProperty("technicalOwner") - private String technicalOwner = null; - - @JsonProperty("technicalOwnerEmail") - private String technicalOwnerEmail = null; - - public APIBusinessInformation businessOwner(String businessOwner) { - this.businessOwner = businessOwner; - return this; - } - - /** - * Get businessOwner - * @return businessOwner - **/ - @ApiModelProperty(example = "businessowner", value = "") - public String getBusinessOwner() { - return businessOwner; - } - - public void setBusinessOwner(String businessOwner) { - this.businessOwner = businessOwner; - } - - public APIBusinessInformation businessOwnerEmail(String businessOwnerEmail) { - this.businessOwnerEmail = businessOwnerEmail; - return this; - } - - /** - * Get businessOwnerEmail - * @return businessOwnerEmail - **/ - @ApiModelProperty(example = "businessowner@wso2.com", value = "") - public String getBusinessOwnerEmail() { - return businessOwnerEmail; - } - - public void setBusinessOwnerEmail(String businessOwnerEmail) { - this.businessOwnerEmail = businessOwnerEmail; - } - - public APIBusinessInformation technicalOwner(String technicalOwner) { - this.technicalOwner = technicalOwner; - return this; - } - - /** - * Get technicalOwner - * @return technicalOwner - **/ - @ApiModelProperty(example = "technicalowner", value = "") - public String getTechnicalOwner() { - return technicalOwner; - } - - public void setTechnicalOwner(String technicalOwner) { - this.technicalOwner = technicalOwner; - } - - public APIBusinessInformation technicalOwnerEmail(String technicalOwnerEmail) { - this.technicalOwnerEmail = technicalOwnerEmail; - return this; - } - - /** - * Get technicalOwnerEmail - * @return technicalOwnerEmail - **/ - @ApiModelProperty(example = "technicalowner@wso2.com", value = "") - public String getTechnicalOwnerEmail() { - return technicalOwnerEmail; - } - - public void setTechnicalOwnerEmail(String technicalOwnerEmail) { - this.technicalOwnerEmail = technicalOwnerEmail; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIBusinessInformation aPIBusinessInformation = (APIBusinessInformation) o; - return Objects.equals(this.businessOwner, aPIBusinessInformation.businessOwner) && - Objects.equals(this.businessOwnerEmail, aPIBusinessInformation.businessOwnerEmail) && - Objects.equals(this.technicalOwner, aPIBusinessInformation.technicalOwner) && - Objects.equals(this.technicalOwnerEmail, aPIBusinessInformation.technicalOwnerEmail); - } - - @Override - public int hashCode() { - return Objects.hash(businessOwner, businessOwnerEmail, technicalOwner, technicalOwnerEmail); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIBusinessInformation {\n"); - - sb.append(" businessOwner: ").append(toIndentedString(businessOwner)).append("\n"); - sb.append(" businessOwnerEmail: ").append(toIndentedString(businessOwnerEmail)).append("\n"); - sb.append(" technicalOwner: ").append(toIndentedString(technicalOwner)).append("\n"); - sb.append(" technicalOwnerEmail: ").append(toIndentedString(technicalOwnerEmail)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIEndpointURLs.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIEndpointURLs.java deleted file mode 100644 index 28d2f87098..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIEndpointURLs.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * APIEndpointURLs - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class APIEndpointURLs { - @JsonProperty("environmentName") - private String environmentName = null; - - @JsonProperty("environmentType") - private String environmentType = null; - - @JsonProperty("environmentURLs") - private APIEnvironmentURLs environmentURLs = null; - - public APIEndpointURLs environmentName(String environmentName) { - this.environmentName = environmentName; - return this; - } - - /** - * Get environmentName - * @return environmentName - **/ - @ApiModelProperty(example = "Production and Sandbox", value = "") - public String getEnvironmentName() { - return environmentName; - } - - public void setEnvironmentName(String environmentName) { - this.environmentName = environmentName; - } - - public APIEndpointURLs environmentType(String environmentType) { - this.environmentType = environmentType; - return this; - } - - /** - * Get environmentType - * @return environmentType - **/ - @ApiModelProperty(example = "hybrid", value = "") - public String getEnvironmentType() { - return environmentType; - } - - public void setEnvironmentType(String environmentType) { - this.environmentType = environmentType; - } - - public APIEndpointURLs environmentURLs(APIEnvironmentURLs environmentURLs) { - this.environmentURLs = environmentURLs; - return this; - } - - /** - * Get environmentURLs - * @return environmentURLs - **/ - @ApiModelProperty(example = "null", value = "") - public APIEnvironmentURLs getEnvironmentURLs() { - return environmentURLs; - } - - public void setEnvironmentURLs(APIEnvironmentURLs environmentURLs) { - this.environmentURLs = environmentURLs; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIEndpointURLs aPIEndpointURLs = (APIEndpointURLs) o; - return Objects.equals(this.environmentName, aPIEndpointURLs.environmentName) && - Objects.equals(this.environmentType, aPIEndpointURLs.environmentType) && - Objects.equals(this.environmentURLs, aPIEndpointURLs.environmentURLs); - } - - @Override - public int hashCode() { - return Objects.hash(environmentName, environmentType, environmentURLs); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIEndpointURLs {\n"); - - sb.append(" environmentName: ").append(toIndentedString(environmentName)).append("\n"); - sb.append(" environmentType: ").append(toIndentedString(environmentType)).append("\n"); - sb.append(" environmentURLs: ").append(toIndentedString(environmentURLs)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIEnvironmentURLs.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIEnvironmentURLs.java deleted file mode 100644 index 339c4a16eb..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIEnvironmentURLs.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * APIEnvironmentURLs - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class APIEnvironmentURLs { - @JsonProperty("http") - private String http = null; - - @JsonProperty("https") - private String https = null; - - public APIEnvironmentURLs http(String http) { - this.http = http; - return this; - } - - /** - * HTTP environment URL - * @return http - **/ - @ApiModelProperty(example = "http://192.168.56.1:8280/phoneverify/1.0.0", value = "HTTP environment URL") - public String getHttp() { - return http; - } - - public void setHttp(String http) { - this.http = http; - } - - public APIEnvironmentURLs https(String https) { - this.https = https; - return this; - } - - /** - * HTTPS environment URL - * @return https - **/ - @ApiModelProperty(example = "https://192.168.56.1:8243/phoneverify/1.0.0", value = "HTTPS environment URL") - public String getHttps() { - return https; - } - - public void setHttps(String https) { - this.https = https; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIEnvironmentURLs aPIEnvironmentURLs = (APIEnvironmentURLs) o; - return Objects.equals(this.http, aPIEnvironmentURLs.http) && - Objects.equals(this.https, aPIEnvironmentURLs.https); - } - - @Override - public int hashCode() { - return Objects.hash(http, https); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIEnvironmentURLs {\n"); - - sb.append(" http: ").append(toIndentedString(http)).append("\n"); - sb.append(" https: ").append(toIndentedString(https)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIInfo.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIInfo.java deleted file mode 100644 index b6ac4f4548..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIInfo.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * APIInfo - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class APIInfo { - @JsonProperty("id") - private String id = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("context") - private String context = null; - - @JsonProperty("version") - private String version = null; - - @JsonProperty("provider") - private String provider = null; - - @JsonProperty("status") - private String status = null; - - public APIInfo id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public APIInfo name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorAPI", value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public APIInfo description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "A calculator API that supports basic operations", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public APIInfo context(String context) { - this.context = context; - return this; - } - - /** - * Get context - * @return context - **/ - @ApiModelProperty(example = "CalculatorAPI", value = "") - public String getContext() { - return context; - } - - public void setContext(String context) { - this.context = context; - } - - public APIInfo version(String version) { - this.version = version; - return this; - } - - /** - * Get version - * @return version - **/ - @ApiModelProperty(example = "1.0.0", value = "") - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public APIInfo provider(String provider) { - this.provider = provider; - return this; - } - - /** - * If the provider value is not given, the user invoking the API will be used as the provider. - * @return provider - **/ - @ApiModelProperty(example = "admin", value = "If the provider value is not given, the user invoking the API will be used as the provider. ") - public String getProvider() { - return provider; - } - - public void setProvider(String provider) { - this.provider = provider; - } - - public APIInfo status(String status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @ApiModelProperty(example = "PUBLISHED", value = "") - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIInfo aPIInfo = (APIInfo) o; - return Objects.equals(this.id, aPIInfo.id) && - Objects.equals(this.name, aPIInfo.name) && - Objects.equals(this.description, aPIInfo.description) && - Objects.equals(this.context, aPIInfo.context) && - Objects.equals(this.version, aPIInfo.version) && - Objects.equals(this.provider, aPIInfo.provider) && - Objects.equals(this.status, aPIInfo.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, description, context, version, provider, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIInfo {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIList.java deleted file mode 100644 index 1801088d6c..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/APIList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * APIList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class APIList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public APIList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of APIs returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of APIs returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public APIList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/apis?limit=1&offset=2&query=", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public APIList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/apis?limit=1&offset=0&query=", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public APIList list(List list) { - this.list = list; - return this; - } - - public APIList addListItem(APIInfo listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIList aPIList = (APIList) o; - return Objects.equals(this.count, aPIList.count) && - Objects.equals(this.next, aPIList.next) && - Objects.equals(this.previous, aPIList.previous) && - Objects.equals(this.list, aPIList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Application.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Application.java deleted file mode 100644 index 6dd92ccddf..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Application.java +++ /dev/null @@ -1,290 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * Application - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class Application { - @JsonProperty("applicationId") - private String applicationId = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("subscriber") - private String subscriber = null; - - @JsonProperty("throttlingTier") - private String throttlingTier = null; - - @JsonProperty("callbackUrl") - private String callbackUrl = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("status") - private String status = ""; - - @JsonProperty("groupId") - private String groupId = null; - - @JsonProperty("keys") - private List keys = new ArrayList(); - - public Application applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Get applicationId - * @return applicationId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public Application name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorApp", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Application subscriber(String subscriber) { - this.subscriber = subscriber; - return this; - } - - /** - * If subscriber is not given user invoking the API will be taken as the subscriber. - * @return subscriber - **/ - @ApiModelProperty(example = "admin", value = "If subscriber is not given user invoking the API will be taken as the subscriber. ") - public String getSubscriber() { - return subscriber; - } - - public void setSubscriber(String subscriber) { - this.subscriber = subscriber; - } - - public Application throttlingTier(String throttlingTier) { - this.throttlingTier = throttlingTier; - return this; - } - - /** - * Get throttlingTier - * @return throttlingTier - **/ - @ApiModelProperty(example = "Unlimited", required = true, value = "") - public String getThrottlingTier() { - return throttlingTier; - } - - public void setThrottlingTier(String throttlingTier) { - this.throttlingTier = throttlingTier; - } - - public Application callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * Get callbackUrl - * @return callbackUrl - **/ - @ApiModelProperty(example = "", value = "") - public String getCallbackUrl() { - return callbackUrl; - } - - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public Application description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "Sample calculator application", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Application status(String status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @ApiModelProperty(example = "APPROVED", value = "") - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public Application groupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get groupId - * @return groupId - **/ - @ApiModelProperty(example = "", value = "") - public String getGroupId() { - return groupId; - } - - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - public Application keys(List keys) { - this.keys = keys; - return this; - } - - public Application addKeysItem(ApplicationKey keysItem) { - this.keys.add(keysItem); - return this; - } - - /** - * Get keys - * @return keys - **/ - @ApiModelProperty(example = "null", value = "") - public List getKeys() { - return keys; - } - - public void setKeys(List keys) { - this.keys = keys; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Application application = (Application) o; - return Objects.equals(this.applicationId, application.applicationId) && - Objects.equals(this.name, application.name) && - Objects.equals(this.subscriber, application.subscriber) && - Objects.equals(this.throttlingTier, application.throttlingTier) && - Objects.equals(this.callbackUrl, application.callbackUrl) && - Objects.equals(this.description, application.description) && - Objects.equals(this.status, application.status) && - Objects.equals(this.groupId, application.groupId) && - Objects.equals(this.keys, application.keys); - } - - @Override - public int hashCode() { - return Objects.hash(applicationId, name, subscriber, throttlingTier, callbackUrl, description, status, groupId, keys); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Application {\n"); - - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" subscriber: ").append(toIndentedString(subscriber)).append("\n"); - sb.append(" throttlingTier: ").append(toIndentedString(throttlingTier)).append("\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); - sb.append(" keys: ").append(toIndentedString(keys)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationInfo.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationInfo.java deleted file mode 100644 index f1307b9338..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationInfo.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * ApplicationInfo - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class ApplicationInfo { - @JsonProperty("applicationId") - private String applicationId = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("subscriber") - private String subscriber = null; - - @JsonProperty("throttlingTier") - private String throttlingTier = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("status") - private String status = null; - - @JsonProperty("groupId") - private String groupId = null; - - public ApplicationInfo applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Get applicationId - * @return applicationId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public ApplicationInfo name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorApp", value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ApplicationInfo subscriber(String subscriber) { - this.subscriber = subscriber; - return this; - } - - /** - * Get subscriber - * @return subscriber - **/ - @ApiModelProperty(example = "admin", value = "") - public String getSubscriber() { - return subscriber; - } - - public void setSubscriber(String subscriber) { - this.subscriber = subscriber; - } - - public ApplicationInfo throttlingTier(String throttlingTier) { - this.throttlingTier = throttlingTier; - return this; - } - - /** - * Get throttlingTier - * @return throttlingTier - **/ - @ApiModelProperty(example = "Unlimited", value = "") - public String getThrottlingTier() { - return throttlingTier; - } - - public void setThrottlingTier(String throttlingTier) { - this.throttlingTier = throttlingTier; - } - - public ApplicationInfo description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "Sample calculator application", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public ApplicationInfo status(String status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @ApiModelProperty(example = "APPROVED", value = "") - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public ApplicationInfo groupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get groupId - * @return groupId - **/ - @ApiModelProperty(example = "", value = "") - public String getGroupId() { - return groupId; - } - - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationInfo applicationInfo = (ApplicationInfo) o; - return Objects.equals(this.applicationId, applicationInfo.applicationId) && - Objects.equals(this.name, applicationInfo.name) && - Objects.equals(this.subscriber, applicationInfo.subscriber) && - Objects.equals(this.throttlingTier, applicationInfo.throttlingTier) && - Objects.equals(this.description, applicationInfo.description) && - Objects.equals(this.status, applicationInfo.status) && - Objects.equals(this.groupId, applicationInfo.groupId); - } - - @Override - public int hashCode() { - return Objects.hash(applicationId, name, subscriber, throttlingTier, description, status, groupId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationInfo {\n"); - - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" subscriber: ").append(toIndentedString(subscriber)).append("\n"); - sb.append(" throttlingTier: ").append(toIndentedString(throttlingTier)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationKey.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationKey.java deleted file mode 100644 index a49d1522a6..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationKey.java +++ /dev/null @@ -1,252 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * ApplicationKey - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class ApplicationKey { - @JsonProperty("consumerKey") - private String consumerKey = null; - - @JsonProperty("consumerSecret") - private String consumerSecret = null; - - @JsonProperty("supportedGrantTypes") - private List supportedGrantTypes = new ArrayList(); - - @JsonProperty("keyState") - private String keyState = null; - - /** - * Key type - */ - public enum KeyTypeEnum { - PRODUCTION("PRODUCTION"), - - SANDBOX("SANDBOX"); - - private String value; - - KeyTypeEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KeyTypeEnum fromValue(String text) { - for (KeyTypeEnum b : KeyTypeEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("keyType") - private KeyTypeEnum keyType = null; - - @JsonProperty("token") - private Token token = null; - - public ApplicationKey consumerKey(String consumerKey) { - this.consumerKey = consumerKey; - return this; - } - - /** - * Consumer key of the application - * @return consumerKey - **/ - @ApiModelProperty(example = "vYDoc9s7IgAFdkSyNDaswBX7ejoa", value = "Consumer key of the application") - public String getConsumerKey() { - return consumerKey; - } - - public void setConsumerKey(String consumerKey) { - this.consumerKey = consumerKey; - } - - public ApplicationKey consumerSecret(String consumerSecret) { - this.consumerSecret = consumerSecret; - return this; - } - - /** - * Consumer secret of the application - * @return consumerSecret - **/ - @ApiModelProperty(example = "TIDlOFkpzB7WjufO3OJUhy1fsvAa", value = "Consumer secret of the application") - public String getConsumerSecret() { - return consumerSecret; - } - - public void setConsumerSecret(String consumerSecret) { - this.consumerSecret = consumerSecret; - } - - public ApplicationKey supportedGrantTypes(List supportedGrantTypes) { - this.supportedGrantTypes = supportedGrantTypes; - return this; - } - - public ApplicationKey addSupportedGrantTypesItem(String supportedGrantTypesItem) { - this.supportedGrantTypes.add(supportedGrantTypesItem); - return this; - } - - /** - * Supported grant types for the application - * @return supportedGrantTypes - **/ - @ApiModelProperty(example = "null", value = "Supported grant types for the application") - public List getSupportedGrantTypes() { - return supportedGrantTypes; - } - - public void setSupportedGrantTypes(List supportedGrantTypes) { - this.supportedGrantTypes = supportedGrantTypes; - } - - public ApplicationKey keyState(String keyState) { - this.keyState = keyState; - return this; - } - - /** - * State of the key generation of the application - * @return keyState - **/ - @ApiModelProperty(example = "APPROVED", value = "State of the key generation of the application") - public String getKeyState() { - return keyState; - } - - public void setKeyState(String keyState) { - this.keyState = keyState; - } - - public ApplicationKey keyType(KeyTypeEnum keyType) { - this.keyType = keyType; - return this; - } - - /** - * Key type - * @return keyType - **/ - @ApiModelProperty(example = "PRODUCTION", value = "Key type") - public KeyTypeEnum getKeyType() { - return keyType; - } - - public void setKeyType(KeyTypeEnum keyType) { - this.keyType = keyType; - } - - public ApplicationKey token(Token token) { - this.token = token; - return this; - } - - /** - * Get token - * @return token - **/ - @ApiModelProperty(example = "null", value = "") - public Token getToken() { - return token; - } - - public void setToken(Token token) { - this.token = token; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationKey applicationKey = (ApplicationKey) o; - return Objects.equals(this.consumerKey, applicationKey.consumerKey) && - Objects.equals(this.consumerSecret, applicationKey.consumerSecret) && - Objects.equals(this.supportedGrantTypes, applicationKey.supportedGrantTypes) && - Objects.equals(this.keyState, applicationKey.keyState) && - Objects.equals(this.keyType, applicationKey.keyType) && - Objects.equals(this.token, applicationKey.token); - } - - @Override - public int hashCode() { - return Objects.hash(consumerKey, consumerSecret, supportedGrantTypes, keyState, keyType, token); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationKey {\n"); - - sb.append(" consumerKey: ").append(toIndentedString(consumerKey)).append("\n"); - sb.append(" consumerSecret: ").append(toIndentedString(consumerSecret)).append("\n"); - sb.append(" supportedGrantTypes: ").append(toIndentedString(supportedGrantTypes)).append("\n"); - sb.append(" keyState: ").append(toIndentedString(keyState)).append("\n"); - sb.append(" keyType: ").append(toIndentedString(keyType)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationKeyGenerateRequest.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationKeyGenerateRequest.java deleted file mode 100644 index 8b7cf21d9d..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationKeyGenerateRequest.java +++ /dev/null @@ -1,234 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * ApplicationKeyGenerateRequest - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class ApplicationKeyGenerateRequest { - /** - * Gets or Sets keyType - */ - public enum KeyTypeEnum { - PRODUCTION("PRODUCTION"), - - SANDBOX("SANDBOX"); - - private String value; - - KeyTypeEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KeyTypeEnum fromValue(String text) { - for (KeyTypeEnum b : KeyTypeEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("keyType") - private KeyTypeEnum keyType = null; - - @JsonProperty("validityTime") - private String validityTime = null; - - @JsonProperty("callbackUrl") - private String callbackUrl = null; - - @JsonProperty("accessAllowDomains") - private List accessAllowDomains = new ArrayList(); - - @JsonProperty("scopes") - private List scopes = new ArrayList(); - - public ApplicationKeyGenerateRequest keyType(KeyTypeEnum keyType) { - this.keyType = keyType; - return this; - } - - /** - * Get keyType - * @return keyType - **/ - @ApiModelProperty(example = "PRODUCTION", required = true, value = "") - public KeyTypeEnum getKeyType() { - return keyType; - } - - public void setKeyType(KeyTypeEnum keyType) { - this.keyType = keyType; - } - - public ApplicationKeyGenerateRequest validityTime(String validityTime) { - this.validityTime = validityTime; - return this; - } - - /** - * Get validityTime - * @return validityTime - **/ - @ApiModelProperty(example = "3600", required = true, value = "") - public String getValidityTime() { - return validityTime; - } - - public void setValidityTime(String validityTime) { - this.validityTime = validityTime; - } - - public ApplicationKeyGenerateRequest callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * Callback URL - * @return callbackUrl - **/ - @ApiModelProperty(example = "", value = "Callback URL") - public String getCallbackUrl() { - return callbackUrl; - } - - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public ApplicationKeyGenerateRequest accessAllowDomains(List accessAllowDomains) { - this.accessAllowDomains = accessAllowDomains; - return this; - } - - public ApplicationKeyGenerateRequest addAccessAllowDomainsItem(String accessAllowDomainsItem) { - this.accessAllowDomains.add(accessAllowDomainsItem); - return this; - } - - /** - * Allowed domains for the access token - * @return accessAllowDomains - **/ - @ApiModelProperty(example = "null", required = true, value = "Allowed domains for the access token") - public List getAccessAllowDomains() { - return accessAllowDomains; - } - - public void setAccessAllowDomains(List accessAllowDomains) { - this.accessAllowDomains = accessAllowDomains; - } - - public ApplicationKeyGenerateRequest scopes(List scopes) { - this.scopes = scopes; - return this; - } - - public ApplicationKeyGenerateRequest addScopesItem(String scopesItem) { - this.scopes.add(scopesItem); - return this; - } - - /** - * Allowed scopes for the access token - * @return scopes - **/ - @ApiModelProperty(example = "null", value = "Allowed scopes for the access token") - public List getScopes() { - return scopes; - } - - public void setScopes(List scopes) { - this.scopes = scopes; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationKeyGenerateRequest applicationKeyGenerateRequest = (ApplicationKeyGenerateRequest) o; - return Objects.equals(this.keyType, applicationKeyGenerateRequest.keyType) && - Objects.equals(this.validityTime, applicationKeyGenerateRequest.validityTime) && - Objects.equals(this.callbackUrl, applicationKeyGenerateRequest.callbackUrl) && - Objects.equals(this.accessAllowDomains, applicationKeyGenerateRequest.accessAllowDomains) && - Objects.equals(this.scopes, applicationKeyGenerateRequest.scopes); - } - - @Override - public int hashCode() { - return Objects.hash(keyType, validityTime, callbackUrl, accessAllowDomains, scopes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationKeyGenerateRequest {\n"); - - sb.append(" keyType: ").append(toIndentedString(keyType)).append("\n"); - sb.append(" validityTime: ").append(toIndentedString(validityTime)).append("\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" accessAllowDomains: ").append(toIndentedString(accessAllowDomains)).append("\n"); - sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationList.java deleted file mode 100644 index b89c62e6a7..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ApplicationList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * ApplicationList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class ApplicationList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public ApplicationList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of applications returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of applications returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public ApplicationList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/applications?limit=1&offset=2&groupId=", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public ApplicationList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/applications?limit=1&offset=0&groupId=", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public ApplicationList list(List list) { - this.list = list; - return this; - } - - public ApplicationList addListItem(ApplicationInfo listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationList applicationList = (ApplicationList) o; - return Objects.equals(this.count, applicationList.count) && - Objects.equals(this.next, applicationList.next) && - Objects.equals(this.previous, applicationList.previous) && - Objects.equals(this.list, applicationList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Document.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Document.java deleted file mode 100644 index 39d6760933..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Document.java +++ /dev/null @@ -1,310 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * Document - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class Document { - @JsonProperty("documentId") - private String documentId = null; - - @JsonProperty("name") - private String name = null; - - /** - * Gets or Sets type - */ - public enum TypeEnum { - HOWTO("HOWTO"), - - SAMPLES("SAMPLES"), - - PUBLIC_FORUM("PUBLIC_FORUM"), - - SUPPORT_FORUM("SUPPORT_FORUM"), - - API_MESSAGE_FORMAT("API_MESSAGE_FORMAT"), - - SWAGGER_DOC("SWAGGER_DOC"), - - OTHER("OTHER"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String text) { - for (TypeEnum b : TypeEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("type") - private TypeEnum type = null; - - @JsonProperty("summary") - private String summary = null; - - /** - * Gets or Sets sourceType - */ - public enum SourceTypeEnum { - INLINE("INLINE"), - - URL("URL"), - - FILE("FILE"); - - private String value; - - SourceTypeEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SourceTypeEnum fromValue(String text) { - for (SourceTypeEnum b : SourceTypeEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("sourceType") - private SourceTypeEnum sourceType = null; - - @JsonProperty("sourceUrl") - private String sourceUrl = null; - - @JsonProperty("otherTypeName") - private String otherTypeName = null; - - public Document documentId(String documentId) { - this.documentId = documentId; - return this; - } - - /** - * Get documentId - * @return documentId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getDocumentId() { - return documentId; - } - - public void setDocumentId(String documentId) { - this.documentId = documentId; - } - - public Document name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "CalculatorDoc", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Document type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @ApiModelProperty(example = "HOWTO", required = true, value = "") - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - public Document summary(String summary) { - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @ApiModelProperty(example = "Summary of Calculator Documentation", value = "") - public String getSummary() { - return summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - public Document sourceType(SourceTypeEnum sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get sourceType - * @return sourceType - **/ - @ApiModelProperty(example = "INLINE", required = true, value = "") - public SourceTypeEnum getSourceType() { - return sourceType; - } - - public void setSourceType(SourceTypeEnum sourceType) { - this.sourceType = sourceType; - } - - public Document sourceUrl(String sourceUrl) { - this.sourceUrl = sourceUrl; - return this; - } - - /** - * Get sourceUrl - * @return sourceUrl - **/ - @ApiModelProperty(example = "", value = "") - public String getSourceUrl() { - return sourceUrl; - } - - public void setSourceUrl(String sourceUrl) { - this.sourceUrl = sourceUrl; - } - - public Document otherTypeName(String otherTypeName) { - this.otherTypeName = otherTypeName; - return this; - } - - /** - * Get otherTypeName - * @return otherTypeName - **/ - @ApiModelProperty(example = "", value = "") - public String getOtherTypeName() { - return otherTypeName; - } - - public void setOtherTypeName(String otherTypeName) { - this.otherTypeName = otherTypeName; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Document document = (Document) o; - return Objects.equals(this.documentId, document.documentId) && - Objects.equals(this.name, document.name) && - Objects.equals(this.type, document.type) && - Objects.equals(this.summary, document.summary) && - Objects.equals(this.sourceType, document.sourceType) && - Objects.equals(this.sourceUrl, document.sourceUrl) && - Objects.equals(this.otherTypeName, document.otherTypeName); - } - - @Override - public int hashCode() { - return Objects.hash(documentId, name, type, summary, sourceType, sourceUrl, otherTypeName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Document {\n"); - - sb.append(" documentId: ").append(toIndentedString(documentId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); - sb.append(" sourceUrl: ").append(toIndentedString(sourceUrl)).append("\n"); - sb.append(" otherTypeName: ").append(toIndentedString(otherTypeName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/DocumentList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/DocumentList.java deleted file mode 100644 index f3cb981965..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/DocumentList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * DocumentList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class DocumentList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public DocumentList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of Documents returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of Documents returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public DocumentList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/apis/01234567-0123-0123-0123-012345678901/documents?limit=1&offset=2", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public DocumentList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/apis/01234567-0123-0123-0123-012345678901/documents?limit=1&offset=0", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public DocumentList list(List list) { - this.list = list; - return this; - } - - public DocumentList addListItem(Document listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DocumentList documentList = (DocumentList) o; - return Objects.equals(this.count, documentList.count) && - Objects.equals(this.next, documentList.next) && - Objects.equals(this.previous, documentList.previous) && - Objects.equals(this.list, documentList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DocumentList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Error.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Error.java deleted file mode 100644 index 6b234db0a8..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Error.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * Error - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class Error { - @JsonProperty("code") - private Long code = null; - - @JsonProperty("message") - private String message = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("moreInfo") - private String moreInfo = null; - - @JsonProperty("error") - private List error = new ArrayList(); - - public Error code(Long code) { - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @ApiModelProperty(example = "null", required = true, value = "") - public Long getCode() { - return code; - } - - public void setCode(Long code) { - this.code = code; - } - - public Error message(String message) { - this.message = message; - return this; - } - - /** - * Error message. - * @return message - **/ - @ApiModelProperty(example = "null", required = true, value = "Error message.") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public Error description(String description) { - this.description = description; - return this; - } - - /** - * A detail description about the error message. - * @return description - **/ - @ApiModelProperty(example = "null", value = "A detail description about the error message. ") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Error moreInfo(String moreInfo) { - this.moreInfo = moreInfo; - return this; - } - - /** - * Preferably an url with more details about the error. - * @return moreInfo - **/ - @ApiModelProperty(example = "null", value = "Preferably an url with more details about the error. ") - public String getMoreInfo() { - return moreInfo; - } - - public void setMoreInfo(String moreInfo) { - this.moreInfo = moreInfo; - } - - public Error error(List error) { - this.error = error; - return this; - } - - public Error addErrorItem(ErrorListItem errorItem) { - this.error.add(errorItem); - return this; - } - - /** - * If there are more than one error list them out. For example, list out validation errors by each field. - * @return error - **/ - @ApiModelProperty(example = "null", value = "If there are more than one error list them out. For example, list out validation errors by each field. ") - public List getError() { - return error; - } - - public void setError(List error) { - this.error = error; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Error error = (Error) o; - return Objects.equals(this.code, error.code) && - Objects.equals(this.message, error.message) && - Objects.equals(this.description, error.description) && - Objects.equals(this.moreInfo, error.moreInfo) && - Objects.equals(this.error, error.error); - } - - @Override - public int hashCode() { - return Objects.hash(code, message, description, moreInfo, error); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Error {\n"); - - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" moreInfo: ").append(toIndentedString(moreInfo)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ErrorListItem.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ErrorListItem.java deleted file mode 100644 index 7bbe4a336f..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/ErrorListItem.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * ErrorListItem - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class ErrorListItem { - @JsonProperty("code") - private String code = null; - - @JsonProperty("message") - private String message = null; - - public ErrorListItem code(String code) { - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @ApiModelProperty(example = "null", required = true, value = "") - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public ErrorListItem message(String message) { - this.message = message; - return this; - } - - /** - * Description about individual errors occurred - * @return message - **/ - @ApiModelProperty(example = "null", required = true, value = "Description about individual errors occurred ") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorListItem errorListItem = (ErrorListItem) o; - return Objects.equals(this.code, errorListItem.code) && - Objects.equals(this.message, errorListItem.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorListItem {\n"); - - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Subscription.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Subscription.java deleted file mode 100644 index d2275ce76c..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Subscription.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * Subscription - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class Subscription { - @JsonProperty("subscriptionId") - private String subscriptionId = null; - - @JsonProperty("applicationId") - private String applicationId = null; - - @JsonProperty("apiIdentifier") - private String apiIdentifier = null; - - @JsonProperty("tier") - private String tier = null; - - /** - * Gets or Sets status - */ - public enum StatusEnum { - BLOCKED("BLOCKED"), - - PROD_ONLY_BLOCKED("PROD_ONLY_BLOCKED"), - - UNBLOCKED("UNBLOCKED"), - - ON_HOLD("ON_HOLD"), - - REJECTED("REJECTED"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String text) { - for (StatusEnum b : StatusEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("status") - private StatusEnum status = null; - - public Subscription subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get subscriptionId - * @return subscriptionId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", value = "") - public String getSubscriptionId() { - return subscriptionId; - } - - public void setSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - } - - public Subscription applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Get applicationId - * @return applicationId - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", required = true, value = "") - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public Subscription apiIdentifier(String apiIdentifier) { - this.apiIdentifier = apiIdentifier; - return this; - } - - /** - * Get apiIdentifier - * @return apiIdentifier - **/ - @ApiModelProperty(example = "01234567-0123-0123-0123-012345678901", required = true, value = "") - public String getApiIdentifier() { - return apiIdentifier; - } - - public void setApiIdentifier(String apiIdentifier) { - this.apiIdentifier = apiIdentifier; - } - - public Subscription tier(String tier) { - this.tier = tier; - return this; - } - - /** - * Get tier - * @return tier - **/ - @ApiModelProperty(example = "Unlimited", required = true, value = "") - public String getTier() { - return tier; - } - - public void setTier(String tier) { - this.tier = tier; - } - - public Subscription status(StatusEnum status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @ApiModelProperty(example = "UNBLOCKED", value = "") - public StatusEnum getStatus() { - return status; - } - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Subscription subscription = (Subscription) o; - return Objects.equals(this.subscriptionId, subscription.subscriptionId) && - Objects.equals(this.applicationId, subscription.applicationId) && - Objects.equals(this.apiIdentifier, subscription.apiIdentifier) && - Objects.equals(this.tier, subscription.tier) && - Objects.equals(this.status, subscription.status); - } - - @Override - public int hashCode() { - return Objects.hash(subscriptionId, applicationId, apiIdentifier, tier, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Subscription {\n"); - - sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" apiIdentifier: ").append(toIndentedString(apiIdentifier)).append("\n"); - sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/SubscriptionList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/SubscriptionList.java deleted file mode 100644 index b6688838ec..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/SubscriptionList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * SubscriptionList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class SubscriptionList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public SubscriptionList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of Subscriptions returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of Subscriptions returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public SubscriptionList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/subscriptions?limit=1&offset=2&apiId=01234567-0123-0123-0123-012345678901&groupId=", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public SubscriptionList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/subscriptions?limit=1&offset=0&apiId=01234567-0123-0123-0123-012345678901&groupId=", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public SubscriptionList list(List list) { - this.list = list; - return this; - } - - public SubscriptionList addListItem(Subscription listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubscriptionList subscriptionList = (SubscriptionList) o; - return Objects.equals(this.count, subscriptionList.count) && - Objects.equals(this.next, subscriptionList.next) && - Objects.equals(this.previous, subscriptionList.previous) && - Objects.equals(this.list, subscriptionList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubscriptionList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Tag.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Tag.java deleted file mode 100644 index 7370df7c68..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Tag.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.Objects; - - -/** - * Tag - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class Tag { - @JsonProperty("name") - private String name = null; - - @JsonProperty("weight") - private Integer weight = null; - - public Tag name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "tag1", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Tag weight(Integer weight) { - this.weight = weight; - return this; - } - - /** - * Get weight - * @return weight - **/ - @ApiModelProperty(example = "5", required = true, value = "") - public Integer getWeight() { - return weight; - } - - public void setWeight(Integer weight) { - this.weight = weight; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.name, tag.name) && - Objects.equals(this.weight, tag.weight); - } - - @Override - public int hashCode() { - return Objects.hash(name, weight); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/TagList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/TagList.java deleted file mode 100644 index 543a6c83f2..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/TagList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * TagList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class TagList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public TagList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of Tags returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of Tags returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public TagList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/tags?limit=1&offset=2", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public TagList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/tags?limit=1&offset=0", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public TagList list(List list) { - this.list = list; - return this; - } - - public TagList addListItem(Tag listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TagList tagList = (TagList) o; - return Objects.equals(this.count, tagList.count) && - Objects.equals(this.next, tagList.next) && - Objects.equals(this.previous, tagList.previous) && - Objects.equals(this.list, tagList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TagList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Tier.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Tier.java deleted file mode 100644 index 1f44116b02..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Tier.java +++ /dev/null @@ -1,328 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - - -/** - * Tier - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class Tier { - @JsonProperty("name") - private String name = null; - - @JsonProperty("description") - private String description = null; - - /** - * Gets or Sets tierLevel - */ - public enum TierLevelEnum { - API("api"), - - APPLICATION("application"); - - private String value; - - TierLevelEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TierLevelEnum fromValue(String text) { - for (TierLevelEnum b : TierLevelEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("tierLevel") - private TierLevelEnum tierLevel = null; - - @JsonProperty("attributes") - private Map attributes = new HashMap(); - - @JsonProperty("requestCount") - private Long requestCount = null; - - @JsonProperty("unitTime") - private Long unitTime = null; - - /** - * This attribute declares whether this tier is available under commercial or free - */ - public enum TierPlanEnum { - FREE("FREE"), - - COMMERCIAL("COMMERCIAL"); - - private String value; - - TierPlanEnum(String value) { - this.value = value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TierPlanEnum fromValue(String text) { - for (TierPlanEnum b : TierPlanEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("tierPlan") - private TierPlanEnum tierPlan = null; - - @JsonProperty("stopOnQuotaReach") - private Boolean stopOnQuotaReach = null; - - public Tier name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "Platinum", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Tier description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @ApiModelProperty(example = "Allows 50 request(s) per minute.", value = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Tier tierLevel(TierLevelEnum tierLevel) { - this.tierLevel = tierLevel; - return this; - } - - /** - * Get tierLevel - * @return tierLevel - **/ - @ApiModelProperty(example = "api", value = "") - public TierLevelEnum getTierLevel() { - return tierLevel; - } - - public void setTierLevel(TierLevelEnum tierLevel) { - this.tierLevel = tierLevel; - } - - public Tier attributes(Map attributes) { - this.attributes = attributes; - return this; - } - - public Tier putAttributesItem(String key, String attributesItem) { - this.attributes.put(key, attributesItem); - return this; - } - - /** - * Custom attributes added to the tier policy - * @return attributes - **/ - @ApiModelProperty(example = "null", value = "Custom attributes added to the tier policy ") - public Map getAttributes() { - return attributes; - } - - public void setAttributes(Map attributes) { - this.attributes = attributes; - } - - public Tier requestCount(Long requestCount) { - this.requestCount = requestCount; - return this; - } - - /** - * Maximum number of requests which can be sent within a provided unit time - * @return requestCount - **/ - @ApiModelProperty(example = "50", required = true, value = "Maximum number of requests which can be sent within a provided unit time ") - public Long getRequestCount() { - return requestCount; - } - - public void setRequestCount(Long requestCount) { - this.requestCount = requestCount; - } - - public Tier unitTime(Long unitTime) { - this.unitTime = unitTime; - return this; - } - - /** - * Get unitTime - * @return unitTime - **/ - @ApiModelProperty(example = "60000", required = true, value = "") - public Long getUnitTime() { - return unitTime; - } - - public void setUnitTime(Long unitTime) { - this.unitTime = unitTime; - } - - public Tier tierPlan(TierPlanEnum tierPlan) { - this.tierPlan = tierPlan; - return this; - } - - /** - * This attribute declares whether this tier is available under commercial or free - * @return tierPlan - **/ - @ApiModelProperty(example = "FREE", required = true, value = "This attribute declares whether this tier is available under commercial or free ") - public TierPlanEnum getTierPlan() { - return tierPlan; - } - - public void setTierPlan(TierPlanEnum tierPlan) { - this.tierPlan = tierPlan; - } - - public Tier stopOnQuotaReach(Boolean stopOnQuotaReach) { - this.stopOnQuotaReach = stopOnQuotaReach; - return this; - } - - /** - * If this attribute is set to false, you are capabale of sending requests even if the request count exceeded within a unit time - * @return stopOnQuotaReach - **/ - @ApiModelProperty(example = "true", required = true, value = "If this attribute is set to false, you are capabale of sending requests even if the request count exceeded within a unit time ") - public Boolean getStopOnQuotaReach() { - return stopOnQuotaReach; - } - - public void setStopOnQuotaReach(Boolean stopOnQuotaReach) { - this.stopOnQuotaReach = stopOnQuotaReach; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tier tier = (Tier) o; - return Objects.equals(this.name, tier.name) && - Objects.equals(this.description, tier.description) && - Objects.equals(this.tierLevel, tier.tierLevel) && - Objects.equals(this.attributes, tier.attributes) && - Objects.equals(this.requestCount, tier.requestCount) && - Objects.equals(this.unitTime, tier.unitTime) && - Objects.equals(this.tierPlan, tier.tierPlan) && - Objects.equals(this.stopOnQuotaReach, tier.stopOnQuotaReach); - } - - @Override - public int hashCode() { - return Objects.hash(name, description, tierLevel, attributes, requestCount, unitTime, tierPlan, stopOnQuotaReach); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tier {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" tierLevel: ").append(toIndentedString(tierLevel)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" requestCount: ").append(toIndentedString(requestCount)).append("\n"); - sb.append(" unitTime: ").append(toIndentedString(unitTime)).append("\n"); - sb.append(" tierPlan: ").append(toIndentedString(tierPlan)).append("\n"); - sb.append(" stopOnQuotaReach: ").append(toIndentedString(stopOnQuotaReach)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/TierList.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/TierList.java deleted file mode 100644 index 82bdb76a0c..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/TierList.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * TierList - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class TierList { - @JsonProperty("count") - private Integer count = null; - - @JsonProperty("next") - private String next = null; - - @JsonProperty("previous") - private String previous = null; - - @JsonProperty("list") - private List list = new ArrayList(); - - public TierList count(Integer count) { - this.count = count; - return this; - } - - /** - * Number of Tiers returned. - * @return count - **/ - @ApiModelProperty(example = "1", value = "Number of Tiers returned. ") - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public TierList next(String next) { - this.next = next; - return this; - } - - /** - * Link to the next subset of resources qualified. Empty if no more resources are to be returned. - * @return next - **/ - @ApiModelProperty(example = "/tiers/api?limit=1&offset=2", value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ") - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public TierList previous(String previous) { - this.previous = previous; - return this; - } - - /** - * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. - * @return previous - **/ - @ApiModelProperty(example = "/tiers/api?limit=1&offset=0", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") - public String getPrevious() { - return previous; - } - - public void setPrevious(String previous) { - this.previous = previous; - } - - public TierList list(List list) { - this.list = list; - return this; - } - - public TierList addListItem(Tier listItem) { - this.list.add(listItem); - return this; - } - - /** - * Get list - * @return list - **/ - @ApiModelProperty(example = "null", value = "") - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TierList tierList = (TierList) o; - return Objects.equals(this.count, tierList.count) && - Objects.equals(this.next, tierList.next) && - Objects.equals(this.previous, tierList.previous) && - Objects.equals(this.list, tierList.list); - } - - @Override - public int hashCode() { - return Objects.hash(count, next, previous, list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TierList {\n"); - - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" list: ").append(toIndentedString(list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Token.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Token.java deleted file mode 100644 index f90d15d7c3..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/model/Token.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * WSO2 API Manager - Store - * This document specifies a **RESTful API** for WSO2 **API Manager** - Store. It is written with [swagger 2](http://swagger.io/). - * - * OpenAPI spec version: 0.10.0 - * Contact: architecture@wso2.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License 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 org.wso2.carbon.apimgt.integration.client.store.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - - -/** - * Token - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") -public class Token { - @JsonProperty("accessToken") - private String accessToken = null; - - @JsonProperty("tokenScopes") - private List tokenScopes = new ArrayList(); - - @JsonProperty("validityTime") - private Long validityTime = null; - - public Token accessToken(String accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - * Access token - * @return accessToken - **/ - @ApiModelProperty(example = "1.2345678901234568E30", value = "Access token") - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public Token tokenScopes(List tokenScopes) { - this.tokenScopes = tokenScopes; - return this; - } - - public Token addTokenScopesItem(String tokenScopesItem) { - this.tokenScopes.add(tokenScopesItem); - return this; - } - - /** - * Valid scopes for the access token - * @return tokenScopes - **/ - @ApiModelProperty(example = "null", value = "Valid scopes for the access token") - public List getTokenScopes() { - return tokenScopes; - } - - public void setTokenScopes(List tokenScopes) { - this.tokenScopes = tokenScopes; - } - - public Token validityTime(Long validityTime) { - this.validityTime = validityTime; - return this; - } - - /** - * Maximum validity time for the access token - * @return validityTime - **/ - @ApiModelProperty(example = "3600", value = "Maximum validity time for the access token") - public Long getValidityTime() { - return validityTime; - } - - public void setValidityTime(Long validityTime) { - this.validityTime = validityTime; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Token token = (Token) o; - return Objects.equals(this.accessToken, token.accessToken) && - Objects.equals(this.tokenScopes, token.tokenScopes) && - Objects.equals(this.validityTime, token.validityTime); - } - - @Override - public int hashCode() { - return Objects.hash(accessToken, tokenScopes, validityTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Token {\n"); - - sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); - sb.append(" tokenScopes: ").append(toIndentedString(tokenScopes)).append("\n"); - sb.append(" validityTime: ").append(toIndentedString(validityTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/util/PropertyUtils.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/util/PropertyUtils.java deleted file mode 100644 index 83d162fdb4..0000000000 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/util/PropertyUtils.java +++ /dev/null @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -* -* WSO2 Inc. licenses this file to you under the Apache License, -* Version 2.0 (the "License"); you may not use this file except -* in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.util; - - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class PropertyUtils { - - //This method is only used if the mb features are within DAS. - public static String replaceProperties(String text) { - String regex = "\\$\\{(.*?)\\}"; - Pattern pattern = Pattern.compile(regex); - Matcher matchPattern = pattern.matcher(text); - while (matchPattern.find()) { - String sysPropertyName = matchPattern.group(1); - String sysPropertyValue = System.getProperty(sysPropertyName); - if (sysPropertyValue != null && !sysPropertyName.isEmpty()) { - text = text.replaceAll("\\$\\{(" + sysPropertyName + ")\\}", sysPropertyValue); - } - } - return text; - } -} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/util/Utils.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/util/Utils.java new file mode 100644 index 0000000000..ed5a587986 --- /dev/null +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/util/Utils.java @@ -0,0 +1,89 @@ +/* +* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +* +* WSO2 Inc. licenses this file to you under the Apache License, +* Version 2.0 (the "License"); you may not use this file except +* in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License 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 org.wso2.carbon.apimgt.integration.client.util; + + +import feign.Client; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.io.IOException; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import feign.Logger; +import feign.Request; +import feign.Response; +import org.apache.commons.logging.Log; + +public class Utils { + + //This method is only used if the mb features are within DAS. + public static String replaceProperties(String text) { + String regex = "\\$\\{(.*?)\\}"; + Pattern pattern = Pattern.compile(regex); + Matcher matchPattern = pattern.matcher(text); + while (matchPattern.find()) { + String sysPropertyName = matchPattern.group(1); + String sysPropertyValue = System.getProperty(sysPropertyName); + if (sysPropertyValue != null && !sysPropertyName.isEmpty()) { + text = text.replaceAll("\\$\\{(" + sysPropertyName + ")\\}", sysPropertyValue); + } + } + return text; + } + + public static Client getSSLClient() { + return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() { + @Override + public boolean verify(String s, SSLSession sslSession) { + return true; + } + }); + } + + private static SSLSocketFactory getTrustedSSLSocketFactory() { + try { + TrustManager[] trustAllCerts = new TrustManager[]{ + new X509TrustManager() { + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return null; + } + public void checkClientTrusted( + java.security.cert.X509Certificate[] certs, String authType) { + } + public void checkServerTrusted( + java.security.cert.X509Certificate[] certs, String authType) { + } + } + }; + SSLContext sc = SSLContext.getInstance("SSL"); + sc.init(null, trustAllCerts, new java.security.SecureRandom()); + return sc.getSocketFactory(); + } catch (KeyManagementException | NoSuchAlgorithmException e) { + return null; + } + + } +} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml new file mode 100644 index 0000000000..aa6c82acf8 --- /dev/null +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml @@ -0,0 +1,205 @@ + + + + + + apimgt-extensions + org.wso2.carbon.devicemgt + 2.0.16-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.apimgt.integration.generated.client + 2.0.16-SNAPSHOT + bundle + WSO2 Carbon - API Management Integration Client + WSO2 Carbon - API Management Integration Client + http://wso2.org + + + + + + io.swagger + swagger-codegen-maven-plugin + 2.2.1 + + + process-resources + publisher + + generate + + + ${project.basedir}/src/main/resources/publisher-api.yaml + java + + ${project.artifactId}.publisher.api + ${project.artifactId}.publisher.model + + feign + + + + process-resources + store + + generate + + + ${project.basedir}/src/main/resources/store-api.yaml + java + + ${project.artifactId}.store.api + ${project.artifactId}.store.model + + feign + + + + + + com.google.code.maven-replacer-plugin + replacer + 1.5.2 + + + + process-resources + replace-for-swagger-genenerated-code-publisher + + replace + + + ${project.basedir}/target/generated-sources/swagger/src/main/java/org/wso2/carbon/apimgt/integration/generated/client/publisher/model/API.java + + + CURRENT_TENANT + current_tenant + + + ALL_TENANTS + all_tenants + + + SPECIFIC_TENANTS + specific_tenants + + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + ${project.artifactId} + ${project.artifactId} + ${project.version} + APIM Integration + + org.wso2.carbon.apimgt.integration.generated.client.publisher.api.*, + org.wso2.carbon.apimgt.integration.generated.client.publisher.model.*, + org.wso2.carbon.apimgt.integration.generated.client.store.api.*, + org.wso2.carbon.apimgt.integration.generated.client.store.model.* + + + feign;version="${io.github.openfeign.version.range}", + feign.jackson;version="${io.github.openfeign.version.range}", + feign.codec;version="${io.github.openfeign.version.range}", + feign.auth;version="${io.github.openfeign.version.range}", + feign.gson;version="${io.github.openfeign.version.range}", + feign.slf4j;version="${io.github.openfeign.version.range}", + com.google.gson, + com.fasterxml.jackson.core;resolution:=optional, + com.fasterxml.jackson.annotation, + com.fasterxml.jackson.databind;resolution:=optional, + io.swagger.annotations, + javax.net.ssl, + com.fasterxml.jackson.datatype.joda;resolution:=optional, + org.apache.oltu.oauth2.client.*;resolution:=optional, + org.apache.oltu.oauth2.common.*;resolution:=optional, + org.junit;resolution:=optional, + + + jsr311-api, + feign-jaxrs + + + + + + + + + + + com.google.code.gson + gson + + + javax.ws.rs + jsr311-api + + + + io.swagger + swagger-annotations + + + junit + junit + + + io.github.openfeign + feign-core + + + io.github.openfeign + feign-jackson + + + io.github.openfeign + feign-jaxrs + + + io.github.openfeign + feign-gson + + + org.testng + testng + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + + + io.github.openfeign + feign-slf4j + + + org.wso2.orbit.com.fasterxml.jackson.core + jackson-databind + ${jackson-databind.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + + + + diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/publisher-api.yaml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/publisher-api.yaml new file mode 100644 index 0000000000..f213bd6652 --- /dev/null +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/publisher-api.yaml @@ -0,0 +1,2747 @@ +swagger: '2.0' +###################################################### +# Prolog +###################################################### +info: + version: "0.10.0" + title: "WSO2 API Manager - Publisher API" + description: | + This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. + + It is written with [swagger 2](http://swagger.io/). + + contact: + name: "WSO2" + url: "http://wso2.com/products/api-manager/" + email: "architecture@wso2.com" + license: + name: "Apache 2.0" + url: "http://www.apache.org/licenses/LICENSE-2.0.html" + +###################################################### +# The fixed parts of the URLs of the API +###################################################### + +# The schemes supported by the API +schemes: + - https + +# The domain of the API. +# This is configured by the customer during deployment. +# The given host is just an example. +host: apis.wso2.com + +# The base path of the API. +# Will be prefixed to all paths. +basePath: /api/am/publisher/v0.10 + +# The following media types can be passed as input in message bodies of the API. +# The actual media type must be specified in the Content-Type header field of the request. +# The default is json, i.e. the Content-Type header is not needed to +# be set, but supporting it serves extensibility. +consumes: + - application/json + +# The following media types may be passed as output in message bodies of the API. +# The media type(s) consumable by the requestor is specified in the Accept header field +# of the corresponding request. +# The actual media type returned will be specfied in the Content-Type header field +# of the of the response. +# The default of the Accept header is json, i.e. there is not needed to +# set the value, but supporting it serves extensibility. +produces: + - application/json + + +x-wso2-security: + apim: + x-wso2-scopes: + - description: "" + roles: admin + name: apim:api_view + key: apim:api_view + - description: "" + roles: admin + name: apim:api_create + key: apim:api_create + - description: "" + roles: admin + name: apim:api_publish + key: apim:api_publish + - description: "" + roles: admin + name: apim:tier_view + key: apim:tier_view + - description: "" + roles: admin + name: apim:tier_manage + key: apim:tier_manage + - description: "" + roles: admin + name: apim:subscription_view + key: apim:subscription_view + - description: "" + roles: admin + name: apim:subscription_block + key: apim:subscription_block + +###################################################### +# The "API Collection" resource APIs +###################################################### +paths: + /apis: + +#----------------------------------------------------- +# Retrieving the list of all APIs qualifying under a given search condition +#----------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"This sample API provides Account Status Validation\",\n \"name\": \"AccountVal\",\n \"context\": \"/account\",\n \"id\": \"2e81f147-c8a8-4f68-b4f0-69e0e7510b01\",\n \"status\": \"PUBLISHED\"\n },\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": null,\n \"name\": \"api1\",\n \"context\": \"/api1\",\n \"id\": \"3e22d2fb-277a-4e9e-8c7e-1c0f7f73960e\",\n \"status\": \"PUBLISHED\"\n }\n ],\n \"next\": \"\",\n \"count\": 2\n}" + summary: | + Get all APIs + description: | + Get a list of available APIs qualifying under a given search condition. + parameters: + - $ref : '#/parameters/limit' + - $ref : '#/parameters/offset' + - name : query + in: query + description: | + **Search condition**. + + You can search in attributes by using an **"attribute:"** modifier. + + Eg. "provider:wso2" will match an API if the provider of the API contains "wso2". + + Supported attribute modifiers are [**version, context, status, + description, subcontext, doc, provider**] + + If no advanced attribute modifier has been specified, search will match the + given query string against API Name. + type: string + - $ref : "#/parameters/Accept" + - $ref : "#/parameters/If-None-Match" + tags: + - APIs + responses: + 200: + description: | + OK. + List of qualifying APIs is returned. + schema: + $ref: '#/definitions/APIList' + headers: + Content-Type: + description: The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Create a new API +#----------------------------------------------------- + post: + x-scope: apim:api_create + x-wso2-curl: "curl -H \"Authorization: Bearer 40e486e50ce43407181fb4c570d2cac7\" -H \"Content-Type: application/json\" -X POST -d @data.json http://127.0.0.1:9763/api/am/publisher/v0.10/apis" + x-wso2-request: "{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": true,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"Verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b\nContent-Type: application/json\n\n{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": true,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"Verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"890a4f4d-09eb-4877-a323-57f6ce2ed79b\",\n \"status\": \"CREATED\"\n}" + summary: Create a new API + description: | + Create a new API + parameters: + - in: body + name: body + description: | + API object that needs to be added + required: true + schema: + $ref: '#/definitions/API' + - $ref: '#/parameters/Content-Type' + tags: + - APIs + responses: + 201: + description: | + Created. + Successful response with the newly created object as entity in the body. + Location header contains URL of newly created entity. + schema: + $ref: '#/definitions/API' + headers: + Location: + description: | + The URL of the newly created resource. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional request + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 415: + description: | + Unsupported Media Type. + The entity of the request was in a not supported format. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Individual API" resource APIs +###################################################### + /apis/{apiId}: + +#----------------------------------------------------- +# Retrieve the details of an API definition +#----------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b" + x-wso2-response: "HTTP/1.1 200 OK\nDate: Mon, 22 Feb 2016 13:27:08 GMT\nContent-Type: application/json\nTransfer-Encoding: chunked\nServer: WSO2 Carbon Server\n\n{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": false,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"Verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"890a4f4d-09eb-4877-a323-57f6ce2ed79b\",\n \"status\": \"PUBLISHED\"\n}" + summary: Get API details + description: | + Get details of an API + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - APIs + responses: + 200: + description: | + OK. + Requested API is returned + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests. + type: string + schema: + $ref: '#/definitions/API' + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Update the definition of an API +#----------------------------------------------------- + put: + x-scope: apim:api_create + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X PUT -d @data.json http://127.0.0.1:9763/api/am/publisher/v0.10/apis/6fb74674-4ab8-4b52-9886-f9a376985060" + x-wso2-request: "{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"2.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": false,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"verification\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"2.0.0\",\n \"description\": \"Use this API to verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"6fb74674-4ab8-4b52-9886-f9a376985060\",\n \"status\": \"CREATED\"\n}" + x-wso2-response: "HTTP/1.1 200 OK\nDate: Mon, 22 Feb 2016 13:31:35 GMT\nContent-Type: application/json\nTransfer-Encoding: chunked\nServer: WSO2 Carbon Server\n\n{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"2.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": false,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"verification\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"2.0.0\",\n \"description\": \"Use this API to verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"6fb74674-4ab8-4b52-9886-f9a376985060\",\n \"status\": \"CREATED\"\n}" + summary: Update an existing API + description: | + Update an existing API + parameters: + - $ref: '#/parameters/apiId' + - in: body + name: body + description: | + API object that needs to be added + required: true + schema: + $ref: '#/definitions/API' + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - APIs + responses: + 200: + description: | + OK. + Successful response with updated API object + schema: + $ref: '#/definitions/API' + headers: + Location: + description: | + The URL of the newly created resource. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 403: + description: | + Forbidden. + The request must be conditional but no condition has been specified. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Delete the definition of an API +#----------------------------------------------------- + delete: + x-scope: apim:api_create + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X DELETE http://127.0.0.1:9763/api/am/publisher/v0.10/apis/6fb74674-4ab8-4b52-9886-f9a376985060" + x-wso2-response: "HTTP/1.1 200 OK" + summary: Delete API + description: | + Delete an existing API + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - APIs + responses: + 200: + description: | + OK. + Resource successfully deleted. + 403: + description: | + Forbidden. + The request must be conditional but no condition has been specified. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + Resource to be deleted does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +################################################################ +# The swagger resource of "Individual API" resource APIs +################################################################ + + /apis/{apiId}/swagger: +#----------------------------------------------------- +# Retrieve the API swagger definition +#----------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/swagger" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\nContent-Length: 329\n\n{\n \"paths\": {\"/*\": {\"get\": {\n \"x-auth-type\": \"Application\",\n \"x-throttling-tier\": \"Unlimited\",\n \"responses\": {\"200\": {\"description\": \"OK\"}}\n }}},\n \"x-wso2-security\": {\"apim\": {\"x-wso2-scopes\": []}},\n \"swagger\": \"2.0\",\n \"info\": {\n \"title\": \"PhoneVerification\",\n \"description\": \"Verify a phone number\",\n \"contact\": {\n \"email\": \"xx@ee.com\",\n \"name\": \"xx\"\n },\n \"version\": \"1.0.0\"\n }\n}" + summary: Get API Definition + description: | + Get the swagger of an API + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - APIs + responses: + 200: + description: | + OK. + Requested swagger document of the API is returned + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Update the API swagger definition +#----------------------------------------------------- + put: + consumes: + - multipart/form-data + x-scope: apim:api_create + x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -F apiDefinition=\"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\" -X PUT \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/swagger\"" + x-wso2-request: "{\n \"paths\": {\n \"\\/*\": {\n \"get\": {\n \"x-auth-type\": \"Application\",\n \"x-throttling-tier\": \"Unlimited\",\n \"responses\": {\n \"200\": {\n \"description\": \"OK\"\n }\n }\n }\n }\n },\n \"x-wso2-security\": {\n \"apim\": {\n \"x-wso2-scopes\": []\n }\n },\n \"swagger\": \"2.0\",\n \"info\": {\n \"title\": \"PhoneVerification\",\n \"description\": \"Verify a phone number\",\n \"contact\": {\n \"email\": \"xx@ee.com\",\n \"name\": \"xx\"\n },\n \"version\": \"1.0.0\"\n }\n}" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"paths\": {\"/*\": {\"get\": {\n \"x-auth-type\": \"Application\",\n \"x-throttling-tier\": \"Unlimited\",\n \"responses\": {\"200\": {\"description\": \"OK\"}}\n }}},\n \"x-wso2-security\": {\"apim\": {\"x-wso2-scopes\": []}},\n \"swagger\": \"2.0\",\n \"info\": {\n \"title\": \"PhoneVerification\",\n \"description\": \"Verify a phone number\",\n \"contact\": {\n \"email\": \"xx@ee.com\",\n \"name\": \"xx\"\n },\n \"version\": \"1.0.0\"\n }\n}" + summary: Update API Definition + description: | + Update an existing swagger definition of an API + parameters: + - $ref: '#/parameters/apiId' + - in: formData + name: apiDefinition + description: Swagger definition of the API + type: string + required: true + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - APIs + responses: + 200: + description: | + OK. + Successful response with updated Swagger definition + headers: + Location: + description: | + The URL of the newly created resource. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 403: + description: | + Forbidden. + The request must be conditional but no condition has been specified. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +################################################################ +# The thumbnail resource of "Individual API" resource APIs +################################################################ + + /apis/{apiId}/thumbnail: +#------------------------------------------------------------------------------------------------- +# Downloads a thumbnail image of an API +#------------------------------------------------------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -H \"Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail > image.jpg" + x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: image/jpeg\r\n\r\n[image content]" + summary: Get the thumbnail image + description: | + Downloads a thumbnail image of an API + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - APIs + responses: + 200: + description: | + OK. + Thumbnail image returned + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested Document does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#---------------------------------------------------------------------------- +# Upload a thumbnail image to a certain API +#---------------------------------------------------------------------------- + post: + consumes: + - multipart/form-data + x-scope: apim:api_create + x-wso2-curl: "curl -X POST -H \"Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail -F file=@image.jpg" + x-wso2-response: "HTTP/1.1 201 Created\r\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail\r\nContent-Type: application/json\r\n\r\n{\r\n \"relativePath\": \"/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail\",\r\n \"mediaType\": \"image/jpeg\"\r\n}" + summary: Upload a thumbnail image + description: | + Upload a thumbnail image to an API. + parameters: + - $ref: '#/parameters/apiId' + - in: formData + name: file + description: Image to upload + type: file + required: true + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - APIs + responses: + 200: + description: | + OK. + Image updated + schema: + $ref : '#/definitions/FileInfo' + headers: + Location: + description: | + The URL of the uploaded thumbnail image of the API. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Copy API" Processing Function resource API +###################################################### + /apis/copy-api: + +#----------------------------------------------------- +# Create a new API based on an already existing one +#----------------------------------------------------- + post: + x-scope: apim:api_create + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/copy-api?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&newVersion=2.0.0\"" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/6fb74674-4ab8-4b52-9886-f9a376985060\nContent-Type: application/json\n\n{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"2.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": true,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"2.0.0\",\n \"description\": \"Verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"6fb74674-4ab8-4b52-9886-f9a376985060\",\n \"status\": \"CREATED\"\n}" + summary: Copy API + description: | + Create a new API by copying an existing API + parameters: + - name: newVersion + description: Version of the new API. + type: string + in: query + required: true + - $ref: '#/parameters/apiId-Q' + tags: + - APIs + responses: + 201: + description: | + Created. + Successful response with the newly created API as entity in the body. Location header contains URL of newly created API. + headers: + Location: + description: | + The URL of the newly created API. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + API to copy does not exist. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Change Lifecycle" Processing Function resource API +###################################################### + /apis/change-lifecycle: + +#----------------------------------------------------- +# Change the lifecycle of an API +#----------------------------------------------------- + post: + x-scope: apim:api_publish + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish\"" + x-wso2-response: "HTTP/1.1 200 OK" + summary: Change API Status + description: | + Change the lifecycle of an API + parameters: + - name: action + description: | + The action to demote or promote the state of the API. + + Supported actions are [ **Publish, Deploy as a Prototype, Demote to Created, Demote to Prototyped, Block, Deprecate, Re-Publish, Retire **] + + in: query + type: string + required: true + enum: + - Publish + - Deploy as a Prototype + - Demote to Created + - Demote to Prototyped + - Block + - Deprecate + - Re-Publish + - Retire + - name: lifecycleChecklist + description: | + + You can specify additional checklist items by using an **"attribute:"** modifier. + + Eg: "Deprecate Old Versions:true" will deprecate older versions of a particular API when it is promoted to + Published state from Created state. Multiple checklist items can be given in "attribute1:true, attribute2:false" + format. + + Supported checklist items are as follows. + 1. **Deprecate Old Versions**: Setting this to true will deprecate older versions of a particular API when it is promoted to Published state from Created state. + 2. **Require Re-Subscription**: If you set this to true, users need to re subscribe to the API although they may have subscribed to an older version. + + type: string + in: query + - $ref: '#/parameters/apiId-Q' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - APIs + responses: + 200: + description: | + OK. + Lifecycle changed successfully. + headers: + ETag: + description: | + Entity Tag of the changed API. Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the API lifecycle has been modified the last time. + Used by caches, or in conditional requests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Document Collection" resource APIs +###################################################### + /apis/{apiId}/documents: + +#----------------------------------------------------- +# Retrieve the documents associated with an API that qualify under a search condition +#----------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents\"" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n },\n {\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"URL\",\n \"sourceUrl\": \"http://wiki.cdyne.com/index.php/Phone_Verification\",\n \"otherTypeName\": null,\n \"documentId\": \"4145df31-04f1-440c-8d08-68952874622c\",\n \"summary\": \"This is the URL for online documentation\",\n \"name\": \"Online Documentation\",\n \"type\": \"SAMPLES\"\n }\n ],\n \"next\": \"\",\n \"count\": 2\n}" + summary: Get API Documents + description: | + Get a list of documents belonging to an API. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/limit' + - $ref: '#/parameters/offset' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + tags: + - API Document + responses: + 200: + description: | + OK. + Document list is returned. + schema: + $ref: '#/definitions/DocumentList' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Add a document to a certain API +#----------------------------------------------------- + post: + x-scope: apim:api_create + x-wso2-curl: "curl -H \"Authorization: Bearer cdcc8cf6016ed10620edf3a1d3c5ef2b\" -H \"Content-Type: application/json\" -X POST -d @data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents\"" + x-wso2-request: "{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"summary\": \"This is a sample documentation\",\n \"name\": \"Introduction to PhoneVerification API\",\n \"type\": \"HOWTO\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058\",\n \"summary\": \"This is a sample documentation\",\n \"name\": \"Introduction to PhoneVerification API\",\n \"type\": \"HOWTO\"\n}" + summary: Add a new document + description: | + Add a new document to an API + parameters: + - $ref: '#/parameters/apiId' + - in: body + name: body + description: | + Document object that needs to be added + required: true + schema: + $ref: '#/definitions/Document' + - $ref: '#/parameters/Content-Type' + tags: + - API Document + responses: + 201: + description: | + Created. + Successful response with the newly created Document object as entity in the body. + Location header contains URL of newly added document. + schema: + $ref: '#/definitions/Document' + headers: + Location: + description: | + Location to the newly created Document. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional request. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 415: + description: | + Unsupported media type. + The entity of the request was in a not supported format. + +###################################################### +# The "Individual Document" resource APIs +###################################################### + '/apis/{apiId}/documents/{documentId}': + +#----------------------------------------------------- +# Retrieve a particular document of a certain API +#----------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\"" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" + summary: Get an API Document + description: | + Get a particular document associated with an API. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/documentId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - API Document + responses: + 200: + description: | + OK. + Document returned. + schema: + $ref: '#/definitions/Document' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested Document does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Update a particular document of a certain API +#----------------------------------------------------- + put: + x-scope: apim:api_create + x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X PUT -d data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\"" + x-wso2-request: "{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" + summary: Update an API Document + description: | + Update document details. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/documentId' + - in: body + name: body + description: | + Document object that needs to be added + required: true + schema: + $ref: '#/definitions/Document' + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - API Document + responses: + 200: + description: | + OK. + Document updated + schema: + $ref: '#/definitions/Document' + headers: + Location: + description: | + The URL of the updated document. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Delete a particular document of a certain API +#----------------------------------------------------- + delete: + x-scope: apim:api_create + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X DELETE http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058" + x-wso2-response: "HTTP/1.1 200 OK" + summary: Delete an API Document + description: | + Delete a document of an API + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/documentId' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - API Document + responses: + 200: + description: | + OK. + Resource successfully deleted. + 404: + description: | + Not Found. + Resource to be deleted does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +################################################################ +# The content resource of "Individual Document" resource APIs +################################################################ + + '/apis/{apiId}/documents/{documentId}/content': + + #------------------------------------------------------------------------------------------------- + # Downloads a FILE type document/get the inline content or source url of a certain document + #------------------------------------------------------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content\" > sample.pdf" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Disposition: attachment; filename=\"sample.pdf\"\nContent-Type: application/octet-stream\nContent-Length: 7802\n\n%PDF-1.4\n%äüöß\n2 0 obj\n<>\nstream\n..\n>>\nstartxref\n7279\n%%EOF" + summary: Get document content + description: | + Downloads a FILE type document/get the inline content or source url of a certain document. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/documentId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - API Document + responses: + 200: + description: | + OK. + File or inline content returned. + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 303: + description: | + See Other. + Source can be retrived from the URL specified at the Location header. + headers: + Location: + description: | + The Source URL of the document. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested Document does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + + #---------------------------------------------------------------------------- + # Upload a file or add inline content to a document of a certain API + #---------------------------------------------------------------------------- + post: + consumes: + - multipart/form-data + x-scope: apim:api_create + x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -F file=@\"sample.pdf\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content\"" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content\nContent-Type: application/json\n\n{\n \"visibility\":\"API_LEVEL\",\n \"sourceType\":\"FILE\",\n \"sourceUrl\":null,\n \"otherTypeName\":null,\n \"documentId\":\"daf732d3-bda2-46da-b381-2c39d901ea61\",\n \"summary\":\"This is a sample documentation pdf\",\n \"name\":\"Introduction to PhoneVerification API PDF\",\n \"type\":\"HOWTO\"\n}" + summary: Update API document content. + description: | + Upload a file to a document or add inline content to the document. + + Document's source type should be **FILE** in order to upload a file to the document using **file** parameter. + Document's source type should be **INLINE** in order to add inline content to the document using **inlineContent** parameter. + + Only one of **file** or **inlineContent** can be specified at one time. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/documentId' + - in: formData + name: file + description: Document to upload + type: file + required: false + - in: formData + name: inlineContent + description: Inline content of the document + type: string + required: false + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - API Document + responses: + 200: + description: | + OK. + Document updated + schema: + $ref: '#/definitions/Document' + headers: + Location: + description: | + The URL of the updated content of the document. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Individual Application" resource APIs +###################################################### + '/applications/{applicationId}': + +#----------------------------------------------------- +# Retrieve the details about a certain application +#----------------------------------------------------- + get: + x-scope: apim:api_create + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/applications/896658a0-b4ee-4535-bbfa-806c894a4015" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"groupId\": \"\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"description\": null,\n \"name\": \"DefaultApplication\"\n}" + summary: Get Application + description: | + Get application details + parameters: + - $ref: '#/parameters/applicationId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Applications + responses: + 200: + description: | + OK. + Application returned. + schema: + $ref: '#/definitions/Application' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested application does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Subscription Collection" resource APIs +###################################################### + /subscriptions: + +#----------------------------------------------------- +# Retrieve all subscriptions of a certain API +#----------------------------------------------------- + get: + x-scope: apim:subscription_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/subscriptions?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b\"" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n \n{\n \"previous\": \"\",\n \"list\": [\n {\n \"subscriptionId\": \"64eca60b-2e55-4c38-8603-e9e6bad7d809\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"UNBLOCKED\"\n },\n {\n \"subscriptionId\": \"7ac22c34-8745-4cfe-91e0-262c50b2f2e3\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"367a2361-8db5-4140-8133-c6c8dc7fa0c4\",\n \"status\": \"UNBLOCKED\"\n }\n ],\n \"next\": \"\",\n \"count\": 2\n}" + summary: Get All Subscriptions + description: | + Get subscription list. + The API Identifier and corresponding Application Identifier + the subscriptions of which are to be returned are passed as parameters. + parameters: + - $ref: '#/parameters/apiId-Q' + - $ref: '#/parameters/limit' + - $ref: '#/parameters/offset' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + tags: + - Subscriptions + responses: + 200: + description: | + OK. + Subscription list returned. + schema: + $ref: '#/definitions/SubscriptionList' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 406: + description: | + Not Acceptable. The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Individual Subscription" resource APIs +###################################################### + '/subscriptions/{subscriptionId}': + +#----------------------------------------------------- +# Retrieve a certain subscription +#----------------------------------------------------- + get: + x-scope: apim:subscription_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/subscriptions/64eca60b-2e55-4c38-8603-e9e6bad7d809" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"subscriptionId\": \"64eca60b-2e55-4c38-8603-e9e6bad7d809\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"UNBLOCKED\"\n}" + summary: Get a Subscription + description: | + Get subscription details + parameters: + - $ref: '#/parameters/subscriptionId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Subscriptions + responses: + 200: + description: | + OK. + Subscription returned + schema: + $ref: '#/definitions/Subscription' + headers: + Content-Type: + description: The content type of the body. + type: string + ETag: + description: 'Entity Tag of the response resource. Used by caches, or in conditional requests.' + type: string + Last-Modified: + description: 'Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests.' + type: string + '304': + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + '404': + description: | + Not Found. + Requested Subscription does not exist. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Block Subscription" Processing Function resource API +###################################################### + /subscriptions/block-subscription: + +#----------------------------------------------------- +# Block a certain subscription +#----------------------------------------------------- + post: + x-scope: apim:subscription_block + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/subscriptions/block-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809&blockState=PROD_ONLY_BLOCKED\"" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n \n{\n \"subscriptionId\": \"64eca60b-2e55-4c38-8603-e9e6bad7d809\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"PROD_ONLY_BLOCKED\"\n}" + summary: Block a subscription + parameters: + - $ref: '#/parameters/subscriptionId-Q' + - name: blockState + in: query + description: | + Subscription block state. + type: string + required: true + enum: + - BLOCKED + - PROD_ONLY_BLOCKED + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + description: | + Block a subscription. + tags: + - Subscriptions + responses: + 200: + description: | + OK. + Subscription was blocked successfully. + headers: + ETag: + description: | + Entity Tag of the blocked subscription. + Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the subscription has been blocked. + Used by caches, or in conditional requests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + Requested subscription does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Unblock Subscription" Processing Function resource API +###################################################### + /subscriptions/unblock-subscription: + +#----------------------------------------------------- +# Unblock a certain subscription +#----------------------------------------------------- + post: + x-scope: apim:subscription_block + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/subscriptions/unblock-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809\"" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"subscriptionId\": \"64eca60b-2e55-4c38-8603-e9e6bad7d809\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"UNBLOCKED\"\n} " + summary: Unblock a Subscription + parameters: + - $ref: '#/parameters/subscriptionId-Q' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + description: | + Unblock a subscription. + tags: + - Subscriptions + responses: + 200: + description: | + OK. + Subscription was unblocked successfully. + headers: + ETag: + description: | + Entity Tag of the unblocked subscription. + Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the subscription has been unblocked. + Used by caches, or in conditional requests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + Requested subscription does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Tier Collection" resource APIs +###################################################### + '/tiers/{tierLevel}': + +#----------------------------------------------------- +# Retrieve the list of all available tiers +#----------------------------------------------------- + get: + x-scope: apim:tier_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 1,\n \"description\": \"Allows 1 request(s) per minute.\",\n \"name\": \"Bronze\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 20,\n \"description\": \"Allows 20 request(s) per minute.\",\n \"name\": \"Gold\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Silver\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 0,\n \"tierPlan\": null,\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 0,\n \"description\": \"Allows unlimited requests\",\n \"name\": \"Unlimited\",\n \"attributes\": {}\n }\n ],\n \"next\": \"\",\n \"count\": 4\n}" + summary: List Tiers + description: | + Get available tiers + parameters: + - $ref: '#/parameters/limit' + - $ref: '#/parameters/offset' + - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + tags: + - Tiers + responses: + 200: + description: | + OK. + List of tiers returned. + schema: + $ref: '#/definitions/TierList' + headers: + Content-Type: + description: The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Create a new tier +#----------------------------------------------------- + post: + x-scope: apim:tier_manage + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X POST -d @data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api\"" + x-wso2-request: "{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"a\":10,\n \"b\":30\n }\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/tiers/Low\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"b\": \"30\",\n \"a\": \"10\"\n }\n}" + summary: Add a new Tier + description: | + Add a new tier + parameters: + - in: body + name: body + description: | + Tier object that should to be added + required: true + schema: + $ref: '#/definitions/Tier' + - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/Content-Type' + tags: + - Tiers + responses: + 201: + description: | + Created. + Successful response with the newly created object as entity in the body. + Location header contains URL of newly created entity. + schema: + $ref: '#/definitions/Tier' + headers: + Location: + description: | + Location of the newly created tier. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional request' + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 415: + description: | + Unsupported media type. + The entity of the request was in a not supported format. + +###################################################### +# The "Individual Tier" resource APIs +###################################################### + '/tiers/{tierLevel}/{tierName}': + +#----------------------------------------------------- +# Retrieve a certain tier +#----------------------------------------------------- + get: + x-scope: apim:tier_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api/Bronze" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 1,\n \"description\": \"Allows 1 request(s) per minute.\",\n \"name\": \"Bronze\",\n \"attributes\": {}\n}" + summary: Get a Tier + description: | + Get tier details + parameters: + - $ref: '#/parameters/tierName' + - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Tiers + responses: + 200: + description: | + OK. + Tier returned + schema: + $ref: '#/definitions/Tier' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested Tier does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported. + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Update a certain tier +#----------------------------------------------------- + put: + x-scope: apim:tier_manage + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X PUT -d @data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api/Low\"" + x-wso2-request: "{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 10,\n \"description\": \"Allows 10 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"a\": \"30\",\n \"b\": \"10\",\n \"c\": \"20\"\n }\n}\n" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 10,\n \"description\": \"Allows 10 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"b\": \"10\",\n \"c\": \"20\",\n \"a\": \"30\"\n }\n}" + summary: Update a Tier + description: | + Update tier details + parameters: + - $ref: '#/parameters/tierName' + - in: body + name: body + description: | + Tier object that needs to be modified + required: true + schema: + $ref: '#/definitions/Tier' + - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Tiers + responses: + 200: + description: | + OK. + Subscription updated. + schema: + $ref: '#/definitions/Tier' + headers: + Location: + description: | + The URL of the newly created resource. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Delete a certain tier +#----------------------------------------------------- + delete: + x-scope: apim:tier_manage + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api/Low\"" + x-wso2-response: "HTTP/1.1 200 OK" + summary: Delete a Tier + description: | + Remove a tier + parameters: + - $ref: '#/parameters/tierName' + - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Tiers + responses: + 200: + description: | + OK. + Resource successfully deleted. + 404: + description: | + Not Found. + Resource to be deleted does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Update Permission" Processing Function resource API +###################################################### + '/tiers/update-permission': + +#----------------------------------------------------- +# Update the permission of a certain tier +#----------------------------------------------------- + post: + x-scope: apim:tier_manage + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X POST -d @data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/update-permission?tierName=Bronze&tierLevel=api\"" + x-wso2-request: "{\n \"permissionType\":\"deny\",\n \"roles\": [\"Internal/everyone\",\"admin\"]\n}" + x-wso2-response: "HTTP/1.1 200 OK" + summary: Update Tier Permission + description: | + Update tier permission + parameters: + - $ref: '#/parameters/tierName-Q' + - $ref: '#/parameters/tierLevel-Q' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + - in: body + name: permissions + schema: + $ref: '#/definitions/TierPermission' + tags: + - Tiers + responses: + 200: + description: | + OK. + Successfully updated tier permissions + schema: + type: array + items: + $ref: '#/definitions/Tier' + headers: + ETag: + description: | + Entity Tag of the modified tier. + Used by caches, or in conditional request. + type: string + Last-Modified: + description: | + Date and time the tier has been modified. + Used by caches, or in conditional requests. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 403: + description: | + Forbidden. + The request must be conditional but no condition has been specified. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + Requested tier does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + + +###################################################### +# The "Environment Collection" resource API +###################################################### + /environments: + +#----------------------------------------------------- +# Retrieve the list of environments configured for a certain API +#----------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/environments\"" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"list\": [ {\n \"showInApiConsole\": true,\n \"serverUrl\": \"https://192.168.56.1:9444//services/\",\n \"endpoints\": {\n \"http\": \"http://192.168.56.1:8281\",\n \"https\": \"https://192.168.56.1:8244\"\n },\n \"name\": \"Production and Sandbox\",\n \"type\": \"hybrid\"\n }],\n \"count\": 1\n}" + summary: Get gateway environments + description: | + Get a list of gateway environments configured previously. + parameters: + - in: query + name: apiId + description: | + Will return environment list for the provided API. + type: string + tags: + - Environments + responses: + 200: + description: | + OK. + Environment list is returned. + schema: + $ref: '#/definitions/EnvironmentList' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' +###################################################### +# Parameters - required by some of the APIs above +###################################################### +parameters: + +# API Identifier +# Specified as part of the path expression + apiId: + name: apiId + in: path + description: | + **API ID** consisting of the **UUID** of the API. + The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. + Should be formatted as **provider-name-version**. + required: true + type: string + +# API Identifier +# Specified as part of the query string + apiId-Q: + name: apiId + in: query + description: | + **API ID** consisting of the **UUID** of the API. + The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. + Should be formatted as **provider-name-version**. + required: true + type: string + + +# Document Identifier +# Specified as part of the path expression + documentId: + name: documentId + in: path + description: | + **Document Identifier** + required: true + type: string + +# Application Identifier +# Specified as part of the path expression + applicationId: + name: applicationId + in: path + description: | + **Application Identifier** consisting of the UUID of the Application. + required: true + type: string + +# Subscription Identifier +# Specified as part of the path expression + subscriptionId: + name: subscriptionId + in: path + description: | + Subscription Id + required: true + type: string + +# Subscription Identifier +# Specified as part of the query string + subscriptionId-Q: + name: subscriptionId + in: query + description: | + Subscription Id + required: true + type: string + +# Tier Name +# Specified as part of the path expression + tierName: + name: tierName + in: path + description: | + Tier name + required: true + type: string + +# Tier Name +# Specified as part of the query string + tierName-Q: + name: tierName + in: query + description: | + Name of the tier + required: true + type: string + +# Tier Type +# Specified as part of the path expression + tierLevel: + name: tierLevel + in: path + description: | + List API or Application or Resource type tiers. + type: string + enum: + - api + - application + - resource + required: true + +# Tier Type +# Specified as part of the query string + tierLevel-Q: + name: tierLevel + in: query + description: | + List API or Application or Resource type tiers. + type: string + enum: + - api + - application + - resource + required: true + +# Used for pagination: +# The maximum number of resoures to be returned by a GET + limit: + name: limit + in: query + description: | + Maximum size of resource array to return. + default: 25 + type: integer + +# Used for pagination: +# The order number of an instance in a qualified set of resoures +# at which to start to return the next batch of qualified resources + offset: + name: offset + in: query + description: | + Starting point within the complete list of items qualified. + default: 0 + type: integer + +# The HTTP Accept header + Accept: + name: Accept + in: header + description: | + Media types acceptable for the response. Default is JSON. + default: JSON + type: string + +# The HTTP Content-Type header + Content-Type: + name: Content-Type + in: header + description: | + Media type of the entity in the body. Default is JSON. + default: JSON + required: true + type : string + +# The HTTP If-None-Match header +# Used to avoid retrieving data that are already cached + If-None-Match: + name: If-None-Match + in: header + description: | + Validator for conditional requests; based on the ETag of the formerly retrieved + variant of the resourec. + type : string + +# The HTTP If-Modified-Since header +# Used to avoid retrieving data that are already cached + If-Modified-Since: + name: If-Modified-Since + in: header + description: | + Validator for conditional requests; based on Last Modified header of the + formerly retrieved variant of the resource. + type: string + +# The HTTP If-Match header +# Used to avoid concurrent updates + If-Match: + name: If-Match + in: header + description: | + Validator for conditional requests; based on ETag. + type: string + +# The HTTP If-Unmodified-Since header +# Used to avoid concurrent updates + If-Unmodified-Since: + name: If-Unmodified-Since + in: header + description: | + Validator for conditional requests; based on Last Modified header. + type: string + +###################################################### +# The resources used by some of the APIs above within the message body +###################################################### +definitions: + +#----------------------------------------------------- +# The API List resource +#----------------------------------------------------- + APIList: + title: API List + properties: + count: + type: integer + description: | + Number of APIs returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/apis?limit=1&offset=2&query=" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/apis?limit=1&offset=0&query=" + list: + type: array + items: + $ref: '#/definitions/APIInfo' + +#----------------------------------------------------- +# The API Info resource +#----------------------------------------------------- + APIInfo: + title: API Info object with basic API details. + properties: + id: + type: string + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorAPI + description: + type: string + example: A calculator API that supports basic operations + context: + type: string + example: CalculatorAPI + version: + type: string + example: 1.0.0 + provider: + description: | + If the provider value is not given, the user invoking the API will be used as the provider. + type: string + example: admin + status: + type: string + example: CREATED + +#----------------------------------------------------- +# The API resource +#----------------------------------------------------- + API: + title: API object + required: + - name + - context + - version + - apiDefinition + - tiers + - isDefaultVersion + - transport + - endpointConfig + - visibility + properties: + id: + type: string + description: | + UUID of the api registry artifact + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorAPI + description: + type: string + example: A calculator API that supports basic operations + context: + type: string + example: CalculatorAPI + version: + type: string + example: 1.0.0 + provider: + description: | + If the provider value is not given user invoking the api will be used as the provider. + type: string + example: admin + apiDefinition: + description: | + Swagger definition of the API which contains details about URI templates and scopes + type: string + wsdlUri: + description: | + WSDL URL if the API is based on a WSDL endpoint + type: string + example: "http://www.webservicex.com/globalweather.asmx?wsdl" + status: + type: string + example: CREATED + responseCaching: + type: string + example: Disabled + cacheTimeout: + type: integer + example: 300 + destinationStatsEnabled: + type: string + example: Disabled + isDefaultVersion: + type: boolean + example: false + transport: + description: | + Supported transports for the API (http and/or https). + type: array + items: + type: string + example: ["http","https"] + tags: + type: array + items: + type: string + example: ["substract","add"] + tiers: + type: array + items: + type: string + example: ["Unlimited"] + maxTps: + properties: + production: + type: integer + format: int64 + example: 1000 + sandbox: + type: integer + format: int64 + example: 1000 + thumbnailUri: + type: string + example: "/apis/01234567-0123-0123-0123-012345678901/thumbnail" + visibility: + type: string + enum: + - PUBLIC + - PRIVATE + - RESTRICTED + - CONTROLLED + example: PUBLIC + visibleRoles: + type: array + items: + type: string + example: [] + visibleTenants: + type: array + items: + type: string + example: [] + endpointConfig: + type: string + example: "{\"production_endpoints\":{\"url\":\"http://localhost:9763/am/sample/calculator/v1/api\",\"config\":null},\"implementation_status\":\"managed\",\"endpoint_type\":\"http\"}" + endpointSecurity: + properties: + type: + type: string + example: basic + enum: + - basic + - digest + username: + type: string + example: admin + password: + type: string + example: password + gatewayEnvironments: + description: | + Comma separated list of gateway environments. + type: string + example: Production and Sandbox + sequences: + type: array + items: + $ref: '#/definitions/Sequence' + example: [] + subscriptionAvailability: + type: string + enum: + - current_tenant + - all_tenants + - specific_tenants + example: current_tenant + subscriptionAvailableTenants: + type: array + items: + type: string + example: [] + businessInformation: + properties: + businessOwner: + type: string + example: businessowner + businessOwnerEmail: + type: string + example: businessowner@wso2.com + technicalOwner: + type: string + example: technicalowner + technicalOwnerEmail: + type: string + example: technicalowner@wso2.com + corsConfiguration: + description: | + CORS configuration for the API + properties: + corsConfigurationEnabled: + type: boolean + default: false + accessControlAllowOrigins: + type: array + items: + type: string + accessControlAllowCredentials: + type: boolean + default: false + accessControlAllowHeaders: + type: array + items: + type: string + accessControlAllowMethods: + type: array + items: + type: string + +#----------------------------------------------------- +# The Application resource +#----------------------------------------------------- + Application: + title: Application + required: + - name + - throttlingTier + properties: + applicationId: + type: string + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorApp + subscriber: + type: string + example: admin + throttlingTier: + type: string + example: Unlimited + description: + type: string + example: Sample calculator application + groupId: + type: string + example: "" + +#----------------------------------------------------- +# The Document List resource +#----------------------------------------------------- + DocumentList: + title: Document List + properties: + count: + type: integer + description: | + Number of Documents returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/apis/01234567-0123-0123-0123-012345678901/documents?limit=1&offset=2" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/apis/01234567-0123-0123-0123-012345678901/documents?limit=1&offset=0" + list: + type: array + items: + $ref: '#/definitions/Document' + +#----------------------------------------------------- +# The Document resource +#----------------------------------------------------- + Document: + title: Document + required: + - name + - type + - sourceType + - visibility + properties: + documentId: + type: string + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorDoc + type: + type: string + enum: + - HOWTO + - SAMPLES + - PUBLIC_FORUM + - SUPPORT_FORUM + - API_MESSAGE_FORMAT + - SWAGGER_DOC + - OTHER + example: HOWTO + summary: + type: string + example: "Summary of Calculator Documentation" + sourceType: + type: string + enum: + - INLINE + - URL + - FILE + example: INLINE + sourceUrl: + type: string + example: "" + otherTypeName: + type: string + example: "" + visibility: + type: string + enum: + - OWNER_ONLY + - PRIVATE + - API_LEVEL + example: API_LEVEL + +#----------------------------------------------------- +# The Tier List resource +#----------------------------------------------------- + TierList: + title: Tier List + properties: + count: + type: integer + description: | + Number of Tiers returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/tiers/api?limit=1&offset=2" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/tiers/api?limit=1&offset=0" + list: + type: array + items: + $ref: '#/definitions/Tier' + +#----------------------------------------------------- +# The Tier resource +#----------------------------------------------------- + Tier: + title: Tier + required: + - name + - tierPlan + - requestCount + - unitTime + - stopOnQuotaReach + properties: + name: + type: string + example: Platinum + description: + type: string + example: "Allows 50 request(s) per minute." + tierLevel: + type: string + enum: + - api + - application + - resource + example: api + attributes: + description: | + Custom attributes added to the tier policy + type: object + additionalProperties: + type: string + example: {} + requestCount: + description: | + Maximum number of requests which can be sent within a provided unit time + type: integer + format: int64 + example: 50 + unitTime: + type: integer + format: int64 + example: 60000 + timeUnit: + type: string + example: "min" + tierPlan: + description: | + This attribute declares whether this tier is available under commercial or free + type: string + enum: + - FREE + - COMMERCIAL + example: FREE + stopOnQuotaReach: + description: | + By making this attribute to false, you are capabale of sending requests + even if the request count exceeded within a unit time + type: boolean + example: true + +#----------------------------------------------------- +# The Tier Permission resource +#----------------------------------------------------- + TierPermission: + title: tierPermission + required: + - permissionType + - roles + properties: + permissionType: + type: string + enum: + - allow + - deny + example: deny + roles: + type: array + items: + type: string + example: ["Internal/everyone"] + +#----------------------------------------------------- +# The Subscription List resource +#----------------------------------------------------- + SubscriptionList: + title: Subscription List + properties: + count: + type: integer + description: | + Number of Subscriptions returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/subscriptions?limit=1&offset=2&apiId=01234567-0123-0123-0123-012345678901&groupId=" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/subscriptions?limit=1&offset=0&apiId=01234567-0123-0123-0123-012345678901&groupId=" + list: + type: array + items: + $ref: '#/definitions/Subscription' + +#----------------------------------------------------- +# The Subscription resource +#----------------------------------------------------- + Subscription: + title: Subscription + required: + - applicationId + - apiIdentifier + - tier + properties: + subscriptionId: + type: string + example: 01234567-0123-0123-0123-012345678901 + applicationId: + type: string + example: 01234567-0123-0123-0123-012345678901 + apiIdentifier: + type: string + example: 01234567-0123-0123-0123-012345678901 + tier: + type: string + example: Unlimited + status: + type: string + enum: + - BLOCKED + - PROD_ONLY_BLOCKED + - UNBLOCKED + - ON_HOLD + - REJECTED + example: UNBLOCKED + +#----------------------------------------------------- +# The Sequence resource +#----------------------------------------------------- + Sequence: + title: Sequence + required: + - name + properties: + name: + type: string + example: log_in_message + config: + type: string + example: "" + type: + type: string + example: in + +#----------------------------------------------------- +# The Error resource +#----------------------------------------------------- + Error: + title: Error object returned with 4XX HTTP status + required: + - code + - message + properties: + code: + type: integer + format: int64 + message: + type: string + description: Error message. + description: + type: string + description: | + A detail description about the error message. + moreInfo: + type: string + description: | + Preferably an url with more details about the error. + error: + type: array + description: | + If there are more than one error list them out. + For example, list out validation errors by each field. + items: + $ref: '#/definitions/ErrorListItem' + +#----------------------------------------------------- +# The Error List Item resource +#----------------------------------------------------- + ErrorListItem: + title: Description of individual errors that may have occurred during a request. + required: + - code + - message + properties: + code: + type: string + message: + type: string + description: | + Description about individual errors occurred + +#----------------------------------------------------- +# The Environment resource +#----------------------------------------------------- + Environment: + title: Environment + required: + - name + - type + - serverUrl + - endpoints + - showInApiConsole + properties: + name: + type: string + example: Production and Sandbox + type: + type: string + example: hybrid + serverUrl: + type: string + example: "https://localhost:9443//services/" + showInApiConsole: + type: boolean + example: true + endpoints: + $ref: '#/definitions/EnvironmentEndpoints' + +#----------------------------------------------------- +# The Environment List resource +#----------------------------------------------------- + EnvironmentList: + title: Environment List + properties: + count: + type: integer + description: | + Number of Environments returned. + example: 1 + list: + type: array + items: + $ref: '#/definitions/Environment' + + +#----------------------------------------------------- +# The Environment Endpoint resource +#----------------------------------------------------- + EnvironmentEndpoints : + title: Environment Endpoints + properties: + http: + type: string + description: HTTP environment URL + example: "http://localhost:8280" + https: + type: string + description: HTTPS environment URL + example: "https://localhost:8244" + +#----------------------------------------------------- +# The File Information resource +#----------------------------------------------------- + FileInfo : + title: File Information including meta data + properties: + relativePath: + type: string + description: relative location of the file (excluding the base context and host of the Publisher API) + example: "apis/01234567-0123-0123-0123-012345678901/thumbnail" + mediaType: + type: string + description: media-type of the file + example: "image/jpeg" \ No newline at end of file diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/store-api.yaml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/store-api.yaml new file mode 100644 index 0000000000..eed49e831e --- /dev/null +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/store-api.yaml @@ -0,0 +1,2311 @@ +swagger: '2.0' +###################################################### +# Prolog +###################################################### +info: + version: "0.11.0" + title: "WSO2 API Manager - Store" + description: | + This specifies a **RESTful API** for WSO2 **API Manager** - Store. + + Please see [full swagger definition](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.0.4/components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/resources/store-api.yaml) of the API which is written using [swagger 2.0](http://swagger.io/) specification. + contact: + name: "WSO2" + url: "http://wso2.com/products/api-manager/" + email: "architecture@wso2.com" + license: + name: "Apache 2.0" + url: "http://www.apache.org/licenses/LICENSE-2.0.html" + +###################################################### +# The fixed parts of the URLs of the API +###################################################### + +# The schemes supported by the API +schemes: + - https + +# The domain of the API. +# This is configured by the customer during deployment. +# The given host is just an example. +host: apis.wso2.com + +# The base path of the API. +# Will be prefixed to all paths. +basePath: /api/am/store/v0.11 + +# The following media types can be passed as input in message bodies of the API. +# The actual media type must be specified in the Content-Type header field of the request. +# The default is json, i.e. the Content-Type header is not needed to +# be set, but supporting it serves extensibility. +consumes: + - application/json + +# The following media types may be passed as output in message bodies of the API. +# The media type(s) consumable by the requestor is specified in the Accept header field +# of the corresponding request. +# The actual media type returned will be specfied in the Content-Type header field +# of the of the response. +# The default of the Accept header is json, i.e. there is not needed to +# set the value, but supporting it serves extensibility. +produces: + - application/json + +x-wso2-security: + apim: + x-wso2-scopes: + - description: "" + roles: Internal/subscriber + name: apim:subscribe + key: apim:subscribe + +###################################################### +# The "API Collection" resource APIs +###################################################### +paths: + /apis: + +#----------------------------------------------------- +# Retrieving the list of all APIs qualifying under a given search condition +#----------------------------------------------------- + get: + x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis" + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/apis + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"This API provide Account Status Validation.\",\n \"status\": \"PUBLISHED\",\n \"name\": \"AccountVal\",\n \"context\": \"/account/1.0.0\",\n \"id\": \"2e81f147-c8a8-4f68-b4f0-69e0e7510b01\"\n },\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": null,\n \"status\": \"PUBLISHED\",\n \"name\": \"api1\",\n \"context\": \"/api1/1.0.0\",\n \"id\": \"3e22d2fb-277a-4e9e-8c7e-1c0f7f73960e\"\n },\n {\n \"provider\": \"admin\",\n \"version\": \"2.0.0\",\n \"description\": \"Verify a phone number\",\n \"status\": \"PUBLISHED\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify/2.0.0\",\n \"id\": \"c43a325c-260b-4302-81cb-768eafaa3aed\"\n }\n ],\n \"count\": 3,\n \"next\": \"\"\n}" + summary: | + Retrieve/Search APIs + description: | + This operation provides you a list of available APIs qualifying under a given search condition. + + Each retrieved API is represented with a minimal amount of attributes. If you want to get complete details of an API, you need to use **Get details of an API** operation. + + This operation supports retriving APIs of other tenants. The required tenant domain need to be specified as a header `X-WSO2-Tenant`. If not specified super tenant's APIs will be retrieved. If you used an Authorization header, the user's tenant associated with the access token will be used. + + **NOTE:** + * By default, this operation retrieves Published APIs. In order to retrieve Prototyped APIs, you need to use **query** parameter and specify **status:PROTOTYPED**. + * This operation does not require an Authorization header by default. But if it is provided, it will be validated and checked for permissions of the user, hence you may be able to see APIs which are restricted for special permissions/roles. + parameters: + - $ref : '#/parameters/limit' + - $ref : '#/parameters/offset' + - $ref : '#/parameters/requestedTenant' + - name : query + in: query + description: | + **Search condition**. + + You can search in attributes by using an **":"** modifier. + + Eg. + "provider:wso2" will match an API if the provider of the API is exactly "wso2". + + Additionally you can use wildcards. + + Eg. + "provider:wso2*" will match an API if the provider of the API starts with "wso2". + + Supported attribute modifiers are [**version, context, status, + description, subcontext, doc, provider, tag**] + + If no advanced attribute modifier has been specified, search will match the + given query string against API Name. + + type: string + - $ref : "#/parameters/Accept" + - $ref : "#/parameters/If-None-Match" + tags: + - API (Collection) + responses: + 200: + description: | + OK. + List of qualifying APIs is returned. + schema: + $ref: '#/definitions/APIList' + headers: + Content-Type: + description: The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Individual API" resource APIs +###################################################### + /apis/{apiId}: + +#----------------------------------------------------- +# Retrieve the details of an API definition +#----------------------------------------------------- + get: + x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed" + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\r\n \"thumbnailUrl\": null,\r\n \"tiers\": [\"Unlimited\"],\r\n \"businessInformation\": {\r\n \"technicalOwner\": \"John Doe\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"businessOwner\": \"Jane Roe\",\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\"\r\n },\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"},\\\"Content-Type\\\":{\\\"description\\\":\\\"The content type of the body.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity.\\\"}}}},\\\"/order/{orderId}\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Get details of an Order\\\",\\\"parameters\\\":[{\\\"description\\\":\\\"Order Id\\\",\\\"name\\\":\\\"orderId\\\",\\\"format\\\":\\\"integer\\\",\\\"type\\\":\\\"number\\\",\\\"required\\\":true,\\\"in\\\":\\\"path\\\"}],\\\"responses\\\":{\\\"200\\\":{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"headers\\\":{},\\\"description\\\":\\\"OK Requested Order will be returned\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"isDefaultVersion\": false,\r\n \"endpointURLs\": [ {\r\n \"environmentName\": \"Production and Sandbox\",\r\n \"environmentType\": \"hybrid\",\r\n \"environmentURLs\": {\r\n \"http\": \"http://10.100.7.77:8280//pizzashack/1.0.0\",\r\n \"https\": \"https://10.100.7.77:8243//pizzashack/1.0.0\"\r\n }\r\n }],\r\n \"transport\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"tags\": [\"pizza\"],\r\n \"version\": \"1.0.0\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"provider\": \"admin\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"context\": \"/pizzashack/1.0.0\",\r\n \"id\": \"8848faaa-7fd1-478a-baa2-48a4ebb92c98\",\r\n \"status\": \"PUBLISHED\"\r\n} " + summary: | + Get details of an API + description: | + Using this operation, you can retrieve complete details of a single API. You need to provide the Id of the API to retrive it. + + `X-WSO2-Tenant` header can be used to retrive an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. + + **NOTE:** + * This operation does not require an Authorization header by default. But if it is provided, it will be validated and checked for permissions of the user, hence you may be able to see APIs which are restricted for special permissions/roles. \n + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + - $ref: '#/parameters/requestedTenant' + tags: + - API (Individual) + responses: + 200: + description: | + OK. + Requested API is returned + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + schema: + $ref: '#/definitions/API' + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + + + /apis/{apiId}/swagger: +#----------------------------------------------------- +# Retrieve the API swagger definition +#----------------------------------------------------- + get: + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger + x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"paths\": {\"/*\": {\"get\": {\n \"x-auth-type\": \"Application\",\n \"x-throttling-tier\": \"Unlimited\",\n \"responses\": {\"200\": {\"description\": \"OK\"}}\n }}},\n \"x-wso2-security\": {\"apim\": {\"x-wso2-scopes\": []}},\n \"swagger\": \"2.0\",\n \"info\": {\n \"title\": \"PhoneVerification\",\n \"description\": \"Verify a phone number\",\n \"contact\": {\n \"email\": \"xx@ee.com\",\n \"name\": \"xx\"\n },\n \"version\": \"2.0.0\"\n }\n}\n" + summary: | + Get swagger definition + description: | + You can use this operation to retrieve the swagger definition of an API. + + `X-WSO2-Tenant` header can be used to retrive the swagger definition an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. + + **NOTE:** + * This operation does not require an Authorization header by default. But in order to see a restricted API's swagger definition, you need to provide Authorization header. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + - $ref: '#/parameters/requestedTenant' + tags: + - API (Individual) + responses: + 200: + description: | + OK. + Requested swagger document of the API is returned + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Generate SDK for an API +#----------------------------------------------------- + /apis/generate-sdk/: + post: + x-scope: apim:subscribe + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/apis/generate-sdk + x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/generate-sdk" + x-wso2-response: "HTTP/1.1 200 OK \n Content-Disposition: attachment; filename=\"PizzaShackAPI_1.0.0_java.zip\" \n Date: Wed, 12 Oct 2016 11:10:49 GMT \n Content-Type: application/zip \n Transfer-Encoding: chunked \n Server: WSO2 Carbon Server" + summary: | + Generate SDK for an API + description: | + This operation can be used to generate SDK for an API by providing the id of the API along with the preferred language. + parameters: + - $ref: '#/parameters/apiId-Q' + - $ref: '#/parameters/language' + - $ref : '#/parameters/requestedTenant' + tags: + - API (Individual) + responses: + 200: + description: | + OK. + SDK generated successfully. + headers: + Content-Type: + description: | + The content type of the body. + type: string + 400: + description: | + Bad request. + SDK language is not supported. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Document Collection" resource APIs +###################################################### + /apis/{apiId}/documents: + +#----------------------------------------------------- +# Retrieve the documents associated with an API that qualify under a search condition +#----------------------------------------------------- + get: + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents + x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"850a4f34-db2c-4d23-9d85-3f95fbfb082c\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n },\n {\n \"sourceType\": \"URL\",\n \"sourceUrl\": \"http://wiki.cdyne.com/index.php/Phone_Verification\",\n \"otherTypeName\": null,\n \"documentId\": \"98e18be8-5861-43c7-ba26-8cbbccd3a76f\",\n \"summary\": \"This is the URL for online documentation\",\n \"name\": \"Online Documentation\",\n \"type\": \"SAMPLES\"\n },\n {\n \"sourceType\": \"FILE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"b66451ff-c6c2-4f6a-b91d-3821dc119b04\",\n \"summary\": \"This is a sample documentation pdf\",\n \"name\": \"Introduction to PhoneVerification API PDF\",\n \"type\": \"HOWTO\"\n }\n ],\n \"count\": 3,\n \"next\": \"\"\n}" + summary: | + Get a list of documents of an API + description: | + This operation can be used to retrive a list of documents belonging to an API by providing the id of the API. + + `X-WSO2-Tenant` header can be used to retrive documents of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. + + **NOTE:** + * This operation does not require an Authorization header by default. But in order to see a restricted API's documents, you need to provide Authorization header. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/limit' + - $ref: '#/parameters/offset' + - $ref: '#/parameters/requestedTenant' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + tags: + - Document (Collection) + responses: + 200: + description: | + OK. + Document list is returned. + schema: + $ref: '#/definitions/DocumentList' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Individual Document" resource APIs +###################################################### + '/apis/{apiId}/documents/{documentId}': + +#----------------------------------------------------- +# Retrieve a particular document of a certain API +#----------------------------------------------------- + get: + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c + x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c\"" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"850a4f34-db2c-4d23-9d85-3f95fbfb082c\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" + summary: | + Get a document of an API + description: | + This operation can be used to retrieve a particular document's metadata associated with an API. + + `X-WSO2-Tenant` header can be used to retrive a document of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. + + **NOTE:** + * This operation does not require an Authorization header by default. But in order to see a restricted API's document, you need to provide Authorization header. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/documentId' + - $ref: '#/parameters/requestedTenant' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Document (Individual) + responses: + 200: + description: | + OK. + Document returned. + schema: + $ref: '#/definitions/Document' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested Document does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + + +################################################################ +# The content resource of "Individual Document" resource APIs +################################################################ + + '/apis/{apiId}/documents/{documentId}/content': + + #------------------------------------------------------------------------------------------------- + # Downloads a FILE type document/get the inline content or source url of a certain document + #------------------------------------------------------------------------------------------------- + get: + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content + x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content\" > sample.pdf" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Disposition: attachment; filename=\"sample.pdf\"\nContent-Type: application/octet-stream\nContent-Length: 7802\n\n%PDF-1.4\n%äüöß\n2 0 obj\n<>\nstream\n..\n>>\nstartxref\n7279\n%%EOF" + + summary: | + Get the content of an API document + description: | + This operation can be used to retrive the content of an API's document. + + The document can be of 3 types. In each cases responses are different. + + 1. **Inline type**: + The content of the document will be retrieved in `text/plain` content type + 2. **FILE type**: + The file will be downloaded with the related content type (eg. `application/pdf`) + 3. **URL type**: + The client will recieve the URL of the document as the Location header with the response with - `303 See Other` + + `X-WSO2-Tenant` header can be used to retrive the content of a document of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. + + **NOTE:** + * This operation does not require an Authorization header by default. But in order to see a restricted API's document content, you need to provide Authorization header. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/documentId' + - $ref: '#/parameters/requestedTenant' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Document (Individual) + responses: + 200: + description: | + OK. + File or inline content returned. + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 303: + description: | + See Other. + Source can be retrived from the URL specified at the Location header. + headers: + Location: + description: | + The Source URL of the document. + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested Document does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +################################################################ +# The thumbnail resource of "Individual API" resource APIs +################################################################ + + /apis/{apiId}/thumbnail: +#------------------------------------------------------------------------------------------------- +# Downloads a thumbnail image of an API +#------------------------------------------------------------------------------------------------- + get: + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail + x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail > image.jpg" + x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: image/jpeg\r\n\r\n[image content]" + summary: Get thumbnail image + description: | + This operation can be used to download a thumbnail image of an API. + + **NOTE:** + * This operation does not require an Authorization header by default. But in order to see a restricted API's thumbnail, you need to provide Authorization header. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/requestedTenant' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - API (Individual) + responses: + 200: + description: | + OK. + Thumbnail image returned + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested Document does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Application Collection" resource APIs +###################################################### + /applications: + +#----------------------------------------------------- +# Retrieve a list of all applications of a certain subscriber +#----------------------------------------------------- + get: + x-scope: apim:subscribe + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/applications + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/store/v0.11/applications\"" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"groupId\": \"\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"367a2361-8db5-4140-8133-c6c8dc7fa0c4\",\n \"description\": \"\",\n \"status\": \"APPROVED\",\n \"name\": \"app1\"\n },\n {\n \"groupId\": \"\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"description\": null,\n \"status\": \"APPROVED\",\n \"name\": \"DefaultApplication\"\n }\n ],\n \"count\": 2,\n \"next\": \"\"\n}" + summary: | + Retrieve/Search applications + description: | + This operation can be used to retrieve list of applications that is belonged to the user associated with the provided access token. + parameters: + - $ref: '#/parameters/groupId' + - name : query + in: query + description: | + **Search condition**. + + You can search for an application by specifying the name as "query" attribute. + + Eg. + "app1" will match an application if the name is exactly "app1". + + Currently this does not support wildcards. Given name must exactly match the application name. + type: string + - $ref: '#/parameters/limit' + - $ref: '#/parameters/offset' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + tags: + - Application (Collection) + responses: + 200: + description: | + OK. + Application list returned. + schema: + $ref: '#/definitions/ApplicationList' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported. + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Create a new application +#----------------------------------------------------- + post: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/applications\"" + x-wso2-request: "POST https://127.0.0.1:9443/api/am/store/v0.11/applications\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"throttlingTier\": \"Unlimited\",\n \"description\": \"sample app description\",\n \"name\": \"sampleapp\",\n \"callbackUrl\": \"http://my.server.com/callback\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.11/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\nContent-Type: application/json\n\n{\n \"groupId\": null,\n \"callbackUrl\": \"http://my.server.com/callback\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"description\": \"sample app description\",\n \"status\": \"APPROVED\",\n \"name\": \"sampleapp\",\n \"keys\": []\n}" + summary: | + Create a new application + description: | + This operation can be used to create a new application specifying the details of the application in the payload. + parameters: + - in: body + name: body + description: | + Application object that is to be created. + required: true + schema: + $ref: '#/definitions/Application' + - $ref: '#/parameters/Content-Type' + tags: + - Application (Individual) + responses: + 201: + description: | + Created. + Successful response with the newly created object as entity in the body. + Location header contains URL of newly created entity. + schema: + $ref: '#/definitions/Application' + headers: + Location: + description: | + Location of the newly created Application. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 409: + description: | + Conflict. + Application already exists. + schema: + $ref: '#/definitions/Error' + 415: + description: | + Unsupported media type. + The entity of the request was in a not supported format. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Individual Application" resource APIs +###################################################### + '/applications/{applicationId}': + +#----------------------------------------------------- +# Retrieve the details about a certain application +#----------------------------------------------------- + get: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/store/v0.11/applications/896658a0-b4ee-4535-bbfa-806c894a4015\"" + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/applications/896658a0-b4ee-4535-bbfa-806c894a4015 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"groupId\": \"\",\n \"callbackUrl\": null,\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"description\": null,\n \"status\": \"APPROVED\",\n \"name\": \"DefaultApplication\",\n \"keys\": [ {\n \"consumerKey\": \"AVoREWiB16kY_GTIzscl40GYYZQa\",\n \"consumerSecret\": \"KXQxmS8W3xDvvJH4AfR6xrhKIeIa\",\n \"keyState\": \"COMPLETED\",\n \"keyType\": \"PRODUCTION\",\n \"supportedGrantTypes\": null,\n \"token\": {\n \"validityTime\": 3600,\n \"accessToken\": \"3887da6d111f0429c6dff47a46e87209\",\n \"tokenScopes\": [\n \"am_application_scope\",\n \"default\"\n ]\n }\n }]\n}" + summary: | + Get details of an application + description: | + This operation can be used to retrieve details of an individual application specifying the application id in the URI. + parameters: + - $ref: '#/parameters/applicationId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Application (Individual) + responses: + 200: + description: | + OK. + Application returned. + schema: + $ref: '#/definitions/Application' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested application does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Update a certain application +#----------------------------------------------------- + put: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X PUT -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\"" + x-wso2-request: "PUT https://127.0.0.1:9443/api/am/store/v0.11/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"callbackUrl\": \"\",\n \"throttlingTier\": \"Bronze\",\n \"description\": \"sample app description updated\",\n \"name\": \"sampleapp\"\n}" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"groupId\": null,\n \"callbackUrl\": \"\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Bronze\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"description\": \"sample app description updated\",\n \"status\": \"APPROVED\",\n \"name\": \"sampleapp\",\n \"keys\": []\n}" + summary: | + Update an application + description: | + This operation can be used to update an application. Upon succesfull you will retrieve the updated application as the response. + parameters: + - $ref: '#/parameters/applicationId' + - in: body + name: body + description: | + Application object that needs to be updated + required: true + schema: + $ref: '#/definitions/Application' + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Application (Individual) + responses: + 200: + description: | + OK. + Application updated. + schema: + $ref: '#/definitions/Application' + headers: + Location: + description: | + The URL of the newly created resource. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met (Will be supported in future). + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Delete a certain application +#----------------------------------------------------- + delete: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE \"https://127.0.0.1:9443/api/am/store/v0.11/applications/367a2361-8db5-4140-8133-c6c8dc7fa0c4\"" + x-wso2-request: | + DELETE https://127.0.0.1:9443/api/am/store/v0.11/applications/367a2361-8db5-4140-8133-c6c8dc7fa0c4 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK" + summary: | + Remove an application + description: | + This operation can be used to remove an application specifying its id. + parameters: + - $ref: '#/parameters/applicationId' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Application (Individual) + responses: + 200: + description: | + OK. + Resource successfully deleted. + 404: + description: | + Not Found. + Resource to be deleted does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met (Will be supported in future). + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Generate Keys" Processing Function resource API +###################################################### + '/applications/generate-keys': + +#----------------------------------------------------- +# Generate keys for an application +#----------------------------------------------------- + post: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/applications/generate-keys?applicationId=c30f3a6e-ffa4-4ae7-afce-224d1f820524\"" + x-wso2-request: "POST https://127.0.0.1:9443/api/am/store/v0.11/applications/generate-keys?applicationId=c30f3a6e-ffa4-4ae7-afce-224d1f820524\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"validityTime\": \"3600\",\n \"keyType\": \"PRODUCTION\",\n \"accessAllowDomains\": [\"ALL\"\n ]\n}" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"consumerSecret\": \"8V7DDKtKGtuG_9GDjaOJ5sijdX0a\",\n \"consumerKey\": \"LOFL8He72MSGVil4SS_bsh9O8MQa\",\n \"keyState\": \"APPROVED\",\n \"keyType\": \"PRODUCTION\",\n \"supportedGrantTypes\": [\n \"urn:ietf:params:oauth:grant-type:saml2-bearer\",\n \"iwa:ntlm\",\n \"refresh_token\",\n \"client_credentials\",\n \"password\"\n ],\n \"token\": {\n \"validityTime\": 3600,\n \"accessToken\": \"fd2cdc4906fbc162e033d57f85a71c21\",\n \"tokenScopes\": [\n \"am_application_scope\",\n \"default\"\n ]\n }\n}" + summary: | + Generate keys for application + description: | + This operation can be used to generate client Id and client secret for an application + parameters: + - $ref: '#/parameters/applicationId-Q' + - in: body + name: body + description: | + Application object the keys of which are to be generated + required: true + schema: + $ref: '#/definitions/ApplicationKeyGenerateRequest' + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Application (Individual) + responses: + 200: + description: | + OK. + Keys are generated. + schema: + $ref: '#/definitions/ApplicationKey' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future).‚ + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met (Will be supported in future). + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Subscription Collection" resource APIs +###################################################### + /subscriptions: + +#----------------------------------------------------- +# Retrieve all subscriptions of a certain API and application +#----------------------------------------------------- + get: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed\"" + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"tier\": \"Bronze\",\n \"subscriptionId\": \"03b8ef2b-5ae5-41f5-968e-52fa7fbd5d33\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"UNBLOCKED\"\n },\n {\n \"tier\": \"Bronze\",\n \"subscriptionId\": \"5ed42650-9f5e-4dd4-94f3-3f09f1b17354\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"846118a5-3b25-4c22-a983-2d0278936f09\",\n \"status\": \"UNBLOCKED\"\n }\n ],\n \"count\": 2,\n \"next\": \"\"\n}" + summary: | + Get all subscriptions + description: | + This operation can be used to retrieve a list of subscriptions of the user associated with the provided access token. This operation is capable of + + 1. Retrieving applications which are subscibed to a specific API. + `GET https://127.0.0.1:9443/api/am/store/v0.11/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed` + + 2. Retrieving APIs which are subscribed by a specific application. + `GET https://127.0.0.1:9443/api/am/store/v0.11/subscriptions?applicationId=c43a325c-260b-4302-81cb-768eafaa3aed` + + **IMPORTANT:** + * It is mandatory to provide either **apiId** or **applicationId**. + parameters: + - $ref: '#/parameters/apiId-Q' + - $ref: '#/parameters/applicationId-Q' + - $ref: '#/parameters/groupId' + - $ref: '#/parameters/offset' + - $ref: '#/parameters/limit' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + tags: + - Subscription (Collection) + responses: + 200: + description: | + OK. + Subscription list returned. + schema: + $ref: '#/definitions/SubscriptionList' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 406: + description: | + Not Acceptable. The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Create a new subscription +#----------------------------------------------------- + post: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions\"" + x-wso2-request: "POST https://127.0.0.1:9443/api/am/store/v0.11/subscriptions\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"c43a325c-260b-4302-81cb-768eafaa3aed\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\nContent-Type: application/json\n\n{\n \"tier\": \"Gold\",\n \"subscriptionId\": \"5b65808c-cdf2-43e1-a695-de63e3ad0ae9\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"status\": \"UNBLOCKED\"\n}" + summary: | + Add a new subscription + description: | + This operation can be used to add a new subscription providing the id of the API and the application. + parameters: + - in: body + name: body + description: | + Subscription object that should to be added + required: true + schema: + $ref: '#/definitions/Subscription' + - $ref: '#/parameters/Content-Type' + tags: + - Subscription (Individual) + responses: + 201: + description: | + Created. + Successful response with the newly created object as entity in the body. + Location header contains URL of newly created entity. + schema: + $ref: '#/definitions/Subscription' + headers: + Location: + description: | + Location to the newly created subscription. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 415: + description: | + Unsupported media type. + The entity of the request was in a not supported format. + +###################################################### +# The "Multiple Subscriptions" resource API +###################################################### + '/subscriptions/multiple': +#----------------------------------------------------- +# Create a batch of Subscriptions +#----------------------------------------------------- + post: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/multiple\"" + x-wso2-request: "POST https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/multiple\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"c43a325c-260b-4302-81cb-768eafaa3aed\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\nContent-Type: application/json\n\n{\n \"tier\": \"Gold\",\n \"subscriptionId\": \"5b65808c-cdf2-43e1-a695-de63e3ad0ae9\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"status\": \"UNBLOCKED\"\n}" + summary: | + Add new subscriptions + description: | + This operation can be used to add a new subscriptions providing the ids of the APIs and the applications. + parameters: + - in: body + name: body + description: | + Subscription objects that should to be added + required: true + schema: + type: array + items: + $ref: '#/definitions/Subscription' + - $ref: '#/parameters/Content-Type' + tags: + - Subscription (Multitple) + responses: + 200: + description: | + OK. + Successful response with the newly created objects as entity in the body. + schema: + type: array + items: + $ref: '#/definitions/Subscription' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 415: + description: | + Unsupported media type. + The entity of the request was in a not supported format. + +###################################################### +# The "Individual Subscription" resource APIs +###################################################### + '/subscriptions/{subscriptionId}': + +#----------------------------------------------------- +# Retrieve a certain subscription +#----------------------------------------------------- + get: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\"" + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"tier\": \"Gold\",\n \"subscriptionId\": \"5b65808c-cdf2-43e1-a695-de63e3ad0ae9\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"status\": \"UNBLOCKED\"\n}" + summary: | + Get details of a subscription + description: | + This operation can be used to get details of a single subscription. + parameters: + - $ref: '#/parameters/subscriptionId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Subscription (Individual) + responses: + 200: + description: | + OK. + Subscription returned + schema: + $ref: '#/definitions/Subscription' + headers: + Content-Type: + description: The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. Used by caches, or in conditional requests (Will be supported in future). + type: string + '304': + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + '404': + description: | + Not Found. + Requested Subscription does not exist. + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Delete a certain subscription +#----------------------------------------------------- + delete: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\"" + x-wso2-request: | + DELETE https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9 + x-wso2-response: "HTTP/1.1 200 OK" + summary: | + Remove a subscription + description: | + This operation can be used to remove a subscription. + parameters: + - $ref: '#/parameters/subscriptionId' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Subscription (Individual) + responses: + 200: + description: | + OK. + Resource successfully deleted. + 404: + description: | + Not Found. + Resource to be deleted does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met (Will be supported in future). + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Tier Collection" resource APIs +###################################################### + /tiers/{tierLevel}: + +#----------------------------------------------------- +# Retrieve the list of all available tiers +#----------------------------------------------------- + get: + x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/tiers/api\"" + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/tiers/api + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 1,\n \"description\": \"Allows 1 request(s) per minute.\",\n \"name\": \"Bronze\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 20,\n \"description\": \"Allows 20 request(s) per minute.\",\n \"name\": \"Gold\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Silver\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 0,\n \"tierPlan\": null,\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 0,\n \"description\": \"Allows unlimited requests\",\n \"name\": \"Unlimited\",\n \"attributes\": {}\n }\n ],\n \"count\": 4,\n \"next\": \"\"\n}" + summary: | + Get available tiers + description: | + This operation can be used to retrieve all the tiers available for the provided tier level. Tier level should be specified as a path parameter and should be one of `api` and `application`. + + **NOTE**: + * API tiers are the ones that is available during subscription of an application to an API. Hence they are also called subscription tiers and are same as the subscription policies in Admin REST API. + parameters: + - $ref: '#/parameters/limit' + - $ref: '#/parameters/offset' + - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/requestedTenant' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + tags: + - Throttling Tier (Collection) + responses: + 200: + description: | + OK. + List of tiers returned. + schema: + type: array + items: + $ref: '#/definitions/TierList' + headers: + Content-Type: + description: The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Individual Tier" resource APIs +###################################################### + '/tiers/{tierLevel}/{tierName}': + +#----------------------------------------------------- +# Retrieve a certain tier +#----------------------------------------------------- + get: + x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/tiers/api/Bronze\"" + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/tiers/api/Bronze + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 1,\n \"description\": \"Allows 1 request(s) per minute.\",\n \"name\": \"Bronze\",\n \"attributes\": {}\n}" + summary: | + Get details of a tier + description: | + This operation can be used to retrieve details of a single tier by specifying the tier level and tier name. + parameters: + - $ref: '#/parameters/tierName' + - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/requestedTenant' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Throttling Tier (Individual) + responses: + 200: + description: | + OK. + Tier returned + schema: + $ref: '#/definitions/Tier' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested Tier does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Tag Collection" resource API +###################################################### + /tags: + +#----------------------------------------------------- +# Retrieve the list of tags qualifying under a search condition +#----------------------------------------------------- + get: + x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/tags\"" + x-wso2-request: | + GET https://127.0.0.1:9443/api/am/store/v0.11/tags + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"weight\": 1,\n \"name\": \"mobile\"\n },\n {\n \"weight\": 1,\n \"name\": \"multimedia\"\n },\n {\n \"weight\": 1,\n \"name\": \"phone\"\n }\n ],\n \"count\": 3,\n \"next\": \"\"\n}" + summary: | + Get all tags + description: | + This operation can be used to retrieve a list of tags that are already added to APIs. + parameters: + - $ref: '#/parameters/limit' + - $ref: '#/parameters/offset' + - $ref: '#/parameters/requestedTenant' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + tags: + - Tag (Collection) + responses: + 200: + description: | + OK. + Tag list is returned. + schema: + $ref: '#/definitions/TagList' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +###################################################### +# Parameters - required by some of the APIs above +###################################################### +parameters: + +# Requested Tenant domain +# Specified as a header parameter + requestedTenant: + name: X-WSO2-Tenant + in: header + description: | + For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be + retirieved from. + required: false + type: string + +# API Identifier +# Specified as part of the path expression + apiId: + name: apiId + in: path + description: | + **API ID** consisting of the **UUID** of the API. + The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. + Should be formatted as **provider-name-version**. + required: true + type: string + +# API Identifier +# Specified as part of the query string + apiId-Q: + name: apiId + in: query + description: | + **API ID** consisting of the **UUID** of the API. + The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. + Should be formatted as **provider-name-version**. + required: true + type: string + +# API Identifier +# Specified as part of the path expression + language: + name: language + in: query + description: | + Programming language to generate SDK. + required: true + type: string + + +# Document Identifier +# Specified as part of the path expression + documentId: + name: documentId + in: path + description: | + Document Identifier + required: true + type: string + +# Application Identifier +# Specified as part of the path expression + applicationId: + name: applicationId + in: path + description: | + Application Identifier consisting of the UUID of the Application. + required: true + type: string + +# Application Identifier +# Specified as part of the query string + applicationId-Q: + name: applicationId + in: query + description: | + Application Identifier consisting of the UUID of the Application. + required: true + type: string + +# Group Identifier of the application + groupId: + name: groupId + in: query + description: | + Application Group Id + required: false + type: string + +# Subscription Identifier +# Specified as part of the path expression + subscriptionId: + name: subscriptionId + in: path + description: | + Subscription Id + required: true + type: string + +# Tier Name +# Specified as part of the path expression + tierName: + name: tierName + in: path + description: | + Tier name + required: true + type: string + +# Tier Type +# Specified as part of the path expression + tierLevel: + name: tierLevel + in: path + description: | + List API or Application type tiers. + type: string + enum: + - api + - application + required: true + +# Used for pagination: +# The maximum number of resoures to be returned by a GET + limit: + name: limit + in: query + description: | + Maximum size of resource array to return. + default: 25 + type: integer + +# Used for pagination: +# The order number of an instance in a qualified set of resoures +# at which to start to return the next batch of qualified resources + offset: + name: offset + in: query + description: | + Starting point within the complete list of items qualified. + default: 0 + type: integer + +# The HTTP Accept header + Accept: + name: Accept + in: header + description: | + Media types acceptable for the response. Default is application/json. + default: application/json + type: string + +# The HTTP Content-Type header + Content-Type: + name: Content-Type + in: header + description: | + Media type of the entity in the body. Default is application/json. + default: application/json + required: true + type : string + +# The HTTP If-None-Match header +# Used to avoid retrieving data that are already cached + If-None-Match: + name: If-None-Match + in: header + description: | + Validator for conditional requests; based on the ETag of the formerly retrieved + variant of the resourec. + type : string + +# The HTTP If-Modified-Since header +# Used to avoid retrieving data that are already cached + If-Modified-Since: + name: If-Modified-Since + in: header + description: | + Validator for conditional requests; based on Last Modified header of the + formerly retrieved variant of the resource. + type: string + +# The HTTP If-Match header +# Used to avoid concurrent updates + If-Match: + name: If-Match + in: header + description: | + Validator for conditional requests; based on ETag. + type: string + +# The HTTP If-Unmodified-Since header +# Used to avoid concurrent updates + If-Unmodified-Since: + name: If-Unmodified-Since + in: header + description: | + Validator for conditional requests; based on Last Modified header. + type: string + +###################################################### +# The resources used by some of the APIs above within the message body +###################################################### +definitions: + +#----------------------------------------------------- +# The API List resource +#----------------------------------------------------- + APIList: + title: API List + properties: + count: + type: integer + description: | + Number of APIs returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/apis?limit=1&offset=2&query=" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/apis?limit=1&offset=0&query=" + list: + type: array + items: + $ref: '#/definitions/APIInfo' + +#----------------------------------------------------- +# The API Info resource +#----------------------------------------------------- + APIInfo: + title: API Info object with basic API details. + properties: + id: + type: string + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorAPI + description: + type: string + example: A calculator API that supports basic operations + context: + type: string + example: CalculatorAPI + version: + type: string + example: 1.0.0 + provider: + description: | + If the provider value is not given, the user invoking the API will be used as the provider. + type: string + example: admin + status: + type: string + example: PUBLISHED + +#----------------------------------------------------- +# The API resource +#----------------------------------------------------- + API: + title: API object + required: + - name + - context + - version + - provider + - status + - apiDefinition + properties: + id: + type: string + description: | + UUID of the api registry artifact + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorAPI + description: + type: string + example: A calculator API that supports basic operations + context: + type: string + example: CalculatorAPI + version: + type: string + example: 1.0.0 + provider: + description: | + If the provider value is not given user invoking the api will be used as the provider. + type: string + example: admin + apiDefinition: + description: | + Swagger definition of the API which contains details about URI templates and scopes + type: string + example: "{\"paths\":{\"/substract\":{\"get\":{\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"parameters\":[{\"name\":\"x\",\"required\":true,\"type\":\"string\",\"in\":\"query\"},{\"name\":\"y\",\"required\":true,\"type\":\"string\",\"in\":\"query\"}],\"responses\":{\"200\":{}}}},\"/add\":{\"get\":{\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"parameters\":[{\"name\":\"x\",\"required\":true,\"type\":\"string\",\"in\":\"query\"},{\"name\":\"y\",\"required\":true,\"type\":\"string\",\"in\":\"query\"}],\"responses\":{\"200\":{}}}}},\"swagger\":\"2.0\",\"info\":{\"title\":\"CalculatorAPI\",\"version\":\"1.0.0\"}}" + wsdlUri: + description: | + WSDL URL if the API is based on a WSDL endpoint + type: string + example: "http://www.webservicex.com/globalweather.asmx?wsdl" + status: + type: string + example: PUBLISHED + isDefaultVersion: + type: boolean + example: false + transport: + type: array + items: + description: | + Supported transports for the API (http and/or https). + type: string + example: ["http","https"] + tags: + type: array + items: + type: string + example: ["substract","add"] + tiers: + type: array + items: + type: string + example: ["Unlimited"] + thumbnailUrl: + type: string + example: "" + endpointURLs: + type: array + items: + properties: + environmentName: + type: string + example: Production and Sandbox + environmentType: + type: string + example: hybrid + environmentURLs: + properties: + http: + type: string + description: HTTP environment URL + example: "http://192.168.56.1:8280/phoneverify/1.0.0" + https: + type: string + description: HTTPS environment URL + example: "https://192.168.56.1:8243/phoneverify/1.0.0" + businessInformation: + properties: + businessOwner: + type: string + example: businessowner + businessOwnerEmail: + type: string + example: businessowner@wso2.com + technicalOwner: + type: string + example: technicalowner + technicalOwnerEmail: + type: string + example: technicalowner@wso2.com + +#----------------------------------------------------- +# The Application List resource +#----------------------------------------------------- + ApplicationList: + title: Application List + properties: + count: + type: integer + description: | + Number of applications returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/applications?limit=1&offset=2&groupId=" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/applications?limit=1&offset=0&groupId=" + list: + type: array + items: + $ref: '#/definitions/ApplicationInfo' + +#----------------------------------------------------- +# The Application resource +#----------------------------------------------------- + Application: + title: Application + required: + - name + - throttlingTier + properties: + applicationId: + type: string + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorApp + subscriber: + description: | + If subscriber is not given user invoking the API will be taken as the subscriber. + type: string + example: admin + throttlingTier: + type: string + example: Unlimited + callbackUrl: + type: string + example: "" + description: + type: string + example: Sample calculator application + status: + type: string + example: APPROVED + default: "" + groupId: + type: string + example: "" + keys: + type: array + items: + $ref: '#/definitions/ApplicationKey' + example: [] + +#----------------------------------------------------- +# The Application Info resource +#----------------------------------------------------- + ApplicationInfo: + title: Application info object with basic application details + properties: + applicationId: + type: string + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorApp + subscriber: + type: string + example: admin + throttlingTier: + type: string + example: Unlimited + description: + type: string + example: Sample calculator application + status: + type: string + example: APPROVED + groupId: + type: string + example: "" + +#----------------------------------------------------- +# The Document List resource +#----------------------------------------------------- + DocumentList: + title: Document List + properties: + count: + type: integer + description: | + Number of Documents returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/apis/01234567-0123-0123-0123-012345678901/documents?limit=1&offset=2" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/apis/01234567-0123-0123-0123-012345678901/documents?limit=1&offset=0" + list: + type: array + items: + $ref: '#/definitions/Document' + +#----------------------------------------------------- +# The Document resource +#----------------------------------------------------- + Document: + title: Document + required: + - name + - type + - sourceType + properties: + documentId: + type: string + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: CalculatorDoc + type: + type: string + enum: + - HOWTO + - SAMPLES + - PUBLIC_FORUM + - SUPPORT_FORUM + - API_MESSAGE_FORMAT + - SWAGGER_DOC + - OTHER + example: HOWTO + summary: + type: string + example: "Summary of Calculator Documentation" + sourceType: + type: string + enum: + - INLINE + - URL + - FILE + example: INLINE + sourceUrl: + type: string + example: "" + otherTypeName: + type: string + example: "" + +#----------------------------------------------------- +# The Tier List resource +#----------------------------------------------------- + TierList: + title: Tier List + properties: + count: + type: integer + description: | + Number of Tiers returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/tiers/api?limit=1&offset=2" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/tiers/api?limit=1&offset=0" + list: + type: array + items: + $ref: '#/definitions/Tier' + +#----------------------------------------------------- +# The Tier resource +#----------------------------------------------------- + Tier: + title: Tier + required: + - name + - tierPlan + - requestCount + - unitTime + - stopOnQuotaReach + properties: + name: + type: string + example: Platinum + description: + type: string + example: "Allows 50 request(s) per minute." + tierLevel: + type: string + enum: + - api + - application + example: api + attributes: + description: | + Custom attributes added to the tier policy + type: object + additionalProperties: + type: string + example: {} + requestCount: + description: | + Maximum number of requests which can be sent within a provided unit time + type: integer + format: int64 + example: 50 + unitTime: + type: integer + format: int64 + example: 60000 + tierPlan: + description: | + This attribute declares whether this tier is available under commercial or free + type: string + enum: + - FREE + - COMMERCIAL + example: FREE + stopOnQuotaReach: + description: | + If this attribute is set to false, you are capabale of sending requests + even if the request count exceeded within a unit time + type: boolean + example: true + +#----------------------------------------------------- +# The Subscription List resource +#----------------------------------------------------- + SubscriptionList: + title: Subscription List + properties: + count: + type: integer + description: | + Number of Subscriptions returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/subscriptions?limit=1&offset=2&apiId=01234567-0123-0123-0123-012345678901&groupId=" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/subscriptions?limit=1&offset=0&apiId=01234567-0123-0123-0123-012345678901&groupId=" + list: + type: array + items: + $ref: '#/definitions/Subscription' + +#----------------------------------------------------- +# The Subscription resource +#----------------------------------------------------- + Subscription: + title: Subscription + required: + - applicationId + - apiIdentifier + - tier + properties: + subscriptionId: + type: string + example: 01234567-0123-0123-0123-012345678901 + applicationId: + type: string + example: 01234567-0123-0123-0123-012345678901 + apiIdentifier: + type: string + example: 01234567-0123-0123-0123-012345678901 + tier: + type: string + example: Unlimited + status: + type: string + enum: + - BLOCKED + - PROD_ONLY_BLOCKED + - UNBLOCKED + - ON_HOLD + - REJECTED + example: UNBLOCKED + +#----------------------------------------------------- +# The Tag resource +#----------------------------------------------------- + Tag: + title: Tag + required: + - name + - weight + properties: + name: + type: string + example: tag1 + weight: + type: integer + example: 5 + +#----------------------------------------------------- +# The Tag List resource +#----------------------------------------------------- + TagList: + title: Tag List + properties: + count: + type: integer + description: | + Number of Tags returned. + example: 1 + next: + type: string + description: | + Link to the next subset of resources qualified. + Empty if no more resources are to be returned. + example: "/tags?limit=1&offset=2" + previous: + type: string + description: | + Link to the previous subset of resources qualified. + Empty if current subset is the first subset returned. + example: "/tags?limit=1&offset=0" + list: + type: array + items: + $ref: '#/definitions/Tag' + +#----------------------------------------------------- +# The Error resource +#----------------------------------------------------- + Error: + title: Error object returned with 4XX HTTP status + required: + - code + - message + properties: + code: + type: integer + format: int64 + message: + type: string + description: Error message. + description: + type: string + description: | + A detail description about the error message. + moreInfo: + type: string + description: | + Preferably an url with more details about the error. + error: + type: array + description: | + If there are more than one error list them out. + For example, list out validation errors by each field. + items: + $ref: '#/definitions/ErrorListItem' + +#----------------------------------------------------- +# The Error List Item resource +#----------------------------------------------------- + ErrorListItem: + title: Description of Individual errors that may have occurred during a request. + required: + - code + - message + properties: + code: + type: string + message: + type: string + description: | + Description about Individual errors occurred + +#----------------------------------------------------- +# The Token resource +#----------------------------------------------------- + Token : + title: Token details for invoking APIs + properties: + accessToken: + type: string + description: Access token + example: 01234567890123456789012345678901 + tokenScopes: + type: array + items: + type: string + description: Valid scopes for the access token + example: ["default"] + validityTime: + type: integer + format: int64 + description: Maximum validity time for the access token + example: 3600 + +#----------------------------------------------------- +# The Application Key resource +#----------------------------------------------------- + ApplicationKey : + title: Application key details + properties: + consumerKey: + type: string + description: Consumer key of the application + example: vYDoc9s7IgAFdkSyNDaswBX7ejoa + consumerSecret: + type: string + description: Consumer secret of the application + example: TIDlOFkpzB7WjufO3OJUhy1fsvAa + supportedGrantTypes: + type: array + items: + type: string + description: Supported grant types for the application + example: ["client_credentials","password"] + keyState: + type: string + description: State of the key generation of the application + example: APPROVED + keyType: + description: Key type + type: string + enum: + - PRODUCTION + - SANDBOX + example: PRODUCTION + token: + $ref: '#/definitions/Token' + +#----------------------------------------------------- +# The Application Key Generation Request schema +#----------------------------------------------------- + ApplicationKeyGenerateRequest : + title: Application key generation request object + required: + - keyType + - validityTime + - accessAllowDomains + properties: + keyType: + type: string + enum: + - PRODUCTION + - SANDBOX + example: PRODUCTION + validityTime: + type: string + example: 3600 + callbackUrl: + type: string + description: Callback URL + example: "" + accessAllowDomains: + type: array + items: + type: string + description: Allowed domains for the access token + example: ["ALL"] + scopes: + type: array + items: + type: string + description: Allowed scopes for the access token + example: ["am_application_scope","default"] + +#----------------------------------------------------- +# END-OF-FILE +#----------------------------------------------------- \ No newline at end of file diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml index eb154f0102..040588814c 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml @@ -160,7 +160,9 @@ org.wso2.carbon.core.util, org.wso2.carbon.user.api, org.wso2.carbon.user.core.*, - org.wso2.carbon.utils.multitenancy + org.wso2.carbon.utils.multitenancy, + org.wso2.carbon.apimgt.integration.generated.client.publisher.api, + org.wso2.carbon.apimgt.integration.generated.client.publisher.model javax.ws.rs-api, diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java index 9e21d731f0..f7914d3d52 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java @@ -19,12 +19,11 @@ package org.wso2.carbon.apimgt.webapp.publisher; import feign.FeignException; +import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.*; import org.wso2.carbon.apimgt.integration.client.publisher.PublisherClient; -import org.wso2.carbon.apimgt.integration.client.publisher.model.*; import org.wso2.carbon.apimgt.webapp.publisher.config.WebappPublisherConfig; import org.wso2.carbon.apimgt.webapp.publisher.exception.APIManagerPublisherException; import org.wso2.carbon.apimgt.webapp.publisher.internal.APIPublisherDataHolder; -import org.wso2.carbon.base.MultitenantConstants; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.utils.multitenancy.MultitenantUtils; import java.util.*; @@ -105,8 +104,8 @@ public class APIPublisherServiceImpl implements APIPublisherService { api.setApiDefinition(APIPublisherUtil.getSwaggerDefinition(config)); api.setWsdlUri(null); api.setStatus(PUBLISHED_STATUS); - api.responseCaching("DISABLED"); - api.destinationStatsEnabled("false"); + api.setResponseCaching("DISABLED"); + api.setDestinationStatsEnabled("false"); api.isDefaultVersion(true); List transport = new ArrayList<>(); transport.add("https"); diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index b7ba0a2747..747dc0d394 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -34,6 +34,7 @@ http://wso2.org + org.wso2.carbon.apimgt.integration.generated.client org.wso2.carbon.apimgt.integration.client org.wso2.carbon.apimgt.webapp.publisher org.wso2.carbon.apimgt.application.extension diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index f21e091316..8bde4d8e06 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -315,22 +315,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv return enrolmentInfos; } - @Override - public List getDeviceEnrolledTenants() throws DeviceManagementException { - try { - DeviceManagementDAOFactory.openConnection(); - return deviceDAO.getDeviceEnrolledTenants(); - } catch (DeviceManagementDAOException e) { - throw new DeviceManagementException("Error occurred while retrieving the tenants " + - "which have device enrolled.", e); - } catch (SQLException e) { - throw new DeviceManagementException("Error occurred while opening a connection to the data source", e); - } finally { - DeviceManagementDAOFactory.closeConnection(); - } - } - - @Override public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException { DeviceManager deviceManager = this.getDeviceManager(deviceId.getType()); @@ -1295,6 +1279,21 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv return dms.getPolicyMonitoringManager(); } + @Override + public List getDeviceEnrolledTenants() throws DeviceManagementException { + try { + DeviceManagementDAOFactory.openConnection(); + return deviceDAO.getDeviceEnrolledTenants(); + } catch (DeviceManagementDAOException e) { + throw new DeviceManagementException("Error occurred while retrieving the tenants " + + "which have device enrolled.", e); + } catch (SQLException e) { + throw new DeviceManagementException("Error occurred while opening a connection to the data source", e); + } finally { + DeviceManagementDAOFactory.closeConnection(); + } + } + @Override public List getDevicesOfUser(String username) throws DeviceManagementException { List devices = new ArrayList<>(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java index fcd10a349e..9040af6654 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java @@ -23,6 +23,7 @@ import com.google.gson.Gson; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.task.DeviceMgtTaskException; @@ -33,6 +34,7 @@ import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import java.util.List; +import java.util.List; import java.util.Map; public class DeviceDetailsRetrieverTask implements Task { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/operation.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/operation.js index 127a0df064..e9c07ee0ba 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/operation.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/operation.js @@ -51,6 +51,16 @@ var operationModule = function () { feature["contentType"] = features[i].contentType; feature["deviceType"] = deviceType; feature["params"] = []; + var featuresEntry = utility.getDeviceTypeConfig(deviceType)["deviceType"]["features"]; + if (featuresEntry) { + var featureEntry = featuresEntry[features[i].code]; + if (featureEntry) { + var permissionEntry = featureEntry["permission"]; + if (permissionEntry) { + feature["permission"] = permissionEntry + } + } + } var metaData = features[i].metadataEntries; if (metaData) { for (var j = 0; j < metaData.length; j++) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js index 8de168ccea..d1b2838985 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js @@ -511,7 +511,7 @@ var userModule = function () { permissions["LIST_DEVICES"] = true; permissions["LIST_OWN_DEVICES"] = true; } - if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/owning-device")) { + if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/owning-device/view")) { permissions["LIST_OWN_DEVICES"] = true; } if (publicMethods.isAuthorized("/permission/admin/device-mgt/admin/groups/view")) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js index 50cbba4dca..beaa90c56b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js @@ -30,11 +30,15 @@ application.put("carbonServer", carbonServer); var permissions = { "/permission/admin/Login": ["ui.execute"], - "/permission/admin/manage/api/subscribe": ["ui.execute"] + "/permission/admin/device-mgt/device/api/subscribe": ["ui.execute"], + "/permission/admin/device-mgt/devices/enroll": ["ui.execute"], + "/permission/admin/device-mgt/devices/disenroll": ["ui.execute"], + "/permission/admin/device-mgt/devices/owning-device/view": ["ui.execute"] }; var adminPermissions = { - "/permission/admin": ["ui.execute"] + "/permission/admin/device-mgt": ["ui.execute"], + "/permission/admin/manage/api": ["ui.execute"] }; //On Startup, admin user will get both roles: devicemgt-admin and devicemgt-user diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml index e6c65be761..cdb768bd77 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml @@ -39,6 +39,10 @@ org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.integration.client + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.integration.generated.client + @@ -98,9 +102,15 @@ io.github.openfeign:feign-gson:${io.github.openfeign.version} + + io.github.openfeign:feign-slf4j:${io.github.openfeign.version} + org.wso2.carbon.devicemgt:org.wso2.carbon.apimgt.integration.client:${project.version} + + org.wso2.carbon.devicemgt:org.wso2.carbon.apimgt.integration.generated.client:${project.version} + @@ -108,11 +118,4 @@ - - - 1.5.4 - 4.4.10 - 9.3.1 - - diff --git a/pom.xml b/pom.xml index 3e745d19bd..4160e95ddc 100644 --- a/pom.xml +++ b/pom.xml @@ -205,6 +205,11 @@ org.wso2.carbon.apimgt.integration.client ${carbon.device.mgt.version} + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.integration.generated.client + ${carbon.device.mgt.version} + org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.annotations @@ -1914,6 +1919,7 @@ 9.3.1 + [9.3.1,10.0.0) 1.0.1 2.1.5