Commit 5efa435e authored by Mubeena Ishaq's avatar Mubeena Ishaq
Browse files

Update meep-app-support-client for App Support API v3.1.1

parent 8b83d4c5
Loading
Loading
Loading
Loading
+26 −2
Original line number Diff line number Diff line
# Go API client for client

MEC Application Support Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC011 Application Enablement API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.02.01_60/gs_MEC011v020201p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-app-enablement](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-app-enablement/server/app-support) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about applications in the network <p>**Note**<br>AdvantEDGE supports a selected subset of Application Support API endpoints (see below).
MEC Application Support Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC011 Application Enablement API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/03.01.01_60/gs_MEC011v030101p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-app-enablement](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-app-enablement/server/app-support) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about applications in the network <p>**Note**<br>AdvantEDGE supports a selected subset of Application Support API endpoints (see below).

## Overview
This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project.  By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client.

- API version: 2.2.1
- API version: 3.1.1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen

@@ -23,6 +23,10 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*MecAppSupportApi* | [**ApplicationsConfirmReadyPOST**](docs/MecAppSupportApi.md#applicationsconfirmreadypost) | **Post** /applications/{appInstanceId}/confirm_ready | 
*MecAppSupportApi* | [**ApplicationsConfirmTerminationPOST**](docs/MecAppSupportApi.md#applicationsconfirmterminationpost) | **Post** /applications/{appInstanceId}/confirm_termination | 
*MecAppSupportApi* | [**ApplicationsRegistrationDELETE**](docs/MecAppSupportApi.md#applicationsregistrationdelete) | **Delete** /registrations/{appInstanceId} |
*MecAppSupportApi* | [**ApplicationsRegistrationGET**](docs/MecAppSupportApi.md#applicationsregistrationget) | **Get** /registrations/{appInstanceId} |
*MecAppSupportApi* | [**ApplicationsRegistrationPUT**](docs/MecAppSupportApi.md#applicationsregistrationput) | **Put** /registrations/{appInstanceId} |
*MecAppSupportApi* | [**ApplicationsRegistrationsPOST**](docs/MecAppSupportApi.md#applicationsregistrationspost) | **Post** /registrations |
*MecAppSupportApi* | [**ApplicationsSubscriptionDELETE**](docs/MecAppSupportApi.md#applicationssubscriptiondelete) | **Delete** /applications/{appInstanceId}/subscriptions/{subscriptionId} | 
*MecAppSupportApi* | [**ApplicationsSubscriptionGET**](docs/MecAppSupportApi.md#applicationssubscriptionget) | **Get** /applications/{appInstanceId}/subscriptions/{subscriptionId} | 
*MecAppSupportApi* | [**ApplicationsSubscriptionsGET**](docs/MecAppSupportApi.md#applicationssubscriptionsget) | **Get** /applications/{appInstanceId}/subscriptions | 
@@ -39,25 +43,42 @@ Class | Method | HTTP request | Description

## Documentation For Models


 - [AppInfo](docs/AppInfo.md)
 - [AppProfile](docs/AppProfile.md)
 - [AppReadyConfirmation](docs/AppReadyConfirmation.md)
 - [AppTerminationConfirmation](docs/AppTerminationConfirmation.md)
 - [AppTerminationNotification](docs/AppTerminationNotification.md)
 - [AppTerminationNotificationLinks](docs/AppTerminationNotificationLinks.md)
 - [AppTerminationNotificationSubscription](docs/AppTerminationNotificationSubscription.md)
 - [CategoryRef](docs/CategoryRef.md)
 - [CurrentTime](docs/CurrentTime.md)
 - [DestinationInterface](docs/DestinationInterface.md)
 - [DestinationInterfaceInterfaceType](docs/DestinationInterfaceInterfaceType.md)
 - [DnsRule](docs/DnsRule.md)
 - [DnsRuleIpAddressType](docs/DnsRuleIpAddressType.md)
 - [DnsRuleState](docs/DnsRuleState.md)
 - [EndPointInfoAddress](docs/EndPointInfoAddress.md)
 - [EndPointInfoAddresses](docs/EndPointInfoAddresses.md)
 - [EndPointInfoAlternative](docs/EndPointInfoAlternative.md)
 - [EndPointInfoFqdn](docs/EndPointInfoFqdn.md)
 - [EndPointInfoUris](docs/EndPointInfoUris.md)
 - [FeatureDependency](docs/FeatureDependency.md)
 - [LinkType](docs/LinkType.md)
 - [LinkTypeConfirmTermination](docs/LinkTypeConfirmTermination.md)
 - [MecAppSuptApiSubscriptionLinkList](docs/MecAppSuptApiSubscriptionLinkList.md)
 - [MecAppSuptApiSubscriptionLinkListLinks](docs/MecAppSuptApiSubscriptionLinkListLinks.md)
 - [MecAppSuptApiSubscriptionLinkListSubscription](docs/MecAppSuptApiSubscriptionLinkListSubscription.md)
 - [OneOfAppInfoEndpoint](docs/OneOfAppInfoEndpoint.md)
 - [OneOfAppProfileEndPt](docs/OneOfAppProfileEndPt.md)
 - [OperationActionType](docs/OperationActionType.md)
 - [ProblemDetails](docs/ProblemDetails.md)
 - [SecurityInfo](docs/SecurityInfo.md)
 - [SecurityInfoOAuth2Info](docs/SecurityInfoOAuth2Info.md)
 - [SecurityInfoOAuth2InfoGrantType](docs/SecurityInfoOAuth2InfoGrantType.md)
 - [Self](docs/Self.md)
 - [SerializerType](docs/SerializerType.md)
 - [ServiceDependency](docs/ServiceDependency.md)
 - [TimeSourceStatus](docs/TimeSourceStatus.md)
 - [TimingCaps](docs/TimingCaps.md)
 - [TimingCapsNtpServers](docs/TimingCapsNtpServers.md)
@@ -70,6 +91,9 @@ Class | Method | HTTP request | Description
 - [TrafficRuleAction](docs/TrafficRuleAction.md)
 - [TrafficRuleFilterType](docs/TrafficRuleFilterType.md)
 - [TrafficRuleState](docs/TrafficRuleState.md)
 - [TransportDependency](docs/TransportDependency.md)
 - [TransportDescriptor](docs/TransportDescriptor.md)
 - [TransportType](docs/TransportType.md)
 - [TunnelInfo](docs/TunnelInfo.md)
 - [TunnelInfoTunnelType](docs/TunnelInfoTunnelType.md)

+1571 −890

File changed.

Preview size limit exceeded, changes collapsed.

+130 −2
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@
 *
 * AdvantEDGE MEC Application Support API
 *
 * MEC Application Support Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC011 Application Enablement API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.02.01_60/gs_MEC011v020201p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-app-enablement](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-app-enablement/server/app-support) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about applications in the network <p>**Note**<br>AdvantEDGE supports a selected subset of Application Support API endpoints (see below).
 * MEC Application Support Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC011 Application Enablement API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/03.01.01_60/gs_MEC011v030101p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-app-enablement](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-app-enablement/server/app-support) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about applications in the network <p>**Note**<br>AdvantEDGE supports a selected subset of Application Support API endpoints (see below).
 *
 * API version: 2.2.1
 * API version: 3.1.1
 * Contact: AdvantEDGE@InterDigital.com
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 */
@@ -290,6 +290,134 @@ func (a *MecAppSupportApiService) ApplicationsConfirmTerminationPOST(ctx context
	return localVarHttpResponse, nil
}

/*
MecAppSupportApiService
The POST method may be used by the MEC application instance to request its registration to the MEC platform.
  - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  - @param "Body" (optional.Interface of AppInfo) -  The message content in the request contains the profile of the MEC application instance, calling the MEC platform to register the MEC application instance.
  - @return AppInfo
*/
func (a *MecAppSupportApiService) ApplicationsRegistrationsPOST(ctx context.Context, body AppInfo) (*http.Response, error) {
	var (
		localVarHttpMethod  = strings.ToUpper("Post")
		localVarPostBody    interface{}
		localVarFileName    string
		localVarFileBytes   []byte
		localVarReturnValue AppInfo
	)

	// create path and map variables
	localVarPath := a.client.cfg.BasePath + "/registrations"

	localVarHeaderParams := make(map[string]string)
	localVarQueryParams := url.Values{}
	localVarFormParams := url.Values{}

	// to determine the Content-Type header
	localVarHttpContentTypes := []string{"application/json"}

	// set Content-Type header
	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
	if localVarHttpContentType != "" {
		localVarHeaderParams["Content-Type"] = localVarHttpContentType
	}

	// to determine the Accept header
	localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"}

	// set Accept header
	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
	if localVarHttpHeaderAccept != "" {
		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
	}
	// body params
	localVarPostBody = &body

	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
	if err != nil {
		return nil, err
	}

	localVarHttpResponse, err := a.client.callAPI(r)
	if err != nil || localVarHttpResponse == nil {
		return localVarHttpResponse, err
	}

	localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
	localVarHttpResponse.Body.Close()
	if err != nil {
		return localVarHttpResponse, err
	}

	if localVarHttpResponse.StatusCode < 300 {
		// If we succeed, return the data, otherwise pass on to decode error.
		err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
		if err == nil {
			return localVarHttpResponse, err
		}
	}

	if localVarHttpResponse.StatusCode >= 300 {
		newErr := GenericSwaggerError{
			body:  localVarBody,
			error: localVarHttpResponse.Status,
		}
		if localVarHttpResponse.StatusCode == 201 {
			var v AppInfo
			err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
			if err != nil {
				newErr.error = err.Error()
				return localVarHttpResponse, newErr
			}
			newErr.model = v
			return localVarHttpResponse, newErr
		}
		if localVarHttpResponse.StatusCode == 400 {
			var v ProblemDetails
			err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
			if err != nil {
				newErr.error = err.Error()
				return localVarHttpResponse, newErr
			}
			newErr.model = v
			return localVarHttpResponse, newErr
		}
		if localVarHttpResponse.StatusCode == 401 {
			var v ProblemDetails
			err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
			if err != nil {
				newErr.error = err.Error()
				return localVarHttpResponse, newErr
			}
			newErr.model = v
			return localVarHttpResponse, newErr
		}
		if localVarHttpResponse.StatusCode == 403 {
			var v ProblemDetails
			err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
			if err != nil {
				newErr.error = err.Error()
				return localVarHttpResponse, newErr
			}
			newErr.model = v
			return localVarHttpResponse, newErr
		}
		if localVarHttpResponse.StatusCode == 404 {
			var v ProblemDetails
			err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
			if err != nil {
				newErr.error = err.Error()
				return localVarHttpResponse, newErr
			}
			newErr.model = v
			return localVarHttpResponse, newErr
		}
		return localVarHttpResponse, newErr
	}

	return localVarHttpResponse, nil
}

/*
MecAppSupportApiService
This method deletes a mecAppSuptApiSubscription. This method is typically used in \&quot;Unsubscribing from service availability event notifications\&quot; procedure.
+2 −2
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@
 *
 * AdvantEDGE MEC Application Support API
 *
 * MEC Application Support Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC011 Application Enablement API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.02.01_60/gs_MEC011v020201p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-app-enablement](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-app-enablement/server/app-support) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about applications in the network <p>**Note**<br>AdvantEDGE supports a selected subset of Application Support API endpoints (see below).
 * MEC Application Support Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC011 Application Enablement API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/03.01.01_60/gs_MEC011v030101p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-app-enablement](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-app-enablement/server/app-support) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about applications in the network <p>**Note**<br>AdvantEDGE supports a selected subset of Application Support API endpoints (see below).
 *
 * API version: 2.2.1
 * API version: 3.1.1
 * Contact: AdvantEDGE@InterDigital.com
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 */
+3 −3
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@
 *
 * AdvantEDGE MEC Application Support API
 *
 * MEC Application Support Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC011 Application Enablement API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.02.01_60/gs_MEC011v020201p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-app-enablement](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-app-enablement/server/app-support) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about applications in the network <p>**Note**<br>AdvantEDGE supports a selected subset of Application Support API endpoints (see below).
 * MEC Application Support Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC011 Application Enablement API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/03.01.01_60/gs_MEC011v030101p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-app-enablement](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-app-enablement/server/app-support) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about applications in the network <p>**Note**<br>AdvantEDGE supports a selected subset of Application Support API endpoints (see below).
 *
 * API version: 2.2.1
 * API version: 3.1.1
 * Contact: AdvantEDGE@InterDigital.com
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 */
@@ -52,7 +52,7 @@ var (
	xmlCheck  = regexp.MustCompile("(?i:[application|text]/xml)")
)

// APIClient manages communication with the AdvantEDGE MEC Application Support API API v2.2.1
// APIClient manages communication with the AdvantEDGE MEC Application Support API API v3.1.1
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
	cfg    *Configuration
Loading